/* LIFT landing page — Stryds-pattern rebuild: pinned scrubbed hero, arc
   ribbons, stacked cards, floating pill. Fonts are linked from index.html,
   not @imported (an @import hides them from the preload scanner). */

/* ==========================================================================
   Tokens — mirrored from the LIFT design system. The in-repo spec is
   DESIGN.md's frontmatter and .impeccable/design.json; this is the subset
   the landing page uses, plus the deviations noted below.
   ========================================================================== */

:root {
  --lift-black: rgb(13, 13, 12);
  --lift-raised: rgb(22, 22, 19);
  --lift-card: rgb(27, 27, 23);
  --lift-border: rgb(43, 43, 40);
  --lift-lime: rgb(200, 255, 40);
  --lift-lime-dim: rgb(143, 184, 28);
  --lift-ink: rgb(246, 245, 240);
  --lift-ink-2: rgb(171, 169, 160);
  --lift-ink-3: rgb(110, 108, 99);
  --lift-ink-4: rgb(68, 67, 61);

  /* AA-safe text grey — a deliberate landing-page deviation. The system's
     ink-3 (3.69:1) and ink-4 (1.96:1) fail WCAG AA for text on --lift-black;
     this sits between ink-2 and ink-3 on the same hue. See DESIGN.md. */
  --text-muted: rgb(126, 124, 114); /* 4.64:1 */

  /* Lit lime for CTA hover. */
  --lift-lime-bright: #e2ff66;

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-full: 999px;
  --radius-card: 32px;

  /* Rendered height of the App Store badge. The coming-soon pill tracks it. */
  --badge-h: 54px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --gutter: 40px;

  /* Semantic z-index scale. Never write a bare number below. */
  --z-arcs: 1;
  --z-hero-text: 2;
  --z-dock: 40;
  --z-intro: 90;
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--lift-black);
  color: var(--lift-ink);
  font-family: var(--font-ui);
  overflow-x: clip;
}

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

a:hover {
  color: var(--lift-lime-dim);
}

::selection {
  background: var(--lift-lime);
  color: var(--lift-black);
}

img,
svg {
  display: block;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1,
h2 {
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--lift-lime);
  outline-offset: 3px;
}

/* ==========================================================================
   Type roles
   ========================================================================== */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
}

.display--cta {
  font-size: clamp(44px, 6vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.accent {
  color: var(--lift-lime);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

/* The closing CTA's button. Carries no Apple marks, so it is unrestricted
   brand styling; it opens the store modal, which holds the one badge. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--lift-lime);
  color: var(--lift-black);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 17px 30px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: transform 150ms var(--ease), background 150ms var(--ease);
}

.btn-primary:hover {
  background: var(--lift-lime-bright);
  color: var(--lift-black);
}

.btn-primary:active {
  transform: scale(0.97);
}

/* The closing CTA's button row. */
.btn-row {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   01 · Hero — pinned scene with four scrubbed text stages.

   Default is the no-JS layout: stages flow as visible stacked blocks.
   main.js adds .is-pinned, which turns the section into a 420vh scroll
   track with a sticky 100vh stage; stage opacity is then scroll-driven.
   ========================================================================== */

.hero {
  position: relative;
}

.hero__stage {
  position: relative;
  overflow: clip;
  padding: 18vh var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 14vh;
}

.hero.is-pinned {
  height: 420vh;
}

.hero.is-pinned .hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0 var(--gutter);
  display: block;
}

.hero__item {
  position: relative;
  z-index: var(--z-hero-text);
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero.is-pinned .hero__item {
  position: absolute;
  inset: 0;
  /* max-width must go: an absolute box with inset:0 + max-width + margin:0
     anchors LEFT, which pushed the whole scene off-center on wide screens.
     The flex centering does the layout work instead. */
  max-width: none;
  margin: 0;
  padding: 0 var(--gutter);
  opacity: 0;
  will-change: opacity, transform;
}

.hero.is-pinned .hero__item[data-stage="0"] {
  opacity: 1;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

/* The wordmark at the reference's hero scale — the brand IS the hero. */
.hero__mark {
  width: min(512px, 50vw);
  height: auto;
}

.hero__tag {
  font-family: var(--font-ui);
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 500;
  color: var(--lift-ink-2);
}

.hero__line {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(38px, 6vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 16ch;
  text-wrap: balance;
}

.hero__line--resolve {
  font-size: clamp(30px, 4.4vw, 64px);
  max-width: 22ch;
}

/* Word-scrub: spans get their opacity from JS. Without JS there are no
   spans, so the text is simply visible. */
.hero__line .w,
.manifesto__line .w {
  opacity: 1;
  transition: opacity 120ms linear;
}

/* ==========================================================================
   Arc ribbons — the reference's avatar arcs, carrying stat chips instead.
   Giant rings pushed off the top and bottom edges so only a sliver shows;
   JS rotates the ring so the chips travel along the curve.
   ========================================================================== */

.arcs {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-arcs);
  pointer-events: none;
}

.arc {
  --d: 175vw;
  /* How much of the ring pokes into the viewport. vh-capped: rings are sized
     in vw, so on wide-short screens a width-only share swallowed the scene
     (39% of vh at 1680x673) and ran the arcs through the wordmark. */
  --sliver: min(12vw, 18vh);
  position: absolute;
  left: 50%;
  margin-left: calc(var(--d) / -2);
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  will-change: transform;
}

.arcs--top {
  top: 0;
}

.arcs--bottom {
  bottom: 0;
}

/* Ring slivers: ~13% of the ring pokes into the viewport. */
.arcs--top .arc {
  top: calc(var(--sliver) - var(--d));
}

.arcs--bottom .arc {
  bottom: calc(var(--sliver) - var(--d));
}

.arc--lime {
  border: clamp(34px, 4.6vw, 76px) solid var(--lift-lime);
}

.arc--dim {
  border: clamp(34px, 4.6vw, 76px) solid var(--lift-lime-dim);
}

.arc--back {
  --d: 191vw;
  --sliver: min(13.4vw, 20vh);
  border: clamp(40px, 5.4vw, 90px) solid var(--lift-card);
}

.arc--back-2 {
  border-color: var(--lift-raised);
}

/* Chips sit on the ring's circumference at --th degrees from its center.
   JS counter-rotates them against the ring so they stay upright. */
/* --rot mirrors the parent ring's rotation (set by main.js) so the chip can
   cancel it and stay upright. */
.arc__chip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: rotate(var(--th)) translateY(calc(var(--d) / 2))
    rotate(calc(var(--th) * -1 - var(--rot, 0deg)));
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(13, 13, 12, 0.88);
  box-shadow: inset 0 0 0 1px var(--lift-border);
  color: var(--lift-ink-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(11px, 0.85vw, 13px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ==========================================================================
   02 · Cards — sticky stacked scenes, each covered by the next.
   ========================================================================== */

.card {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh var(--gutter);
  background: var(--lift-black);
}

.card__inner {
  width: 100%;
  max-width: 1240px;
  min-height: 86vh;
  background: var(--lift-raised);
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--lift-border);
  padding: clamp(32px, 5vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  column-gap: clamp(32px, 4vw, 72px);
  overflow: hidden;
}

.card__inner--flip {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.card__inner--flip .card__txt {
  order: 2;
}

.card__inner--flip .card__media {
  order: 1;
}

.card__head {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(36px, 4.4vw, 68px);
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.card__copy {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--lift-ink-2);
  max-width: 44ch;
  text-wrap: pretty;
}

.checklist {
  margin-top: 28px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  font-size: 16px;
  color: var(--lift-ink);
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.checklist li::before {
  content: "\2192";
  color: var(--lift-lime);
}

.card__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Phone — every piece of chrome is a ratio of --phone-w (the design's own
   values over its 400px reference: 62/400 radius, 12/400 padding, ...), so
   the mock scales as one object. Fixed-pixel chrome is what breaks small
   sizes: a 62px radius on a 74px-wide body is a pill, not a phone.
   ========================================================================== */

.phone {
  /* The vh cap is load-bearing, not cosmetic. The phone is the tallest thing
     in a card, and the card must fit inside 100vh or — being sticky — its
     tail can never be scrolled to. Budget: 100vh minus the card's 4vh×2
     padding minus the inner's clamp(32px,5vw,88px)×2. At 36vh that budget
     was blown on any viewport wider than 3:2 and shorter than ~833px, which
     is most laptops: 1366×768 overshot by 10px, 1280×720 by 9px. */
  --phone-w: min(300px, 24vw, 32vh);
  position: relative;
  width: var(--phone-w);
  transform: rotate(-4deg);
  transition: transform 500ms var(--ease);
  will-change: transform;
}

.phone__btn {
  position: absolute;
  left: calc(var(--phone-w) * -0.0075);
  width: calc(var(--phone-w) * 0.01);
  background: #2e2e2a;
  border-radius: calc(var(--phone-w) * 0.005) 0 0 calc(var(--phone-w) * 0.005);
}

.phone__btn--silence {
  top: 16%;
  height: calc(var(--phone-w) * 0.075);
}

.phone__btn--vol-up {
  top: calc(16% + var(--phone-w) * 0.11);
  height: calc(var(--phone-w) * 0.13);
}

.phone__btn--vol-down {
  top: calc(16% + var(--phone-w) * 0.27);
  height: calc(var(--phone-w) * 0.13);
}

.phone__btn--power {
  left: auto;
  right: calc(var(--phone-w) * -0.0075);
  top: 22%;
  height: calc(var(--phone-w) * 0.21);
  border-radius: 0 calc(var(--phone-w) * 0.005) calc(var(--phone-w) * 0.005) 0;
}

.phone__body {
  position: relative;
  padding: calc(var(--phone-w) * 0.03);
  background: #1a1a19;
  border-radius: calc(var(--phone-w) * 0.155);
  box-shadow:
    inset 0 0 0 calc(var(--phone-w) * 0.00625) #45453f,
    inset 0 0 0 calc(var(--phone-w) * 0.015) #0c0c0b,
    0 calc(var(--phone-w) * 0.1) calc(var(--phone-w) * 0.25) rgba(0, 0, 0, 0.6);
}

.phone__screen {
  position: relative;
  aspect-ratio: 1290 / 2796;
  overflow: hidden;
  border-radius: calc(var(--phone-w) * 0.125);
  background: var(--lift-black);
}

.phone__shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   03 · Manifesto + CTA
   ========================================================================== */

.manifesto {
  min-height: 76vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(96px, 12vh, 160px) var(--gutter);
}

.manifesto__line {
  font-size: clamp(56px, 11vw, 150px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.manifesto__sub {
  margin-top: 28px;
  max-width: 38ch;
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--lift-ink-2);
  text-wrap: pretty;
}

.cta {
  padding: clamp(96px, 14vh, 180px) var(--gutter);
  text-align: center;
}

.cta__head {
  max-width: 16ch;
  margin: 0 auto;
  text-wrap: balance;
}

.cta__lede {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 500;
  color: var(--lift-ink-2);
}

.cta__row {
  margin-top: 40px;
  justify-content: center;
}

/* ==========================================================================
   Footer — bottom padding clears the always-on dock.
   ========================================================================== */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gutter) var(--gutter) 110px;
  border-top: 1px solid var(--lift-border);
}

.footer__mark {
  height: 34px;
  opacity: 0.85;
}

.footer__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__links a {
  color: var(--text-muted);
}

.footer__links a:hover {
  color: var(--lift-ink-2);
}

.footer__copy {
  font-size: 14px;
  color: var(--text-muted);
}

/* ==========================================================================
   Dock — the page's only navigation, per the reference. Visible from load;
   main.js hides it over the closing CTA. The one UI drop shadow: a floating
   element is the shadow rule's own stated exception.
   ========================================================================== */

.dock {
  position: fixed;
  z-index: var(--z-dock);
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(22, 22, 19, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--lift-border), 0 12px 40px rgba(0, 0, 0, 0.55);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease), visibility 260ms;
}

.dock.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
}

.dock__mark {
  height: 22px;
  opacity: 0.9;
}

.dock__cta {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: var(--lift-lime);
  color: var(--lift-black);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 11px 20px;
  border-radius: var(--radius-full);
  transition: transform 150ms var(--ease), background 150ms var(--ease);
}

.dock__cta:hover {
  background: var(--lift-lime-bright);
  color: var(--lift-black);
}

.dock__cta:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Intro — the reference's squircle moment: lime sheet, dark squircle
   rotating in with the wordmark, then the squircle swells to become the
   page. Injected by main.js only; no-JS and reduced-motion visitors land
   straight on the hero.
   ========================================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: var(--z-intro);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lift-lime);
  overflow: hidden;
}

.intro__sq {
  width: min(46vmin, 420px);
  aspect-ratio: 1;
  border-radius: 34%;
  background: var(--lift-black);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.5) rotate(-16deg);
  transition: transform 700ms var(--ease);
  will-change: transform;
}

.intro__sq img {
  width: 52%;
  height: auto;
  transition: opacity 300ms var(--ease);
}

.intro.is-set .intro__sq {
  transform: scale(1) rotate(-8deg);
}

.intro.is-out {
  background: transparent;
  transition: background 400ms var(--ease) 300ms;
}

.intro.is-out .intro__sq {
  transform: scale(9) rotate(0deg);
  transition: transform 800ms var(--ease);
}

.intro.is-out .intro__sq img {
  opacity: 0;
}

body.is-intro {
  overflow: hidden;
}

/* ==========================================================================
   Store modal — the dock's target. Native <dialog>; the panel is the one
   raised sheet in the system, so it takes the pop shadow.
   ========================================================================== */

.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: none;
}

.modal::backdrop {
  background: rgba(13, 13, 12, 0.72);
  backdrop-filter: blur(10px);
}

.modal__panel {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  background: var(--lift-raised);
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px var(--lift-border), 0 24px 80px rgba(0, 0, 0, 0.6);
  padding: 40px 32px 32px;
  text-align: center;
  font-family: var(--font-ui);
  color: var(--lift-ink);
}

.modal[open] .modal__panel {
  animation: modal-in 260ms var(--ease);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--lift-border);
  color: var(--lift-ink-2);
  cursor: pointer;
}

.modal__close:hover {
  color: var(--lift-ink);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.modal__sub {
  margin-top: 8px;
  font-size: 15px;
  color: var(--lift-ink-2);
}

.modal__store {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The badge gets no hover or press treatment — the guidelines forbid
   modifying or animating it. */
.modal__badge {
  display: inline-flex;
}

.modal__badge img {
  height: var(--badge-h);
  width: auto;
}

.modal__badge-note {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.modal__opts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--lift-card);
  box-shadow: inset 0 0 0 1px var(--lift-border);
  color: var(--lift-ink);
  transition: transform 150ms var(--ease), background 150ms var(--ease);
}

/* A live option is the modal's one lime action. */
.modal__opt[href^="http"] {
  background: var(--lift-lime);
  box-shadow: none;
  color: var(--lift-black);
}

.modal__opt[href^="http"]:hover {
  background: var(--lift-lime-bright);
  color: var(--lift-black);
}

/* Press applies to every option, live or not. */
.modal__opt:active {
  transform: scale(0.98);
}

/* After the visitor selects Android with no store live, the row answers
   rather than navigating. */
.modal__opt.is-announced .modal__opt-note {
  color: var(--text-muted);
}

.modal__opt-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.modal__opt-note {
  font-size: 13px;
  font-weight: 600;
}

body.modal-open {
  overflow: hidden;
}

/* ==========================================================================
   Reveal — main.js flips these on as they enter the viewport.
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 921px) and (max-width: 1200px) {
  :root {
    --gutter: 32px;
  }
}

@media (max-width: 920px) {
  :root {
    --gutter: 20px;
  }

  .hero__mark {
    width: min(336px, 67vw);
  }

  .hero__line {
    font-size: clamp(34px, 9.4vw, 54px);
  }

  .hero__line--resolve {
    font-size: clamp(26px, 7.2vw, 40px);
  }

  .arc {
    --d: 420vw;
    --sliver: min(26vw, 15vh);
  }

  .arc--back {
    --d: 460vw;
    --sliver: min(29vw, 17vh);
  }

  /* No sticky stacking here: in one column a card is taller than a phone
     viewport, and a sticky box taller than the viewport can never scroll to
     its own bottom. The cards flow instead. */
  .card {
    position: static;
    min-height: 0;
    padding: 8vh var(--gutter);
  }

  .card__inner,
  .card__inner--flip {
    grid-template-columns: 1fr;
    row-gap: 32px;
    min-height: 0;
    align-content: center;
  }

  .card__inner--flip .card__txt {
    order: 1;
  }

  .card__inner--flip .card__media {
    order: 2;
  }

  .phone {
    --phone-w: min(240px, 52vw, 32vh);
  }

  .footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  /* The dock owns the bottom-center band on small screens; the middle chip
     of the bottom arc would sit right behind it. */
  .arcs--bottom .arc__chip:nth-child(2) {
    display: none;
  }
}

/* Short viewports: full-height cards need room; relax the height promises. */
@media (max-height: 560px) {
  .card__inner {
    min-height: 0;
  }

  .phone {
    --phone-w: min(200px, 22vw);
  }
}

/* ==========================================================================
   Reduced motion — the scenes still read, they just don't perform.
   main.js also skips pinning, the intro, tilt, and word-scrub entirely.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phone,
  .reveal,
  .dock,
  .intro,
  .intro__sq,
  .arc,
  .hero__line .w,
  .manifesto__line .w {
    transition: none;
  }

  .modal[open] .modal__panel {
    animation: none;
  }

  .phone {
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
