/* XVelo landing page: a scrolling story with a drawn 3D iPhone that slides off and back on for each feature.
   Brand C7 Glacier. Desktop: words on the left, the phone held on the right. Phones: the phone held at the top, words below. */
:root { --phone-w: 300px; }
.story { overflow-x: clip; position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); max-width: 1240px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.chapters { grid-column: 1; grid-row: 1; }
.stage { grid-column: 2; grid-row: 1; position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; justify-content: center; perspective: 1600px; pointer-events: none; }
.glow { position: absolute; inset: 10% -10%; background: radial-gradient(closest-side, rgba(111, 221, 255, .13), rgba(111, 221, 255, 0)); }
.step { border-top: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding-block: 80px; max-width: 560px; }
.step .eyebrow { font-weight: 600; font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.step.hero .eyebrow { color: var(--glacier); }
.step h1, .step h2 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: .01em; }
.step h1 { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.18; }
.step h2 { font-size: clamp(30px, 3.8vw, 50px); line-height: 1.22; }
.step p { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.6; max-width: 34em; }
.step .words { opacity: .25; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1); display: flex; flex-direction: column; gap: 22px; }
.step.on .words { opacity: 1; transform: none; }
.scrollcue { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; margin-top: 18px; }
.scrollcue i { width: 1.5px; height: 34px; background: linear-gradient(var(--glacier), rgba(111, 221, 255, 0)); display: inline-block; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(-4px); opacity: .5; } 50% { transform: translateY(6px); opacity: 1; } }

/* The phone */
.float { animation: float 7s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes float { 0%, 100% { transform: translateY(-8px) rotate(-1.5deg); } 50% { transform: translateY(8px) rotate(-.5deg); } }
.phone { position: relative; width: calc(var(--phone-w) + 26px); aspect-ratio: 326 / 678; transform: translateX(0) rotateY(-16deg) rotateX(6deg); transition: transform .65s cubic-bezier(.16, 1, .3, 1), opacity .65s ease; transform-style: preserve-3d; }
.phone.leave { transform: translateX(110vw) rotateY(-55deg) rotateX(6deg); opacity: .6; transition: transform .42s cubic-bezier(.7, 0, .84, 0), opacity .42s ease; }
.phone.arrive { transform: translateX(110vw) rotateY(-55deg) rotateX(6deg); opacity: .6; transition: none; }
.btn-side { position: absolute; width: 4px; border-radius: 2px; background: #4A4F57; }
.frame { position: absolute; inset: 0; border-radius: calc(52px * var(--z, 1)); padding: 3px; background: linear-gradient(140deg, #5B616A 0%, #2A2D32 35%, #15171A 60%, #4C525B 100%); box-shadow: 0 60px 110px rgba(0, 0, 0, .6), 0 18px 36px rgba(0, 0, 0, .45); }
.bezel { width: 100%; height: 100%; border-radius: calc(49px * var(--z, 1)); background: #050506; padding: calc(10px * var(--z, 1)); }
.screen-area { position: relative; width: 100%; height: 100%; border-radius: calc(40px * var(--z, 1)); overflow: hidden; background: var(--bg); }
.island { position: absolute; top: calc(10px * var(--z, 1)); left: 50%; width: 30%; height: calc(26px * var(--z, 1)); margin-left: -15%; border-radius: calc(16px * var(--z, 1)); background: #000; z-index: 5; }
.sheen { position: absolute; inset: 0; z-index: 6; background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .02) 28%, rgba(255, 255, 255, 0) 45%); pointer-events: none; }
.shadow { position: absolute; bottom: 8%; width: 60%; height: 34px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0)); }
/* Screens are laid out for a 300px-wide screen; --z (set by the page script) shrinks them with the phone. */
.screen { position: absolute; inset: 0; display: none; zoom: var(--z, 1); font-family: var(--body); color: var(--text); }
.screen.on { display: block; }
.screen img { width: 100%; height: auto; display: block; }

/* Screen: filming */
.cam { background: linear-gradient(180deg, #11161B 0%, #1A2229 55%, #23302A 100%); }
.cam svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud { position: absolute; top: 46px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; }
.chip { background: rgba(11, 12, 14, .72); border-radius: 8px; padding: 5px 8px; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.chip.rec { color: var(--text); }
.panel { position: absolute; left: 10px; right: 10px; bottom: 14px; background: rgba(11, 12, 14, .92); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.lab { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.num { font-family: var(--display); font-size: 38px; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.num small { font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .12em; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.minis div { background: var(--panel2); border-radius: 8px; padding: 6px 8px; }
.minis b { display: block; font-size: 14px; white-space: nowrap; }
.minis span { font-size: 10px; color: var(--muted); }
.play .tap1 { animation: pop .3s ease .25s both; } .play .tap2 { animation: pop .3s ease .5s both; } .play .scale { animation: fade .4s ease .7s both; }
.play .path { animation: draw .8s cubic-bezier(.2, .8, .2, 1) 1s both; } .play .landed { animation: pop .3s ease 1.7s both; }
.play .panel { animation: rise .5s cubic-bezier(.16, 1, .3, 1) 1.5s both; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: .85; } }
@keyframes draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.tap1, .tap2, .landed { transform-box: fill-box; transform-origin: center; }

/* Screen: field and bullpen */
.app { padding: 58px 14px 0; background: var(--bg); }
.app .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.app svg { display: block; width: 100%; height: auto; margin-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.tiles div { background: var(--panel); border-radius: 14px; padding: 12px; }
.tiles .num { font-size: 26px; }
.play .dot { animation: pop .28s ease both; }
.pitchcard { background: var(--panel); border-radius: 16px; padding: 12px; margin-top: 8px; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.call { font-weight: 700; font-size: 13px; color: var(--bg); background: var(--glacier); border-radius: 7px; padding: 4px 9px; }
.call.ball { background: var(--platinum); }

/* Screens: real screenshots */
.play .scrollshot { animation: scrollshot 6s ease-in-out .6s both; }
@keyframes scrollshot { from { transform: translateY(0); } to { transform: translateY(-14%); } }
.play .jiggle { animation: jiggle .3s ease-in-out infinite; }
@keyframes jiggle { 0%, 100% { transform: rotate(-.5deg) scale(1.02); } 50% { transform: rotate(.5deg) scale(1.02); } }


/* How it tracks: the intro, then the camera view (what the iPhone sees) with its steps */
.intro { color: var(--text); border-top: 0; max-width: 1240px; margin: 0 auto; padding-block: 120px 24px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 22px; }
.intro .eyebrow { font-weight: 600; font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: var(--glacier); white-space: nowrap; }
.intro h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: clamp(34px, 5vw, 64px); line-height: 1.15; letter-spacing: .01em; text-wrap: balance; }
.intro p { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.6; max-width: 36em; }
.story.track { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; }
.camview { width: 100%; max-width: 780px; transform: rotateY(-9deg) rotateX(4deg); transform-style: preserve-3d; }
.cam-bezel { border-radius: 48px; padding: 3px; background: linear-gradient(140deg, #5B616A 0%, #2A2D32 35%, #15171A 60%, #4C525B 100%); box-shadow: 0 60px 110px rgba(0, 0, 0, .6), 0 18px 36px rgba(0, 0, 0, .45); }
.cam-screen { position: relative; border-radius: 45px; background: #050506; padding: 14px; overflow: hidden; }
.camsvg { display: block; width: 100%; height: auto; border-radius: 32px; background: #10161C; }
.cam-island { position: absolute; left: 22px; top: 50%; width: 24px; height: 28%; transform: translateY(-50%); border-radius: 14px; background: #000; }
.L { opacity: 0; transition: opacity .45s ease; }
.L.vis { opacity: 1; }
.L .spot, .L .tap { transform-box: fill-box; transform-origin: center; }
.L.play .spot { animation: pop .3s ease both; animation-delay: calc(var(--i) * 55ms + .15s); }
.L.play .tap { animation: pop .35s ease both; animation-delay: calc(var(--i) * .4s + .2s); }
.L.play .draw { animation: fadein .6s ease .55s both; }
.L.play .late { animation: fadein .5s ease 1.4s both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* Screens: compete and friends */
.chips { display: flex; gap: 6px; margin-top: 12px; }
.chips span { font-size: 10px; font-weight: 600; padding: 5px 8px; border-radius: 7px; background: var(--panel); color: var(--muted); white-space: nowrap; }
.chips .sel { background: var(--platinum); color: var(--bg); }
.board, .friends { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.board li { display: grid; grid-template-columns: 14px 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; background: var(--panel); border-radius: 12px; padding: 7px 10px; font-size: 13px; font-weight: 600; }
.board b { font-family: var(--display); font-weight: 400; font-size: 11px; color: var(--muted); }
.board i, .friends i { width: 26px; height: 26px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; color: var(--platinum); }
.board em { font-style: normal; font-family: var(--display); font-size: 14px; font-variant-numeric: tabular-nums; }
.board .me { box-shadow: inset 0 0 0 2px var(--glacier); }
.tile2 { background: var(--panel); border-radius: 14px; padding: 10px 12px; margin-top: 8px; display: grid; gap: 7px; }
.tile2 .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tile2 .txt { font-size: 12px; font-weight: 600; white-space: nowrap; }
.tile2 .sub { margin-top: 0; font-size: 11px; white-space: nowrap; }
.bar { height: 6px; border-radius: 6px; background: var(--panel2); }
.bar span { display: block; height: 100%; border-radius: 6px; background: var(--platinum); }
.pips { display: flex; gap: 5px; }
.pips span { flex: 1; height: 6px; border-radius: 6px; background: var(--panel2); }
.pips .f { background: var(--platinum); }
.friends li { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 12px; padding: 7px 10px; }
.friends span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.friends b { font-size: 13px; }
.friends small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.vs .cmp { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.vs .cmp em { font-style: normal; font-family: var(--display); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--text); font-variant-numeric: tabular-nums; }
.vs .cmp em:last-child { text-align: right; }
.sharebtn { margin-top: 10px; height: 38px; border-radius: 12px; background: var(--glacier); color: var(--bg); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.play .board li, .play .friends li { animation: rise .45s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i) * 90ms + .2s); }
.play .bar span { animation: grow 1s cubic-bezier(.16, 1, .3, 1) .7s both; }
@keyframes grow { from { width: 0; } }

/* Closing */
.soon { font-size: inherit; text-align: center; padding-block: 120px 140px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; align-items: center; gap: 26px; border-top: 1px solid var(--line); background: radial-gradient(800px 420px at 50% 40%, rgba(111, 221, 255, .08), rgba(111, 221, 255, 0)); }
.soon .mark { width: 96px; height: 96px; }
.soon h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: clamp(28px, 7.2vw, 108px); line-height: 1; letter-spacing: .04em; white-space: nowrap; color: var(--text); }
.soon p { margin: 0; color: var(--muted); font-size: 20px; max-width: 34em; }
.soon .btn.main { height: 60px; padding: 0 34px; font-size: 18px; }
.soon .mail { color: var(--muted); font-size: 15px; letter-spacing: .04em; }

@media (max-width: 900px) {
  /* The phone is sized from the space Safari/Chrome leave (svh = with toolbars showing), so it always fits its box:
     total height = (width + 26px) / 0.4808, kept 36px shorter than the box for the float and the tilt. */
  :root { --stage-h: 56svh; --phone-w: min(200px, 46vw, calc((var(--stage-h) - 36px) * .4808 - 26px)); }
  .story { display: block; padding-left: 0; padding-right: 0; }
  .chapters { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .stage { position: sticky; top: 0; height: var(--stage-h); z-index: 3; background: var(--bg); }
  /* Text scrolling up fades out just below the phone, never behind it. */
  .stage::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 36px; background: linear-gradient(var(--bg), rgba(11, 12, 14, 0)); }
  /* Each feature's words fill the space under the phone, so one block leaves as the next arrives. */
  .step, .step.hero { min-height: calc(100svh - var(--stage-h)); justify-content: flex-start; padding-block: 20px 48px; gap: 16px; }
  .step p { font-size: 17px; }
  .step .words { gap: 16px; }
  .scrollcue { display: none; }
  .phone { transform: translateX(0) rotateY(-12deg) rotateX(5deg); }
  .intro { padding-block: 72px 8px; gap: 16px; }
  .intro p { font-size: 17px; }
  .story.track .stage { height: auto; padding-block: 12px 18px; }
  .story.track .step { min-height: 52svh; }
  .camview { transform: none; }
  .cam-bezel { border-radius: 26px; }
  .cam-screen { border-radius: 23px; padding: 7px; }
  .camsvg { border-radius: 17px; }
  .cam-island { left: 11px; width: 12px; border-radius: 8px; }
}
@media (max-width: 600px) {
  .soon h2 { white-space: normal; font-size: 13vw; line-height: 1.12; }
}
@media (prefers-reduced-motion: reduce) {
  .float, .scrollcue i, .play .jiggle, .play .scrollshot { animation: none; }
  .phone, .phone.leave, .step .words, .L { transition: none; }
  .L.play * { animation: none !important; }
  .play * { animation-duration: .01s !important; animation-delay: 0s !important; }
}
