/* SvaraScience — The Rhythm Brain
   One stylesheet for every page. Colors and fonts live in :root,
   so changing a value here changes it everywhere. */

:root {
  --navy: #13235A;        /* main dark color: hero, footer, headings */
  --blue: #1E3A8A;        /* logo blue, links */
  --orange: #E8701A;      /* decoration: letters, active beat */
  --orange-light: #F28C38;/* buttons and accents on navy */
  --orange-text: #B4530F; /* orange that is dark enough for small text */
  --bg: #F7F6F2;          /* page background */
  --white: #FFFFFF;
  --soft: #EEF1F8;        /* light blue-gray sections */
  --ink: #1C2333;         /* body text */
  --muted: #4B5563;       /* secondary text */
  --line: #E3DED3;        /* borders */
  --on-navy: #D5DAEA;     /* body text on navy */
  --heading: 'Space Grotesk', Inter, system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
}
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; color: var(--navy); margin: 0; line-height: 1.15; }
h1 { font-size: clamp(34px, 5.5vw, 58px); }
h2 { font-size: clamp(28px, 3.5vw, 36px); }
h3 { font-size: 24px; }
p { margin: 0; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-text); }
.muted { color: var(--muted); font-size: 15px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* ---------- Navigation ---------- */
.site-nav { background: var(--white); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.nav-logo { display: inline-flex; align-items: center; min-height: 44px; }
.nav-logo img { height: 44px; width: auto; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; font-size: 15px; font-weight: 600; }
.nav-links a { display: inline-block; padding: 12px 2px; color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--orange); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; font-family: var(--body); font-size: 16px; cursor: pointer; }
.btn-primary { background: var(--orange-light); color: var(--navy); }
.btn-primary:hover { background: var(--orange); color: var(--navy); }
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--blue); color: var(--white); }
.btn-outline { border-color: var(--navy); background: var(--white); color: var(--navy); }
.nav-links .btn { min-height: 44px; padding: 0 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section--white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--soft { background: var(--soft); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy p { color: var(--on-navy); }
.page-header { padding: 72px 0 48px; }
.page-header .lead { font-size: 19px; max-width: 760px; }

/* ---------- Home hero ---------- */
.hero { background: var(--navy); color: var(--white); padding: 88px 0 96px; }
.hero h1 { color: var(--white); }
.hero .kicker { color: var(--orange-light); }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 999 1 540px; display: flex; flex-direction: column; gap: 20px; }
.hero-text .lead { font-size: 19px; color: var(--on-navy); max-width: 620px; }
.stat-card { flex: 1 1 280px; padding: 32px; border-radius: 20px; background: var(--blue); display: flex; flex-direction: column; gap: 8px; }
.stat-card .num { font-family: var(--heading); font-weight: 700; font-size: 72px; line-height: 1; color: var(--orange-light); }
.stat-card p { color: #E4E8F3; }

/* ---------- Vision and mission ---------- */
.vm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.vm-grid .statement { font-family: var(--heading); font-weight: 700; font-size: 26px; line-height: 1.3; color: var(--navy); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid--wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; padding: 32px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.card--plain { border: none; }
a.card:hover { border-color: var(--orange-light); color: var(--ink); }
.card .more { font-size: 15px; font-weight: 600; color: var(--orange-text); }
.card .label { font-size: 14px; font-weight: 700; color: var(--orange-text); text-transform: uppercase; }
.card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- Split layouts (text + photo/video) ---------- */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.split > .wide { flex: 999 1 460px; }
.split > .narrow { flex: 1 1 300px; }
.photo { width: 100%; max-width: 400px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; }
.portrait { width: 260px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; }
.video { width: 100%; aspect-ratio: 16 / 9; background: var(--navy); border-radius: 16px; object-fit: contain; }
.quote { font-family: var(--heading); font-size: 24px; line-height: 1.4; color: var(--navy); }

/* ---------- CLAP steps ---------- */
.steps { border-top: 1px solid #D8D3C7; }
.step { display: flex; flex-wrap: wrap; gap: 16px 40px; padding: 32px 0; border-bottom: 1px solid #D8D3C7; }
.step .letter { flex: 0 0 72px; font-family: var(--heading); font-weight: 700; font-size: 64px; line-height: 0.9; color: var(--orange); }
.step .what { flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px; }
.step .what strong { font-family: var(--heading); font-size: 26px; color: var(--navy); }
.step .example { flex: 1 1 320px; padding: 18px 22px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.step .example b { font-family: var(--heading); color: var(--navy); }

/* ---------- Research timeline ---------- */
.status-pill { align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: var(--soft); color: var(--navy); font-size: 15px; font-weight: 600; }
.timeline-row { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 32px 0; border-top: 1px solid #D8D3C7; }
.timeline-row:last-child { border-bottom: 1px solid #D8D3C7; }
.timeline-row .when { flex: 0 0 220px; display: flex; flex-direction: column; gap: 2px; }
.timeline-row .when .kicker { letter-spacing: 0.06em; }
.timeline-row .body { flex: 1 1 480px; display: flex; flex-direction: column; gap: 12px; }
.phase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.phase { padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.phase strong { color: var(--navy); }

/* ---------- Awards ---------- */
.award { display: flex; flex-direction: column; gap: 4px; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.award strong { color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy); padding: 56px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer img { height: 48px; width: auto; }
.site-footer a { color: var(--white); font-weight: 600; }
.site-footer .stack { gap: 4px; font-size: 15px; }

/* ---------- Tap-along tala demo ---------- */
.tala { width: 100%; max-width: 520px; margin: 0 auto; padding: 28px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--ink); }
.tala-dial { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1 / 1; }
.tala-dial svg { width: 100%; height: 100%; overflow: visible; }
.tala-ring { fill: none; stroke: #C9D1E6; stroke-width: 2; }
.tala-beat circle { fill: #C9D1E6; transition: fill 0.25s, r 0.25s; }
.tala-beat.is-sam circle { fill: var(--navy); }
.tala-beat.is-seen circle { fill: var(--blue); }
.tala-beat.is-on circle { fill: var(--orange); }
.tala-beat text { font-family: var(--heading); font-weight: 700; font-size: 17px; fill: var(--navy); text-anchor: middle; dominant-baseline: middle; transition: opacity 0.3s; }
.tala-hub { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.tala-hub strong { font-family: var(--heading); font-size: 34px; line-height: 1; color: var(--navy); }
.tala-hub span { font-size: 13px; color: var(--muted); margin-top: 6px; }
.tala-trail { min-height: 26px; font-family: var(--heading); font-size: 18px; letter-spacing: 0.04em; color: var(--navy); text-align: center; }
.tala .btn { font-size: 16px; }
.tala .btn-quiet { border-color: #C9D1E6; background: var(--white); color: var(--navy); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tala-beat circle, .tala-beat text { transition: none; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 72px; }
  .stat-card .num { font-size: 56px; }
}

/* Fixes for elements inside other components */
.nav-links a.btn { display: inline-flex; align-items: center; color: var(--white); padding: 0 18px; }
.nav-links a.btn:hover { color: var(--white); }
.tala .tala-trail { color: var(--navy); }
.section--navy .tala p { color: var(--navy); }
