:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #262626;
  --fg: #f5f5f5;
  --muted: #a1a1aa;
  --red: #e10600;      /* fills: white text on it = 4.97:1 */
  --red-text: #ff3b30; /* red text on --bg = 5.58:1 */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 Archivo, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand, .stat strong { font-family: "Space Grotesk", system-ui, sans-serif; line-height: 1.1; }
h1 { font-size: clamp(2.75rem, 8vw, 6rem); font-weight: 700; letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 2.5rem; }
h3 { font-size: 1.25rem; font-weight: 500; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 4px; }
.red { color: var(--red-text); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--fg); color: var(--bg); padding: .5rem 1rem; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .875rem max(1rem, calc((100% - var(--max)) / 2));
  background: rgb(10 10 10 / .8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { min-height: 44px; display: flex; align-items: center; gap: .625rem; text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.nav nav { display: flex; align-items: center; gap: 1.5rem; }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav nav a:not(.btn):hover { color: var(--fg); }
@media (max-width: 680px) { .nav nav a:not(.btn) { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.5rem;
  background: var(--red); color: #fff; font-weight: 500; text-decoration: none;
  border: 1px solid var(--red); border-radius: 999px;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); background: #ff1a0d; box-shadow: 0 8px 30px rgb(225 6 0 / .35); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--fg); }
.btn-ghost:hover { background: var(--surface); border-color: var(--fg); box-shadow: none; }
.btn-sm { min-height: 44px; padding: 0 1.125rem; }

/* sections */
main section { max-width: var(--max); margin: 0 auto; padding: 6.5rem 1rem; }
.eyebrow { color: var(--red-text); font-size: .875rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.lead { color: var(--muted); font-size: 1.25rem; max-width: 40rem; margin: 1.5rem 0 2.5rem; }
.tag { align-self: flex-start; display: inline-block; font-size: .8125rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .75rem; }

/* hero */
.hero { min-height: min(calc(100svh - 70px), 900px); display: flex; flex-direction: column; justify-content: center; }

/* page-wide grid scrolls with the page; the red glow is a fixed layer that follows the pointer */
body {
  background-image:
    linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px);
  background-size: 64px 64px;
}
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.glow {
  position: absolute; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px;
  background: radial-gradient(circle, rgb(225 6 0 / .3), transparent 65%);
  transform: translate3d(70vw, 40vh, 0);
  animation: drift 14s ease-in-out infinite alternate;
  will-change: transform;
}
.glow.follow { animation: none; }
@keyframes drift { to { transform: translate3d(55vw, 60vh, 0) scale(1.2); } }
.cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .875rem; color: var(--muted); margin-top: 3.5rem; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; padding: 0 !important; width: calc(100% - 2rem); }
.stat { background: var(--bg); padding: 2rem 1.5rem; display: grid; gap: .5rem; align-content: start; }
.stat strong { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
.stat > span { color: var(--muted); font-size: .9375rem; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4rem; align-items: center; }
.about img { border-radius: 20px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; filter: grayscale(.2) contrast(1.05); }
.about p:not(.eyebrow) { color: var(--muted); margin-bottom: 1rem; max-width: 36rem; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.chips li { font-size: .875rem; padding: .375rem .875rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 2.5rem; } .about img { max-width: 320px; } }

/* cards */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 1.5rem; }
.card, .mini {
  display: flex; flex-direction: column; gap: .875rem; padding: 2rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  text-decoration: none;
  transition: transform .3s var(--ease), border-color .3s;
}
.card p, .mini p { color: var(--muted); }
.card:hover { transform: translateY(-4px); border-color: rgb(225 6 0 / .6); }
.ico { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: rgb(225 6 0 / .12); fill: none; stroke: var(--red-text); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.product { flex-direction: row; align-items: flex-start; gap: 1.5rem; }
.product > div { display: flex; flex-direction: column; gap: .75rem; }
.product img, .thumb { width: 96px; height: 96px; flex: none; border-radius: 16px; }
.thumb { display: grid; place-items: center; background: var(--red); color: #fff; font: 700 1.5rem "Space Grotesk", sans-serif; letter-spacing: .05em; }
.arrow { display: inline-block; color: var(--red-text); transition: transform .3s var(--ease); }
a.card:hover .arrow { transform: translate(3px, -3px); }
.link { font-size: .9375rem; color: var(--red-text); }
@media (max-width: 520px) { .product { flex-direction: column; } }

/* timeline */
.timeline { list-style: none; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--red); transform-origin: top; transform: scaleY(0); }
@supports (animation-timeline: view()) {
  .timeline::after { animation: fill linear both; animation-timeline: view(); animation-range: entry 20% cover 70%; }
  @keyframes fill { to { transform: scaleY(1); } }
}
@supports not (animation-timeline: view()) { .timeline::after { transform: none; } }
.timeline > li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0 0 3rem 2rem; position: relative; }
.timeline > li::before { content: ""; position: absolute; left: -5px; top: .35rem; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--red); }
.timeline > li:first-child::before { background: var(--red); box-shadow: 0 0 0 6px rgb(225 6 0 / .2); }
.timeline .when { color: var(--muted); font-size: .9375rem; padding-top: .15rem; font-variant-numeric: tabular-nums; }
.timeline .at { color: var(--muted); font-weight: 400; }
.timeline ul { padding-left: 1.1rem; margin-top: .75rem; display: grid; gap: .5rem; color: var(--muted); max-width: 46rem; }
.timeline ul li::marker { color: var(--red-text); }
.timeline b { color: var(--fg); font-weight: 500; }
@media (max-width: 600px) { .timeline > li { grid-template-columns: 1fr; gap: .25rem; padding-left: 1.5rem; } }

/* stack marquee */
.stack { max-width: none !important; padding: 2rem 0 !important; border-block: 1px solid var(--border); }
.marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee ul { list-style: none; padding: 0; display: flex; flex: none; min-width: 100%; justify-content: space-around; gap: 3rem; padding-right: 3rem; animation: scroll 40s linear infinite; }
.marquee:hover ul { animation-play-state: paused; }
.marquee li { font: 500 1.25rem "Space Grotesk", sans-serif; color: var(--muted); white-space: nowrap; }
.marquee li:nth-child(4n+1) { color: var(--fg); }
@keyframes scroll { to { transform: translateX(-100%); } }

/* contact */
.contact { text-align: center; }
.contact .lead { margin-inline: auto; }
.social { list-style: none; padding: 0; display: flex; justify-content: center; gap: 2rem; margin-top: 2rem; }
.social a { color: var(--muted); display: inline-block; padding: .75rem 0; transition: color .2s; }
.social a:hover { color: var(--fg); }

footer { border-top: 1px solid var(--border); padding: 2rem 1rem; text-align: center; color: var(--muted); font-size: .8125rem; display: grid; gap: .25rem; }

/* scroll reveal: only transform/opacity, so it stays on the compositor (60fps) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .timeline::after { transform: none; }
}
