/*
 * TrainScribe landing. Mirrors the app's light palette (src/theme/palettes.ts LIGHT)
 * and type pairing (src/theme/fonts.ts): Space Grotesk for display, Plus Jakarta Sans
 * for body. Plain CSS, no build step.
 */

:root {
  --bg: #f6f7f2;
  --bg-top: #fafbf5;
  --bg-bottom: #edefe5;
  --surface: #ffffff;
  --text: #101421;
  --text-muted: #667085;
  --text-faint: #98a2b3;
  --primary: #c8f560;
  --primary-deep: #c2f24e;
  --primary-soft: #eafbc4;
  --on-primary: #101421;
  --accent: #7c5cfc;
  --accent-soft: #c8b6ff;
  --border: #e4e7ec;
  --dark-card: #111318;
  --hero-top: #16181f;
  --hero-bottom: #0d0f13;
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.66);
  --on-dark-faint: rgba(255, 255, 255, 0.42);
  --radius: 20px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family:
    'Plus Jakarta Sans',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.lang-switch {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--surface);
}

.lang-switch:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--text-faint);
}

/* ---- Hero: light, copy left + bare phone right ---- */

.hero {
  position: relative;
  padding: 40px 0 8px;
  margin-bottom: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 40px;
}

/* ambient brand blobs (lime + violet, like the app background) */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
}

.hero::before {
  width: 460px;
  height: 460px;
  top: -120px;
  left: -180px;
  background: rgba(200, 245, 96, 0.55);
}

.hero::after {
  width: 420px;
  height: 420px;
  top: 160px;
  right: -180px;
  background: rgba(124, 92, 252, 0.3);
}

.hero .tagline-chip {
  display: inline-block;
  background: var(--dark-card);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 84px);
  line-height: 1.04;
  color: var(--text);
}

.hero .hl {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 18px;
  padding: 0 20px;
  margin-top: 10px;
  box-shadow: 0 12px 36px rgba(200, 245, 96, 0.55);
}

.hero .sub {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 22px 0 0;
}

.hero .store-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero .store-row img {
  height: 64px;
  display: block;
}

.hero .ios-soon {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--surface);
}

.hero-media {
  display: flex;
  justify-content: center;
}

/* CSS device shell around the screen-only video: same bezel/radii ratios as the
   app device frame, so no rendered background ever shows. */
.phone-shell {
  width: 300px;
  padding: 10px;
  border-radius: 47px;
  background: linear-gradient(160deg, #2a2e37 0%, #0c0d11 100%);
  box-shadow:
    0 40px 90px rgba(124, 92, 252, 0.25),
    0 24px 50px rgba(16, 20, 33, 0.3),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.phone-shell video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 37px;
}

/* ---- "You say -> you get" demo strip (the app's onboarding moment) ---- */

.demo {
  background: linear-gradient(160deg, var(--hero-top), var(--hero-bottom));
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  color: var(--on-dark);
}

.demo-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.demo-quote {
  font-size: 18px;
  line-height: 1.5;
  color: var(--on-dark-muted);
  font-style: italic;
}

.demo-arrow {
  font-size: 36px;
  color: var(--primary);
  font-weight: 700;
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 16px;
  background: color-mix(in srgb, var(--c) 28%, transparent);
  color: color-mix(in srgb, var(--c) 55%, white);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}

.chip-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-dark);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ---- Value blurbs ---- */

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}

.value-card {
  border-radius: var(--radius-lg);
  padding: 30px 26px;
}

.value-card .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  font-size: 21px;
  margin-bottom: 16px;
}

.value-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 15px;
  color: var(--text-muted);
}

.value-lime {
  background: var(--primary-soft);
}

.value-violet {
  background: #ede9ff;
}

.value-dark {
  background: linear-gradient(160deg, var(--hero-top), var(--hero-bottom));
  color: var(--on-dark);
}

.value-dark h3 {
  color: var(--on-dark);
}

.value-dark p {
  color: var(--on-dark-muted);
}

.value-dark .badge {
  background: rgba(255, 255, 255, 0.12);
}

/* ---- How it works ---- */

.how {
  margin-bottom: 56px;
}

.how h2,
.shots h2 {
  font-size: 30px;
  margin-bottom: 24px;
  text-align: center;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.how-step {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(16, 20, 33, 0.06);
}

.how-step .num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--on-primary);
  background: var(--primary);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.how-step p {
  font-size: 15px;
  color: var(--text-muted);
}

.how-step strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 4px;
}

/* ---- Screenshots ---- */

.shots {
  margin-bottom: 64px;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.shot {
  text-align: center;
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
}

.shot .phone-shell {
  width: 100%;
  max-width: 248px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 40px;
  box-shadow:
    0 24px 50px rgba(16, 20, 33, 0.32),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 32px;
}

.shot figcaption {
  margin-top: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.shot-lime {
  background: linear-gradient(170deg, #e3f9b4, var(--primary));
}

.shot-violet {
  background: linear-gradient(170deg, #e6deff, var(--accent-soft));
}

.shot-dark {
  background: linear-gradient(160deg, var(--hero-top), var(--hero-bottom));
}

.shot-dark figcaption {
  color: var(--on-dark);
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-muted);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---- Legal pages ---- */

.legal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin: 16px 0 48px;
}

.legal h1 {
  font-size: 34px;
  margin-bottom: 8px;
}

.legal .updated {
  color: var(--text-faint);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal h2 {
  font-size: 21px;
  margin: 32px 0 10px;
}

.legal p,
.legal li {
  font-size: 16px;
  color: var(--text-muted);
}

.legal ul {
  padding-left: 22px;
  margin: 8px 0;
}

.legal strong {
  color: var(--text);
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
  .values,
  .how-steps {
    grid-template-columns: 1fr;
  }

  /* shots become a swipeable carousel */
  .shot-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    margin: 0 -24px;
    padding: 4px 24px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .shot-row::-webkit-scrollbar {
    display: none;
  }

  .shot {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
    gap: 36px;
    text-align: center;
  }

  .hero .sub {
    margin: 22px auto 0;
  }

  .hero .store-row {
    justify-content: center;
  }

  .phone-shell {
    width: 264px;
    padding: 9px;
    border-radius: 42px;
  }

  .phone-shell video {
    border-radius: 33px;
  }

  .demo {
    grid-template-columns: 1fr;
    padding: 28px 24px;
    gap: 20px;
  }

  .demo-arrow {
    transform: rotate(90deg);
    justify-self: center;
    line-height: 1;
  }

  .legal {
    padding: 32px 20px;
  }
}
