/* Class Portal marketing site. Apple product-page grammar (docs/apple-reference.md), the app's
   Beta 6 look: the system type stack, true black, flat #1d1d1f panels, depth by tone not glow. */
:root{
  --bg:#000;
  --bg2:#0b0b0d;
  --panel:#1d1d1f;
  --panel2:#1d1d1f;
  --line:rgba(255,255,255,.08);
  --text:#f5f5f7;
  --text2:#a1a1a6;
  --text3:#6e6e73;
  --blue:#2997ff;
  --blue-deep:#0071e3;
  --brass:#d8a95c;
  --navy:#78aede;
  --ui:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue",Helvetica,Arial,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,monospace;
  --app:#000;
  --radius:28px;
  --max:1200px;
  --gutter:max(24px,calc((100vw - var(--max)) / 2));
  --ease:cubic-bezier(.2,.7,.2,1);
  color-scheme:dark;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
html,body{margin:0;background:var(--bg);color:var(--text)}
body{font-family:var(--ui);font-size:17px;line-height:1.47;letter-spacing:-.022em;-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{max-width:100%;display:block}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{margin:0;font-family:var(--ui);font-weight:600;letter-spacing:-.015em;line-height:1.05}
p{margin:0}
.wrap{width:min(var(--max),calc(100% - 48px));margin:0 auto}
.narrow{width:min(820px,calc(100% - 48px));margin:0 auto}

/* Type scale */
.eyebrow{font-family:var(--ui);font-size:clamp(17px,1.45vw,21px);font-weight:600;color:var(--text3);letter-spacing:-.01em}
.h-hero{font-size:clamp(48px,7.5vw,96px);font-weight:600;letter-spacing:-.015em;line-height:1.04}
.h-big{font-size:clamp(40px,6.7vw,96px);font-weight:600;letter-spacing:-.015em;line-height:1.04}
.h-sect{font-size:clamp(32px,3.4vw,48px);font-weight:600;letter-spacing:-.003em}
.lead{font-size:clamp(19px,1.7vw,24px);line-height:1.3;color:var(--text2);font-weight:600;letter-spacing:-.01em}
.lead b,.lead strong{color:var(--text);font-weight:600}
.small{font-size:14px;color:var(--text3)}

/* Buttons */
.btn{font-family:var(--ui);display:inline-flex;align-items:center;gap:8px;border-radius:980px;padding:13px 24px;font-size:18px;font-weight:500;line-height:1;white-space:nowrap;transition:transform .2s var(--ease),background .2s;text-decoration:none!important}
.btn.primary{background:var(--blue-deep);color:#fff}
.btn.primary:hover{background:#0077ed}
.btn.ghost{background:transparent;color:var(--text);border:1px solid rgba(255,255,255,.35)}
.btn.ghost:hover{background:rgba(255,255,255,.08)}
.btn.sm{padding:8px 15px;font-size:14px}
.btn:active{transform:scale(.97)}

/* Local nav (frosted bar that arrives after the hero) */
.localnav{position:fixed;top:12px;left:12px;right:12px;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:10px 12px 10px 18px;border-radius:16px;background:rgba(29,29,31,.72);
  -webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
  border:1px solid rgba(255,255,255,.06);
  transform:translateY(-140%);opacity:0;transition:transform .45s var(--ease),opacity .45s var(--ease)}
.localnav.on{transform:none;opacity:1}
.localnav .brand{font-family:var(--ui);display:flex;align-items:center;gap:10px;font-weight:600;font-size:17px;color:var(--text);white-space:nowrap}
.localnav .brand img{width:26px;height:26px;border-radius:7px}
.localnav .acts{display:flex;gap:8px}
/* Preview deployment badge (build.sh preview adds body.preview) */
body.preview .localnav .brand::after,body.preview .hero .topline::after{content:"PREVIEW";font-family:var(--mono);font-size:11px;letter-spacing:.08em;color:var(--brass);border:1px solid rgba(216,169,92,.5);border-radius:6px;padding:2px 6px;margin-left:4px}

/* Phone mockup: a real frame PNG (assets/frames, 1470x3000 source) over a screen box.
   Screen cut-out measured from the PNG: x 75-1394, y 66-2933 of 1470x3000, corner radius ~200px.
   Inside the screen, safe-area bands (59pt top, 34pt bottom of 956pt) carry a CSS status bar and
   home indicator, so a 440x863 capture reads as the full display. The phone is a size container,
   so the status bar is set in cqw and scales with the device wherever it is placed. */
.phone{position:relative;width:min(380px,84vw);aspect-ratio:1470/3000;container-type:inline-size}
.phone .frame{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none}
.phone .screen{position:absolute;top:2.2%;bottom:2.2%;left:5.1%;right:5.1%;border-radius:15.2%/7%;overflow:hidden;background:var(--app,#0f131a);z-index:1;display:flex;flex-direction:column;color:#fff}
.phone .screen .sb{flex:0 0 6.17%;position:relative;display:flex;align-items:center;justify-content:space-between;padding:0 10.2% 0 11.3%;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif;font-size:3.5cqw;font-weight:600;letter-spacing:-.01em;line-height:1;transform:translateY(6%)}
.phone .screen .sb .ic{display:flex;gap:1.5cqw;align-items:center}
.phone .screen .sb svg{height:2.7cqw;width:auto;fill:currentColor;display:block}
.phone .screen .sb svg:last-child{height:2.9cqw}
/* The Dynamic Island, drawn here rather than trusted to the frame PNG: a pure black pill with
   the lens, above everything, so it reads identically over a still, a video and the bar. */
.phone .island{position:absolute;left:40.5%;top:3.67%;width:19%;height:3.53%;border-radius:999px;background:#000;z-index:4;pointer-events:none}
.phone .island::after{content:"";position:absolute;right:12%;top:50%;width:19%;aspect-ratio:1;transform:translateY(-50%);border-radius:50%;background:radial-gradient(circle at 40% 35%,#2a2f4a 0,#0b0d18 55%,#000 75%)}
.phone .screen .shot{flex:1 1 auto;position:relative;min-height:0}
.phone .screen .shot img,.phone .screen .shot video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top;display:block;background:var(--app,#0f131a)}
.phone .screen .hi{flex:0 0 3.56%;display:grid;place-items:center}
.phone .screen .hi::after{content:"";width:36%;height:1.4cqw;border-radius:999px;background:rgba(255,255,255,.9)}

.phone .replay{position:absolute;left:50%;bottom:-52px;transform:translateX(-50%);z-index:4;border:0;border-radius:999px;background:rgba(255,255,255,.12);color:var(--text);font:600 14px/1 var(--ui);padding:10px 16px;display:none;cursor:pointer;white-space:nowrap}
.phone.ended .replay{display:inline-flex;gap:6px;align-items:center}

/* Reveal on scroll */
.reveal{opacity:0;transform:translateY(44px) scale(.98);transition:opacity 1s var(--ease),transform 1s var(--ease)}
.reveal.in{opacity:1;transform:none}
.reveal.d1{transition-delay:.08s}.reveal.d2{transition-delay:.16s}.reveal.d3{transition-delay:.24s}.reveal.d4{transition-delay:.32s}

/* Hero: headline first on every size; phone beside it on wide screens, below it on narrow */
.hero{position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;padding:88px var(--gutter) 0;overflow:hidden;isolation:isolate;gap:8px 24px}
.hero .glow{display:none}
.hero .copy{align-self:start;text-align:center}
.hero .topline{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:14px}
.hero .topline img{width:36px;height:36px;border-radius:10px}
.hero .topline .eyebrow{color:var(--text2)}
.hero .sub{margin-top:18px;max-width:34ch;margin-inline:auto}
.hero .avail{margin-top:22px;color:var(--text2);font-size:17px;min-height:1.5em}
.hero .avail:empty{display:none}
.hero .cta{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap;justify-content:center}
.hero .stage{display:grid;place-items:start center;padding-top:36px;min-height:0}
.hero .phone{width:min(400px,86vw);transform:translateY(calc(6% + var(--hp,0) * 10vh)) scale(calc(1 - var(--hp,0) * .12));transform-origin:50% 100%;opacity:calc(1 - var(--hp,0) * .6)}
@media (min-width:901px){
  .hero{min-height:100svh;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);grid-template-rows:1fr;align-items:center;padding-top:64px}
  .hero .copy{grid-column:1;grid-row:1;align-self:center;padding-bottom:10vh;text-align:left}
  .hero .topline,.hero .cta{justify-content:flex-start}
  .hero .sub{margin-inline:0}
  .hero .stage{grid-column:2;grid-row:1;align-self:end;justify-self:center;padding:0;height:100svh;display:grid;align-items:end}
  .hero .phone{height:94svh;width:auto;transform:translateY(calc(8% + var(--hp,0) * 8vh)) scale(calc(1 - var(--hp,0) * .1))}
}

/* Section framing */
.sect{padding-block:clamp(80px,12vw,160px)}
.sect.panel{background:var(--panel)}
.sect .head{max-width:900px}
.sect .head .eyebrow{margin-bottom:12px}
.sect .head .lead{margin-top:22px;max-width:44ch}

/* Pinned scrub stage. The outer is tall; the inner sticks for the whole scroll and site.js
   writes the eased numbers: --s (phone scale), --py (phone y), --ho/--hy (headline opacity and
   lift), --co/--cy (caption). Headline holds then rises out; the phone grows from small and low
   to full size in the middle of the stage; then it settles up a little and the caption arrives. */
.pin{position:relative;height:320vh}
.pin .stick{position:sticky;top:0;height:100svh;display:grid;place-items:center;overflow:hidden}
.pin .stick .bgglow{display:none}
.pin .stick .head{position:absolute;top:max(76px,9vh);left:24px;right:24px;margin-inline:auto;max-width:900px;text-align:center;opacity:var(--ho,1);transform:translateY(var(--hy,0));will-change:transform,opacity}
.pin .stick .head .eyebrow{margin-bottom:12px}
.pin .stick .phone{height:min(86svh,980px);width:auto;transform:translateY(var(--py,14vh)) scale(var(--s,.58));will-change:transform}
.pin .stick .caption{position:absolute;left:50%;bottom:max(24px,4vh);transform:translate(-50%,var(--cy,20px));text-align:center;width:min(680px,92%);opacity:var(--co,0)}

/* Highlights gallery (Apple: one card in view, the next peeking; text top-centre; timed dots
   and a pause button; only the active card's video plays and the gallery advances when it ends) */
#highlights{background:var(--panel)}
#highlights .wrap{display:flex;justify-content:space-between;align-items:baseline}
.carousel{margin-top:40px;display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 var(--gutter) 6px;scroll-padding-inline:var(--gutter);scrollbar-width:none;-webkit-overflow-scrolling:touch}
.carousel::-webkit-scrollbar{display:none}
.card{flex:0 0 min(var(--max),calc(100vw - 2 * var(--gutter) - 40px));scroll-snap-align:start;position:relative;aspect-ratio:1260/612;border-radius:var(--radius);overflow:hidden;background:#000;isolation:isolate;display:flex;flex-direction:column}
.card .txt{flex:0 0 auto;padding:40px 48px 0;text-align:center;font-size:clamp(21px,2vw,28px);font-weight:600;line-height:1.2;letter-spacing:-.01em;z-index:2;margin:0 auto;max-width:34ch}
.card .txt span{color:var(--text2)}
/* the phone takes whatever height is left under the caption and is cropped by the card */
.card .art{flex:1 1 auto;min-height:0;position:relative;z-index:1;margin-top:22px;display:grid;justify-items:center;align-items:start;overflow:hidden}
.card .art .phone{width:auto;height:150%;max-width:none}
.gallery-ctl{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:22px}
.dots{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.1);border-radius:999px;padding:9px 14px}
.dots button{position:relative;width:8px;height:8px;border-radius:4px;border:0;padding:0;background:rgba(255,255,255,.35);cursor:pointer;overflow:hidden;transition:width .35s var(--ease),background .35s}
.dots button.on{width:38px;background:rgba(255,255,255,.35)}
.dots button.on::after{content:"";position:absolute;inset:0;width:calc(var(--t,0) * 100%);background:var(--text);border-radius:4px}
.gallery-pause{width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.1);color:var(--text);display:grid;place-items:center;cursor:pointer}
.gallery-pause svg{width:14px;height:14px;fill:currentColor}
.gallery-pause .play{display:none}
.gallery-pause.paused .pause{display:none}.gallery-pause.paused .play{display:block}

/* Stat rows */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:40px 24px;margin-top:64px;text-align:center}
.stat .n{font-family:var(--ui);font-size:clamp(44px,4.8vw,72px);font-weight:700;letter-spacing:-.03em;line-height:1;color:var(--text)}
.stat .n em{font-style:normal;color:var(--brass)}
.stat .c{margin-top:10px;color:var(--text2);font-size:15px}
.stat .k{font-size:15px;color:var(--text3);margin-bottom:8px;font-weight:600}

/* Feature grid tiles */
.grid{display:grid;gap:20px;grid-template-columns:repeat(12,1fr);margin-top:48px}
.tile{position:relative;background:var(--panel);border-radius:var(--radius);padding:36px;overflow:hidden;min-height:340px;display:flex;flex-direction:column;justify-content:flex-start;gap:12px}
.tile h3{font-size:clamp(24px,2.2vw,32px);font-weight:600;letter-spacing:-.025em}
.tile p{color:var(--text2);font-size:17px;max-width:38ch}
.tile .art{position:absolute;right:5%;bottom:-36%;width:min(340px,42%);pointer-events:none}
.tile .art .phone{width:100%}
.tile.has-art h3,.tile.has-art p{max-width:50%}
#more .grid .tile{background:var(--panel)}
.sect.panel .tile{background:#000}
.tile.w6{grid-column:span 6}.tile.w4{grid-column:span 4}.tile.w8{grid-column:span 8}.tile.w12{grid-column:span 12}
.tile.tall{min-height:560px}
.tile .glyph{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;background:var(--blue);margin-bottom:6px}
.tile .glyph svg{width:26px;height:26px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Highlight-as-you-scroll paragraph */
.hlp{font-size:clamp(28px,3.3vw,48px);line-height:1.15;font-weight:600;letter-spacing:-.01em;color:var(--text3)}
.hlp .w{transition:color .35s var(--ease)}
.hlp .w.on{color:var(--text)}

/* Two-up split with sticky phone */
.split{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:start;margin-top:64px}
.split .sticky{position:sticky;top:6vh;display:grid;place-items:center;padding:0;height:88vh}
.split .sticky .phone{height:min(84vh,900px);width:auto}
.split .steps{display:grid;gap:min(30vh,260px);padding:24vh 0}
.split .step h3{font-size:clamp(28px,2.8vw,40px);font-weight:600;letter-spacing:-.025em}
.split .step p{margin-top:14px;color:var(--text2);font-size:19px;max-width:40ch}
.split .step .num{display:inline-block;font-size:17px;color:var(--text3);font-weight:600;margin-bottom:10px}

/* Trust band */
.trust{margin-top:clamp(80px,12vw,160px);background:var(--panel);padding:clamp(80px,10vw,140px) 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.trust ul{list-style:none;margin:48px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:36px 32px}
.trust li h3{font-size:23px;font-weight:600;margin-bottom:8px}
.trust li p{color:var(--text2)}

/* Final CTA */
.final{padding:clamp(100px,14vw,200px) 0;text-align:center;position:relative;overflow:hidden}
.final .glow{display:none}
.final .cta{display:flex;gap:12px;justify-content:center;margin-top:34px;flex-wrap:wrap}
.final .avail{margin-top:20px;color:var(--text2)}
.final [data-launch]:empty{display:none}

footer{padding:40px 0 56px;border-top:1px solid var(--line);color:var(--text3);font-size:13px;line-height:1.6}
footer p{max-width:70ch}
footer .row{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;margin-top:18px}

/* Responsive */
@media (max-width:900px){
  .tile.w6,.tile.w4,.tile.w8{grid-column:span 12}
  .tile,.tile.tall{min-height:0;padding:32px 28px}
  .tile.has-art h3,.tile.has-art p{max-width:100%}
  /* the phone sits under the text, centred, and runs off the bottom of the tile */
  .tile .art{position:relative;right:auto;bottom:auto;width:72%;margin:28px auto -46%}
  .tile.has-art{padding-bottom:0}
  .split{grid-template-columns:1fr;gap:24px}
  .split .sticky{position:relative;top:auto;height:auto;padding:16px 0}
  .split .sticky .phone{height:auto;width:min(380px,86vw)}
  .split .steps{gap:56px;padding:16px 0 0}
  .pin{height:280vh}
  .pin .stick .head{top:max(64px,8vh)}
  .pin .stick .phone{height:min(78svh,196vw)}
  .localnav{top:8px;left:8px;right:8px}
  .localnav .acts .ghost{display:none}
  #highlights .wrap{flex-direction:column;align-items:flex-start;gap:6px}
  .card{flex-basis:calc(100vw - 2 * var(--gutter) - 28px);aspect-ratio:308/480}
  .card .txt{padding:26px 22px 0;font-size:19px}
  .card .art{margin-top:18px}
  .card .art .phone{height:auto;width:80%}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .pin{height:auto}
  .pin .stick{position:relative;height:auto;padding:40px 24px;display:flex;flex-direction:column;align-items:center;gap:32px}
  .pin .stick .head,.pin .stick .caption{position:static;opacity:1;transform:none}
  .pin .stick .phone{transform:none;height:auto;width:min(380px,86vw)}
  .hero .phone{transform:none;opacity:1}
  .hlp .w{color:var(--text)}
  .localnav{transition:none}
}
