/* ==========================================================================
   Unwindy landing page
   Fonts: Instrument Serif (display) / SF Pro (body, via system stack)
   ========================================================================== */

:root {
  --lp-black: #000000;
  --lp-white: #ffffff;
  --lp-soft: rgba(255, 255, 255, 0.72);
  --lp-faint: rgba(255, 255, 255, 0.45);
  --lp-line: rgba(255, 255, 255, 0.16);
  --lp-accent: #ff4800;
  --lp-card: #0b4051;
  --lp-radius: 20px;
  --lp-gutter: clamp(20px, 5vw, 72px);
  --lp-body-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --lp-display-font: "Instrument Serif", Georgia, "Times New Roman", serif;
}

html:has(.landing-page) {
  /* Intentionally not using scroll-behavior: smooth — it desyncs GSAP pins. */
}

.landing-page {
  font-family: var(--lp-body-font);
  color: var(--lp-white);
  background: var(--lp-black);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.landing-page main {
  display: block;
  width: 100%;
  min-width: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-180%);
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: #000000;
}

.skip-link:focus {
  transform: translateY(0);
}

.lp-display {
  font-family: var(--lp-display-font);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.04;
  margin: 0;
}

.lp-sub {
  font-family: var(--lp-body-font);
  color: var(--lp-soft);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.65;
  margin: 0;
}

/* Header: brand | centered nav | primary CTA */
.landing-page .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  background: transparent;
  color: var(--lp-white);
}

.landing-page .brand {
  justify-self: start;
}

.landing-page .nav {
  justify-self: center;
}

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

.lp-cta-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: 100%;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--lp-body-font);
  font-size: 15px;
  font-weight: 590;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.lp-btn:hover {
  transform: translateY(-2px);
}

.lp-btn:active {
  transform: translateY(0);
}

.lp-btn-primary {
  background: var(--lp-accent);
  color: var(--lp-white);
}

.lp-btn-primary:hover {
  background: #ff5a17;
}

/* 1. Hero
   ========================================================================== */

.lp-hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.lp-hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: clamp(100px, 18vh, 220px);
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--lp-black) 92%);
}

.lp-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% center;
  opacity: 1;
}

.lp-hero-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.28) 34%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(100deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 46%);
}

.lp-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 840px;
  padding: 0 var(--lp-gutter) clamp(48px, 8vh, 96px);
}

.lp-hero-copy h1 {
  font-size: clamp(44px, 5.6vw, 84px);
}

.lp-hero-copy .lp-sub {
  margin-top: 20px;
  max-width: 68ch;
}

.lp-hero-copy .lp-cta-row {
  margin-top: 32px;
}

/* 2. Intro + How It Works
   ========================================================================== */

.lp-hiw {
  position: relative;
  z-index: 2;
  background: var(--lp-black);
}

.lp-hiw-pin {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 5vh, 52px);
  padding: clamp(28px, 5vh, 48px) 0;
  overflow: hidden;
}

.lp-hiw-intro {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--lp-gutter);
}

.lp-hiw-intro h2 {
  font-size: clamp(32px, 4vw, 60px);
  text-wrap: balance;
}

.lp-hiw-intro .lp-sub {
  margin: 22px auto 0;
  max-width: 62ch;
}

.lp-hiw-viewport {
  overflow: hidden;
  /* Preserve horizontal clipping while making room for the mockup entrance
     offset; the lower edge no longer crops inactive cards. */
  padding-bottom: 56px;
  margin-bottom: -56px;
}

.lp-hiw-track {
  display: flex;
  align-items: stretch;
  gap: clamp(24px, 4vw, 56px);
  padding: 0 max(var(--lp-gutter), calc((100vw - min(74vw, 1040px)) / 2));
  width: max-content;
  will-change: transform;
}

/* Cards */

.lp-card {
  position: relative;
  width: min(74vw, 1040px);
  height: clamp(380px, 52vh, 540px);
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 3.5vw, 56px);
  padding: clamp(28px, 4vw, 64px);
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 55%),
    var(--lp-card);
  border: 2px solid rgba(255, 255, 255, 1);
  border-radius: var(--lp-radius);
  overflow: hidden;
}

.lp-card-index {
  display: block;
  font-size: 13px;
  font-weight: 590;
  letter-spacing: 0.14em;
  color: var(--lp-faint);
  margin-bottom: 18px;
}

.lp-card-copy h3 {
  font-size: clamp(28px, 3vw, 46px);
  text-wrap: balance;
}

.lp-card-copy p {
  margin: 16px 0 0;
  color: var(--lp-soft);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.65;
  max-width: 44ch;
}

/* The phone bleeds off the bottom edge of the card intentionally;
   the card's overflow: hidden crops it. */
.lp-card-visual {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  align-self: stretch;
  min-width: 0;
}

/* Payoff card — full-bleed looping video under readable copy */

.lp-card-payoff {
  display: flex;
  align-items: flex-end;
  border-color: rgba(255, 255, 255, 1);
  background: #041c25;
}

.lp-card-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.lp-card-payoff .lp-card-video {
  object-position: 20% center;
}

.lp-card-video-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.08) 55%);
  pointer-events: none;
}

.lp-card-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 70% 8%, rgba(154, 200, 216, 0.2), rgba(154, 200, 216, 0) 60%),
    radial-gradient(120% 90% at 20% 100%, rgba(3, 16, 21, 0.9), rgba(3, 16, 21, 0) 70%),
    linear-gradient(196deg, #10586e 0%, #0b4051 42%, #041c25 100%);
}

.lp-card-payoff .lp-card-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.lp-card-payoff .lp-card-copy p {
  color: rgba(255, 255, 255, 0.86);
}

.lp-card-payoff h3 {
  font-size: clamp(32px, 3.6vw, 54px);
}

/* Real iPhone mockups. The card clips the lower quarter of each image so the
   device feels anchored in the frame rather than floating above it. */

.lp-mockup-image {
  display: block;
  width: clamp(200px, 21vw, 280px);
  height: auto;
  flex: none;
  filter: drop-shadow(0 28px 28px rgba(0, 0, 0, 0.42));
  /* Entrance motion is driven by GSAP on the HIW scrub timeline. */
  will-change: transform, opacity;
}

.lp-phone {
  width: clamp(200px, 21vw, 280px);
  aspect-ratio: 9 / 19.5;
  padding: 10px;
  border-radius: 44px;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(clamp(24px, 4vh, 48px));
}

.lp-phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, #0e1420 0%, #070a10 100%);
  padding: 56px 18px 18px;
}

.lp-phone-island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 5.4%;
  max-height: 26px;
  border-radius: 999px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Skeleton shapes inside placeholder screens */

.lp-phone-screen i,
.lp-phone-screen b,
.lp-phone-screen u,
.lp-phone-screen s,
.lp-ph-title {
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.lp-ph-title {
  width: 62%;
  height: 14px;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.22);
}

.lp-ph-title-center {
  margin-left: auto;
  margin-right: auto;
}

.lp-ph-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.lp-ph-row i { width: 46%; height: 10px; }
.lp-ph-row b { width: 20%; height: 10px; background: rgba(255, 120, 60, 0.55); }

.lp-ph-row-slim { padding: 12px 14px; }

.lp-ph-chips {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.lp-ph-chips s {
  width: 28%;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lp-ph-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  margin-bottom: 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.lp-ph-step u {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 120, 60, 0.45);
  flex: none;
}

.lp-ph-step i { width: 52%; height: 9px; }
.lp-ph-step b { width: 16%; height: 9px; margin-left: auto; }

.lp-ph-ring {
  width: 58%;
  aspect-ratio: 1;
  margin: 6px auto 24px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(255, 120, 60, 0.75);
  transform: rotate(38deg);
}

/* 3. Routine Benefits
   ========================================================================== */

.lp-benefits {
  position: relative;
  z-index: 3;
  background: var(--lp-black);
}

.lp-benefits-pin {
  position: relative;
  height: 100svh;
  height: 100dvh;
  min-height: 100svh;
  background: var(--lp-black);
  overflow: hidden;
}

.lp-benefits-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
}

.lp-benefits-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(65% 55% at 50% 50%, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.06) 78%);
}

.lp-benefits-lines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--lp-gutter);
  text-align: center;
}

.lp-benefit-line {
  font-size: clamp(34px, 4.6vw, 72px);
  max-width: 18ch;
  margin: 12px 0;
  opacity: 1;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  will-change: opacity, transform;
}

.lp-motion .lp-benefits-lines {
  display: grid;
  place-items: center;
}

.lp-motion .lp-benefit-line {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
}

/* 4. Differentiator
   ========================================================================== */

.lp-diff {
  padding: clamp(96px, 12vh, 150px) var(--lp-gutter) clamp(40px, 5vh, 72px);
}

.lp-diff-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.lp-diff-copy h2 {
  font-size: clamp(34px, 4vw, 58px);
  text-wrap: balance;
}

.lp-diff-copy .lp-sub {
  margin-top: 22px;
  max-width: 48ch;
}

.lp-diff-visual {
  position: relative;
  min-height: clamp(480px, 64vh, 740px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(12px, 2vw, 28px) 0;
  overflow: visible;
}

.lp-diff-stage {
  position: relative;
  /* ~25% smaller than the previous 525px / 81% stage */
  width: min(61%, 394px);
}

.lp-diff-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 172%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 84, 8, 0.72) 0%,
    rgba(255, 72, 0, 0.5) 26%,
    rgba(255, 72, 0, 0.22) 46%,
    rgba(255, 72, 0, 0) 66%
  );
  filter: blur(30px);
  pointer-events: none;
}

.lp-diff-device {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 50px rgba(0, 0, 0, 0.55));
}

.lp-diff-overlay {
  position: absolute;
  left: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.lp-diff-dynamic {
  /* ~10px higher than before, and slightly wider than the device so it
     overlaps the bezel for a shallow 3D stack. */
  top: calc(3.5% - 10px);
  left: -6%;
  width: 112%;
  z-index: 3;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45));
}

.lp-diff-lockscreen {
  left: -4%;
  width: 108%;
  bottom: 20%;
}

.lp-reduced-motion .lp-benefits,
.lp-reduced-motion .lp-benefits-pin {
  opacity: 1;
}

/* 5. Closing CTA
   ========================================================================== */

.lp-close {
  text-align: center;
  padding: clamp(56px, 7vh, 96px) var(--lp-gutter) clamp(20px, 3vh, 40px);
}

.lp-close h2 {
  font-size: clamp(44px, 6vw, 96px);
}

.lp-close .lp-cta-row {
  justify-content: center;
  margin: 40px auto 0;
}

/* Footer refinements on black */

.landing-page .site-footer {
  border-color: var(--lp-line);
  color: var(--muted);
  padding-top: clamp(16px, 2vw, 32px);
  padding-bottom: 0;
  margin-bottom: 0;
}

.landing-page .site-footer a {
  color: inherit;
}

/* Reduced motion: linear vertical layout, no pinning
   ========================================================================== */

.lp-reduced-motion .lp-hiw-track {
  flex-direction: column;
  width: auto;
  padding: 0 var(--lp-gutter);
  align-items: center;
}

.lp-reduced-motion .lp-card {
  width: min(1040px, 100%);
}

.lp-reduced-motion .lp-mockup-image {
  opacity: 1;
  transform: translateY(28px);
}

.lp-reduced-motion .lp-card {
  opacity: 1;
  transform: none;
}

.lp-reduced-motion .lp-card-video {
  display: block;
}

.lp-reduced-motion .lp-benefit-line {
  opacity: 1;
  position: static;
  margin: 12px 0;
}

.lp-reduced-motion .lp-benefits-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

@media (max-width: 900px) {
  .lp-hero-video {
    object-position: 45% center;
  }

  .lp-hiw-pin {
    min-height: 0;
    display: block;
    padding: clamp(88px, 14vh, 128px) 0 0;
    overflow: visible;
  }

  .lp-hiw-intro {
    margin-bottom: clamp(40px, 8vh, 72px);
  }

  .lp-hiw-cards-pinned .lp-hiw-intro {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  /* Card rail fills the space under the header with breathing room. */
  .lp-hiw-viewport {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: calc(100dvh - var(--site-header-height) - 28px);
    margin: 0;
    padding: 12px 0 16px;
    overflow: hidden;
  }

  .lp-hiw-track {
    align-items: stretch;
    gap: 24px;
    height: 100%;
    padding: 0 var(--lp-gutter);
  }

  .lp-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    width: calc(100vw - var(--lp-gutter) - var(--lp-gutter));
    max-width: 560px;
    height: 85%;
    align-self: center;
    min-height: 0;
    gap: 20px;
    padding: 24px 22px 0;
  }

  .lp-card-copy h3 {
    font-size: clamp(24px, 6vw, 32px);
  }

  /* Let the card itself crop the lower part of each mockup. */
  .lp-card-visual {
    align-self: stretch;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    overflow: visible;
  }

  .lp-mockup-image {
    width: min(52vw, 240px);
    height: auto;
    /* The card clips the lower quarter; GSAP still raises/fades this. */
  }

  .lp-card-payoff {
    padding-bottom: 24px;
  }

  .lp-card-payoff .lp-card-video {
    object-position: 30% center;
  }

  .lp-diff-inner {
    grid-template-columns: 1fr;
    gap: clamp(28px, 5vh, 44px);
  }

  .lp-diff {
    padding: clamp(56px, 8vh, 88px) var(--lp-gutter) clamp(32px, 5vh, 48px);
  }

  .lp-diff-copy {
    text-align: center;
  }

  .lp-diff-copy h2 {
    font-size: clamp(32px, 6.5vw, 46px);
  }

  .lp-diff-copy .lp-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .lp-diff-visual {
    min-height: clamp(420px, 56vh, 520px);
    padding: 8px 0;
  }

  .lp-close {
    padding-top: clamp(72px, 10vh, 112px);
    padding-bottom: clamp(72px, 10vh, 120px);
  }

  .lp-diff-stage {
    width: min(62%, 220px);
  }

  .lp-diff-dynamic {
    top: calc(3.5% - 10px);
    left: -6%;
    width: 112%;
  }

  .lp-diff-lockscreen {
    left: -4%;
    width: 108%;
  }

  .landing-page .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .landing-page .nav {
    gap: 12px;
    font-size: 12px;
  }

  .lp-cta-row {
    width: 100%;
  }
}

@media (max-width: 820px) {
  /* Keep the shared header pinned on the landing page too. */
  .landing-page .site-header {
    position: fixed;
    background: transparent;
  }
}

@media (max-width: 480px) {
  .landing-page .site-header {
    gap: 8px;
  }

  .landing-page .nav {
    gap: 8px;
    font-size: 11px;
  }
}
