/* Home page only. Shared tokens and components live in style.css. */

.home { overflow-x: clip; }
.home section { padding: 96px 0; }
.home h2 { font-size: clamp(32px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.03em; }
.grad {
  background: linear-gradient(100deg, #C4B5FD 0%, #A78BFA 40%, #7C4DFF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn-lg { padding: 17px 34px; font-size: 17px; }
.btn-link { color: #C4B5FD; padding-left: 8px; padding-right: 8px; }

/* ── Scroll reveal ─────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s cubic-bezier(.2,.7,.2,1), transform 0.6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.btn-row.reveal { transition-delay: 0.1s; }

/* ── Hero ──────────────────────────────────────────── */
.home .h-hero { padding: 104px 0 40px; text-align: center; position: relative; }
.h-hero::before {
  content: ""; position: absolute; inset: -10% 0 auto; height: 900px; z-index: -1;
  background:
    radial-gradient(ellipse 50% 45% at 25% 15%, rgba(108, 92, 231, 0.32), transparent 60%),
    radial-gradient(ellipse 45% 40% at 78% 10%, rgba(124, 77, 255, 0.26), transparent 60%);
}
.eyebrow { font-family: var(--font-rounded); font-weight: 600; font-size: 19px; color: var(--text-2); margin-bottom: 14px; }
.h-hero h1 {
  font-family: var(--font); font-weight: 700;
  font-size: clamp(44px, 8.2vw, 104px); line-height: 1.02; letter-spacing: -0.045em;
  margin: 0 auto 26px; max-width: 1100px;
}
.h-sub { font-size: clamp(18px, 2.2vw, 24px); color: var(--text-2); max-width: 680px; margin: 0 auto 36px; line-height: 1.45; }
.h-film {
  margin: 64px auto 0; max-width: 1440px; padding: 0 24px;
}
.h-film video {
  display: block; width: 100%; aspect-ratio: 1920 / 880; object-fit: cover;
  border-radius: 32px; background: #0A0A1A;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

/* ── iPhone frame ──────────────────────────────────── */
.iphone {
  position: relative; width: 340px; aspect-ratio: 1290 / 2796;
  padding: 11px; border-radius: 58px;
  background: linear-gradient(145deg, #3a3a46, #15151c 40%, #2a2a34);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 60px 120px -20px rgba(124, 77, 255, 0.35), 0 30px 60px rgba(0,0,0,0.5);
  box-sizing: content-box;
}
.iphone-screen { position: absolute; inset: 11px; border-radius: 48px; overflow: hidden; background: #000; }
.iphone-island { position: absolute; top: 11px; left: 50%; width: 31%; height: 3.6%; transform: translateX(-50%); background: #000; border-radius: 999px; z-index: 5; }
.iphone-screen > video, .iphone-screen > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.iphone-sm { width: 300px; }

/* ── Showcase (pinned) ─────────────────────────────── */
.home .showcase { padding: 0; height: 280vh; position: relative; }
.sc-sticky { position: sticky; top: 64px; height: calc(100vh - 64px); display: flex; align-items: center; }
.sc-grid { display: grid; grid-template-columns: 1fr auto; gap: 72px; align-items: center; width: 100%; }
.sc-copy { width: 100%; }
.sc-steps { list-style: none; position: relative; min-height: 260px; }
.sc-step { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(-16px); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.sc-step.is-on { opacity: 1; transform: none; transition: opacity .6s ease .22s, transform .7s cubic-bezier(.2,.7,.2,1) .22s; }
.sc-step:not(.is-on) { transform: translateY(-16px); }
.sc-step.is-on ~ .sc-step:not(.is-on) { transform: translateY(24px); }
.sc-step p { color: var(--text-2); font-size: 21px; line-height: 1.5; max-width: 460px; }
.sc-device { justify-self: center; }
.sc-sticky .iphone { width: min(340px, calc((100vh - 64px - 96px) * 0.4614)); }
.sc-lock, .sc-home { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .7s ease; }
.sc-lock { object-fit: cover; }
.sc-home { background-size: cover; background-position: center; opacity: 0; }
.showcase.home-on .sc-home { opacity: 1; }
.showcase.home-on .sc-lock { opacity: 0; }
/* iOS widget grid, sized relative to the 390pt-wide screen */
.hs-grid {
  position: absolute; left: 6.2%; right: 6.2%; top: 13%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 5.6%; row-gap: 10px;
}
.wdg { width: 100%; display: block; border-radius: 13% / 13%; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.wdg-m, .wdg-l { grid-column: span 2; }
.wdg-m { border-radius: 6.2% / 13%; }
.wdg-l { border-radius: 6.2% / 6%; }
.pop { opacity: 0; transform: scale(0.6) translateY(20px); transition: opacity .45s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.pop.on { opacity: 1; transform: none; }
.pop.on + .pop.on { transition-delay: .08s; }

/* ── Try it ────────────────────────────────────────── */
.try-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 0 auto 40px; width: max-content; max-width: 100%;
  padding: 4px; border-radius: 26px; background: var(--bg-raised); border: 1px solid var(--border);
}
.try-tabs button {
  font: 600 15px var(--font); color: var(--text-2); background: none; border: 0; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; white-space: nowrap; transition: background .25s, color .25s;
}
.try-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.try-stage { display: flex; flex-direction: column; align-items: center; perspective: 1600px; }
.flip { background: none; border: 0; padding: 0; cursor: pointer; width: min(620px, 92vw); aspect-ratio: 1092 / 510; display: block; }
.flip:focus-visible { outline: 3px solid #A78BFA; outline-offset: 8px; border-radius: 40px; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,.7,.2,1); }
.flip.is-back .flip-inner { transform: rotateX(180deg); }
.face {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 7% / 15%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,0.6);
}
.face.back { transform: rotateX(180deg); }
.flip.swap .flip-inner { transition: none; }
.flip.nudge .flip-inner { animation: nudge .5s cubic-bezier(.2,.7,.2,1); }
@keyframes nudge { 0% { transform: translateX(0); } 35% { transform: translateX(-14px); opacity: .6; } 100% { transform: translateX(0); } }
.try-hint { color: var(--text-3); font-size: 15px; margin-top: 26px; min-height: 1.6em; }

/* ── Learn rail ────────────────────────────────────── */
.home .learn { padding-bottom: 80px; }
.rail {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 max(24px, calc((100vw - 1080px) / 2 + 24px));
  padding: 8px max(24px, calc((100vw - 1080px) / 2 + 24px)) 24px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure { flex: 0 0 auto; width: clamp(220px, 24vw, 300px); scroll-snap-align: start; }
.rail img { width: 100%; display: block; border-radius: 26px; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.rail figure:hover img { transform: translateY(-6px); }
.rail figcaption { color: var(--text-2); font-weight: 600; margin-top: 14px; font-size: 16px; }
.rail-foot { margin-top: 10px; }

/* ── Bento ─────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  position: relative; overflow: hidden; border-radius: 30px; padding: 36px 34px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.1); min-height: 520px; display: flex; flex-direction: column;
}
.tile h3 { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 12px; }
.tile p { color: var(--text-2); font-size: 16px; line-height: 1.5; }
.tile a { color: #C4B5FD; text-decoration: none; font-weight: 600; display: inline-block; margin-top: 12px; }
.tile-phone { margin: 30px auto 0; width: 72%; flex: 1; display: flex; align-items: flex-end; }
.tile-phone img, .tile-phone video {
  width: 100%; display: block; border-radius: 30px 30px 0 0; border: 7px solid #23232c; border-bottom: 0;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
  aspect-ratio: 1290 / 1700; object-fit: cover; object-position: top;
}
.tile:hover .tile-phone img, .tile:hover .tile-phone video { transform: translateY(-10px); }
.tile-wide { grid-column: span 3; flex-direction: row; align-items: stretch; gap: 40px; padding: 48px 56px 0; min-height: 460px; }
.tile-wide .tile-copy { flex: 1; align-self: center; padding-bottom: 48px; max-width: 480px; }
.tile-wide h3 { font-size: clamp(30px, 3.6vw, 44px); }
.tile-wide p { font-size: 18px; }
.tile-wide .tile-phone { width: 300px; flex: 0 0 auto; margin: 0; }
.tile-stat { min-height: 0; padding: 34px; justify-content: center; }
.tile-stat .big { font-size: clamp(34px, 3.6vw, 46px); font-weight: 700; letter-spacing: -0.03em; color: var(--text); line-height: 1.05; margin-bottom: 8px; }
.tile-stat .c-lav { color: #A78BFA; }
.tile-stat .c-mint { color: #5EEAD4; }
.tile-stack { display: flex; flex-direction: column; gap: 20px; }
.tile-stack .tile-stat { flex: 1; }

/* ── A day with FlashStacks ────────────────────────── */
.day-grid { display: grid; grid-template-columns: 1fr auto; gap: 80px; align-items: center; }
.story { width: 320px; aspect-ratio: 886 / 1920; border-radius: 36px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 60px 120px -20px rgba(124, 77, 255, 0.4), 0 30px 60px rgba(0,0,0,0.5); }
.story video { width: 100%; height: 100%; object-fit: cover; display: block; }
.day-copy p { color: var(--text-2); font-size: 20px; line-height: 1.55; margin-bottom: 30px; max-width: 520px; }

/* ── CTA ───────────────────────────────────────────── */
.h-cta { text-align: center; position: relative; }
.h-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 50% 60% at 50% 55%, rgba(124, 77, 255, 0.28), transparent 70%);
}
.cta-icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 28px; box-shadow: 0 20px 50px rgba(124,77,255,0.35); }
.h-cta p { color: var(--text-2); font-size: 20px; margin: 0 auto 34px; max-width: 560px; }


/* ── Guides ────────────────────────────────────────── */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide {
  display: flex; flex-direction: column; gap: 6px; padding: 24px 26px; border-radius: 22px; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03)); border: 1px solid rgba(255,255,255,0.1);
  transition: border-color .25s, transform .4s cubic-bezier(.2,.7,.2,1);
}
.guide:hover { border-color: rgba(167,139,250,0.5); transform: translateY(-3px); }
.guide span { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #A78BFA; }
.guide b { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.guide i { font-style: normal; color: var(--text-2); font-size: 15px; line-height: 1.45; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .home section { padding: 88px 0; }
  .sc-grid { grid-template-columns: 1fr; gap: 28px; justify-items: center; text-align: center; }
  .sc-copy { order: 2; }
  .sc-copy .kicker { display: none; }
  .sc-steps { min-height: 170px; }
  .sc-step p { font-size: 17px; margin: 0 auto; }
  .sc-step h2 { font-size: 30px; margin-bottom: 8px; }
  .sc-sticky .iphone { width: min(250px, 58vw, calc((100vh - 64px - 260px) * 0.4614)); }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; flex-direction: column; padding: 36px 30px 0; }
  .tile-wide .tile-copy { padding-bottom: 0; }
  .tile-wide .tile-phone { width: 62%; margin: 30px auto 0; }
  .tile { min-height: 0; }
  .day-grid { grid-template-columns: 1fr; gap: 48px; justify-items: center; text-align: center; }
  .day-copy p { margin-left: auto; margin-right: auto; }
  .h-film { padding: 0 12px; }
  .h-film video { border-radius: 20px; }
}
@media (max-width: 520px) {
  .h-film video { aspect-ratio: 4 / 3; }
  .story { width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .pop, .sc-step, .flip-inner, .tile-phone img, .rail img { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
