/* Apex Labs site styles. Plain CSS, no build step. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-500-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-700-latin.woff2") format("woff2"); }

:root {
  --violet: #B53DFF;
  --violet-soft: #CF85FF;
  --violet-text: #C27BFF; /* violet for small text on dark: 6.6:1 */
  --violet-btn: #9D2BE6;  /* white text on it: 5.4:1 */
  --ink: #0B0D10;
  --bg: #0B0D10;
  --bg-2: #111419;
  --panel: #15181F;
  --line: #242833;
  --text: #F3F4F7;
  --muted: #A3A8B6;
  --overlays: #FF3D57;
  --commentator: #FF7A1A;
  --accent: var(--violet-text);
  --radius: 14px;
  --wrap: 1180px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--violet-btn); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 16, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: 2px; background: var(--violet); border-radius: 2px; }
.nav-toggle { display: none; }
@media (max-width: 1040px) { .nav { gap: 0; } .nav a { padding: 8px 9px; font-size: 14.5px; } }

/* Sign-in corner: "Get your key", or the Discord name and its menu (assets/js/account.js). */
.brand { margin-right: auto; }
.account { position: relative; display: flex; align-items: center; flex: none; }
.btn.btn-key { padding: 9px 16px; font-size: 15px; white-space: nowrap; }
.signed-in [data-account-signin] { visibility: hidden; }
.account-btn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 220px;
  padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: 500 15px/1 var(--body); cursor: pointer;
}
.account-btn:hover, .account-btn[aria-expanded="true"] { border-color: var(--violet); }
.account-avatar {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--violet-btn); color: #fff; font: 700 15px/1 var(--display);
}
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.account-chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .15s ease; }
.account-btn[aria-expanded="true"] .account-chev { transform: rotate(180deg); }
.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: max-content; min-width: 220px; max-width: min(300px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.account-menu[hidden] { display: none; }
.account-who { margin: 0; padding: 8px 10px 10px; font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }
.account-who strong { color: var(--text); font-weight: 600; }
.account-item {
  display: block; width: 100%; text-align: left; padding: 10px; border-radius: 8px; border: 0;
  background: none; color: var(--text); font: 500 15px/1.3 var(--body); text-decoration: none; cursor: pointer;
}
.account-item:hover, .account-item:focus-visible { background: var(--bg-2); color: #fff; }
.account-item[data-account-signout] { color: var(--muted); }
@media (min-width: 901px) and (max-width: 1000px) { .account-btn { max-width: 150px; } }

@media (max-width: 900px) {
  .nav-toggle {
    order: 3;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--panel); color: var(--text); cursor: pointer;
  }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 17px; }
  .nav a[aria-current="page"]::after { display: none; }
  .nav a[aria-current="page"] { color: var(--violet-soft); }
  .site-header .wrap { gap: 10px; }
  .account { order: 2; position: static; }
  .account-menu { top: 68px; right: 16px; }
}
@media (max-width: 420px) {
  .btn.btn-key { padding: 8px 12px; font-size: 14px; }
  .account-btn { max-width: 150px; }
  .brand img { height: 26px; }
}

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: .005em; text-transform: uppercase; margin: 0 0 .4em; }
h1 { font-size: clamp(44px, 7.4vw, 92px); }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 26px; letter-spacing: .02em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: #D6D9E1; max-width: 62ch; }
.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.muted { color: var(--muted); }
.hl { color: var(--violet); }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--violet-btn); color: #fff; }
.btn-primary:hover { background: #8A1FD0; color: #fff; }
.btn-ghost { border-color: #3A3F4C; color: var(--text); }
.btn-ghost:hover { border-color: var(--violet); color: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn small { font-weight: 500; opacity: .8; font-size: 13px; }
.dl-meta { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 112px) 0; }
.band { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 44px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-top: clamp(56px, 8vw, 104px); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(181, 61, 255, .28), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-shot {
  margin-top: clamp(40px, 6vw, 72px);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 40px 120px -40px rgba(181, 61, 255, .45);
}

.home-hero h1 .line2 { color: var(--violet); display: block; }
.split-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.split-shots figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; }
.split-shots figcaption {
  position: absolute; left: 12px; bottom: 12px; font-family: var(--display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  font-size: 14px; background: rgba(11, 13, 16, .85); padding: 4px 10px; border-radius: 6px;
}
@media (max-width: 700px) { .split-shots { grid-template-columns: 1fr; } }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-body { padding: 28px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.card-title img { width: 48px; height: 48px; border-radius: 12px; }
.card-title h3 { margin: 0; }
.card .for { font-size: 14px; color: var(--muted); margin: 0; }
.card .btns { margin-top: auto; padding-top: 20px; }
.card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }

/* Latest updates (home page; cards written by tools/build-latest.py and site.js) */
.updates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .updates { grid-template-columns: 1fr; } }
.update { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; display: flex; flex-direction: column; }
.update[data-latest="overlays"] { border-top: 3px solid var(--overlays); }
.update[data-latest="commentator"] { border-top: 3px solid var(--commentator); }
.update-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.update-tag { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: .02em; margin: 0; text-transform: none; }
.update-head time { color: var(--muted); font-size: 15px; margin-left: auto; }
.update-list { margin: 0; padding-left: 1.2em; }
.update-list li { color: #D6D9E1; font-size: 16px; margin-bottom: 8px; }
.update-more { color: var(--muted); font-size: 15px; margin: 4px 0 0; }
.update-links { margin: auto 0 0; padding-top: 16px; font-weight: 600; }
.update-links a { color: var(--violet-text); }
.update.is-new .update-tag::after { content: "New"; font: 600 12px var(--body); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; margin-left: 10px; padding: 3px 8px; border-radius: 999px; background: var(--violet-btn); color: #fff; }

/* Ecosystem */
.eco { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.eco-node { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.eco-node strong { font-family: var(--display); font-size: 22px; text-transform: uppercase; letter-spacing: .04em; display: block; }
.eco-link { font-family: var(--display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-text); text-align: center; font-size: 14px; }
.eco-link span { display: block; font-size: 30px; line-height: 1; }
@media (max-width: 760px) { .eco { grid-template-columns: 1fr; } .eco-link span { transform: rotate(90deg); } }

/* Trust strip */
.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-weight: 500; }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--violet); transform: rotate(45deg); }

/* Feature rows */
.features { display: grid; gap: clamp(56px, 8vw, 96px); }
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.feature:nth-child(even) { grid-template-columns: 7fr 5fr; }
.feature:nth-child(even) .feature-text { order: 2; }
.feature-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.feature-media.tall { max-width: 360px; justify-self: center; }
@media (max-width: 860px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-text { order: 0; }
}

/* Feature grid (small) */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid3 { grid-template-columns: 1fr; } }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tile h3 { font-size: 22px; margin-bottom: 8px; }
.tile p { margin: 0; color: #C9CDD6; font-size: 16px; }
.tile .tag { display: inline-block; width: 28px; height: 4px; border-radius: 2px; background: var(--accent); margin-bottom: 16px; }

/* Theme gallery */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .themes { grid-template-columns: repeat(2, 1fr); } }
.themes figure { margin: 0; }
.themes img { border-radius: 10px; border: 1px solid var(--line); aspect-ratio: 16/9; object-fit: cover; }
.themes figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Overlay chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px; font-size: 15px; color: #D6D9E1; }

/* CTA band */
.cta {
  text-align: center; background:
    radial-gradient(60% 120% at 50% 0%, rgba(181, 61, 255, .25), transparent 70%), var(--bg-2);
  border-top: 1px solid var(--line);
}
.cta .btns { justify-content: center; }
.cta .lead { margin-inline: auto; }

/* Product themed pages */
.p-overlays { --accent: var(--overlays); }
.p-commentator { --accent: var(--commentator); }
.product-badge { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.product-badge img { width: 44px; height: 44px; border-radius: 11px; }
.product-badge span { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--violet); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: #C9CDD6; }

/* About */
.prose { max-width: 720px; }
.prose p { font-size: 18px; color: #D6D9E1; }
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 700px) { .values { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid .tile a.btn { margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer img { height: 28px; width: auto; margin-bottom: 14px; }
.site-footer .foot-h { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--text); font-size: 15px; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--text); }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Animations off (the footer switch, saved in localStorage "apexlabs-motion"). */
.still, .still *, .still *::before, .still *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
:root.still::view-transition-old(root), :root.still::view-transition-new(root) { animation: none !important; }
.motion-switch { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.motion-switch:hover { color: var(--text); }
.strip { padding: 32px 0; }

/* Legal pages */
.legal-doc { max-width: 860px; }
.legal-doc h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 56px; scroll-margin-top: 90px; }
.legal-doc h2:first-of-type { margin-top: 40px; }
.legal-doc p, .legal-doc li { color: #D6D9E1; }
.legal-doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal-doc li { margin-bottom: .5em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: #D6D9E1; text-decoration: none; }
.toc a:hover { border-color: var(--violet); color: #fff; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--panel); font-weight: 600; color: var(--text); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td { color: #C9CDD6; }
code { font-size: .92em; background: #1C2029; border-radius: 5px; padding: 1px 5px; }
mark.todo { background: rgba(255, 196, 0, .16); color: #FFD75E; border-radius: 4px; padding: 0 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.btn-primary small { opacity: 1; }
.signoff { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: var(--violet-text) !important; margin-top: -4px; }
.signoff::before { content: "— "; }

/* Release notes */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip-btn { font: 500 15px var(--body); color: #D6D9E1; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.chip-btn:hover { border-color: var(--violet); color: #fff; }
.chip-btn[aria-pressed="true"] { background: var(--violet-btn); border-color: var(--violet-btn); color: #fff; }
.releases { display: grid; gap: 12px; max-width: 900px; }
.rel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.rel > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 18px 22px; }
.rel > summary::-webkit-details-marker { display: none; }
.rel > summary::after { content: "+"; margin-left: auto; color: var(--violet-text); font-size: 22px; line-height: 1; }
.rel[open] > summary::after { content: "–"; }
.rel-app { font-family: var(--display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 14px; padding: 3px 10px; border-radius: 6px; }
.rel-overlays { color: #FF8597; background: rgba(255, 61, 87, .12); }
.rel-commentator { color: #FFA466; background: rgba(255, 122, 26, .12); }
.rel-tag { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: .02em; margin: 0; text-transform: none; }
.rel time { color: var(--muted); font-size: 15px; }
.rel-body { padding: 0 22px 18px; border-top: 1px solid var(--line); }
.rel-body h4, .rel-body h5, .rel-body h6 { font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: 18px; margin: 20px 0 8px; }
.rel-body ul { margin: 0 0 12px; padding-left: 1.2em; }
.rel-body li { margin-bottom: 8px; color: #D6D9E1; font-size: 16px; }
.rel-body p { color: #D6D9E1; font-size: 16px; }
.rel-link { margin-top: 16px; }
.rel-more { margin-top: 28px; }
.notice { background: rgba(255, 196, 0, .1); border: 1px solid rgba(255, 196, 0, .3); color: #FFD75E; border-radius: 10px; padding: 12px 16px; }

/* Guides */
.guide { max-width: 860px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 20px; }
.steps > li { counter-increment: step; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px 22px 84px; scroll-margin-top: 90px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 24px; top: 24px; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 22px; color: #0B0D10; background: var(--accent);
}
.steps h2 { font-size: 28px; margin-bottom: 10px; }
.steps p, .steps li li { color: #D6D9E1; font-size: 16px; }
.steps ul, .steps ol.sub { padding-left: 1.2em; margin: 0 0 1em; }
.steps ul li, .steps ol.sub li { margin-bottom: 8px; }
.steps .btns { margin: 6px 0 16px; }
.guide-shot { margin: 18px 0 4px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
kbd { font: 600 13px var(--body); background: #232733; border: 1px solid #343a47; border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; color: #fff; }
.help { margin-top: 28px; scroll-margin-top: 90px; }
.help h2 { font-size: 28px; }
.eyebrow a { color: inherit; }
@media (max-width: 600px) {
  .steps > li { padding: 74px 18px 18px; }
  .steps > li::before { left: 18px; top: 18px; }
}

/* Press kit */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
.facts > div { background: var(--panel); padding: 18px 20px; }
.facts dt { font-family: var(--display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--text); }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }
.desc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .desc-grid { grid-template-columns: 1fr; } }
.desc-grid .tile p + p { margin-top: 12px; }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.asset { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.asset-preview { height: 150px; display: grid; place-items: center; padding: 24px; }
.asset-preview img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.asset-preview { box-sizing: border-box; overflow: hidden; }
.asset-preview.on-dark { background: #0B0D10; }
.asset-preview.on-light { background: #F3F4F7; }
.asset figcaption { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; border-top: 1px solid var(--line); }
.asset-dl { font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.swatch { text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 0 14px; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.swatch:hover { border-color: var(--violet); }
.swatch-chip { height: 72px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.swatch-name, .swatch-hex, .swatch-use { padding: 0 14px; }
.swatch-name { font-weight: 600; }
.swatch-hex { font-family: ui-monospace, Consolas, monospace; color: var(--violet-soft); }
.swatch-use { font-size: 14px; color: var(--muted); }
.copy-status { min-height: 1.6em; margin-top: 10px; }
.shots-h { margin: 8px 0 14px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 36px; }
.shot { margin: 0; }
.shot a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0B0D10; }
.shot a:hover { border-color: var(--violet); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shot figcaption { font-size: 15px; margin-top: 8px; display: flex; flex-direction: column; }
.shot figcaption .muted { font-size: 13px; }

/* News */
.news-feed { margin-top: 20px; }
.news-feed a { display: inline-flex; align-items: center; gap: 8px; color: var(--violet-text); font-weight: 600; text-decoration: none; }
.news-feed a:hover { text-decoration: underline; }
.news-list { display: grid; gap: 16px; max-width: 900px; }
.news-item { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.news-item:hover, .news-item:focus-within { border-color: var(--violet); }
.news-item .news-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.news-item-body { padding: 24px 28px; }
.news-item h2 { font-size: clamp(26px, 3vw, 32px); margin: 0 0 8px; }
.news-item h2 a { color: var(--text); text-decoration: none; }
.news-item h2 a::after { content: ""; position: absolute; inset: 0; }
.news-item p { color: #C9CDD6; margin: 0; }
.news-date { font-family: var(--display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 14px; color: var(--muted) !important; margin-bottom: 6px !important; }
.post h2 { font-size: clamp(28px, 3.4vw, 36px); margin: 44px 0 12px; }
.post h3 { font-size: 24px; margin: 32px 0 10px; }
.post ul, .post ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.post li { font-size: 18px; color: #D6D9E1; margin-bottom: 8px; }
.post a { color: var(--violet-text); }
.post img, .post .news-img { border-radius: 12px; border: 1px solid var(--line); margin: 8px 0 24px; }
.post figure { margin: 0; }
.post blockquote { margin: 0 0 1.2em; padding: 4px 0 4px 20px; border-left: 3px solid var(--violet); }
.news-pager { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; max-width: 720px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.news-pager a { display: grid; gap: 2px; color: var(--text); text-decoration: none; max-width: 48%; }
.news-pager a.newer { margin-left: auto; text-align: right; }
.news-pager span { font-family: var(--display); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.news-pager a:hover { color: var(--violet-text); }
@media (max-width: 600px) { .news-item-body { padding: 20px; } .news-pager a { max-width: 100%; } }

/* League showcase */
.leagues { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
@media (max-width: 820px) { .leagues { grid-template-columns: 1fr; } }
.league { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.league-banner { height: 180px; display: grid; place-items: center; padding: 24px 32px; background: #1C2029; border-bottom: 1px solid var(--line); }
.league-banner img { max-width: 80%; max-height: 132px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 520px) { .league-banner { height: 140px; } .league-banner img { max-height: 96px; } }
.league-body { padding: 24px; min-width: 0; }
.league-mono { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; margin-bottom: 16px; font-family: var(--display); font-weight: 700; font-size: 26px; color: #fff; background: linear-gradient(135deg, var(--violet-btn), #3B1366); }
.league h3 { margin: 0 0 10px; font-size: 28px; }
.league-tags { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.league-tags li { font-size: 14px; color: #C9CDD6; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; }
.league-tags li:has(.rel-app) { border: 0; padding: 0; }
.league-tags .rel-app { display: inline-block; text-decoration: none; font-size: 13px; }
.league-body p { color: #C9CDD6; font-size: 16px; margin: 0 0 14px; }
.league-links { display: flex; flex-wrap: wrap; gap: 8px; }
.league-signups { margin-bottom: 8px; }
.btn-sm { padding: 8px 14px; font-size: 14px; min-height: 0; }
.league-links .brand-icon { width: 18px; height: 18px; flex: none; }
.league-links .btn { gap: 8px; }

/* ---------- Motion ----------
   Decorative only. Everything here moves transform, opacity or a mask, never
   size or position, so nothing shifts. Animations play on every device (sim
   racers often turn Windows animations off for performance, which would
   otherwise hide them all); the footer switch turns them off (.still). Scroll reveals (.rv) and the hero speed
   lines (.hero-fx) are added by site.js, so with JavaScript off the page is
   simply still. */

/* Header: firmer once the page scrolls, with a rev-bar progress line. */
.site-header { transition: background .3s ease, box-shadow .3s ease; }
.site-header.scrolled { background: rgba(11, 13, 16, .94); box-shadow: 0 12px 32px -16px rgba(0, 0, 0, .7); }

/* Start lights by the home page eyebrow: five reds, then lights out. */
.start-lights { display: inline-flex; gap: 4px; margin-right: 12px; vertical-align: 1px; }
.start-lights i { width: 8px; height: 8px; border-radius: 50%; background: #2A2E39; }
.start-lights i:nth-child(1) { --on: .35s; }
.start-lights i:nth-child(2) { --on: .65s; }
.start-lights i:nth-child(3) { --on: .95s; }
.start-lights i:nth-child(4) { --on: 1.25s; }
.start-lights i:nth-child(5) { --on: 1.55s; }

/* Hero speed lines (site.js adds <div class="hero-fx"><i></i></div>). */
.hero-fx {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 78% 22%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 55% at 78% 22%, #000 15%, transparent 72%);
}
.hero-fx i {
  position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 1200px);
  background: linear-gradient(90deg, var(--violet-soft), var(--accent));
  --streaks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='320'%3E%3Cdefs%3E%3ClinearGradient id='g'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23g)'%3E%3Crect x='60' y='40' width='260' height='2' rx='1'/%3E%3Crect x='520' y='74' width='140' height='1.5' rx='.75'/%3E%3Crect x='840' y='22' width='320' height='2' rx='1'/%3E%3Crect x='300' y='132' width='200' height='1.5' rx='.75'/%3E%3Crect x='700' y='170' width='380' height='2.5' rx='1.25'/%3E%3Crect x='110' y='218' width='170' height='1.5' rx='.75'/%3E%3Crect x='960' y='246' width='190' height='2' rx='1'/%3E%3Crect x='420' y='286' width='300' height='1.5' rx='.75'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask: var(--streaks) 0 0 / 1200px 320px repeat;
  mask: var(--streaks) 0 0 / 1200px 320px repeat;
  opacity: .45;
}
.hero > .wrap { z-index: 1; }

/* Hover: lift, accent edge and a light sweep. */
.card, .tile, .update, .eco-node, .league, .themes img, .shot a, .asset, .steps > li {
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .25s ease, box-shadow .35s ease;
}
.card { position: relative; }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .07) 50%, transparent 62%);
  transform: translateX(-100%);
}
.card-img, .feature-media img { transition: transform .7s cubic-bezier(.2, .7, .2, 1); transform-origin: 50% 100%; }
.tile .tag { transform-origin: 0 50%; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(-110%);
}
.btn > svg:last-child:not(:first-child) { transition: transform .25s ease; }
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); border-color: rgba(181, 61, 255, .55); box-shadow: 0 28px 60px -32px rgba(181, 61, 255, .6); }
  .card:hover::after { transform: translateX(100%); transition: transform .9s ease; }
  .card:hover .card-img { transform: scale(1.04); }
  .tile:hover, .update:hover, .eco-node:hover, .league:hover, .asset:hover, .steps > li:hover { transform: translateY(-3px); border-color: #3A3F4C; box-shadow: 0 20px 44px -28px rgba(0, 0, 0, .9); }
  .tile:hover .tag { transform: scaleX(1.9); }
  .feature-media:hover img { transform: scale(1.03); }
  .themes figure:hover img, .shot a:hover { transform: translateY(-3px); border-color: var(--violet); box-shadow: 0 18px 40px -24px rgba(181, 61, 255, .6); }
  .btn-primary:hover::after { transform: translateX(110%); transition: transform .7s ease; }
  .btn:hover > svg:last-child:not(:first-child) { transform: translateX(4px); }
}

/* Nav: underline sweeps in on hover. */
@media (min-width: 901px) {
  .nav a { position: relative; }
  .nav a:not([aria-current="page"])::before {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px;
    background: var(--violet); transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s ease;
  }
  .nav a:hover::before { transform: scaleX(1); }
}
@media (min-width: 901px) and (max-width: 1040px) { .nav a:not([aria-current="page"])::before { left: 9px; right: 9px; } }

/* "Built to work together": data flowing between the two apps. */
.eco-link::after {
  content: ""; display: block; height: 2px; margin: 12px auto 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent) -60% 0 / 50% 100% no-repeat, var(--line);
}

/* Split shots and the product hero shot tilt toward the pointer (site.js sets --rx/--ry). */
.tilt { position: relative; transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease; }
.tilt.tilting { transition-duration: .12s; }
.tilt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .1), transparent 60%);
}
.tilt.tilting::after { opacity: 1; }

/* "On the stream" gets an on-air dot. */
.split-shots figure:nth-child(2) figcaption::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px;
  background: var(--overlays); box-shadow: 0 0 8px rgba(255, 61, 87, .8);
}

/* Race night: a faint chequered flag behind the closing call to action. */
.cta { position: relative; overflow: hidden; }
.cta .wrap { position: relative; }
.cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: conic-gradient(rgba(255, 255, 255, .045) 25%, transparent 0 50%, rgba(255, 255, 255, .045) 0 75%, transparent 0) 0 0 / 28px 28px;
  -webkit-mask-image: radial-gradient(55% 85% at 50% 0%, #000, transparent 80%);
  mask-image: radial-gradient(55% 85% at 50% 0%, #000, transparent 80%);
}

@media all { /* animations: on unless the footer switch turned them off (.still) */
  /* Page heroes drive in, one line after another. */
  .hero > .wrap > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) backwards; }
  .hero > .wrap > :nth-child(2) { animation-delay: .08s; }
  .hero > .wrap > :nth-child(3) { animation-delay: .16s; }
  .hero > .wrap > :nth-child(4) { animation-delay: .24s; }
  .hero > .wrap > :nth-child(5) { animation-delay: .32s; }
  .hero > .wrap > :nth-child(n+6) { animation-delay: .4s; }
  .home-hero h1 .line2 { animation: dash .9s .22s cubic-bezier(.16, .8, .2, 1) backwards; }
  .split-shots figure { animation: rise .9s cubic-bezier(.2, .7, .2, 1) backwards; }
  .split-shots figure:nth-child(1) { animation-delay: .34s; }
  .split-shots figure:nth-child(2) { animation-delay: .46s; }
  .hero::before { animation: glow 12s ease-in-out infinite alternate; }
  .hero-fx i { animation: speedlines 6s linear infinite; will-change: transform; }
  .hero.fx-paused::before, .hero.fx-paused .hero-fx i { animation-play-state: paused; }

  .start-lights i { animation-name: lamp; animation-delay: var(--on); animation-duration: calc(2.15s - var(--on)); animation-timing-function: step-end; animation-fill-mode: forwards; }

  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .home-hero h1 .line2, .hero h1 .hl {
      background: linear-gradient(110deg, var(--violet) 0 40%, #F3E2FF 50%, var(--violet) 60% 100%) 100% 0 / 300% 100%;
      -webkit-background-clip: text; background-clip: text; color: transparent;
      animation-name: dash, glint; animation-duration: .9s, 8s; animation-delay: .22s, 2.2s;
      animation-timing-function: cubic-bezier(.16, .8, .2, 1), ease-in-out; animation-fill-mode: backwards, none;
      animation-iteration-count: 1, infinite;
    }
    .hero h1 .hl { animation-name: glint; animation-duration: 8s; animation-delay: 1.2s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-fill-mode: none; }
  }

  /* Scroll reveals (site.js marks what is below the fold when the page opens). */
  .motion .rv {
    opacity: 0; transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--rv-d, 0s);
  }
  .motion .rv-l { transform: translateX(-44px); }
  .motion .rv-r { transform: translateX(44px); }
  .motion .rv.in { opacity: 1; transform: none; }

  /* Progress bar under the header, driven by scrolling where the browser can. */
  @supports (animation-timeline: scroll()) {
    .site-header::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
      background: linear-gradient(90deg, var(--violet-btn), var(--violet) 70%, var(--accent));
      transform: scaleX(0); transform-origin: 0 50%;
      animation: progress linear both; animation-timeline: scroll(root);
    }
  }

  .eco-link::after { animation: flow 2.2s cubic-bezier(.45, 0, .55, 1) infinite; }
  .trust li::before { animation: blip 4.5s ease-in-out infinite; }
  .trust li:nth-child(2)::before { animation-delay: .35s; }
  .trust li:nth-child(3)::before { animation-delay: .7s; }
  .trust li:nth-child(4)::before { animation-delay: 1.05s; }
  .update.is-new .update-tag::after { animation: pulse 2.4s ease-out infinite; }
  .split-shots figure:nth-child(2) figcaption::before { animation: onair 1.6s ease-in-out infinite; }
  .faq details[open] > :not(summary) { animation: rise .4s cubic-bezier(.2, .7, .2, 1); }
}

@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes dash { from { opacity: 0; transform: translateX(-60px) skewX(-14deg); } 60% { opacity: 1; } }
@keyframes glint { 0% { background-position: 100% 0; } 14%, 100% { background-position: 0 0; } }
@keyframes glow { from { transform: translate(0, 0) scale(1); } to { transform: translate(-6%, 4%) scale(1.12); } }
@keyframes speedlines { to { transform: translateX(-1200px); } }
@keyframes lamp { from { background: #FF2A3D; box-shadow: 0 0 10px 1px rgba(255, 42, 61, .75); } to { background: #2A2E39; box-shadow: none; } }
@keyframes progress { to { transform: scaleX(1); } }
@keyframes flow { from { background-position: -60% 0, 0 0; } to { background-position: 160% 0, 0 0; } }
@keyframes blip { 0%, 28%, 100% { box-shadow: 0 0 0 0 rgba(181, 61, 255, 0); } 12% { box-shadow: 0 0 12px 2px rgba(181, 61, 255, .85); background: #E2B8FF; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(181, 61, 255, .6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(181, 61, 255, 0); } }
@keyframes onair { 50% { opacity: .35; } }

@media print {
  .rv { opacity: 1 !important; transform: none !important; }
  .hero-fx, .site-header::after { display: none; }
}

/* ---------- Cinematic ----------
   Film grain and a soft vignette over every page, rim light on bands, stage
   spotlights behind the closing call to action, and (with motion allowed) a
   letterbox opening on the home page, a focus pull on page titles, an
   anamorphic flare, scroll parallax and fade-to-black page changes. */

/* Vignette and film grain: fixed, click-through, drawn once. */
body::before, body::after { content: ""; position: fixed; pointer-events: none; z-index: 90; }
body::before { inset: 0; z-index: 49; background: radial-gradient(120% 95% at 50% 40%, transparent 55%, rgba(0, 0, 0, .38)); }
body::after {
  inset: -120px; opacity: .07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -.55'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 240px 240px;
}

/* Rim light along the top of each band. */
.band { position: relative; }
.band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, #fff 50%, transparent) -100% 0 / 30% 100% no-repeat,
    linear-gradient(90deg, transparent 10%, rgba(181, 61, 255, .55) 50%, transparent 90%);
}

/* Stage spotlights behind "Ready for race night?". */
.cta { isolation: isolate; }
.cta .wrap::before, .cta .wrap::after {
  content: ""; position: absolute; z-index: -1; bottom: -120px; width: 900px; height: 760px; pointer-events: none;
  background: conic-gradient(from -14deg at 50% 100%, transparent, rgba(181, 61, 255, .2) 14deg, transparent 28deg);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 92%);
  mask-image: linear-gradient(to top, #000 10%, transparent 92%);
  transform-origin: 50% 100%;
}
.cta .wrap::before { left: -330px; transform: rotate(24deg); }
.cta .wrap::after { right: -330px; transform: rotate(-24deg); }

/* Letterbox bars (home page, added by site.js). */
.letterbox i { position: fixed; left: 0; right: 0; height: 11vh; background: #000; z-index: 45; pointer-events: none; }
.letterbox i:first-child { top: 0; transform-origin: 50% 0; }
.letterbox i:last-child { bottom: 0; transform-origin: 50% 100%; }

/* Anamorphic flare across the home headline. */
.home-hero h1 { position: relative; }
.home-hero h1::after {
  content: ""; position: absolute; left: -10%; top: 50%; width: 120%; height: 2px; margin-top: -1px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(207, 133, 255, .7) 35%, #fff 50%, rgba(207, 133, 255, .7) 65%, transparent);
  box-shadow: 0 0 18px 3px rgba(181, 61, 255, .55);
}

@media all { /* animations: on unless the footer switch turned them off (.still) */
  body::after { animation: grain .9s steps(6) infinite; will-change: transform; }

  .letterbox i { animation: letterbox 1.5s .15s cubic-bezier(.7, 0, .2, 1) forwards; }

  .hero > .wrap > h1 { animation: focus 1.3s cubic-bezier(.2, .7, .2, 1) backwards; }
  .home-hero h1::after { animation: flare 1.6s 1.15s ease-out; }

  .hero::before { translate: 0 calc(var(--hy, 0) * .35px); }
  .hero-fx { translate: 0 calc(var(--hy, 0) * .5px); }
  .hero > .wrap > :is(.eyebrow, .product-badge, h1, .lead) { opacity: calc(1 - var(--hy, 0) / 1000); }
  /* Parallax (site.js sets --hy on heroes and --p on feature pictures in view). */
  .feature-media img { scale: 1.06; translate: 0 calc(var(--p, 0) * -2.5%); }
  .split-shots, .hero-shot { translate: 0 calc(var(--hy, 0) * -.06px); }

  .cta .wrap::before { animation: beam-l 7s ease-in-out infinite alternate; }
  .cta .wrap::after { animation: beam-r 8s ease-in-out infinite alternate; }

  /* Slower, camera-like reveals: titles wipe in, pictures settle. */
  .motion .rv { transition-duration: 1s, 1s; }
  .feature-media img, .card-img { transition: transform .7s cubic-bezier(.2, .7, .2, 1), scale 1.6s cubic-bezier(.2, .7, .2, 1); }
  .motion .rv.feature-media img { scale: 1.2; }
  .motion .rv .card-img { scale: 1.15; }

  /* Page changes dip to black and back (browsers with cross-page view transitions). */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: vt-out .28s ease-in both; }
  ::view-transition-new(root) { animation: vt-in .6s .18s cubic-bezier(.2, .7, .2, 1) both; }
}

@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-40px, 30px); } 33% { transform: translate(30px, -60px); }
  50% { transform: translate(-70px, -20px); } 67% { transform: translate(60px, 50px); } 83% { transform: translate(-20px, 80px); } 100% { transform: translate(0, 0); }
}
@keyframes letterbox { to { transform: scaleY(0); } }
@keyframes focus { from { opacity: 0; filter: blur(14px); transform: scale(1.06); transform-origin: 0 50%; } 40% { opacity: 1; } }
@keyframes flare { 0% { opacity: 0; transform: translateX(-35%) scaleX(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(35%) scaleX(1); } }
@keyframes beam-l { from { transform: rotate(14deg); } to { transform: rotate(32deg); } }
@keyframes beam-r { from { transform: rotate(-32deg); } to { transform: rotate(-12deg); } }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.015); } }

@media print { body::before, body::after, .letterbox { display: none; } }

/* ---------- Scroll story ----------
   A screenshot the camera explores as you scroll: it pins in place, zooms into
   one part after another, and the matching caption and sector light up.
   site.js adds .is-live when motion is allowed; otherwise (or with JavaScript
   off) the steps are a plain list beside the screenshots. */
.story-grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.story-copy h2 { font-size: clamp(32px, 3.8vw, 48px); }
.story-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.story-steps li { border-left: 3px solid var(--line); padding: 2px 0 2px 16px; }
.story-app { display: block; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.story-steps h3 { font-size: 24px; margin: 2px 0 4px; }
.story-steps p { margin: 0; color: #C9CDD6; font-size: 16px; }
.story-frame { display: grid; gap: 14px; }
.story-frame img { border-radius: var(--radius); border: 1px solid var(--line); }
.story-light, .story-count:empty, .story-sectors:empty { display: none; }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; } }

.story.is-live { padding: 0; height: calc(var(--steps, 6) * 60vh + 100vh); }
.story.is-live .story-pin { position: sticky; top: 68px; height: calc(100vh - 68px); display: flex; align-items: center; overflow: hidden; }
.story.is-live .story-grid { width: min(var(--wrap), 100% - 32px); }
.story.is-live .story-steps { gap: 0; }
.story.is-live .story-steps li {
  grid-area: 1 / 1; border-left-color: var(--violet); opacity: 0; transform: translateY(-14px); filter: blur(6px);
  transition: opacity .3s ease, transform .3s ease, filter .3s ease; pointer-events: none;
}
.story.is-live .story-steps li.on {
  opacity: 1; transform: none; filter: none;
  transition: opacity .7s .35s ease, transform .8s .35s cubic-bezier(.2, .7, .2, 1), filter .7s .35s ease;
}
.story.is-live .story-steps li > * { transition: transform .8s .35s cubic-bezier(.2, .7, .2, 1); }
.story.is-live .story-steps li:not(.on) > * { transform: translateY(22px); }
.story.is-live .story-steps li.on h3 { transition-delay: .42s; }
.story.is-live .story-steps li.on p { transition-delay: .5s; }
.story-count b { display: inline-block; font-size: 1.9em; vertical-align: -.12em; }
.story-count b.swap { animation: num-in .8s cubic-bezier(.2, .7, .2, 1); }
@keyframes num-in { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.story.is-live .story-count { display: block; margin: 18px 0 0; font: 700 18px/1 var(--display); letter-spacing: .12em; color: var(--muted); }
.story.is-live .story-count b { color: var(--violet-text); font-weight: 700; }
.story.is-live .story-sectors { display: flex; gap: 4px; margin-bottom: 12px; }
.story-sectors i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.story-sectors i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--violet-btn), var(--violet)); transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s cubic-bezier(.7, 0, .2, 1); }
.story-sectors i.done::after { transform: scaleX(1); }
.story.is-live .story-frame {
  display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: #07080A; box-shadow: 0 40px 120px -40px rgba(181, 61, 255, .45);
}
.story.is-live .story-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; transform-origin: 0 0; will-change: transform, opacity; }
/* Camera effects inside the frame: letterbox bars and motion blur while moving,
   a focus reticle and a flare once the shot lands, black for cuts. */
.story.is-live .story-frame img { transition: filter .35s ease; }
.story.is-live .story-frame.moving img { filter: blur(1.6px) saturate(1.15); }
.story-bars, .story-reticle, .story-flare, .story-cut { display: none; }
.story.is-live .story-bars, .story.is-live .story-reticle, .story.is-live .story-flare, .story.is-live .story-cut { display: block; position: absolute; inset: 0; pointer-events: none; }
.story-bars i { position: absolute; left: 0; right: 0; height: 9%; background: #000; transform: scaleY(0); transition: transform .5s cubic-bezier(.7, 0, .2, 1); }
.story-bars i:first-child { top: 0; transform-origin: 50% 0; }
.story-bars i:last-child { bottom: 0; transform-origin: 50% 100%; }
.story-frame.moving .story-bars i { transform: scaleY(1); }
.story-reticle { opacity: 0; transform: scale(1.12); transition: opacity .3s ease, transform .3s ease; }
.story-frame.arrived .story-reticle { opacity: 1; transform: none; transition: opacity .6s .1s ease, transform .8s .1s cubic-bezier(.2, .7, .2, 1); }
.story-reticle i { position: absolute; width: 34px; height: 34px; border: 2px solid rgba(207, 133, 255, .85); filter: drop-shadow(0 0 6px rgba(181, 61, 255, .7)); }
.story-reticle i:nth-child(1) { left: 6%; top: 9%; border-right: 0; border-bottom: 0; }
.story-reticle i:nth-child(2) { right: 6%; top: 9%; border-left: 0; border-bottom: 0; }
.story-reticle i:nth-child(3) { left: 6%; bottom: 9%; border-right: 0; border-top: 0; }
.story-reticle i:nth-child(4) { right: 6%; bottom: 9%; border-left: 0; border-top: 0; }
.story-flare { overflow: hidden; }
.story-flare::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 60%; height: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(207, 133, 255, .8), #fff, rgba(207, 133, 255, .8), transparent);
  box-shadow: 0 0 22px 4px rgba(181, 61, 255, .55);
}
.story-frame.arrived .story-flare::after { animation: story-flare 1.1s .15s ease-out; }
@keyframes story-flare { 0% { opacity: 0; transform: translateX(-80%); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(190%); } }
.story-cut { background: #000; opacity: 0; }
.story.is-live .story-light {
  display: block; position: absolute; inset: 0; pointer-events: none; opacity: var(--zl, 0);
  background: radial-gradient(60% 62% at 50% 50%, transparent 45%, rgba(0, 0, 0, .55));
}
@media (max-width: 860px) {
  .story.is-live { height: calc(var(--steps, 6) * 55vh + 100vh); }
  .story.is-live .story-pin { height: calc(100svh - 68px); }
  .story.is-live .story-grid { gap: 18px; }
  .story.is-live .story-copy h2 { font-size: 30px; margin-bottom: 14px; }
  .story.is-live .story-copy .eyebrow { margin-bottom: 8px; }
  .story.is-live .story-count { margin-top: 12px; }
  .story.is-live .story-steps h3 { font-size: 22px; }
}

/* Speed trails down the sides of the screen while scrolling fast (site.js). */
.warp {
  position: fixed; inset: 0; z-index: 44; pointer-events: none; overflow: hidden; opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 20%, transparent 80%, #000);
  mask-image: linear-gradient(90deg, #000, transparent 20%, transparent 80%, #000);
}
.warp i {
  position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 900px);
  background: linear-gradient(var(--violet-soft), var(--violet));
  --trails: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='900'%3E%3Cdefs%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23g)'%3E%3Crect x='20' y='60' width='2' height='300'/%3E%3Crect x='96' y='420' width='1.5' height='220'/%3E%3Crect x='150' y='120' width='2.5' height='420'/%3E%3Crect x='214' y='600' width='1.5' height='260'/%3E%3Crect x='262' y='240' width='2' height='340'/%3E%3Crect x='60' y='700' width='1.5' height='160'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask: var(--trails) 0 0 / 300px 900px repeat;
  mask: var(--trails) 0 0 / 300px 900px repeat;
  animation: warp .45s linear infinite paused;
}
.warp.on i { animation-play-state: running; }
.warp.up i { animation-direction: reverse; }
@keyframes warp { to { transform: translateY(-900px); } }
@media print { .warp { display: none; } .story.is-live { height: auto; } }

/* ---------- Cinematic, site-wide ----------
   Title card on the home page's first visit, headline words rising in,
   pictures opening like a film gate, cards tipping up into place, a light
   that follows the mouse, rim lights sweeping along bands, and the footer
   wordmark catching the light. */

/* Title card. */
html.intro-on::after { content: ""; position: fixed; inset: 0; z-index: 199; background: #000; animation: intro-failsafe .4s 4s forwards; }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }
html.intro-on .hero *, html.intro-on .hero *::before, html.intro-on .hero *::after, html.intro-on .hero::before { animation-play-state: paused !important; }
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; pointer-events: none; }
.intro-panel { position: absolute; left: 0; right: 0; height: 50.5%; background: #000; transition: transform 1s cubic-bezier(.7, 0, .2, 1); }
.intro-panel:first-child { top: 0; }
.intro-panel:nth-child(2) { bottom: 0; }
.intro.open .intro-panel:first-child { transform: translateY(-100%); }
.intro.open .intro-panel:nth-child(2) { transform: translateY(100%); }
.intro-card { position: relative; text-align: center; display: grid; justify-items: center; gap: 18px; transition: opacity .35s ease, transform .6s ease; }
.intro.open .intro-card { opacity: 0; transform: scale(1.06); }
.intro-card img { width: clamp(150px, 22vw, 240px); height: auto; animation: focus 1.4s .15s cubic-bezier(.2, .7, .2, 1) backwards; }
.intro-line {
  display: block; width: min(420px, 70vw); height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--violet), #fff, var(--violet), transparent);
  box-shadow: 0 0 18px 2px rgba(181, 61, 255, .6); transform: scaleX(0); animation: intro-line 1.2s .55s cubic-bezier(.7, 0, .2, 1) forwards;
}
.intro-card p { margin: 0; font: 600 clamp(13px, 1.4vw, 16px)/1 var(--display); letter-spacing: .32em; text-transform: uppercase; color: var(--violet-text); animation: intro-text 1.2s .9s ease backwards; }
@keyframes intro-line { to { transform: scaleX(1); } }
@keyframes intro-text { from { opacity: 0; letter-spacing: .6em; } }

/* Headline words. */
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .08em; margin: 0 -.02em -.08em; }
.words .w > span { display: inline-block; transform: translateY(110%) rotate(4deg); opacity: 0; transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .9s ease; transition-delay: calc(var(--i, 0) * 55ms + .1s); }
.words.words-in .w > span { transform: none; opacity: 1; }

/* Pictures open like a film gate; cards tip up into place. */
.motion .rv :is(.card-img, .themes img, .shot img, .guide-shot img, .news-img, .league-banner img, .asset-preview img),
.motion .rv.feature-media img { clip-path: inset(46% 0 46% 0); }
.motion .rv.in :is(.card-img, .themes img, .shot img, .guide-shot img, .news-img, .league-banner img, .asset-preview img),
.motion .rv.in.feature-media img { clip-path: inset(0 0 0 0); transition: clip-path 1.2s .1s cubic-bezier(.7, 0, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1), scale 1.6s cubic-bezier(.2, .7, .2, 1); }
.motion .rv:is(.card, .tile, .update, .league, .news-item, .steps > li, .asset, .shot, .eco-node, .themes figure, .swatch) {
  transform: perspective(1000px) translateY(46px) rotateX(16deg); transform-origin: 50% 100%;
}
.motion .rv.in:is(.card, .tile, .update, .league, .news-item, .steps > li, .asset, .shot, .eco-node, .themes figure, .swatch) { transform: none; }

/* Light that follows the mouse. */
.spot { position: fixed; left: 0; top: 0; width: 700px; height: 700px; z-index: 3; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .5s ease; background: radial-gradient(closest-side, rgba(181, 61, 255, .09), transparent); will-change: transform; }
.spot.on { opacity: 1; }

/* Rim light sweep and footer wordmark. */
.band.lit::before { animation: rim 1.8s .1s cubic-bezier(.4, 0, .2, 1); }
@keyframes rim { from { background-position: -100% 0, 0 0; } to { background-position: 200% 0, 0 0; } }
.site-footer { position: relative; overflow: hidden; }
.foot-mark {
  font: 700 clamp(64px, 15.5vw, 230px)/.86 var(--display); text-transform: uppercase; letter-spacing: .01em; text-align: center; white-space: nowrap;
  margin: -12px 0 44px; color: transparent; -webkit-text-stroke: 1.5px rgba(181, 61, 255, .3);
  background: linear-gradient(100deg, transparent 42%, rgba(243, 226, 255, .9) 50%, transparent 58%) 200% 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; user-select: none;
}
.foot-mark.lit { animation: mark 2.6s .2s cubic-bezier(.4, 0, .2, 1); }
@keyframes mark { from { background-position: 200% 0; } to { background-position: -100% 0; } }
@media print { .intro, .spot, .foot-mark { display: none; } }
