/* ==========================================================================
   ILAKKANAM — Design tokens & styles (handoff §3–§6)
   ========================================================================== */

:root {
  --bg: #f6f8f4;
  --surface: #ffffff;
  --ink: #0b2e2b;
  --text-2: #3f5754;
  --muted: #5c716e;
  --teal: #0f766e;
  --teal-dark: #0b5a54;
  --teal-light: #d9f0ec;
  --orange: #ff7a00;
  --orange-hover: #ff8f26;
  --orange-soft: #ffb066;
  --peach: #ffe7d1;
  --peach-text: #a34a00;
  --gold: #d9a441;
  --border: #dbe7e4;
  --divider: #e6efed;
  --band-text: #c6d8d5;
  --band-muted: #9fbab6;

  --card-1: #fff3e2;
  --card-2: #e3f4ee;
  --card-3: #fde8ec;
  --card-4: #e8ecfb;

  --radius-card: 26px;
  --radius-panel: 36px;
  --radius-pill: 999px;

  --max-width: 1200px;
  --side-padding: 28px;

  --font-latin: 'Nunito', system-ui, sans-serif;
  --font-tamil: 'Noto Sans Tamil', 'Nunito', sans-serif;
}

/* ------ Base ------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-latin);
  font-weight: 600;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The rotated hero backdrop bleeds past the edge by design; never allow horizontal scroll. */
main { overflow-x: clip; }

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

[lang="ta"] { font-family: var(--font-tamil); font-weight: 700; }

a { color: var(--teal); text-decoration: none; transition: color .15s, background-color .15s, border-color .15s; }
a:hover { color: var(--teal-dark); }
a:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; border-radius: 12px; }

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--side-padding);
  padding-right: var(--side-padding);
}

/* ------ Type ------ */
h1 {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 900;
  text-wrap: balance;
}
h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 900;
  text-wrap: balance;
}
.lead {
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ------ Buttons ------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 17px;
  text-align: center;
}
.btn-orange {
  min-height: 64px;
  padding: 0 32px;
  background: var(--orange);
  color: #1f1300;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 12px 30px -12px rgba(255, 122, 0, .8);
}
.btn-orange:hover { background: var(--orange-hover); color: #1f1300; }

/* ------ Header ------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 248, 244, .86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(11, 46, 43, .07);
}
.header-inner {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  padding-bottom: 2px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name { font-weight: 900; font-size: 19px; letter-spacing: -0.2px; }
.logo-tamil { font-size: 11.5px; font-weight: 700; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link {
  padding: 10px 14px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-2);
  border-radius: var(--radius-pill);
}
.nav-link:hover { background: rgba(15, 118, 110, .08); color: var(--ink); }
.btn-outline {
  padding: 10px 18px;
  font-weight: 800;
  font-size: 15px;
  color: var(--teal);
  border: 2px solid #cfe0dd;
  border-radius: var(--radius-pill);
  background: var(--surface);
  white-space: nowrap;
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal-dark); }
.nav-discord { display: inline-flex; align-items: center; gap: 8px; }

/* ------ Hero ------ */
.hero {
  padding-top: 72px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 56px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.accent { color: var(--teal); }
.hero-lead { max-width: 540px; }

.pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
}
.pill-tag {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--peach);
  color: var(--peach-text);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 4px; }
.hero-meta { font-size: 14px; color: var(--muted); }

/* Tablet preview */
.preview { position: relative; min-width: 0; }
.preview-backdrop {
  position: absolute;
  inset: -6% -4% -8% 8%;
  background: var(--teal-light);
  border-radius: 48px;
  transform: rotate(3deg);
}
.tablet {
  position: relative;
  background: var(--ink);
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 40px 80px -30px rgba(11, 46, 43, .45);
}
.tablet-screen {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 1280 / 800;
  background: #8fd3e0 url('assets/islands-bg.svg') center / cover no-repeat;
}
.letter-row {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 7%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3%;
}
.letter-card {
  aspect-ratio: 1;
  border-radius: 18%;
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(28px, 4.2vw, 54px);
  line-height: 1;
  color: var(--ink);
}
.audio-chip {
  position: absolute;
  left: -18px;
  top: 14%;
  background: var(--surface);
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 18px 40px -16px rgba(11, 46, 43, .35);
}
.play-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.play-triangle {
  width: 0;
  height: 0;
  border-left: 13px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.audio-chip-text { display: flex; flex-direction: column; line-height: 1.2; }
.audio-word { font-weight: 800; font-size: 20px; }
.audio-hint { font-size: 12px; color: var(--muted); font-weight: 700; }

/* ------ Sections ------ */
.section { padding-top: 64px; padding-bottom: 64px; scroll-margin-top: 80px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin-bottom: 40px; }
.section-lead { font-size: 18px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-num { font-size: 13px; font-weight: 800; color: var(--muted); }
.step-tag {
  font-weight: 800;
  font-size: 15px;
  color: var(--teal);
  background: var(--teal-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.step-title { font-size: 23px; font-weight: 900; letter-spacing: -0.01em; line-height: 1.2; }
.step-body { font-size: 16px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.step-inverted { background: var(--teal); border-color: var(--teal); color: #fff; }
.step-inverted .step-num { color: #e3f4f1; }
.step-inverted .step-tag { background: var(--peach); color: var(--ink); }
.step-inverted .step-body { color: #e3f4f1; }

/* For parents */
.parents-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: clamp(28px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 48px;
}
.parents-intro { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.parents-body { font-size: 18px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.parents-list { display: flex; flex-direction: column; min-width: 0; }
.parents-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
}
.parents-item:first-child { padding-top: 0; }
.parents-item:last-child { border-bottom: 0; padding-bottom: 0; }
.parents-item-title { font-weight: 900; font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
.parents-item-body { font-size: 15.5px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }

.icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-letter { background: var(--teal-light); color: var(--teal); font-weight: 800; font-size: 20px; }
.icon-dot { background: var(--peach); }
.icon-dot .icon-shape { width: 14px; height: 14px; border-radius: 50%; background: var(--orange); }
.icon-diamond { background: #f6ecd4; }
.icon-diamond .icon-shape { width: 16px; height: 16px; background: var(--gold); transform: rotate(45deg); border-radius: 3px; }
.icon-shield { background: #e3ebe9; }
.icon-shield .icon-shape { width: 16px; height: 18px; border: 3px solid var(--ink); border-radius: 4px 4px 8px 8px; }

/* Beta CTA band */
.beta-section { padding-top: 40px; padding-bottom: 88px; scroll-margin-top: 80px; }
.beta-band {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-panel);
  padding: clamp(36px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px;
  align-items: center;
}
.beta-deco {
  position: absolute;
  right: -30px;
  bottom: -90px;
  font-weight: 800;
  font-size: 340px;
  line-height: 1;
  color: rgba(255, 255, 255, .05);
  pointer-events: none;
  user-select: none;
}
.beta-copy, .beta-actions { position: relative; min-width: 0; }
.beta-copy { display: flex; flex-direction: column; gap: 16px; }
.eyebrow-band { color: var(--orange-soft); }
.beta-heading {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #fff;
}
.beta-body { font-size: 18px; line-height: 1.6; color: var(--band-text); max-width: 520px; text-wrap: pretty; }
.beta-actions { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.beta-email {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  padding: 4px 2px;
  border-bottom: 2px solid rgba(255, 255, 255, .25);
  overflow-wrap: anywhere;
}
.beta-email:hover { color: var(--orange-soft); border-color: var(--orange-soft); }
.btn-discord {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .06);
}
.btn-discord:hover { color: var(--orange-soft); border-color: var(--orange-soft); }

/* ------ Footer ------ */
.site-footer { border-top: 1px solid rgba(11, 46, 43, .08); }
.footer-inner {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.footer-left { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.footer-left [lang="ta"] { font-weight: 500; }
.footer-brand { font-weight: 900; color: var(--ink); }
.footer-credit { font-weight: 800; color: var(--ink); }
.footer-credit:hover { color: var(--teal); }
.footer-right { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-right a { color: var(--muted); }
.footer-right a:hover { color: var(--ink); }

/* ------ Small screens (§5) ------ */
@media (max-width: 600px) {
  :root { --side-padding: 20px; }
  .nav-link { display: none; }
  .nav-discord { padding: 10px 12px; }
  .nav-discord-label { display: none; }
  .hero { padding-top: 48px; gap: 48px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .audio-chip { left: 6%; top: 8%; padding: 10px 12px; }
  .preview-backdrop { inset: -4% -2% -6% 4%; }
  .beta-actions { align-items: stretch; }
  .beta-actions .btn { width: 100%; }
  .beta-email { align-self: flex-start; }
}
