/* Driftto — landing page (site/index.html).
   Loaded after styles.css: reuses its :root tokens and reset, adds layout
   for the marketing page only. No hex here — every color is a var() from
   styles.css; add a token there first if one is missing. */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--space-6);
}

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-hairline);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.nav-brand .wordmark {
  height: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-link {
  font-size: 15px;
  color: var(--color-ink-secondary);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-ink);
}

/* ---------- Buttons ---------- */
/* accentButton (#D93F12) is the only fill that ever carries white text —
   #FE4B1B under white text measures 3.3:1 and fails the 4.5:1 minimum. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding-inline: var(--space-5);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-accent-button);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-hairline);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-7);
  padding-block: var(--space-7) var(--space-9);
}

.hero-copy {
  max-width: 480px;
}

.hero-title {
  margin: 0;
  font-size: 52px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.hero-subtitle {
  margin: var(--space-4) 0 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--color-ink-secondary);
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero-caption {
  margin: var(--space-3) 0 0;
  font-size: 13px;
  color: var(--color-ink-placeholder);
}

/* One radial glow, not a bounded card — the phone used to sit small
   inside a hard grey rectangle, which is exactly what read as "a small
   square" instead of a product (Jacky, via CEO, 2026-08-06). The glow
   fades to the page background at its own edges, so there's no second
   hard edge to compete with the device — still the single gradient
   plane the brand guide allows, just shaped as air instead of a box. */
.hero-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse 65% 75% at 50% 50%, var(--color-surface) 0%, var(--color-background) 72%);
  padding: var(--space-8) 0;
}

/* ---------- Phone mockup (shared: hero + connections section) ---------- */

/* Intrinsic height by default — right for a short, real screen like
   Connections. The hero phone needs the real device proportion instead
   (see .phone-device below): cropping it to content read as squashed,
   a ratio that doesn't exist on any iPhone (CEO, 2026-08-06). */
.phone {
  width: 260px;
  background: var(--color-background);
  border: 10px solid var(--color-ink);
  border-radius: 44px;
  box-shadow: var(--shadow-tile);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 390×844 — the design system's own reference width (DRIFTTO_DESIGN.md,
   "Design width 390pt"). The gap under a short note is real device
   behavior, not a bug — the fix is a real 2-3 line note, not the ratio.
   Sized up from the shared 260px .phone default and scaled by min()
   instead of a breakpoint table — a phone that reads as "a small
   square" was Jacky's exact complaint, and the bezel stays on at every
   width now (see the removed 560px override below): a phone without
   its frame reads as a blank rectangle, not a smaller phone. */
.phone-device {
  width: min(320px, 78vw);
  aspect-ratio: 390 / 844;
}

.phone-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--space-4) 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
}

.phone-statusbar svg {
  display: block;
}

.phone-navcluster {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-3) var(--space-4) 0;
}

.phone-navcluster-pill {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 32px;
  padding-inline: 12px;
  background: var(--color-white);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
}

.phone-back {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4) 0;
}

.phone-display {
  margin-top: var(--space-6);
  padding-inline: var(--space-4);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.28;
  color: var(--color-ink);
}

/* Hero demo loop — the one authored motion moment on this page. Jacky's
   complaint was that the hero didn't show what the app does; a static
   note answers "what it looks like," not "what it does." This dramatizes
   the actual mechanism (capture, then confirmed by name) using the
   real app's own confirmation copy pattern (`Sent to ${label}.`,
   index.tsx) and its real CircleCheck/ink treatment — a compressed,
   honest restaging for a hero moment, not an invented capability. */
/* Both layers are absolutely positioned so they cross-fade in place
   instead of pushing each other down the flex column — which collapses
   this wrapper to zero height unless given one explicitly. Sized to
   the capture text's own wrapped height at the phone's real width, not
   a round number — see the render check before shipping. */
.phone-demo {
  position: relative;
  margin-top: var(--space-6);
  min-height: 86px;
}

.phone-demo-capture,
.phone-demo-confirm {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin-top: 0;
}

/* One row per destination — font-size/weight inherit from the shared
   .phone-display class on this same element, so each row only needs
   its own icon+text layout. */
.phone-demo-confirm {
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
}

.phone-confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.phone-confirm-row svg {
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .phone-demo-capture {
    animation: phone-demo-capture 8s ease-in-out infinite;
  }

  .phone-demo-confirm {
    animation: phone-demo-confirm 8s ease-in-out infinite;
  }

  .phone-send-demo {
    animation: phone-demo-send-pulse 8s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* A visitor who asked for less motion still gets the proof — the
     loop just settles on its end state instead of playing it. */
  .phone-demo-capture {
    opacity: 0;
  }

  .phone-demo-confirm {
    opacity: 1;
  }
}

@keyframes phone-demo-capture {
  0%, 3% { opacity: 0; transform: translateY(6px); }
  9%, 47% { opacity: 1; transform: translateY(0); }
  55%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes phone-demo-confirm {
  0%, 59% { opacity: 0; transform: translateY(6px); }
  65%, 93% { opacity: 1; transform: translateY(0); }
  99%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes phone-demo-send-pulse {
  0%, 49% { transform: scale(1); }
  53% { transform: scale(1.18); }
  58%, 100% { transform: scale(1); }
}

.phone-title {
  margin-top: var(--space-4);
  padding-inline: var(--space-4);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-ink);
}

.phone-title-sub {
  margin-top: 2px;
  padding-inline: var(--space-4);
  font-size: 12px;
  color: var(--color-ink-secondary);
}

/* A fixed breathing gap, not flex:1 — the bar sits close under the text
   instead of pinned to a full device height that leaves the middle empty. */
/* Fills the real device height below the note, pushing the bar to the
   bottom — this is only used on .phone-device (the hero), which has a
   fixed aspect-ratio again, so flex:1 has a real height to fill. */
.phone-spacer {
  flex: 1;
}

.phone-bar {
  margin: 0 8px 8px;
  background: var(--color-ink);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.phone-bar-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.phone-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 6px;
  background: var(--color-chip-fill);
  border-radius: var(--radius-pill);
  min-width: 0;
}

.phone-chip-icon {
  width: 12px;
  height: 12px;
  flex: none;
  display: flex;
}

.phone-chip-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-send {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-button);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* Connections list rows, inside the connections phone mockup */

.phone-conn-list {
  margin-top: var(--space-4);
  padding-inline: var(--space-4);
  padding-bottom: var(--space-5);
  display: flex;
  flex-direction: column;
}

.phone-conn-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: 10px;
  border-top: 1px solid var(--color-hairline);
}

.phone-conn-row:first-child {
  border-top: none;
}

.phone-conn-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--color-white);
  border: 1px solid var(--color-hairline);
  box-shadow: var(--shadow-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.phone-conn-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ink);
}

.phone-conn-sub {
  font-size: 10px;
  color: var(--color-ink-secondary);
  margin-top: 1px;
}

.phone-conn-add {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent-text);
  padding-block: 10px;
}

/* ---------- Section shell (shared) ---------- */

.lp-section {
  padding-block: var(--space-7);
}

.lp-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: end;
  margin-bottom: var(--space-6);
}

.lp-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-ink-secondary);
}

.lp-section-title {
  margin: var(--space-2) 0 0;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-ink);
  max-width: 20ch;
}

.lp-section-lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-ink-secondary);
  max-width: 42ch;
}

/* ---------- Feature cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.card {
  background: var(--color-surface);
  border-radius: 20px;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
}

/* Scroll reveal, gated behind .js so a no-script visitor just sees the
   cards — the hidden state only ever applies once the script that
   clears it is confirmed present. Exponential-feeling ease-out, one
   step of stagger per card; not repeated on every section (see the
   hero's own, different demo loop above). */
.js .card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js .card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-eyebrow {
  margin-top: var(--space-4);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-ink-secondary);
}

.card-title {
  margin: 6px 0 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink);
}

.card-body {
  margin: var(--space-2) 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-ink-secondary);
}

/* Each card's real product fragment — a miniature of an actual app state,
   never a decorative icon standing in for one. */
.card-fragment {
  margin-top: var(--space-5);
  background: var(--color-background);
  border: 1px solid var(--color-hairline);
  border-radius: 12px;
  padding: var(--space-3);
}

.frag-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.frag-row + .frag-row {
  margin-top: 6px;
}

.frag-check {
  flex: none;
  display: flex;
}

.frag-text {
  font-size: 13px;
  color: var(--color-ink);
  line-height: 1.4;
}

.frag-meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--color-ink-secondary);
}

.frag-meta.retry {
  color: var(--color-accent-text);
  font-weight: 600;
}

/* ---------- Connections section ---------- */

.connections {
  background: var(--color-surface);
  border-radius: 24px;
  padding: var(--space-7);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: center;
}

.connections-copy-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink);
}

.connections-copy-body {
  margin: var(--space-3) 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-ink-secondary);
  max-width: 34ch;
}

.connections-stage {
  display: flex;
  justify-content: center;
}

/* ---------- Research card ---------- */
/* The one other proof we have: the category has this problem, not a claim
   about our own users. Dark, so it reads as a separate register from the
   rest of the page — a citation, not another feature. */

.research {
  background: var(--color-ink);
  border-radius: 24px;
  padding: var(--space-7);
  display: flex;
  align-items: center;
  gap: var(--space-7);
}

.research-stat {
  flex: none;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: -0.02em;
}

.research-copy-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-white);
  max-width: 46ch;
}

.research-copy-body {
  margin: var(--space-2) 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-on-ink-secondary);
  max-width: 52ch;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--color-hairline);
}

.faq-item {
  border-bottom: 1px solid var(--color-hairline);
  padding-block: var(--space-4);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--color-ink);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-indicator {
  flex: none;
  width: 20px;
  height: 20px;
  position: relative;
}

.faq-indicator::before,
.faq-indicator::after {
  content: "";
  position: absolute;
  background: var(--color-ink-secondary);
  border-radius: 1px;
}

.faq-indicator::before {
  left: 0;
  top: 9px;
  width: 20px;
  height: 2px;
}

.faq-indicator::after {
  left: 9px;
  top: 0;
  width: 2px;
  height: 20px;
  transition: transform 0.15s ease;
}

.faq-item[open] .faq-indicator::after {
  transform: rotate(90deg);
}

.faq-answer {
  margin: var(--space-3) 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-ink-secondary);
  max-width: 62ch;
}

/* ---------- Closing CTA ---------- */

.closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-7);
  border-top: 1px solid var(--color-hairline);
}

.closing-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--color-ink);
}

.closing-action {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.closing-caption {
  margin: 0;
  font-size: 13px;
  color: var(--color-ink-placeholder);
}

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

.footer {
  border-top: 1px solid var(--color-hairline);
  padding-block: var(--space-6) var(--space-7);
}

.footer-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.footer-brand .wordmark {
  height: 24px;
}

.footer-links-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-ink-placeholder);
}

.footer-links {
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-link {
  font-size: 14px;
  color: var(--color-ink-secondary);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--color-ink);
}

.footer-copyright {
  margin-top: var(--space-6);
  font-size: 13px;
  color: var(--color-ink-placeholder);
}

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    text-align: left;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-title {
    font-size: 40px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-section-lede {
    max-width: none;
  }

  .connections {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-6);
  }

  .connections-copy-body {
    max-width: none;
  }

  .research {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-6);
    /* Row gap after the column stack, not the row-mode inline gap — 48px
       between a 44px numeral and the text under it reads as unrelated
       (CEO, 2026-08-06). */
    gap: var(--space-5);
  }

  .closing {
    flex-direction: column;
    align-items: flex-start;
  }

  .closing-action {
    align-items: flex-start;
  }

  .footer-row {
    flex-direction: column;
    gap: var(--space-4);
  }
}

@media (max-width: 560px) {
  .container {
    padding-inline: var(--space-4);
  }

  /* The wordmark is wider than the app-icon-plus-text it replaced, and
     narrow phones (360px, the common Android width) had no margin to
     spare here in the first place — Privacy/Support/Download were
     already this row's tightest fit. Tighter gap and a smaller button
     inset claw back room without hiding or wrapping anything. */
  .nav-links {
    gap: var(--space-2);
  }

  .nav-links .btn {
    padding-inline: var(--space-4);
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-section-title {
    font-size: 26px;
    max-width: none;
  }

  .connections {
    padding: var(--space-5);
  }

  /* The borderless-mobile phone (and the hero-stage inset that existed
     only to support it) is gone — tried and disproven on Jacky's real
     device: "zonder rand is het geen telefoon meer maar een wit blok"
     (without a frame it's not a phone anymore, it's a white block).
     The bezel now stays on at every width; .phone-device's width
     already scales down via min() at its base rule, so no override is
     needed here, and hero-stage's radial glow fades to the page
     background on its own, needing no mobile-only inset either. */

  .phone-bar {
    gap: 6px;
    padding: 6px;
  }

  .phone-bar-icon {
    width: 24px;
    height: 24px;
  }

  .research-stat {
    font-size: 44px;
  }

  .closing {
    text-align: left;
  }

  .closing-title {
    font-size: 24px;
  }
}

/* Below ~400px the nav row is tight even after the fixes above — it
   fits and stays tappable, but the wordmark deserves more air than a
   few pixels next to Support (CEO, 2026-08-06). Privacy and Support
   already live in the footer; the nav's job at this width is getting
   home and downloading, so drop the two secondary links rather than
   crowd the wordmark or wrap the row. */
@media (max-width: 400px) {
  .nav-link {
    display: none;
  }
}
