/* Layout: kolam dot-grid hero beside the thesis; quiet left-aligned sections; the amber kolam is the only loud thing. Brand mark is the thin-line bulb with plus signs. */
:root {
  --lagoon-bg: #EEF3F1;
  --surface: #FFFFFF;
  --ink: #17231F;
  --ink-soft: #4C5D57;
  --line: #CFDAD6;
  --lagoon: #0D5C66;
  --jaggery: #C98A12;
  --dot: #8EA39C;
  --danger: #B3261E;
  --ok: #1E7A4C;
  --font-display: "Catamaran", "Hind Madurai", system-ui, sans-serif;
  --font-body: "Hind Madurai", "Catamaran", system-ui, sans-serif;
  --font-brand: "Josefin Sans", "Catamaran", system-ui, sans-serif;
  --step--1: 0.875rem; --step-0: 1.0625rem; --step-1: 1.3125rem; --step-2: 1.75rem; --step-3: 2.5rem; --step-4: clamp(2.6rem, 6vw, 4.5rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lagoon-bg: #0B1A1C; --surface: #11262A; --ink: #E7EFEC; --ink-soft: #A3B5AF; --line: #24403F;
    --lagoon: #6FC3C9; --jaggery: #EDB341; --dot: #4F6B67; --danger: #F2928B; --ok: #7FD3A6; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --lagoon-bg: #0B1A1C; --surface: #11262A; --ink: #E7EFEC; --ink-soft: #A3B5AF; --line: #24403F;
  --lagoon: #6FC3C9; --jaggery: #EDB341; --dot: #4F6B67; --danger: #F2928B; --ok: #7FD3A6; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--lagoon-bg); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--lagoon-bg); }
a { color: var(--lagoon); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--jaggery); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.ta { font-family: "Catamaran", "Hind Madurai", sans-serif; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand .wm { display: grid; line-height: 1; }
.brand .wm b { font-family: var(--font-brand); font-weight: 600; font-size: 1.05rem; letter-spacing: .2em; }
.brand .wm small { font-family: var(--font-brand); font-size: .56rem; letter-spacing: .16em; color: var(--ink-soft); margin-top: 4px; }

/* Nav */
header.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--lagoon-bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font-weight: 500; }
.nav ul a { color: var(--ink-soft); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav ul a:hover, .nav ul a.active { color: var(--ink); border-bottom-color: var(--jaggery); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.cta-small { background: var(--ink); color: var(--lagoon-bg); padding: 8px 16px; border-radius: 999px; border: 0; font-weight: 600; font-size: var(--step--1); white-space: nowrap; }
.menu-btn { display: none; background: transparent; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 40px; color: var(--ink); align-items: center; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-menu { border-top: 1px solid var(--line); }
.mobile-menu ul { list-style: none; margin: 0; padding: 8px 0 16px; display: grid; }
.mobile-menu a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step-1); border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .nav ul.desktop { display: none; } .menu-btn { display: inline-flex; } }
@media (max-width: 420px) { .brand .wm small { display: none; } .cta-small { padding: 8px 12px; } }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-block: 64px 72px; }
.hero h1 { font-size: var(--step-4); font-weight: 900; }
.hero .tamil { font-size: var(--step-2); font-weight: 700; color: var(--lagoon); margin-top: 20px; line-height: 1.3; }
.hero .tamil small { display: block; font-family: var(--font-body); font-size: var(--step--1); color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.hero .lede { margin-top: 24px; max-width: 34em; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-size: var(--step-0); line-height: 1.3; }
.btn.primary { background: var(--ink); color: var(--lagoon-bg); }
.btn:hover { transform: translateY(-1px); }
.btn.small { padding: 7px 16px; font-size: var(--step--1); border-width: 1.5px; }
.kolam-box { margin: 0; min-width: 0; }
.kolam-box svg { width: 100%; max-width: 520px; height: auto; display: block; margin-inline: auto; touch-action: none; }
.kolam-box figcaption { text-align: center; font-size: var(--step--1); color: var(--ink-soft); margin-top: 8px; }
.kolam-box .reset { background: none; border: 0; color: var(--lagoon); text-decoration: underline; text-underline-offset: 3px; padding: 0; font-size: inherit; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 40px 56px; gap: 32px; } .kolam-box svg { max-width: 380px; } }

/* Sections */
section.band { border-top: 1px solid var(--line); }
section.band > .wrap { padding-block: 80px; }
.sec-head { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; margin-bottom: 48px; }
.sec-head h2 { font-size: var(--step-3); font-weight: 800; }
.sec-head p { color: var(--ink-soft); max-width: 38em; font-size: var(--step-1); line-height: 1.55; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; } section.band > .wrap { padding-block: 56px; } }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.about-grid .statement { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1.3; }
.about-grid .statement + .statement { margin-top: 24px; color: var(--ink-soft); font-weight: 500; font-size: var(--step-1); font-family: var(--font-body); line-height: 1.6; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.values li { padding-block: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.values li:last-child { border-bottom: 1px solid var(--line); }
.values .plus { font-family: var(--font-brand); color: var(--jaggery); font-size: 1.6rem; line-height: 1; font-weight: 600; }
.values strong { font-family: var(--font-display); font-size: var(--step-1); display: block; line-height: 1.3; }
.values span { color: var(--ink-soft); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Focus areas */
.focus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.focus > div { padding: 24px 24px 28px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.focus > div:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.focus .tw { font-family: var(--font-display); font-size: var(--step-3); font-weight: 800; color: var(--jaggery); line-height: 1.1; }
.focus h3 { font-size: var(--step-1); font-weight: 700; }
.focus p { color: var(--ink-soft); }
.focus .link { justify-self: start; margin-top: 6px; background: none; border: 0; padding: 0; color: var(--lagoon); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; font-size: var(--step--1); }
@media (max-width: 860px) { .focus { grid-template-columns: repeat(2, minmax(0,1fr)); } .focus > div:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; } .focus > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); } }
@media (max-width: 520px) { .focus { grid-template-columns: 1fr; } .focus > div:nth-child(even) { padding-left: 0; border-left: 0; } }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); counter-reset: s; }
.steps li { counter-increment: s; padding: 0 20px 0 0; position: relative; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(s); font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--lagoon); color: var(--lagoon); position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 21px; left: 44px; right: 0; border-top: 2px dotted var(--dot); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: var(--step-1); font-weight: 700; margin-top: 8px; }
.steps p { color: var(--ink-soft); font-size: var(--step--1); line-height: 1.6; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { grid-template-columns: 44px 1fr; column-gap: 16px; padding: 0; }
  .steps li::before { grid-row: span 2; }
  .steps li::after { top: 48px; bottom: -24px; left: 21px; right: auto; border-top: 0; border-left: 2px dotted var(--dot); }
  .steps h3 { margin-top: 6px; }
}

/* Programmes */
.program { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 32px; align-items: start; padding-block: 28px; border-top: 1px solid var(--line); }
.program:last-child { border-bottom: 1px solid var(--line); }
.program h3 { font-size: var(--step-2); font-weight: 800; }
.program .who { display: block; font-size: var(--step--1); font-weight: 600; color: var(--lagoon); margin-top: 6px; }
.program p { color: var(--ink-soft); max-width: 36em; }
.program details { margin-top: 12px; }
.program summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: var(--step--1); }
.program details ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: var(--step--1); display: grid; gap: 4px; }
.program .btn { white-space: nowrap; }
@media (max-width: 760px) { .program { grid-template-columns: 1fr; gap: 10px; } .program .btn { justify-self: start; } }

/* Get involved */
.involve { background: var(--lagoon); color: var(--lagoon-bg); }
.involve .wrap { padding-block: 80px; display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.involve h2 { font-size: var(--step-3); font-weight: 800; }
.involve .intro { margin-top: 16px; opacity: .9; max-width: 28em; }
.involve ul { list-style: none; margin: 0; padding: 0; display: grid; }
.involve li { border-top: 1px solid color-mix(in srgb, var(--lagoon-bg) 30%, transparent); }
.involve li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--lagoon-bg) 30%, transparent); }
.involve li button { width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 18px 0; display: grid; grid-template-columns: 11em 1fr auto; gap: 20px; align-items: center; }
.involve li button:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.involve li strong { font-family: var(--font-display); font-size: var(--step-1); font-weight: 700; line-height: 1.3; }
.involve li span { opacity: .9; }
.involve li .go { font-family: var(--font-brand); font-size: 1.6rem; line-height: 1; opacity: 1; }
@media (max-width: 860px) { .involve .wrap { grid-template-columns: 1fr; padding-block: 56px; gap: 28px; } .involve li button { grid-template-columns: 1fr auto; gap: 4px 16px; } .involve li span:not(.go) { grid-column: 1; } .involve li .go { grid-row: 1 / span 2; grid-column: 2; } }

/* FAQ */
.faq { display: grid; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-brand); font-size: 1.6rem; color: var(--jaggery); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 0 22px; color: var(--ink-soft); max-width: 44em; }

/* Newsletter */
.news { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center; }
.news h2 { font-size: var(--step-2); font-weight: 800; }
.news p { color: var(--ink-soft); margin-top: 8px; }
.news form { display: flex; gap: 10px; flex-wrap: wrap; }
.news input { flex: 1 1 220px; min-width: 0; }
.news .msg { flex-basis: 100%; font-size: var(--step--1); }
@media (max-width: 760px) { .news { grid-template-columns: 1fr; padding: 24px; gap: 20px; } }

/* Inputs */
input, select, textarea { font: inherit; color: var(--ink); background: var(--lagoon-bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lagoon) 25%, transparent); }
textarea { min-height: 130px; resize: vertical; }
[aria-invalid="true"] { border-color: var(--danger); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field .hint { font-size: .8rem; color: var(--ink-soft); }
.field .err { font-size: .8rem; color: var(--danger); min-height: 0; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--danger); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-grid dl { margin: 24px 0 0; display: grid; gap: 20px; }
.contact-grid dt { font-size: var(--step--1); color: var(--ink-soft); }
.contact-grid dd { margin: 0; font-weight: 600; font-size: var(--step-1); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.copy { font-size: var(--step--1); font-weight: 500; background: transparent; color: var(--lagoon); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.social { display: flex; flex-wrap: wrap; gap: 10px; }
.social a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--step--1); }
.social a:hover { border-color: var(--ink); }
.social svg { width: 18px; height: 18px; }
form.stack { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .wrap { padding-block: 40px 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer h3 { font-size: var(--step-0); font-weight: 700; margin-bottom: 10px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer ul a, footer ul button { color: var(--ink-soft); text-decoration: none; background: none; border: 0; padding: 0; font-size: var(--step--1); text-align: left; }
footer ul a:hover, footer ul button:hover { color: var(--ink); text-decoration: underline; }
footer .about { color: var(--ink-soft); font-size: var(--step--1); margin-top: 12px; max-width: 30em; }
footer .base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--step--1); color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 20px; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > div:first-child { grid-column: 1 / -1; } }

/* Dialog */
dialog { border: 0; padding: 0; border-radius: 20px; background: var(--surface); color: var(--ink); width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(8, 20, 22, .55); }
.dlg { padding: 28px; display: grid; gap: 20px; }
.dlg-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.dlg-head h2 { font-size: var(--step-2); font-weight: 800; }
.dlg-head p { color: var(--ink-soft); margin-top: 6px; font-size: var(--step--1); }
.x { background: transparent; border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; flex: none; color: var(--ink); font-size: 1.3rem; line-height: 1; }
.preview { white-space: pre-wrap; font-size: var(--step--1); background: var(--lagoon-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-height: 220px; overflow: auto; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 520px) { .dlg { padding: 20px; } }

/* Toast + back to top */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--lagoon-bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: var(--step--1); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.totop { position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.1rem; z-index: 4; }

/* Kolam */
.k-dot { fill: var(--dot); transition: fill .2s; }
.k-dot.on { fill: var(--jaggery); }
.k-loop { fill: none; stroke: var(--jaggery); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.k-link { stroke: var(--lagoon); stroke-width: 3; stroke-linecap: round; fill: none; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } .toast { transition: none; } }

/* WordPress base */
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.admin-bar header.nav { top: 32px; }
@media (max-width: 782px) { .admin-bar header.nav { top: 46px; } }
