:root {
  --saffron: #f7931e;
  --saffron-deep: #df7410;
  --gold: #efb653;
  --ink: #171c24;
  --muted: #66707c;
  --cream: #fff8ed;
  --paper: #ffffff;
  --line: #eadfce;
  --shadow: 0 18px 50px rgba(28, 22, 14, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--saffron) #ebe7e1; }
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: #ebe7e1; }
html::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--saffron), var(--saffron-deep)); border: 2px solid #ebe7e1; border-radius: 999px; }
html::-webkit-scrollbar-thumb:hover { background: var(--saffron-deep); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.72;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
h1, h2, h3, h4 { margin: 0 0 1rem; line-height: 1.12; font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
h1 { font-size: clamp(2.6rem, 7vw, 6rem); letter-spacing: -.05em; }
h2 { font-size: clamp(2rem, 4vw, 3.55rem); letter-spacing: -.035em; }
h3 { font-size: 1.28rem; }
ul { margin-top: 0; }

.container { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 999; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.eyebrow { color: var(--saffron); font-size: .82rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.site-header { position: sticky; inset: 0 0 auto; z-index: 100; background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(20,24,31,.06); transition: box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 10px 35px rgba(24,20,14,.10); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 250px; }
.brand img { width: 66px; height: 66px; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-size: .94rem; }
.brand-copy small { color: var(--saffron-deep); font-weight: 800; font-size: .78rem; margin-top: 5px; text-transform: uppercase; letter-spacing: .08em; }
.primary-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.primary-nav a { position: relative; padding: 29px 0 25px; color: #24252a; font-weight: 750; font-size: .94rem; }
.primary-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 15px; height: 2px; background: var(--ink); transition: right .2s ease; }
.primary-nav a:hover, .primary-nav a.active { color: var(--saffron); }
.primary-nav a:hover::after, .primary-nav a.active::after { right: 0; }
.menu-toggle { display: none; border: 0; width: 46px; height: 46px; border-radius: 50%; background: #f3f3f3; padding: 13px; cursor: pointer; }
.menu-toggle span { height: 2px; width: 100%; display: block; background: var(--ink); margin: 4px 0; }

.home-hero { position: relative; min-height: calc(100vh - 82px); display: grid; align-items: center; isolation: isolate; overflow: hidden; background: #23180d url('../images/ashram-hero.png') center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(247,147,30,.96) 0%, rgba(224,113,11,.78) 42%, rgba(20,20,18,.12) 72%, rgba(15,18,18,.18) 100%); }
.hero-content { padding-block: 90px 120px; }
.home-hero .eyebrow { color: #fff; font-size: .96rem; text-transform: none; letter-spacing: 0; }
.home-hero h1 { max-width: 820px; text-transform: uppercase; color: #171d26; font-weight: 950; }
.home-hero h1 span { color: #fff; }
.hero-lead { max-width: 650px; font-size: 1.07rem; color: rgba(255,255,255,.94); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-mark { position: absolute; right: 4vw; bottom: -5vw; z-index: -1; color: rgba(255,255,255,.09); font-size: clamp(14rem, 30vw, 34rem); line-height: .8; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 12px 24px; border: 1px solid transparent; border-radius: 999px; font-weight: 800; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(0,0,0,.15); }
.button-light { background: #fff; color: var(--ink); }
.button-outline { border-color: rgba(255,255,255,.72); color: #fff; }
.button-dark { background: var(--ink); color: #fff; }
.button-saffron { background: var(--saffron); color: #fff; }

.inner-hero { min-height: 300px; display: grid; align-items: center; text-align: center; color: #fff; position: relative; background: linear-gradient(rgba(9,18,18,.52), rgba(9,18,18,.52)), url('../images/ashram-hero.png') center 58%/cover no-repeat; }
.inner-hero h1 { font-size: clamp(2.6rem, 5vw, 4.5rem); }
.inner-hero .eyebrow { color: #ffd18b; }
.breadcrumb { display: inline-flex; gap: 10px; align-items: center; padding: 10px 20px; background: #fff; color: var(--saffron-deep); font-weight: 800; border-radius: 999px; }
.breadcrumb a:hover { color: var(--ink); }

.section { padding: 96px 0; }
.section-soft { background: var(--cream); }
.section-dark { background: var(--ink); color: #fff; }
.section-heading { max-width: 760px; margin-bottom: 44px; }
.section-heading.center { text-align: center; margin-inline: auto; }
.section-heading p:last-child { color: var(--muted); font-size: 1.05rem; }
.section-dark .section-heading p:last-child { color: #bbc1ca; }
.lead { font-size: clamp(1.12rem, 2vw, 1.35rem); color: #353c46; }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 88px); align-items: center; }
.content-panel { padding: clamp(30px, 5vw, 58px); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.content-panel.accent { background: var(--saffron); color: #171c24; }
.quote { font-family: Georgia, serif; font-size: 1.65rem; line-height: 1.45; }
.check-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 31px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--saffron); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 900; top: .18em; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid #eee4d6; border-radius: var(--radius); padding: 32px; box-shadow: 0 14px 40px rgba(35,26,15,.07); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-number { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--saffron); color: #fff; font-weight: 900; margin-bottom: 22px; }
.card p { color: var(--muted); }
.card .text-link { color: var(--saffron-deep); font-weight: 800; }
.event-card { padding: 0; overflow: hidden; }
.event-card .event-top { min-height: 145px; padding: 30px; color: #fff; display: flex; flex-direction: column; justify-content: end; background: linear-gradient(145deg, rgba(247,147,30,.94), rgba(89,49,15,.65)), url('../images/ashram-hero.png') center/cover; }
.event-card .event-body { padding: 26px 30px 30px; }
.event-date { font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.activity-cards { align-items: stretch; }
.activity-card { display: flex; flex-direction: column; }
.activity-card p { flex: 1; }
.activity-marker { height: 64px; min-width: 64px; padding: 14px; border-radius: 50%; background: linear-gradient(145deg, var(--saffron), var(--saffron-deep)); box-shadow: 0 10px 24px rgba(223,116,16,.25); transition: transform .2s ease; }
.activity-marker svg { display: block; width: 100%; height: 100%; }
.activity-card:hover .activity-marker { transform: translateY(-3px) rotate(-3deg); }
.read-more { align-self: flex-start; margin-top: 10px; }
.activity-dialog { width: min(760px, calc(100% - 32px)); max-height: min(82vh, 820px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.activity-dialog::backdrop { background: rgba(8, 11, 15, .76); backdrop-filter: blur(4px); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px 30px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.25rem); }
.dialog-close { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.dialog-body { padding: 28px 30px 12px; }
.dialog-body p { color: #3f4853; }
.dialog-footer { display: flex; justify-content: flex-end; padding: 10px 30px 28px; }
body.dialog-open { overflow: hidden; }
.feature-band { display: grid; grid-template-columns: repeat(4, 1fr); }
.feature-item { min-height: 245px; padding: 36px; border-right: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; justify-content: space-between; }
.feature-item:last-child { border-right: 0; }
.feature-item b { color: var(--saffron); font-size: 2.2rem; }

.split-image { min-height: 520px; border-radius: var(--radius); background: url('../images/ashram-hero.png') 68% center/cover no-repeat; box-shadow: var(--shadow); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.stat { border-left: 3px solid var(--saffron); padding-left: 16px; }
.stat strong { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .87rem; }

.timeline { display: grid; gap: 20px; max-width: 900px; }
.timeline-item { display: grid; grid-template-columns: 170px 1fr; gap: 32px; padding: 28px; background: #fff; border-radius: 14px; border: 1px solid var(--line); }
.timeline-item time { color: var(--saffron-deep); font-weight: 900; }
.timeline-item p:last-child { margin-bottom: 0; color: var(--muted); }

.gallery-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; grid-auto-rows: 230px; gap: 18px; }
.gallery-tile { position: relative; overflow: hidden; border-radius: var(--radius); background: url('../images/ashram-hero.png') center/cover; }
.gallery-tile:first-child { grid-row: span 2; }
.gallery-tile:nth-child(2) { background-position: 80% 40%; }
.gallery-tile:nth-child(3) { background-position: 46% 60%; }
.gallery-tile:nth-child(4) { grid-column: span 2; background-position: 68% 70%; }
.gallery-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 42%, rgba(16,18,20,.88)); }
.gallery-tile span { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 20px; color: #fff; font-weight: 850; font-size: 1.15rem; }

.language-block + .language-block { margin-top: 70px; padding-top: 70px; border-top: 1px solid var(--line); }
.tamil { font-family: "Nirmala UI", Latha, sans-serif; }
.tamil p, .tamil li { line-height: 1.95; }
.prose { max-width: 880px; }
.prose h2 { margin-top: 2.3rem; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: #4b545f; }

.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.media-card { min-height: 320px; position: relative; border-radius: var(--radius); overflow: hidden; padding: 34px; display: flex; flex-direction: column; justify-content: end; color: #fff; background: linear-gradient(0deg, rgba(18,20,23,.94), rgba(18,20,23,.08)), url('../images/ashram-hero.png') center/cover; }
.media-card:nth-child(2) { background-position: 80% center; }
.media-card:nth-child(3) { background-position: 42% center; }
.media-card:nth-child(4) { background-position: 65% 70%; }
.media-card p { color: #d8dce1; margin: 0; }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; align-items: start; }
.contact-details { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 42px; }
.contact-details p { color: #c7ccd4; }
.contact-details a { font-weight: 800; word-break: break-word; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 800; font-size: .9rem; }
.field input, .field textarea { width: 100%; border: 1px solid #ded5c8; border-radius: 10px; padding: 13px 15px; color: var(--ink); font: inherit; background: #fffdfa; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid rgba(247,147,30,.2); border-color: var(--saffron); }
.captcha-field small { color: #6f6257; font-size: .82rem; }
.captcha-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.captcha-row img { display: block; max-width: 100%; border: 1px solid #ded5c8; border-radius: 10px; background: #fffaf1; }
.captcha-refresh { border: 0; padding: 8px 2px; color: #9c4c09; background: transparent; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.captcha-refresh:hover { color: var(--saffron); }
.captcha-refresh:focus-visible { outline: 3px solid rgba(247,147,30,.25); outline-offset: 3px; border-radius: 4px; }
.honeypot { position: absolute !important; left: -10000px !important; }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; }
.alert-success { background: #e8f8ed; color: #176b31; }
.alert-error { background: #fff0ed; color: #a52b1c; }
.alert ul { margin-bottom: 0; }

.map-card { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: #eee; }
.map-card iframe { display: block; width: 100%; height: 520px; border: 0; }
.visit-details { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; }

.enquiry-strip { background: var(--saffron); padding: 48px 0; }
.enquiry-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.enquiry-strip .eyebrow { color: #5f2e00; }
.enquiry-strip h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.5rem); }
.site-footer { background: #11151c; color: #d0d4db; padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr .75fr .75fr 1.1fr; gap: 45px; padding-bottom: 55px; }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer h2 { font-size: 1.2rem; }
.site-footer h3 { font-size: 1.05rem; }
.footer-logo { width: 86px; height: 86px; object-fit: contain; background: #fff; border-radius: 50%; margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin: 9px 0; }
.site-footer a:hover { color: var(--saffron); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: .9rem; }
.footer-bottom p { margin: 0; }
.back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; background: var(--saffron); box-shadow: 0 12px 32px rgba(15,18,24,.28); opacity: 0; visibility: hidden; transform: translateY(18px) scale(.9); pointer-events: none; transition: opacity .24s ease, visibility .24s ease, transform .24s ease, background .2s ease; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { color: #fff; background: var(--ink); }
.back-to-top:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.back-to-top svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1020px) {
  .brand { min-width: 0; }
  .brand-copy { display: none; }
  .primary-nav { gap: 15px; }
  .primary-nav a { font-size: .86rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .feature-band { grid-template-columns: repeat(2, 1fr); }
  .feature-item:nth-child(2) { border-right: 0; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .header-inner { min-height: 72px; }
  .brand img { width: 58px; height: 58px; }
  .menu-toggle { display: block; z-index: 2; }
  .primary-nav { position: fixed; inset: 72px 0 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 20px 28px 40px; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; overflow-y: auto; }
  .primary-nav.open { transform: translateX(0); visibility: visible; }
  .primary-nav a { padding: 14px 6px; border-bottom: 1px solid #eee; font-size: 1.05rem; }
  .primary-nav a::after { display: none; }
  .home-hero { min-height: 760px; background-position: 63% center; }
  .hero-overlay { background: linear-gradient(90deg, rgba(238,131,16,.96), rgba(214,101,5,.72)), linear-gradient(0deg, rgba(15,18,19,.32), transparent); }
  .home-hero h1 { font-size: clamp(3rem, 12vw, 5rem); }
  .two-column, .contact-grid, .visit-details { grid-template-columns: 1fr; }
  .two-column .split-image { order: -1; min-height: 400px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-tile:first-child { grid-row: span 1; }
  .gallery-tile:nth-child(4) { grid-column: span 1; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .enquiry-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 28px, 1140px); }
  .section { padding: 72px 0; }
  .cards, .feature-band, .media-grid, .form-grid, .gallery-grid, .footer-grid { grid-template-columns: 1fr; }
  .feature-item { min-height: 200px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .feature-item:last-child { border-bottom: 0; }
  .inner-hero { min-height: 260px; }
  .inner-hero h1 { font-size: 2.65rem; }
  .breadcrumb { font-size: .86rem; }
  .hero-actions .button { width: 100%; }
  .home-hero h1 { font-size: clamp(2.75rem, 15vw, 4.3rem); }
  .home-hero { min-height: 720px; }
  .hero-content { padding-block: 70px 90px; }
  .stat-row { grid-template-columns: 1fr; }
  .contact-details, .card { padding: 26px; }
  .dialog-header { padding: 22px 20px 16px; }
  .dialog-body { padding: 22px 20px 8px; }
  .dialog-footer { padding: 8px 20px 22px; }
  .map-card iframe { height: 420px; }
  .footer-grid > div:last-child, .footer-about { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 20px 0; }
  .back-to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
