/* ============================================================
   Pulse marketing site — same tokens as the product (identity
   preservation: this is the same brand, not a new one).
   ============================================================ */
:root {
  --bg:        #E8E1D4;
  --ground:    #DDD5C4;
  --surface:   #F2EDE2;
  --surface-2: #EDE7D9;
  --ink:       #1B2430;
  --ink-soft:  #545A60;
  --ink-faint: color-mix(in srgb, var(--ink) 14%, transparent);
  --ink-ghost: color-mix(in srgb, var(--ink) 6%, transparent);

  --live:      #FF5A3C;
  --live-deep: #A93413;
  --live-tint: color-mix(in srgb, var(--live) 12%, transparent);

  --calm:      #8FA383;
  --calm-deep: #4E5D44;
  --calm-tint: color-mix(in srgb, var(--calm) 20%, transparent);

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --speed: 200ms;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);

  --z-topbar: 10;

  /* Fixed regardless of theme — box-shadows and modal dimming need to stay
     dark in both modes; only --ink itself flips for text/surfaces. */
  --shadow: #1B2430;
}

/* Dark mode — the exact light/dark pairs from ios/Pulse/Theme.swift's
   Color(light:dark:) tokens, not an independently-invented palette, so the
   site and the app switch to the same look. live/calm (decorative,
   high-saturation accents) stay identical across modes in both places. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #1B1814;
    --surface:   #24201A;
    --surface-2: #2C271F;
    --ink:       #EDE6D8;
    --ink-soft:  #A79E8E;
    --live-deep: #FF9478;
    --calm-deep: #B9C7AE;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Per the CSS Overflow spec, setting only overflow-x to a non-visible
     value still forces overflow-y's USED value to auto (the "if one axis
     is visible and the other isn't, the visible one becomes auto" rule) —
     which makes body its own scroll container and breaks position:sticky
     for every descendant (the topbar, the showcase stage). Pinning
     overflow-y explicitly prevents that implicit conversion. */
  overflow-x: clip;
  overflow-y: visible;
}

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.text-balance { text-wrap: balance; }
.mono-inline { font-family: var(--font-mono); font-size: 0.9em; color: var(--live-deep); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   the pulse ring motif — the ONE animation on this page
   ============================================================ */
.mark { position: relative; display: inline-flex; width: 0.875rem; height: 0.875rem; flex: none; vertical-align: -0.05em; }
.mark--sm { width: 0.625rem; height: 0.625rem; }
.mark--lg { width: 5rem; height: 5rem; }
.mark-dot {
  position: absolute; inset: 0; margin: auto;
  width: 55%; height: 55%; border-radius: 50%;
  background: var(--live);
}
.mark-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--live);
  animation: mark-breathe 2.6s var(--ease) infinite;
}
.mark--lg .mark-ring { border-width: 2px; }
.mark-ring--delay { animation-delay: 1.3s; }
@keyframes mark-breathe {
  0%   { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mark-ring { animation: none; transform: scale(1.7); opacity: 0.35; }
  .mark-ring--delay { display: none; }
}

/* ============================================================
   top bar
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: var(--z-topbar);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-faint);
}
.topbar-inner {
  max-width: 72rem; margin-inline: auto;
  padding: 0.875rem 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  text-decoration: none; color: var(--ink); letter-spacing: -0.01em;
}
.topbar-by {
  font-size: 0.8125rem; color: var(--ink-soft);
  margin-left: 0.25rem;
  display: none;
}
.topbar-by-link { color: inherit; text-decoration: none; }
.topbar-by-link:hover strong { text-decoration: underline; }
.topbar-cta {
  margin-left: auto;
  font-size: 0.875rem; font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  transition: background-color var(--speed) var(--ease);
  white-space: nowrap;
}
.topbar-cta:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }

@media (min-width: 40rem) {
  .topbar-by { display: inline; }
}

/* ============================================================
   buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9375rem; font-weight: 600;
  text-decoration: none;
  transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); transform: translateY(-1px); }
.btn--ghost { background: transparent; border: 1.5px solid var(--ink-faint); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-soft); }

/* ============================================================
   layout shell
   ============================================================ */
main { max-width: 72rem; margin-inline: auto; padding-inline: 1.25rem; }

/* ============================================================
   hero — full-bleed section (breaks out of main's centered
   max-width), asymmetric, two overlapping full-screen phones
   ============================================================ */
.hero {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: 1.25rem;
  background: var(--bg);
}
.hero-inner {
  width: 100%;
  min-width: 0; /* .hero is now a flex container (for the full-height centering);
                   without this, its flex-item child refuses to shrink below
                   its content's natural width and overflows narrow viewports */
  max-width: 78rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* without an explicit column, the
    implicit auto-sized column shrinks to fit content instead of filling the
    container, overflowing narrow viewports */
  gap: 3rem;
  padding-block: 3rem 2.5rem;
  align-items: center;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; font-weight: 600; color: var(--live-deep);
  margin-bottom: 1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 38rem;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

/* phone screenshots are full, uncropped app screens (~1:2.05) —
   sized narrow enough that two overlapping full-height phones still
   fit the hero comfortably */
.hero-visual {
  position: relative;
  width: 17rem;
  height: 22.5rem;
  justify-self: center;
  margin-inline: auto;
  perspective: 1600px;
}
.phone {
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--shadow) 35%, transparent), 0 0 0 1px var(--ink-faint);
  transition: transform 0.3s var(--ease);
}
.phone img { width: 100%; height: auto; display: block; }
.hero-visual .phone {
  position: absolute;
  width: 9.5rem;
}
.phone--back { top: 0; left: 0; transform: rotateY(18deg) rotateZ(-6deg); opacity: 0.9; }
.phone--front { top: 1.5rem; left: 6.25rem; transform: rotateY(-14deg) rotateZ(4deg); }
@media (prefers-reduced-motion: reduce) { .phone { transition: none; } }

@media (min-width: 56rem) {
  /* below this, the hero is a single stacked column that should size to its
     own content; at desktop width it's a true two-column layout, so filling
     the screen and centering the text against the phone graphic reads as
     intentional instead of leaving a gap or clipping the phones at the fold */
  .hero {
    min-height: calc(100dvh - 4.5rem);
    display: flex;
    align-items: center;
  }
  .hero-inner { grid-template-columns: 1.15fr 1fr; padding-block: 5.5rem 4rem; }
  .hero-visual { width: 22rem; height: 27rem; justify-self: end; margin-inline: 0; }
  .hero-visual .phone { width: 12rem; }
  .phone--back { top: 0; left: 0; }
  .phone--front { left: 8.5rem; top: 2.5rem; }
}

/* ============================================================
   the problem — left-aligned, a different rhythm from the
   centered motif section later, closing on a bold direct answer
   ============================================================ */
.problem {
  border-top: 1px solid var(--ink-faint);
  padding-block: 4.5rem;
}
.problem-inner { max-width: 42rem; }
.problem-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.problem-body {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 38rem;
}
.problem-answer {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 34rem;
}

/* ============================================================
   scroll-driven showcase
   — desktop: a pinned 3D phone crossfades + rotates while text
     panels scroll past beside it
   — mobile: sticky-pin doesn't suit short viewports, so each
     panel carries its own phone that tilts in on scroll instead
   ============================================================ */
.showcase {
  padding-block: 2rem;
  border-top: 1px solid var(--ink-faint);
}
.showcase-grid { display: block; }

/* ---- desktop pinned stage (hidden by default; shown at 64rem+) ---- */
.showcase-stage-wrap { display: none; }

/* ---- mobile/tablet: per-panel phone, tilts in on scroll ---- */
.showcase-track { display: flex; flex-direction: column; gap: 4rem; }
.showcase-panel { max-width: 34rem; margin-inline: auto; }
.panel-phone {
  position: relative;
  width: min(17rem, 78vw);
  aspect-ratio: 1206 / 2477;
  margin: 0 auto 1.75rem;
  perspective: 1400px;
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 26px 50px -18px color-mix(in srgb, var(--shadow) 32%, transparent), 0 0 0 1px var(--ink-faint);
  transform: rotateY(-22deg) rotateX(4deg) translateY(14px);
  opacity: 0;
  transition: transform 0.9s var(--ease), opacity 0.9s var(--ease);
}
.panel-phone.is-visible { transform: rotateY(0deg) rotateX(0deg) translateY(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .panel-phone { transition: opacity 0.3s linear; transform: none; opacity: 1; }
}

.showcase-caption {
  margin-top: 0.9rem; padding: 0.6rem 0.85rem; border-radius: 0.6rem;
  background: var(--surface-2); border-left: 2px solid var(--live);
  font-size: 0.82rem; color: var(--ink-soft); min-height: 2.6em;
  transition: opacity 0.15s linear;
}
.showcase-caption:empty { display: none; }
.showcase-caption strong { color: var(--ink); font-weight: 600; }

@media (min-width: 64rem) {
  .showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    /* stretch (the default) is required here, not start — the sticky
       stage's containing block must span the track's full height for
       it to stay pinned across the whole scroll range */
  }

  .showcase-stage-wrap { display: block; }
  .showcase-stage {
    position: sticky;
    top: 7rem;
    height: calc(100vh - 9rem);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .showcase-phone {
    position: relative;
    width: 17rem;
    aspect-ratio: 1206 / 2477;
    perspective: 1600px;
    transition: transform 0.4s var(--ease);
  }
  .showcase-screen {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    background: var(--bg);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 30px 60px -18px color-mix(in srgb, var(--shadow) 34%, transparent), 0 0 0 1px var(--ink-faint);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s var(--ease);
  }
  .showcase-screen.is-active { opacity: 1; pointer-events: auto; }
  @media (prefers-reduced-motion: reduce) {
    .showcase-screen { transition: opacity 0.2s linear; }
    .showcase-phone { transition: none; }
  }

  /* per-panel phones are redundant once the shared stage is showing */
  .panel-phone { display: none; }

  .showcase-track { gap: 42vh; padding-block: 12vh 30vh; }
  .showcase-panel { max-width: 30rem; margin-inline: 0; }
}

/* ============================================================
   Interactive phone-demo screens (phone-demo.js) — canned/fake
   data rendered as real app-like UI inside .showcase-screen. This
   is a faithful recreation of the actual SwiftUI screens (fonts,
   sizes, colors pulled directly from Theme.swift / CircleListView
   / WideFeedView / GroupDetailView / Components.swift — not
   approximated), same design tokens as the product itself.
   Scale: 1pt in the real app ≈ 0.052rem here.
   ============================================================ */
.pdemo {
  display: flex; flex-direction: column; height: 100%;
  font-family: var(--font-body); line-height: 1.35; background: var(--bg);
}
.pdemo-nav {
  flex: none; padding: 0.85rem 0.8rem 0.5rem; display: flex; align-items: center; justify-content: space-between;
}
.pdemo-nav-title {
  font-family: var(--font-body); font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em;
}
.pdemo-nav-add {
  all: unset; cursor: pointer; width: 1.4rem; height: 1.4rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; color: var(--ink); font-size: 0.95rem; line-height: 1;
}
.pdemo-body { flex: 1; overflow: hidden; padding: 0 0.7rem; display: flex; flex-direction: column; gap: 0.55rem; position: relative; }

.pdemo-back {
  all: unset; cursor: pointer; font-size: 0.66rem; font-weight: 600; color: var(--ink);
  padding: 0.15rem 0; margin-bottom: 0.15rem; display: flex; align-items: center; gap: 0.15rem;
}
.pdemo-back:hover { opacity: 0.7; }

/* ---- Circle list: one Card, rows separated by a divider ---- */
.pdemo-card {
  background: var(--surface); border: 1px solid var(--ink-faint); border-radius: 0.85rem;
  overflow: hidden;
}
.pdemo-row-divider { height: 1px; background: var(--ink-faint); margin: 0 0.7rem; }

.pdemo-circle-row {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem; box-sizing: border-box; width: 100%;
}
.pdemo-avatar {
  position: relative; flex: none; width: 2.1rem; height: 2.1rem; border-radius: 999px;
  background: var(--calm-tint); display: flex; align-items: center; justify-content: center;
  font-size: 0.83rem; font-weight: 600; color: var(--ink);
}
.pdemo-avatar img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
/* PulseRing: a solid coral dot + a breathing stroked ring around it, exactly
   matching Components.swift's PulseRing animation. */
.pdemo-pulse-ring {
  position: absolute; right: -0.05rem; bottom: -0.05rem; width: 0.6rem; height: 0.6rem;
}
.pdemo-pulse-ring::before, .pdemo-pulse-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
}
.pdemo-pulse-ring::before { background: var(--live); }
.pdemo-pulse-ring::after {
  border: 1px solid var(--live); animation: pdemo-breathe 1.8s ease-out infinite;
}
@keyframes pdemo-breathe {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .pdemo-pulse-ring::after { animation: none; opacity: 0.4; } }

.pdemo-row-title { font-size: 0.83rem; font-weight: 600; color: var(--ink); }
.pdemo-row-sub {
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-soft); margin-top: 0.1rem;
}
.pdemo-row-sub.is-nudge { color: var(--live-deep); }
.pdemo-row-chevron { color: color-mix(in srgb, var(--ink-soft) 60%, transparent); font-size: 0.68rem; font-weight: 600; }

/* ---- Prompt card (blind + revealed) ---- */
.pdemo-label { font-size: 0.62rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 0.35rem; }
.pdemo-prompt-question {
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--ink);
  margin: 0 0 0.7rem; line-height: 1.2;
}
.pdemo-btn {
  all: unset; cursor: pointer; display: block; text-align: center; box-sizing: border-box; width: 100%;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.68rem;
  padding: 0.55rem; border-radius: 999px;
}
.pdemo-btn:hover { opacity: 0.9; }
.pdemo-blind-note { font-size: 0.62rem; color: var(--ink-soft); margin: 0.5rem 0 0; text-align: center; }

.pdemo-reveal-label { font-size: 0.62rem; font-weight: 600; color: var(--calm-deep); margin: 0 0 0.2rem; }
.pdemo-response {
  background: var(--surface); border: 1px solid var(--ink-faint); border-radius: 0.75rem; padding: 0.6rem 0.65rem;
  animation: pdemo-response-in 0.35s var(--ease) backwards;
}
@keyframes pdemo-response-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.pdemo-response-name { font-size: 0.68rem; font-weight: 600; color: var(--ink); }
.pdemo-response-text { font-size: 0.7rem; color: var(--ink); margin: 0.15rem 0 0.4rem; }
.pdemo-reactions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.pdemo-react-btn {
  all: unset; cursor: pointer; font-size: 0.6rem; font-weight: 600; color: var(--ink-soft);
  background: var(--ink-ghost); border-radius: 999px; padding: 0.18rem 0.5rem; transition: transform 0.15s var(--ease);
}
.pdemo-react-btn:active { transform: scale(0.92); }
.pdemo-react-btn.is-mine { background: var(--live-tint); color: var(--live-deep); }

.pdemo-joincode { font-family: var(--font-mono); font-weight: 600; font-size: 0.83rem; color: var(--ink); margin: 0.4rem 0; }

/* ---- Wide feed: organic-height 2-col board, not a rigid square grid ---- */
.pdemo-wide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; align-items: start; }
.pdemo-wide-card {
  all: unset; cursor: pointer; display: block; box-sizing: border-box; width: 100%;
  background: var(--surface); border: 1px solid var(--ink-faint); border-radius: 0.75rem; padding: 0.6rem;
}
.pdemo-wide-card:nth-child(4n+2) { transform: rotate(0.4deg) translateY(0.5rem); }
.pdemo-wide-card:nth-child(4n+3) { transform: rotate(-0.3deg); }
.pdemo-wide-card:nth-child(4n+4) { transform: rotate(0.5deg) translateY(0.5rem); }
.pdemo-wide-photo { width: 100%; aspect-ratio: 1.5; object-fit: cover; border-radius: 0.5rem; background: var(--surface-2); margin-bottom: 0.45rem; }
.pdemo-wide-handle { font-size: 0.58rem; font-weight: 600; color: var(--ink-soft); }
.pdemo-wide-content { font-size: 0.68rem; color: var(--ink); margin: 0.25rem 0 0.4rem; line-height: 1.3; }
.pdemo-tag-row { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.pdemo-tag {
  font-size: 0.56rem; font-weight: 500; color: var(--ink-soft); background: var(--surface-2);
  padding: 0.15rem 0.4rem; border-radius: 999px;
}
.pdemo-round { font-size: 0.56rem; font-weight: 600; }
.pdemo-round-row { display: flex; align-items: center; gap: 0.3rem; }
.pdemo-round-dot { width: 0.32rem; height: 0.32rem; border-radius: 999px; flex: none; }
.pdemo-round.is-live { color: var(--live-deep); }
.pdemo-round.is-live .pdemo-round-dot { background: var(--live); }
.pdemo-round.is-complete { color: var(--calm-deep); }
.pdemo-round.is-complete .pdemo-round-dot { background: var(--calm); }
.pdemo-round-count { font-family: var(--font-mono); margin-left: auto; }
.pdemo-round-meter { height: 0.2rem; border-radius: 999px; background: var(--ink-faint); overflow: hidden; margin-top: 0.3rem; }
.pdemo-round-fill { height: 100%; background: var(--live); }

.pdemo-detail-photo { width: 100%; aspect-ratio: 1.2; object-fit: cover; border-radius: 0.8rem; background: var(--surface-2); margin-bottom: 0.5rem; }

/* ---- Bottom chrome: status pill + tab bar (persistent, tappable) ---- */
.pdemo-status {
  flex: none; margin: 0.5rem 0.7rem 0; padding: 0.4rem 0.4rem 0.4rem 0.6rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--ink-faint);
  display: flex; align-items: center; gap: 0.4rem;
}
.pdemo-status-dot { width: 0.35rem; height: 0.35rem; border-radius: 999px; background: var(--live); flex: none; }
.pdemo-status-text { flex: 1; font-size: 0.62rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdemo-status-add {
  flex: none; width: 1.3rem; height: 1.3rem; border-radius: 999px; background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 0.68rem;
}
.pdemo-tabbar {
  flex: none; margin: 0.4rem 0.7rem 0.6rem; padding: 0.35rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--ink-faint);
  display: flex; justify-content: space-around;
}
.pdemo-tab {
  all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  padding: 0.2rem 0.45rem; border-radius: 999px; color: var(--ink-soft);
}
.pdemo-tab svg { width: 0.85rem; height: 0.85rem; }
.pdemo-tab span { font-size: 0.5rem; font-weight: 600; }
.pdemo-tab.is-active { background: var(--ink-ghost); color: var(--ink); }

/* ---- push/pop navigation transition ---- */
.pdemo-screen-content { animation: pdemo-push-in 0.28s var(--ease); }
@keyframes pdemo-push-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .pdemo-screen-content, .pdemo-response { animation: none; }
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.feature-body {
  margin-top: 1.125rem;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 34rem;
}
.feature-list {
  margin-top: 1.25rem;
  display: flex; flex-direction: column; gap: 0.625rem;
}
.feature-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--ink);
}
.feature-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--calm);
}

@media (min-width: 56rem) {
  .feature { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .feature--reverse .feature-media { order: 0; }
}

/* ============================================================
   motif showcase — one dominant idea, full width, calm
   ============================================================ */
.motif {
  text-align: center;
  padding-block: 5rem;
  border-top: 1px solid var(--ink-faint);
}
.motif-demo { margin-bottom: 2rem; }
.motif-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
  max-width: 34rem;
  margin-inline: auto;
}
.motif-body {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 32rem;
  margin-inline: auto;
}

/* ============================================================
   real-screenshot gallery — genuine device captures, click to
   enlarge in a lightbox (reuses the .modal <dialog> pattern)
   ============================================================ */
.gallery {
  border-top: 1px solid var(--ink-faint);
  padding-block: 5rem;
}
.gallery-inner { max-width: 64rem; margin-inline: auto; text-align: center; }
.gallery-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: -0.02em;
}
.gallery-sub { margin-top: 0.75rem; font-size: 1rem; color: var(--ink-soft); }
.gallery-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.gallery-item {
  all: unset;
  cursor: pointer;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 16px 32px -16px color-mix(in srgb, var(--shadow) 28%, transparent), 0 0 0 1px var(--ink-faint);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.gallery-item:hover, .gallery-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -16px color-mix(in srgb, var(--shadow) 34%, transparent), 0 0 0 1px var(--ink-faint);
}
.gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 1206 / 2622; object-fit: cover; }
.gallery-caption {
  display: block;
  padding: 0.75rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-align: left;
  border-top: 1px solid var(--ink-faint);
}

@media (min-width: 40rem) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.modal--lightbox { max-width: 22rem; background: transparent; box-shadow: none; }
.modal--lightbox .modal-inner { background: var(--surface); border-radius: 1.25rem; overflow: hidden; }
.modal--lightbox .modal-close { background: var(--ink); color: var(--bg); }
.modal--lightbox .modal-close:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.lightbox-img { display: block; width: 100%; height: auto; }

/* ============================================================
   why it's different — paired problem/answer rows, not a
   literal table (keeps the editorial voice instead of a
   spreadsheet look)
   ============================================================ */
.compare {
  border-top: 1px solid var(--ink-faint);
  padding-block: 5rem;
}
.compare-inner { max-width: 46rem; margin-inline: auto; }
.compare-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: -0.02em;
  text-align: center;
}
.compare-list { margin-top: 2.5rem; display: flex; flex-direction: column; }
.compare-row {
  padding-block: 1.25rem;
  border-top: 1px solid var(--ink-faint);
  display: grid;
  gap: 0.375rem;
}
.compare-problem { font-size: 0.9375rem; color: var(--ink-soft); }
.compare-problem::before { content: "\2715  "; color: var(--live-deep); font-weight: 700; }
.compare-answer { font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.compare-answer::before { content: "\2713  "; color: var(--calm-deep); font-weight: 700; }

@media (min-width: 40rem) {
  .compare-row { grid-template-columns: 1fr 1fr; align-items: center; gap: 1.5rem; }
}

/* ============================================================
   what's coming — an honest, explicit roadmap list
   ============================================================ */
.roadmap {
  border-top: 1px solid var(--ink-faint);
  padding-block: 5rem;
}
.roadmap-inner { max-width: 58rem; margin-inline: auto; }
.roadmap-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: -0.02em;
}
.roadmap-sub { margin-top: 0.75rem; font-size: 1rem; color: var(--ink-soft); }
.roadmap-list {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem 2.5rem;
}
.roadmap-list li { display: flex; gap: 0.75rem; align-items: baseline; }
.roadmap-list p { font-size: 0.9375rem; color: var(--ink-soft); }
.roadmap-list strong { color: var(--ink); font-weight: 600; }
.roadmap-tag {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  background: var(--calm-tint);
  color: var(--calm-deep);
  transform: translateY(0.2em);
}

/* ============================================================
   waitlist
   ============================================================ */
.waitlist {
  padding-block: 5rem 4rem;
  border-top: 1px solid var(--ink-faint);
  text-align: center;
}
.waitlist-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}
.waitlist-sub {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
/* Brevo's embed structure (#sib-form-container, #sib-container, the
   sib-container--* classes) needs no styling of its own — it's just
   wrapper divs. Everything visual below targets our own classes plus
   the few Brevo classes/ids its main.js reads to submit and validate. */
.sib-form-container, #sib-container { display: block; }

.waitlist-form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 26rem;
  margin-inline: auto;
}
.waitlist-input {
  font: inherit;
  font-size: 1rem;
  padding: 0.875rem 1.125rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink-faint);
  background: var(--surface);
  color: var(--ink);
}
.waitlist-input::placeholder { color: var(--ink-soft); opacity: 0.85; }
.waitlist-input:focus-visible { border-color: var(--ink-soft); }

/* Per-field validation message Brevo's script fills in on invalid submit. */
.waitlist-field-error {
  display: block;
  min-height: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--live-deep);
  text-align: left;
  padding-inline: 0.25rem;
}

.waitlist-submit { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; white-space: nowrap; }
.waitlist-spinner-icon {
  width: 1rem; height: 1rem;
  fill: currentColor;
  animation: spin 0.7s linear infinite;
}
/* Brevo's own class name for this icon's default (pre-submit) state. */
.sib-hide-loader-icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .waitlist-spinner-icon { animation: none; }
}

/* Brevo's success/error panels — hidden by default; its script reveals
   whichever one applies after a submit attempt (their base stylesheet did
   this with the same bare selector, which we're not loading, so it's
   re-declared here). */
.sib-form-message-panel { display: none; }
.waitlist-message {
  margin-top: 1rem;
  max-width: 26rem;
  margin-inline: auto;
  padding: 0.75rem 1.125rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
}
.waitlist-message--ok { background: var(--calm-tint); color: var(--calm-deep); }
.waitlist-message--error { background: var(--live-tint); color: var(--live-deep); }
.waitlist-message p { margin: 0; }

.waitlist-fine { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--ink-soft); }

@media (min-width: 30rem) {
  .waitlist-form { flex-direction: row; }
  .waitlist-input { flex: 1; }
  .waitlist-submit { flex-shrink: 0; }
}

/* ============================================================
   footer
   ============================================================ */
.foot {
  border-top: 1px solid var(--ink-faint);
  padding: 2rem 1.25rem 3rem;
  text-align: center;
}
.foot-brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; color: var(--ink-soft);
}
.foot strong { color: var(--ink); font-weight: 600; }
.foot-brand-link { color: inherit; text-decoration: none; }
.foot-brand-link:hover strong { text-decoration: underline; }
.foot-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.foot-links a, .foot-link-btn {
  font: inherit;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.foot-links a:hover, .foot-link-btn:hover { color: var(--ink); text-decoration: underline; }

/* ============================================================
   legal pages (privacy / terms) — long-form content, sized and
   spaced like the rest of the site's sections (same title scale
   as .problem/.compare/.roadmap, same border-top rhythm) rather
   than a standalone hero, so they read as part of the site
   ============================================================ */
.legal {
  border-top: 1px solid var(--ink-faint);
  padding-block: 4.5rem 6rem;
}
.legal-inner { max-width: 42rem; margin-inline: auto; }
.legal-title {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  letter-spacing: -0.02em;
}
.legal-updated { margin-top: 0.5rem; font-size: 0.8125rem; color: var(--ink-soft); }
.legal-inner p { margin-top: 1.125rem; font-size: 1rem; line-height: 1.65; color: var(--ink-soft); max-width: 68ch; }
.legal-inner p strong { color: var(--ink); font-weight: 600; }
.legal-inner a { color: var(--ink); text-decoration-color: var(--ink-faint); }
.legal-inner h2 {
  margin-top: 2.5rem;
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.legal-inner ul { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.625rem; max-width: 68ch; }
.legal-inner li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.legal-inner li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--calm);
}
.legal-inner li strong { color: var(--ink); font-weight: 600; }
.legal-inline-btn {
  font: inherit;
  font-size: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-faint);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.legal-inline-btn:hover { text-decoration-color: var(--ink); }

/* ============================================================
   unsubscribe modal — native <dialog>, brand-styled backdrop and
   card; the actual form lives in an isolated iframe (unsubscribe.html)
   so Brevo's hardcoded element ids never collide with the waitlist
   form's identical ids elsewhere on the page
   ============================================================ */
.modal {
  border: none;
  border-radius: 1.25rem;
  padding: 0;
  max-width: 26rem;
  width: calc(100% - 2.5rem);
  background: var(--surface);
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--shadow) 40%, transparent);
}
.modal::backdrop { background: color-mix(in srgb, var(--shadow) 45%, transparent); }
.modal-inner { position: relative; }
.modal-close {
  position: absolute;
  top: 0.625rem; right: 0.625rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--ink-ghost);
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.modal-close:hover { background: var(--ink-faint); color: var(--ink); }
.modal-frame {
  display: block;
  width: 100%;
  height: 17rem;
  border: none;
  border-radius: 1.25rem;
}
