/* IEP VoiceTracker — brand theme.
   Palette is shared with the iOS app (see ios .../DesignSystem/Theme.swift).
   System font stack + minimal CSS keep the site fast with no web-font requests. */

/* Every value below is copied from the app's Theme.swift rather than eyeballed,
   so a teacher who taps through from the App Store sees the same product. Where
   the two had drifted — bg, muted, success — the app's value wins. */
:root {
  --primary: #0F766E;       /* Theme.primary */
  --primary-600: #0D9488;   /* Theme.primary600 */
  --primary-800: #115E59;   /* Theme.primary800 */
  --on-primary: #FFFFFF;    /* Theme.onPrimary */
  --primary-wash: #E6F3F1;  /* Theme.primaryWash — tinted fills */
  --accent: #F59E0B;        /* Theme.accent (amber, used sparingly) */
  --ink: #0B1220;           /* Theme.ink */
  --slate: #334155;         /* Theme.slate */
  --muted: #5A6B7F;         /* Theme.muted */
  --bg: #F2F4F7;            /* Theme.bg */
  --surface: #FFFFFF;       /* Theme.surface */
  --surface-2: #E9EDF2;     /* one step down from surface, on the app's bg */
  --border: #E2E8F0;        /* Theme.border */
  --success: #15803D;       /* Theme.success */
  --danger: #DC2626;        /* Theme.danger */
  --warning: #B45309;       /* Theme.warning */
  --radius: 14px;           /* Theme.corner */
  --radius-sm: 10px;        /* Theme.cornerSmall */
  --tap: 44px;              /* Theme.minTapTarget */
  --shadow: 0 1px 2px rgba(11,18,32,.06), 0 8px 24px rgba(11,18,32,.06);
  --maxw: 1120px;
  /* SwiftUI renders the app in San Francisco. -apple-system resolves to the
     same face on Apple devices, so the two read identically there and fall
     back cleanly elsewhere. No web-font request either way. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Accessibility: skip link + visible focus */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--primary-600); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--slate); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.lang { display: inline-flex; gap: 6px; font-size: 13px; color: var(--muted); }
.lang a.active { color: var(--ink); font-weight: 700; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .05s ease, background .2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-600); color: var(--on-primary); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero .eyebrow { color: var(--primary); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 12px 0 16px; }
.hero p.lead { font-size: 20px; color: var(--slate); max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -.02em; margin: 0 0 10px; }
.section-head p { color: var(--slate); font-size: 18px; margin: 0; }

/* Grid + cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 6px 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--slate); font-size: 15px; }
.feature-ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-wash); color: var(--primary);
}
/* Mask-based icons inherit the current text color, so SVG files are themeable. */
.icon {
  width: 22px; height: 22px; display: block; background: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}

/* Pricing */
.pricing-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.popular { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset, var(--shadow); }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.plan .badge { align-self: flex-start; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 24px; }
.plan li { padding: 7px 0 7px 28px; position: relative; color: var(--slate); font-size: 15px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.plan .cta { margin-top: auto; }

/* Callout / banners */
.banner { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.trust { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }

/* Article */
.article { max-width: 760px; margin: 0 auto; padding: 40px 0 60px; }
.article h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; line-height: 1.12; }
.article .meta { color: var(--muted); font-size: 14px; margin: 8px 0 28px; }
.article h2 { margin-top: 36px; font-size: 24px; }
.article p, .article li { color: var(--slate); font-size: 18px; }
.article blockquote { border-left: 4px solid var(--primary); margin: 24px 0; padding: 6px 18px; color: var(--ink); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-list { display: grid; gap: 16px; }
.post-list a.card { display: block; color: inherit; }
.post-list a.card:hover { text-decoration: none; border-color: var(--primary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-grid a { color: var(--slate); font-size: 14px; }
.footer-legal { color: var(--muted); font-size: 13px; margin-top: 24px; }

/* Utilities */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.pill { display: inline-block; background: var(--surface-2); color: var(--slate); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }

/* Responsive */
@media (max-width: 860px) {
  .grid-3, .pricing-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 20px; gap: 14px; }
  .nav-toggle { display: inline-flex; }
}

@media (prefers-color-scheme: dark) {
  /* The app's dark palette, again taken from Theme.swift. Teal lightens to
     #5EEAD4 there: the light-mode #0F766E fails contrast on a dark ground, so
     carrying it over would break the primary colour exactly where it does the
     most work — links and buttons. */
  :root {
    --primary: #5EEAD4; --primary-600: #2DD4BF; --primary-800: #99F6E4;
    --on-primary: #08201E; --primary-wash: #17342F;
    --accent: #FBBF24;
    --ink: #F8FAFC; --slate: #CBD5E1; --muted: #94A3B8;
    --bg: #0B1220; --surface: #151C2C; --surface-2: #1B2436; --border: #2A3446;
    --success: #4ADE80; --danger: #F87171; --warning: #FBBF24;
    --shadow: 0 1px 2px rgba(0,0,0,.40), 0 8px 24px rgba(0,0,0,.32);
  }
  .site-header { background: rgba(21,28,44,.85); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }


/* ---------------------------------------------------------------------------
   Motion
   Small, purposeful, and entirely optional. Content is visible with no JS and
   with motion disabled; these only soften how it arrives. Nothing animates on
   a timer, and nothing moves more than a few pixels — a marketing page that
   slides its whole layout around costs more attention than it earns.
   --------------------------------------------------------------------------- */
/* Motion is limited to how controls respond to you: hover lift on cards, a
   press on buttons. There is deliberately no scroll-reveal. Fading content in
   as it enters the viewport means shipping it at opacity 0, which puts the
   marketing copy one JavaScript failure away from invisible and gives crawlers
   a hidden-text signal on the pages that most depend on search. The effect is
   not worth that trade on a page whose job is to be read. */
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
  .card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11,18,32,.05), 0 12px 32px rgba(11,18,32,.10); }
  .btn { transition: transform .06s ease, background .18s ease, box-shadow .18s ease; }
  .shot img { transition: transform .22s ease, box-shadow .22s ease; }
  .shot:hover img { transform: translateY(-3px); box-shadow: 0 3px 6px rgba(11,18,32,.06), 0 16px 40px rgba(11,18,32,.12); }
}

/* Screenshots -------------------------------------------------------------- */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.shot { margin: 0; }
.shot img {
  width: 100%; height: auto; border-radius: 22px;
  border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface);
}
.shot figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; text-align: center; }

/* Forms -------------------------------------------------------------------- */
.form { display: grid; gap: 16px; max-width: 620px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: var(--tap); width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-wash);
}
.field .hint { color: var(--muted); font-size: 13px; }
/* Off-screen rather than display:none — a hidden honeypot that screen readers
   skip but bots still fill. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1024px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shots { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  section { padding: 40px 0; }
  .hero { padding: 48px 0 28px; }
  body { font-size: 16px; }
}
/* Very small phones (iPhone SE and narrower) and large-text users: let the
   header wrap instead of squeezing the brand out of the viewport. */
@media (max-width: 380px) {
  .brand span { font-size: 15px; }
  .btn { padding: 11px 16px; }
  .container { padding: 0 16px; }
}
