/* frfr lander — home page only. ask / legal styles stay in styles.css */

.page-home {
  overflow-x: hidden;
}

.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-80px);
}
.skip:focus {
  transform: translateY(0);
  outline: 3px solid var(--hand);
  outline-offset: 3px;
}

/* soft app-style waves over the shared sky, home only */
.page-home .sky::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 42%;
  background:
    radial-gradient(70% 80% at 20% 80%, rgba(255,255,255,0.16), transparent 60%),
    radial-gradient(80% 90% at 80% 100%, rgba(255,255,255,0.12), transparent 62%);
  pointer-events: none;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 100dvh;
  min-height: 100svh;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 22px 18px;
  padding-top: max(22px, env(safe-area-inset-top));
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.hero-copy {
  display: contents;
}
.lockup, .hook, .hero-cta, .hero-stage {
  animation: rise 0.72s cubic-bezier(0.34, 1.4, 0.42, 1);
}
.hook { animation-delay: 0.06s; }
.hero-stage { animation-delay: 0.1s; }
.hero-cta { animation-delay: 0.16s; }

.lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 0;
  line-height: 0;
}
.lockup-hand {
  width: auto;
  height: 78px;
  filter: drop-shadow(0 8px 14px rgba(11,58,106,0.18));
}
.lockup-word {
  width: auto;
  height: 48px;
  filter: drop-shadow(0 6px 12px rgba(11,58,106,0.12));
}

.hook {
  margin: 2px 0 0;
  text-align: center;
  font-weight: 900;
  font-size: clamp(44px, 12vw, 64px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--white);
  text-shadow:
    0 1px 0 rgba(11, 58, 106, 0.18),
    0 2px 0 rgba(11, 58, 106, 0.08),
    0 16px 34px rgba(11, 58, 106, 0.22);
}
.hook span { white-space: nowrap; }
.hook-sm { font-size: clamp(44px, 10vw, 80px); }

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}
.hero .lockup,
.hero .hook { order: 1; }
.hero .hero-stage { order: 2; }
.hero .hero-cta { order: 3; }

.age {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  opacity: 0.82;
}

.btn-store {
  max-width: 320px;
  min-width: 240px;
  animation: cta-pulse 2.8s ease-in-out 1.2s infinite;
}
.btn-store .apple {
  width: 18px;
  height: 22px;
  flex: 0 0 auto;
  fill: currentColor;
}
.hero-cta .btn-store,
.close .btn-store {
  width: min(320px, 100%);
}

@keyframes cta-pulse {
  0%, 100% {
    box-shadow:
      0 var(--lip) 0 var(--gold),
      0 12px 22px var(--shadow),
      inset 0 2px 0 rgba(255,255,255,0.55);
  }
  50% {
    box-shadow:
      0 var(--lip) 0 var(--gold),
      0 16px 30px rgba(11,58,106,0.32),
      0 0 0 7px rgba(255,212,0,0.22),
      inset 0 2px 0 rgba(255,255,255,0.55);
  }
}
.btn-store:hover,
.btn-store:focus-visible {
  animation-play-state: paused;
}
.btn-store:active {
  animation: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- stage + phone ---------- */
.hero-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  animation: rise 0.8s cubic-bezier(0.34, 1.3, 0.42, 1) 0.1s;
}

/* iPhone 17 Pro Max — Apple specs: 77.98 × 163.43 × 8.75 mm,
   6.9" 2868×1320 display, 2.56 mm even bezels, 19.43 mm outer
   corner, 10.27 mm screen corner, Dynamic Island 125.33×36.67 pt.
   Silver brushed-aluminum unibody, Ceramic Shield 2 front. */
.phone-wrap {
  --phone-w: 232px;
  --mm: calc(var(--phone-w) / 77.98);
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: var(--phone-w);
  height: calc(var(--phone-w) * 163.43 / 77.98);
  margin-bottom: 10px;
}

.phone-shadow {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: calc(-10 * var(--mm));
  height: calc(22 * var(--mm));
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(11, 58, 106, 0.50) 0%,
    rgba(11, 58, 106, 0.22) 42%,
    transparent 72%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
  animation: shadow-bob 5.6s ease-in-out 0.8s infinite;
  transform-origin: center;
}

.phone {
  position: absolute;
  inset: 0;
  z-index: 1;
  animation: phone-bob 5.6s ease-in-out 0.8s infinite;
}

.phone-btn {
  position: absolute;
  z-index: 3;
  background: linear-gradient(90deg, #c8c8cc 0%, #f3f3f5 45%, #9a9aa0 100%);
  box-shadow:
    0 0.5px 0 rgba(255,255,255,0.55),
    inset 0 0 0 0.4px rgba(0,0,0,0.2);
}

/* Action button, volume, side button — stand 0.45 mm proud */
.phone-btn.action {
  left: calc(-1.05 * var(--mm));
  top: calc((34.28 - 3.45) * var(--mm));
  width: calc(1.2 * var(--mm));
  height: calc(6.9 * var(--mm));
  border-radius: calc(0.45 * var(--mm)) 0 0 calc(0.45 * var(--mm));
}
.phone-btn.vol-up {
  left: calc(-1.05 * var(--mm));
  top: calc((48.43 - 5.6) * var(--mm));
  width: calc(1.2 * var(--mm));
  height: calc(11.2 * var(--mm));
  border-radius: calc(0.45 * var(--mm)) 0 0 calc(0.45 * var(--mm));
}
.phone-btn.vol-dn {
  left: calc(-1.05 * var(--mm));
  top: calc((62.63 - 5.6) * var(--mm));
  width: calc(1.2 * var(--mm));
  height: calc(11.2 * var(--mm));
  border-radius: calc(0.45 * var(--mm)) 0 0 calc(0.45 * var(--mm));
}
.phone-btn.side {
  right: calc(-1.05 * var(--mm));
  top: calc((55.53 - 8.85) * var(--mm));
  width: calc(1.2 * var(--mm));
  height: calc(17.7 * var(--mm));
  border-radius: 0 calc(0.45 * var(--mm)) calc(0.45 * var(--mm)) 0;
  background: linear-gradient(270deg, #c8c8cc 0%, #f3f3f5 45%, #9a9aa0 100%);
}

/* Camera Control — flush capacitive pill, slightly recessed */
.phone-btn.cam {
  right: calc(-0.45 * var(--mm));
  top: calc((111.82 - 8.55) * var(--mm));
  width: calc(1.35 * var(--mm));
  height: calc(17.1 * var(--mm));
  border-radius: calc(0.65 * var(--mm));
  background:
    linear-gradient(90deg, #7a7a80 0%, #c2c2c6 40%, #5c5c62 100%);
  box-shadow:
    inset 0.6px 0 1px rgba(0,0,0,0.45),
    inset 0 0 0 0.5px rgba(255,255,255,0.28),
    0 0 0 0.4px rgba(40,40,44,0.45);
}
.phone-btn.cam::after {
  content: "";
  position: absolute;
  inset: 18% 28% 18% 18%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(0,0,0,0.12));
  opacity: 0.7;
}

@keyframes phone-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes shadow-bob {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(0.86, 0.78); opacity: 0.55; }
}

.phone-chassis {
  position: absolute;
  inset: 0;
  border-radius: calc(19.43 * var(--mm));
  corner-shape: superellipse(1.6);
  overflow: visible;
  isolation: isolate;
  background:
    repeating-linear-gradient(
      92deg,
      rgba(255,255,255,0.16) 0 0.6px,
      rgba(0,0,0,0.03) 1.1px,
      transparent 2.2px
    ),
    linear-gradient(160deg,
      #f8f8fa 0%,
      #e6e6ea 10%,
      #c2c2c8 22%,
      #f0f0f3 36%,
      #b4b4ba 52%,
      #dedee3 66%,
      #9a9aa2 82%,
      #d5d5da 100%
    );
  box-shadow:
    inset 0 1.2px 0 rgba(255,255,255,0.9),
    inset 0 -1.6px 0 rgba(0,0,0,0.28),
    inset 1.1px 0 0 rgba(255,255,255,0.5),
    inset -1.2px 0 0 rgba(0,0,0,0.22),
    0 1px 2px rgba(11, 58, 106, 0.12),
    0 18px 36px rgba(11, 58, 106, 0.22);
}

/* machined front chamfer */
.phone-chassis::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  corner-shape: inherit;
  pointer-events: none;
  z-index: 0;
  box-shadow:
    inset 0 0 0 0.7px rgba(255,255,255,0.55),
    inset 0 0 0 calc(1.05 * var(--mm)) rgba(20,20,24,0.14);
  background: linear-gradient(145deg,
    rgba(255,255,255,0.42) 0%,
    transparent 26%,
    transparent 70%,
    rgba(0,0,0,0.12) 100%);
  mix-blend-mode: overlay;
}

/* Ceramic Shield 2 front glass, 1.20 mm inset from the unibody */
.phone-glass {
  position: absolute;
  inset: calc(1.20 * var(--mm));
  border-radius: calc(18.23 * var(--mm));
  corner-shape: superellipse(1.6);
  overflow: hidden;
  background: #050506;
  box-shadow:
    0 0 0 0.5px rgba(0,0,0,0.55),
    inset 0 0 0 0.6px rgba(255,255,255,0.06);
  z-index: 1;
}

/* Active display, 2.56 mm from the body edge, tighter 10.27 mm corners */
.phone-screen {
  position: absolute;
  inset: calc(1.36 * var(--mm));
  border-radius: calc(10.27 * var(--mm));
  overflow: hidden;
  background-color: #5fb9ff;
  background-image: url("/assets/home-ui.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.phone-ui {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Dynamic Island — 125.33 × 36.67 pt, 14 pt from the screen top */
.island {
  position: absolute;
  top: calc(14 / 956 * 100%);
  left: 50%;
  transform: translateX(-50%);
  width: calc(125.33 / 440 * 100%);
  height: calc(36.67 / 956 * 100%);
  background: #000;
  border-radius: 999px;
  z-index: 5;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    inset 0 0.5px 0 rgba(255,255,255,0.08);
}
.island-lens {
  position: absolute;
  right: 7%;
  top: 50%;
  translate: 0 -50%;
  width: 17.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, #2a3d5c 0%, #0b1422 42%, #000 74%);
  box-shadow:
    inset 0 0 0 1px rgba(90, 120, 170, 0.35),
    0 0 0 0.6px rgba(0,0,0,0.6);
}

/* iOS home indicator, 134 × 5 pt, 8 pt from the bottom */
.phone-home {
  position: absolute;
  left: 50%;
  bottom: calc(8 / 956 * 100%);
  width: calc(134 / 440 * 100%);
  height: calc(5 / 956 * 100%);
  transform: translateX(-50%);
  background: rgba(11, 26, 48, 0.34);
  border-radius: 999px;
  z-index: 5;
}

.phone-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 6;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.08) 16%, transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 14%);
  mix-blend-mode: soft-light;
}

/* floating theme cards — hidden on small screens so the hero stays uncluttered */
.float-card {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  box-shadow:
    0 14px 28px rgba(11, 58, 106, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.9);
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  overflow: hidden;
}
.float-card p { margin: 0; }

/* ---------- how ---------- */
.how,
.close {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 22px 12px;
}

.how h2 {
  margin: 0 0 28px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(36px, 9vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: var(--white);
  text-shadow:
    0 1px 0 rgba(11, 58, 106, 0.18),
    0 16px 34px rgba(11, 58, 106, 0.22);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.steps li {
  background: var(--glass);
  border-radius: var(--radius-lg);
  padding: 22px 20px 24px;
  box-shadow:
    0 14px 32px rgba(11, 58, 106, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.9);
}
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFE66A 0%, #FFD400 58%, #F3C400 100%);
  box-shadow: 0 4px 0 var(--gold), inset 0 1px 0 rgba(255,255,255,0.55);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.04em;
  color: var(--navy);
}
.steps h3 {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--navy);
}
.steps p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--navy);
  opacity: 0.78;
}

/* ---------- close + footer ---------- */
.close {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 48px;
  padding-bottom: 36px;
  text-align: center;
}
.close .hook { margin: 0; }

.foot-home {
  position: relative;
  z-index: 1;
  flex-direction: column;
  gap: 6px;
  padding: 8px 22px max(28px, env(safe-area-inset-bottom));
}
.foot-home nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 18px;
}
.foot-age {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  opacity: 0.72;
}

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.1fr);
    align-items: center;
    gap: 12px 24px;
    padding: 36px 64px 32px;
    min-height: 100dvh;
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    order: 0;
    padding-left: 8px;
    max-width: 620px;
    animation: rise 0.72s cubic-bezier(0.34, 1.4, 0.42, 1);
  }
  .hero-copy .lockup,
  .hero-copy .hook,
  .hero-copy .hero-cta {
    animation: none;
    order: 0;
  }
  .hero-stage { order: 0; min-height: 680px; }
  .hero-cta {
    align-items: flex-start;
    width: auto;
    margin-top: 4px;
  }
  .lockup { margin: 0; justify-content: flex-start; }
  .lockup-hand { height: 124px; }
  .lockup-word { height: 76px; }
  .hook {
    text-align: left;
    font-size: clamp(64px, 7.2vw, 96px);
    margin: 0;
  }
  .phone-wrap {
    --phone-w: 300px;
    rotate: -7deg;
  }
  .phone { animation-name: phone-bob-lg; }
  .phone-shadow { animation-name: shadow-bob-lg; }
  @keyframes phone-bob-lg {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -14px; }
  }
  @keyframes shadow-bob-lg {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(0.84, 0.76); opacity: 0.5; }
  }

  .float-card {
    display: flex;
    position: absolute;
    width: 230px;
    height: 112px;
    padding: 18px 16px;
    animation: card-float 6.4s ease-in-out infinite;
  }
  .float-card p { font-size: 17px; }
  .float-card img { width: 88px; height: 88px; }
  .float-a {
    top: 6%;
    left: -32%;
    z-index: 3;
    animation-delay: 0s;
  }
  .float-b {
    top: 12%;
    right: -28%;
    z-index: 3;
    animation-delay: -2.2s;
  }
  .float-c {
    bottom: 8%;
    left: -12%;
    z-index: 3;
    animation-delay: -3.6s;
  }
  @keyframes card-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
  }
  /* keep the rotation while floating */
  .float-a { rotate: -9deg; }
  .float-b { rotate: 8deg; }
  .float-c { rotate: 6deg; }

  .how, .close { padding-left: 64px; padding-right: 64px; }
  .how h2 { font-size: 72px; }
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .foot-home { padding-bottom: 36px; }
}

@media (max-height: 740px) and (max-width: 899px) {
  .lockup-hand { height: 64px; }
  .lockup-word { height: 40px; }
  .hook { font-size: 40px; }
  .phone-wrap { --phone-w: 196px; }
  .hero { gap: 6px; padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .phone,
  .page-home .phone-shadow {
    animation: none;
    translate: 0 0;
    transform: none;
  }
  .page-home .phone-shadow { opacity: 0.85; }
  @media (min-width: 900px) {
    .page-home .phone-wrap { rotate: -7deg; }
  }
}
