/* ==========================================================================
   base.css — reset, typography, background mesh, buttons, accessibility
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { background: #FFFFFF; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0; color: var(--ink); background: transparent;
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--green); text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .45em; color: var(--green); text-wrap: balance; }
h1 { font-size: var(--fs-hero); font-weight: 700; line-height: 1.1; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
html[lang="ta"] body, html[lang="ta"] h1, html[lang="ta"] h2, html[lang="ta"] h3, html[lang="ta"] h4 { font-family: 'Noto Sans Tamil', var(--sans); }
html[lang="ta"] body { line-height: 1.85; }
html[lang="ta"] h1, html[lang="ta"] h2, html[lang="ta"] h3, html[lang="ta"] h4 { line-height: 1.35; letter-spacing: 0; font-weight: 600; }
html[lang="ta"] h1 { font-size: clamp(2rem, 5.6vw, 3.4rem); }
html[lang="ta"] h2 { font-size: clamp(1.6rem, 3.8vw, 2.3rem); }
html[lang="ta"] h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1em; max-width: 66ch; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--green); color: var(--cream); padding: 10px 16px; border-radius: var(--r-sm); z-index: 300; }
.skip:focus { left: 8px; }
.lead { font-size: 1.12em; color: var(--muted); }

/* visible focus: green line + gold halo (works on light and dark surfaces) */
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 8px; box-shadow: 0 0 0 6px rgba(201, 162, 75, .7); }
.tile--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--cream); }

/* ---------- animated mesh background (injected by app.js as <div class="mesh">) ---------- */
.mesh { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: linear-gradient(170deg, #FFFFFF 0%, #F8FBF9 55%, #F1F7F3 100%); }
.mesh i { position: absolute; border-radius: 50%; will-change: transform; }
.mesh i:nth-child(1) { width: 60vmax; height: 60vmax; left: -20vmax; top: -18vmax; background: radial-gradient(circle, rgba(168, 214, 190, .30) 0%, transparent 66%); animation: drift1 38s ease-in-out infinite alternate; }
.mesh i:nth-child(2) { width: 52vmax; height: 52vmax; right: -16vmax; top: 10vmax; background: radial-gradient(circle, rgba(207, 224, 210, .55) 0%, transparent 66%); animation: drift2 44s ease-in-out infinite alternate; }
.mesh i:nth-child(3) { width: 44vmax; height: 44vmax; left: 12vmax; bottom: -22vmax; background: radial-gradient(circle, rgba(201, 162, 75, .09) 0%, transparent 66%); animation: drift3 50s ease-in-out infinite alternate; }
.mesh i:nth-child(4) { width: 38vmax; height: 38vmax; right: 8vmax; bottom: -16vmax; background: radial-gradient(circle, rgba(31, 90, 69, .07) 0%, transparent 66%); animation: drift1 56s ease-in-out infinite alternate-reverse; }
.mesh::after { content: ""; position: absolute; inset: 0; opacity: .035; mix-blend-mode: multiply;   /* very subtle noise */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift1 { to { transform: translate(10vmax, 8vmax) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-12vmax, 6vmax) scale(.92); } }
@keyframes drift3 { to { transform: translate(8vmax, -10vmax) scale(1.1); } }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(40px, 7vw, 84px); }
.section-head { max-width: 720px; margin-bottom: clamp(22px, 4vw, 40px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center p { margin-inline: auto; }

/* gold ornamental divider (inspired by the visiting card) */
.orn { height: 22px; width: min(260px, 70%); margin: 14px 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 22'%3E%3Cg fill='none' stroke='%23C9A24B' stroke-width='1.3'%3E%3Cpath d='M0 11h104M156 11h104'/%3E%3C/g%3E%3Cg fill='%23C9A24B'%3E%3Cpath d='M130 3c-4 3-6 7-5 12 3 0 5-1 5-3 0 2 2 3 5 3 1-5-1-9-5-12z'/%3E%3Cpath d='M118 14c-3-2-6-2-9 0 2 3 5 4 9 3zM142 14c3-2 6-2 9 0-2 3-5 4-9 3z'/%3E%3C/g%3E%3C/svg%3E") left center / contain no-repeat; }
.orn.center { margin-inline: auto; background-position: center; }
.orn-band { width: 100%; max-width: 420px; margin: clamp(8px, 2vw, 20px) auto; background-position: center; }

/* ---------- buttons (solid; the liquid CTA lives in liquid-glass.css) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: var(--pill); border: 1.5px solid transparent;
  font-weight: 600; font-size: .97rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .25s var(--ease-spring); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.95); }
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: var(--gold); color: var(--green); }
.btn-gold { background: var(--gold); color: var(--green); }
.btn-gold:hover { background: var(--cream); }
.btn-ghost { background: rgba(255, 255, 255, .35); color: var(--green); border-color: var(--green); }
.btn-ghost:hover { background: var(--green); color: var(--cream); }
.tile--dark .btn-ghost { color: var(--cream); border-color: rgba(255, 255, 255, .7); background: transparent; }
.tile--dark .btn-ghost:hover { background: var(--cream); color: var(--green); }
.btn-wa { background: #1F6B4A; color: #fff; }
.btn-wa:hover { background: var(--gold); color: var(--green); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- scroll reveal: tiles fade and scale in ---------- */
.js .reveal { opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .7s ease, transform .7s var(--ease-spring); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- accessibility fallbacks ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print { .site-header-wrap, .float, .mesh { display: none; } }

/* lining numerals: Cormorant defaults to old-style figures, which make "10" read like "IO" */
h1, h2, h3, h4, .date-btn b, .stat b, .cap .big em, .mini-steps .n, .status-line, .brand-name, .quote p { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
