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

:root {
  --mint: #00ff8b;
  --mint-dark: #00d977;
  --pink: #ffe5f9;
  --pink-hot: #ffb8ec;
  --black: #000000;
  --charcoal: #333333;
  --muted: #5c5c5c;
  --text: #000000;
  --bg: #f8fcf9;
  --bg-soft: #f0f7f3;
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.06);
  --whatsapp: #25d366;
  --line-pattern: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 47px,
    rgba(0, 0, 0, 0.045) 47px,
    rgba(0, 0, 0, 0.045) 48px
  );
  /* legacy aliases */
  --navy: #000000;
  --periwinkle: var(--mint);
  --periwinkle-dark: var(--mint-dark);
  --accent-pink: var(--pink-hot);
  --accent-yellow: var(--mint);
  --site-header-height: 5.625rem;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* ── Header (floating pill) ─────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 1.25rem 0.85rem;
  background: transparent;
}

.nav-pill {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  background: #F4F5EF;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--black);
  justify-self: start;
}

.brand img {
  height: 34px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--black);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  justify-self: center;
}

.nav-links a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--black);
}

.nav-link--outlined {
  border: 1px solid var(--black);
  border-radius: 4px;
  padding: 0.35rem 0.85rem;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--black);
  color: #fff;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  justify-self: end;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  background: var(--charcoal);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.nav-cta-chevron {
  font-size: 1.15rem;
  line-height: 1;
}

/* ── Hero spotlight (Baseten-style) ─────────────────────── */

.hero-spotlight {
  margin-top: calc(-1 * var(--site-header-height));
  padding: 2.5rem 0 4rem;
  padding-top: calc(2.5rem + var(--site-header-height));
  background-color: var(--card);
  background-image: var(--line-pattern);
  background-attachment: fixed;
  border-bottom: 1px solid var(--border-light);
}

.hero-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 3rem;
  align-items: center;
}

.hero-spotlight-content {
  min-width: 0;
}

.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 1.25rem;
}

.hero-headline-line {
  display: block;
  white-space: nowrap;
}

.hero-subtext {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--charcoal);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-subtext-line {
  display: block;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
  white-space: nowrap;
  border-radius: 999px;
}

.hero-actions .btn-secondary {
  border-width: 1px;
}

.phone-mockup--hero {
  width: min(300px, 100%);
}

/* ── How it works ───────────────────────────────────────── */

.how-it-works {
  background: var(--bg);
  padding: 4rem 0;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 2.5rem 4rem;
  align-items: center;
}

.how-it-works-copy {
  min-width: 0;
}

.how-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 36rem;
}

.how-step {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.how-visual-panel {
  position: relative;
  width: min(300px, 100%);
  min-height: 460px;
  justify-self: end;
}

.how-visual-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.how-visual-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.how-papers-stack {
  position: relative;
  width: min(300px, 100%);
  margin: 0 auto;
  min-height: 420px;
  overflow: visible;
}

.how-papers-stack--single .how-papers-img--front {
  object-position: top center;
}

.how-papers-img {
  position: absolute;
  display: block;
  width: 72%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  background: #fff;
  object-fit: cover;
  object-position: center 18%;
}

.how-papers-img--back {
  top: 8%;
  left: 0;
  transform: rotate(-4deg);
  z-index: 1;
}

.how-papers-img--front {
  top: 0;
  right: 0;
  transform: rotate(3deg);
  z-index: 2;
}

.how-visual-caption {
  margin-top: 1.25rem;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.how-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.how-intro {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--charcoal);
  max-width: 42rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.how-step--active .step-detail {
  display: inline-block;
  background: var(--mint);
  color: var(--black);
  padding: 0.15rem 0.5rem;
  margin-top: 0.15rem;
  width: fit-content;
  transition: background 0.4s ease;
}

.step-label {
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.step-detail {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--charcoal);
}

/* ── Phone mockup ───────────────────────────────────────── */

.phone-mockup {
  position: relative;
  justify-self: end;
  width: min(260px, 100%);
  background: #111;
  border-radius: 2.5rem;
  padding: 0.75rem;
  box-shadow:
    0 32px 64px rgba(30, 58, 95, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

.phone-mockup::before,
.phone-mockup::after {
  content: '';
  position: absolute;
  border-radius: 4px;
  z-index: -1;
}

.phone-mockup::before {
  width: 48px;
  height: 48px;
  background: var(--pink);
  top: 12%;
  left: -20px;
}

.phone-mockup::after {
  width: 56px;
  height: 56px;
  background: var(--mint);
  bottom: 8%;
  right: -16px;
}

.phone-screen {
  background: #0b141a;
  border-radius: 2rem;
  overflow: hidden;
  aspect-ratio: 9 / 19;
}

.phone-screen video,
.phone-screen iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--black);
  color: #fff;
  padding: 1rem 1.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--charcoal);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  color: var(--black);
  padding: 1rem 1.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--black);
}

/* ── Our story ──────────────────────────────────────────── */

.story {
  background: var(--card);
  padding: 4rem 0 5rem;
  border-bottom: 1px solid var(--border-light);
}

.page-story .story {
  margin-top: calc(-1 * var(--site-header-height));
  padding: 3.5rem 0 4.5rem;
  padding-top: calc(3.5rem + var(--site-header-height));
}

.page-story .cta-band {
  margin-top: 3rem;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 3rem 4rem;
  align-items: center;
}

.story-portrait {
  margin: 0;
}

.story-portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.story-portrait figcaption {
  background: var(--mint);
  color: var(--black);
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 0.88rem;
  line-height: 1.4;
  padding: 0.8rem 1rem;
}

.story-header {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.story-copy .story-header,
.story-copy .story-body {
  max-width: none;
}

.story-eyebrow {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mint-dark);
  margin-bottom: 0.75rem;
}

.story-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.story-tags {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 0.9rem;
  color: var(--muted);
}

.story-body {
  max-width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.story-body p {
  font-size: 1.05rem;
  color: var(--charcoal);
  line-height: 1.75;
}

/* ── Features (Medly-style row) ─────────────────────────── */

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
  color: var(--black);
}

.section-title p {
  color: var(--muted);
}

.features {
  padding: 4rem 0 5rem;
  background: var(--card);
}

.features .section-title {
  width: min(1100px, 92%);
  margin: 0 auto 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: min(1100px, 92%);
  margin: 0 auto;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.feature-card:hover {
  transform: none;
  box-shadow: none;
}

.feature-art {
  position: relative;
  height: 160px;
  border-radius: 12px;
  background: #ecfdf3;
  overflow: hidden;
}

/* shared illustration primitives */
.art-line {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--mint-dark);
}

.art-line--long { width: 72%; }
.art-line--mid { width: 58%; }
.art-line--short { width: 48%; }
.art-line--fade {
  background: rgba(0, 217, 119, 0.35);
  height: 6px;
}

.art-sheet {
  position: absolute;
  border-radius: 10px;
  border: 2px solid var(--mint-dark);
  background: #fff;
}

.art-sheet--back {
  width: 68%;
  height: 72%;
  top: 14%;
  left: 10%;
  background: rgba(0, 255, 139, 0.15);
  border-color: rgba(0, 217, 119, 0.4);
  transform: rotate(-6deg);
}

.art-sheet--front {
  width: 72%;
  height: 76%;
  top: 10%;
  right: 8%;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--mint-dark);
  border-color: var(--mint-dark);
}

.art-sheet--front .art-line {
  background: rgba(255, 255, 255, 0.92);
}

.art-sheet--front .art-line--short {
  background: rgba(255, 255, 255, 0.55);
}

/* Ask anything */
.feature-art--ask .art-bubble {
  width: 28px;
  height: 20px;
  border-radius: 10px 10px 10px 2px;
  background: #fff;
  margin-bottom: 2px;
}

.feature-art--notes .art-spark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mint);
  margin-top: auto;
  align-self: flex-end;
}

/* Practice questions */
.feature-art--quiz {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.art-quiz-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.art-quiz-row--option {
  padding-left: 4px;
}

.art-q-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mint-dark);
  line-height: 1;
  min-width: 1.25rem;
}

.art-option {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(0, 217, 119, 0.45);
}

.art-option--active {
  background: var(--mint-dark);
  border-color: var(--mint-dark);
}

.feature-art--quiz .art-line {
  width: 100%;
}

/* Past papers / marking */
.feature-art--mark {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.art-mark-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.art-mark-bottom {
  background: rgba(0, 255, 139, 0.2);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
}

.art-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.art-badge--pass {
  background: var(--mint-dark);
}

.art-badge--fail {
  background: rgba(0, 217, 119, 0.45);
}

.art-mark-bottom .art-line {
  background: var(--mint-dark);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0;
  color: var(--black);
  line-height: 1.3;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Videos ─────────────────────────────────────────────── */

.videos {
  padding: 3rem 0 5rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.video-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.06);
}

.video-wrapper {
  background: #000;
  aspect-ratio: 9 / 16;
  max-height: 520px;
}

.video-wrapper video,
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 0;
}

.video-card figcaption {
  padding: 1.25rem 1.5rem;
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.video-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: var(--black);
}

.video-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── CTA band ───────────────────────────────────────────── */

.cta-band {
  background: var(--black);
  border-radius: 4px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 4rem;
  color: #fff;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.cta-band h2 span {
  background: var(--mint);
  color: var(--black);
  padding: 0 0.35rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.75rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-band .btn-primary {
  background: var(--mint);
  color: var(--black);
}

.cta-band .btn-primary:hover {
  background: var(--mint-dark);
  box-shadow: 0 10px 30px rgba(0, 255, 139, 0.25);
}

/* ── Footer ─────────────────────────────────────────────── */

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--bg-soft);
}

footer p + p {
  margin-top: 0.35rem;
}

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

footer a:hover {
  color: var(--black);
  text-decoration: underline;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 0.85rem 0.65rem;
  }

  .nav-pill {
    grid-template-columns: 1fr auto;
    padding: 0.45rem 0.45rem 0.45rem 0.85rem;
    gap: 0.75rem;
  }

  .nav-links {
    display: none;
  }

  .hero-spotlight-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-spotlight-content {
    order: 2;
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .hero-headline {
    align-items: center;
  }

  .hero-headline-line {
    white-space: normal;
    text-align: center;
  }

  .phone-mockup--hero {
    order: 1;
    justify-self: center;
    width: min(240px, 72%);
  }

  .hero-subtext {
    align-items: center;
  }

  .hero-subtext-line {
    white-space: normal;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .feature-grid {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .feature-card {
    scroll-snap-align: start;
    min-width: 200px;
  }

  .how-it-works-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .how-visual-panel {
    order: -1;
    justify-self: center;
    max-width: 280px;
    min-height: 400px;
  }

  .how-steps {
    max-width: none;
  }

  .story-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .story-portrait {
    max-width: 360px;
    margin: 0 auto;
  }
}
