/* 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;
}
.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: 760px) {
  .nav-toggle {
    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); }
}

/* ---------- 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); }

/* 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; }
.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; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.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; }
