/* Hero: a pinned poster. --p (0 to 1) is set by js/hero.js and drives the scroll transition. */
.hero { --p: 0; --mx: 0; --my: 0; position: relative; height: 150vh; background: var(--fog); }
.hero__sticky { position: sticky; top: 0; height: 100vh; min-height: 620px; overflow: hidden; background: linear-gradient(#fbfbfd 0%, #f1f2f6 45%, #e4e6ee 78%, #d8dbe6 100%); }
.hero__fade { display: none; }
.hero__grid { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(11, 12, 16, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 12, 16, 0.07) 1px, transparent 1px); background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 55%, #000 22%, transparent 78%); mask-image: radial-gradient(ellipse 72% 62% at 50% 55%, #000 22%, transparent 78%); }
.hero__glow { position: absolute; z-index: 1; left: 50%; top: 72%; width: 80vw; height: min(46vw, 82vh); transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(37, 64, 255, 0.30), rgba(37, 64, 255, 0.10) 55%, rgba(37, 64, 255, 0)); }

/* headline: letters rise, then the word "grow" is drawn as an outline and filled with blue */
.hero__title { position: absolute; z-index: 2; left: 0; right: 0; top: 0; text-align: center; }
.hero__title .line { display: block; white-space: nowrap; padding-block: 0.12em; margin-block: -0.12em; }
.hero__title .ch { display: inline-block; background-image: linear-gradient(#0b0c10, #3d3f4b); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.js .hero__title .ch { opacity: 0; transform: translateY(0.5em); animation: rise 0.95s var(--ease-out) forwards; animation-delay: calc(0.15s + var(--i) * 0.05s); }
.hero__title .l2 { padding-inline: 0.12em; }
.hero__title .l2 em { position: relative; display: inline-block; font-style: italic; color: transparent; -webkit-text-stroke: 2px var(--blue); }
.hero__title .l2 em::after { content: attr(data-text); position: absolute; inset: 0; background-image: linear-gradient(#5b76ff, #1c33e4); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; }
.js .hero__title .l2 { opacity: 0; animation: rise 1s var(--ease-out) 0.55s forwards; }
.js .hero__title .l2 em::after { clip-path: inset(0 100% 0 0); animation: wipe 1.2s var(--ease-in-out) 1.25s forwards; }
.js .hero__title .l2 em { animation: unstroke 0.4s linear 2.55s forwards; }
@keyframes unstroke { to { -webkit-text-stroke-color: transparent; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }

.hero__aside { position: absolute; z-index: 5; left: 73.4%; top: calc(61% - 7px); width: 23%; }
.hero__pitch { font-size: clamp(15px, 1.5vw, 24px); line-height: 1.08; letter-spacing: -0.02em; color: var(--graphite); }
.hero__aside .action { margin-top: 16px; }
.hero__aside .action__label, .hero__aside .action__disc { height: 40px; }
.hero__aside .action__disc { width: 40px; }
.trust { display: grid; gap: 6px; margin-top: 14px; color: var(--graphite); }
.js .hero__aside { animation: fade 1s var(--ease-out) 1.6s both; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } }

/* floating interface cards */
.chip { position: absolute; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 12px; border-radius: var(--r-md); background: var(--glass-bg); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transform: translate3d(calc(var(--mx) * var(--k, 14px)), calc(var(--my) * var(--k, 14px)), 0); pointer-events: none; }
.chip i { position: relative; width: 38px; height: 38px; flex: none; border-radius: 13px; background: linear-gradient(145deg, #5b76ff, var(--blue-deep)); box-shadow: 0 6px 14px -4px rgba(37, 64, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.chip--a i::after { content: ""; position: absolute; left: 13px; top: 7px; width: 8px; height: 15px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chip--b i::after { content: ""; position: absolute; left: 11px; top: 11px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; }
.chip b { display: block; font-weight: 500; font-size: 15px; line-height: 1.1; letter-spacing: -0.02em; color: var(--graphite); }
.chip em { display: block; margin-top: 5px; font: 500 11px/1.2 var(--font-mono); text-transform: uppercase; font-style: normal; color: var(--muted); }
.chip--a { left: 6%; top: 44%; --k: 18px; }
.chip--b { right: 5%; top: 40%; --k: -12px; }
.js .chip { animation: chip-in 1s var(--ease-out) 1.9s both, bob 6s ease-in-out 2.9s infinite; }
.js .chip--b { animation-delay: 2.1s, 3.4s; }
@keyframes chip-in { from { opacity: 0; scale: 0.9; } }
@keyframes bob { 50% { translate: 0 -9px; } }

/* desk and laptop */
.hero__desk { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 12vh; background: #fff; border-top: 1px solid #e3e6ee; box-shadow: 0 -10px 30px rgba(24, 44, 80, 0.06); border-radius: var(--r-xl) var(--r-xl) 0 0; pointer-events: none; }
.hero__logos { position: absolute; z-index: 4; left: 0; right: 0; bottom: 2.8vh; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px clamp(22px, 2.5vw, 40px); padding-inline: var(--gutter); margin: 0; list-style: none; pointer-events: none; }
.hero__logos li { width: clamp(20px, 1.75vw, 26px); height: clamp(20px, 1.75vw, 26px); background: var(--c, #5d6272); opacity: 1; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; transition: opacity 0.3s; }
.hero__logos li.is-color { background: var(--logo) center / contain no-repeat; -webkit-mask: none; mask: none; }
.js .hero__logos li { animation: fade 0.9s var(--ease-out) both; animation-delay: calc(1.9s + var(--k, 0) * 0.04s); }
.laptop { --w: min(36vw, 700px, 57vh); position: absolute; z-index: 3; left: 50%; top: calc(91.5% - var(--w) * 0.68); width: var(--w); aspect-ratio: 1000 / 650; transform-origin: 50% 40%;
  transform: translate3d(calc(-50% + var(--mx) * 10px), calc(var(--my) * 6px), 0); will-change: transform; }
.js .laptop { animation: laptop-in 1.2s var(--ease-out) 0.8s both; }
@keyframes laptop-in { from { opacity: 0; translate: 0 8vh; } }
.laptop::after { content: ""; position: absolute; left: -6.5%; right: -6.5%; top: 100%; height: calc(var(--w) * 0.03); background: linear-gradient(#f2f1f4 0%, #d9d7dd 45%, #a9a7ae 100%); border-radius: 0 0 calc(var(--w) * 0.03) calc(var(--w) * 0.03) / 0 0 100% 100%;
  box-shadow: 0 calc(var(--w) * 0.022) calc(var(--w) * 0.05) rgba(0, 0, 0, 0.28), inset 0 1px 0 #fff; }
.laptop::before { content: ""; position: absolute; left: 50%; top: 100%; z-index: 4; width: 15%; height: calc(var(--w) * 0.0075); transform: translateX(-50%); background: linear-gradient(#b6b4bb, #dedce1); border-radius: 0 0 999px 999px; }
.laptop__lid { position: absolute; inset: 0; background: #0a0a0b; border-radius: calc(var(--w) * 0.02) calc(var(--w) * 0.02) calc(var(--w) * 0.004) calc(var(--w) * 0.004); box-shadow: 0 0 0 1px #8d8b92, 0 0 0 2px #d3d1d7; }
.laptop__screen { position: absolute; inset: calc(var(--w) * 0.016) calc(var(--w) * 0.014) calc(var(--w) * 0.02); display: block; overflow: hidden; background: #fff; border-radius: calc(var(--w) * 0.004); }
.laptop__screen::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 34%); }
.laptop__screen::after { content: ""; position: absolute; top: 0; left: 50%; z-index: 4; width: 8%; height: calc(var(--w) * 0.017); transform: translateX(-50%); background: #0a0a0b; border-radius: 0 0 calc(var(--w) * 0.008) calc(var(--w) * 0.008); pointer-events: none; }
.laptop__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity 0.8s var(--ease-in-out); }
.laptop__screen img.is-on { opacity: 1; }
.laptop__label { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(12, 13, 18, 0.5); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; font-size: 11px; }
.laptop__count { position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(12, 13, 18, 0.5); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.22); color: #d4d7e2; font-size: 11px; }

/* live rail under the hero */
.rail { display: flex; align-items: center; gap: 16px; width: min(var(--maxw), 100%); margin-inline: auto; padding: 22px var(--gutter); color: var(--muted); }
.rail__rule { flex: 1; height: 1px; background: var(--line); }
.rail__live { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.rail__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(37, 64, 255, 0.18); } }
.rail a:hover { color: var(--blue); }

@media (max-width: 1000px) { .chip { display: none; } }
@media (max-width: 860px) {
  .hero { height: auto; }
  .hero__sticky { position: relative; height: auto; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; padding: 96px var(--gutter) 40px; }
  .hero__grid, .hero__glow, .hero__desk, .hero__fade, .chip { display: none; }
  .hero__title, .hero__aside, .laptop { position: relative; inset: auto; left: auto; top: auto; width: auto; transform: none !important; opacity: 1 !important; }
  .hero__title { font-size: 20vw !important; }
  .hero__title .line { line-height: 0.82 !important; }
  .laptop { --w: calc(100vw - 2 * var(--gutter)); width: var(--w); margin-bottom: 6vw; }
  .hero__logos li { width: 22px; height: 22px; }
  .hero__logos { position: relative; inset: auto; bottom: auto; opacity: 1; gap: 14px 22px; margin-top: 4vw; }
  .rail { flex-wrap: wrap; row-gap: 8px; }
  .rail__rule { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__sticky { position: relative; }
}

/* while the page glides between slides, drop the costly blur effects so every frame stays light */
html.is-snapping .chip, html.is-snapping .laptop__label, html.is-snapping .laptop__count { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.is-snapping .laptop__screen img, html.is-snapping .cursor__ring { transition: none; }

/* elements whose opacity follows the scroll get their own layer, so each frame only updates that value */
html.is-snapping .nav.is-stuck { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(251, 251, 253, 0.94); }
html.is-down .chip, html.is-down .hero__aside, html.is-down .hero__desk, html.is-down .hero__logos, html.is-down .hero__glow { opacity: 0 !important; transition: opacity 0.2s linear; }

/* the lid closes by itself, hinged at the keyboard, once the scroll passes the end of the opening part (js/hero.js adds .is-closed);
   it takes the same time however you scroll, and opens again if you go back up */
.laptop__lid, .laptop__screen { transform-origin: 50% 100%; backface-visibility: hidden; transform: perspective(1300px) rotateX(0deg); opacity: 1;
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s linear; }
.hero.is-closed .laptop__lid, .hero.is-closed .laptop__screen { transform: perspective(1300px) rotateX(-86deg); opacity: 0; transition: transform 0.95s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.35s linear 0.6s; }
@media (max-width: 860px), (prefers-reduced-motion: reduce) { .laptop__lid, .laptop__screen, .hero.is-closed .laptop__lid, .hero.is-closed .laptop__screen { transform: none; opacity: 1; transition: none; } }
