/* 200X Labs landing page */

:root {
  --bg: #050505;
  --surface: #0c0c0c;
  --surface-2: #121212;
  --border: #1f1f1f;
  --border-strong: #3a3a3a;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --silver: #c0c0c0;
  --red: #e30613;
  --red-press: #c00510;
  --red-text: #ff4f55;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  scrollbar-color: var(--border-strong) var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 1rem/1.7 var(--sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: #fff; }

img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 em, h2 em { font-style: italic; color: var(--red-text); }

.container { width: 100%; max-width: 80rem; margin-inline: auto; padding-inline: var(--pad); }

.label {
  display: block;
  margin-bottom: 1.75rem;
  font: 600 0.72rem/1.4 var(--sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--silver);
}

.skip {
  position: absolute; left: var(--pad); top: -5rem; z-index: 200;
  padding: 0.7rem 1rem; background: var(--text); color: var(--bg); font-weight: 600;
}
.skip:focus { top: 0.75rem; }

[hidden] { display: none !important; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.9rem;
  min-height: 3.25rem; padding: 0.9rem 2rem;
  border: 1px solid transparent;
  font: 600 0.8rem/1.2 var(--sans);
  letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-solid:hover { background: var(--red-press); border-color: var(--red-press); box-shadow: 0 12px 40px rgba(227, 6, 19, 0.28); }
.btn-line { border-color: var(--border-strong); color: var(--text); }
.btn-line:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn .arrow { transition: transform 0.3s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---- Cursor and preloader (only switched on by the script) --------------- */
.cursor,
.cursor-glow { display: none; position: fixed; left: 0; top: 0; pointer-events: none; border-radius: 50%; transform: translate(-50%, -50%); }
.has-cursor .cursor,
.has-cursor .cursor-glow { display: block; }
.has-cursor body,
.has-cursor a,
.has-cursor button { cursor: none; }
.cursor {
  z-index: 9999; width: 12px; height: 12px; background: #fff; mix-blend-mode: difference;
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}
.cursor.is-hover { width: 48px; height: 48px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.35); mix-blend-mode: normal; }
.cursor-glow { z-index: 9998; width: 320px; height: 320px; background: radial-gradient(circle, rgba(255, 255, 255, 0.035) 0%, transparent 70%); }

.preloader { display: none; }
.js .preloader {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  background: var(--bg);
  transition: opacity 0.8s ease, visibility 0.8s;
}
.preloader img { width: 11rem; }
.preloader-bar { position: relative; width: 120px; height: 1px; background: var(--border-strong); overflow: hidden; }
.preloader-bar::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: translateX(-100%); animation: load 1.4s ease-in-out infinite; }
@keyframes load { 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }
.js .preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---- Navigation ---------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 2.5rem;
  padding: 1rem var(--pad);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.nav.is-scrolled { background: rgba(5, 5, 5, 0.82); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom-color: var(--border); }

.brand { display: flex; align-items: center; flex: none; min-height: 2.75rem; }
.brand img { width: auto; height: 2.5rem; }

.menu { display: flex; gap: 2.5rem; margin-left: auto; }
.menu a {
  position: relative; display: flex; align-items: center; min-height: 2.75rem;
  color: var(--muted); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.3s ease;
}
.menu a::after { content: ""; position: absolute; left: 0; bottom: 0.55rem; width: 100%; height: 1px; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.menu a:hover { color: var(--text); }
.menu a:hover::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.6rem 1.4rem;
  border: 1px solid var(--border-strong);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.nav-cta:hover { background: var(--red); border-color: var(--red); color: #fff; }

.menu-toggle {
  display: none; place-content: center;
  width: 2.75rem; height: 2.75rem; padding: 0;
  background: none; border: 1px solid var(--border-strong); color: var(--text);
}
.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding: 7rem 0 4rem; overflow: hidden; }
.hero-canvas { position: absolute; top: 0; right: 0; width: 50%; height: 100%; z-index: 1; }
.hero-content { position: relative; z-index: 2; width: 56%; padding-left: var(--pad); }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 5.5rem); line-height: 1.02; margin-bottom: 1.75rem; }
.hero-sub { max-width: 31rem; margin-bottom: 2.75rem; color: var(--muted); font-size: 1.125rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---- Value strip --------------------------------------------------------- */
.strip { padding: 5rem 0; background: var(--surface); border-block: 1px solid var(--border); }
.strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); }
.strip-item h3 { margin-bottom: 0.75rem; font: 600 1.0625rem/1.4 var(--sans); letter-spacing: 0; }
.strip-item p { color: var(--muted); font-size: 0.95rem; }

/* ---- Section heads ------------------------------------------------------- */
.section-head { max-width: 40rem; margin-bottom: clamp(3.5rem, 8vw, 6.5rem); }
.section-head h2 { font-size: clamp(2.4rem, 4.2vw, 4rem); margin-bottom: 1rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-head.is-center { margin-inline: auto; text-align: center; }

/* ---- Feature rows -------------------------------------------------------- */
.features { padding: clamp(5rem, 11vw, 9rem) 0; }
.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(4rem, 9vw, 8rem); }
.feature-row.is-reverse .feature-text { order: 2; }
.feature-text h3,
.feature-text h2 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); margin-bottom: 1.5rem; }
.feature-text p { max-width: 30rem; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }

.feature-list { margin-top: 2rem; }
.feature-list li { position: relative; padding: 0.55rem 0 0.55rem 1.4rem; color: var(--muted); font-size: 0.95rem; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 0.6rem; height: 1px; background: var(--red); }

.visual {
  position: relative; width: 100%; height: clamp(19rem, 34vw, 28rem);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  border: 1px solid var(--border); overflow: hidden;
}
.visual canvas,
.hero-canvas canvas { display: block; width: 100%; height: 100%; }

/* ---- Project ------------------------------------------------------------- */
.project { padding: clamp(5rem, 11vw, 9rem) 0; background: var(--surface); border-block: 1px solid var(--border); }
.project .feature-text h2 { font-size: clamp(2.6rem, 4.6vw, 4.25rem); margin-bottom: 1.25rem; }
.project .feature-text .project-lead { max-width: 32rem; margin-bottom: 1.5rem; color: var(--text); font-size: 1.2rem; line-height: 1.55; font-weight: 400; }
.project .feature-text p + p:not(.project-stack) { margin-top: 1rem; }
.project .feature-text .project-stack { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.9rem; letter-spacing: 0.02em; }

.covers { margin-top: clamp(3.5rem, 7vw, 6rem); }
.covers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: cover; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.covers-grid li {
  counter-increment: cover; padding: 1.75rem 1.5rem 2rem;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 0.975rem; font-weight: 400; line-height: 1.55;
}
.covers-grid li::before { content: counter(cover, decimal-leading-zero); display: block; margin-bottom: 1rem; font-family: var(--serif); font-size: 1.1rem; color: var(--red-text); }

/* ---- Process ------------------------------------------------------------- */
.process { padding: clamp(5rem, 11vw, 9rem) 0; }
.steps { position: relative; display: grid; gap: clamp(3rem, 6vw, 4.5rem); max-width: 46rem; margin-inline: auto; }
.steps::before { content: ""; position: absolute; left: 1.5rem; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, var(--border), var(--red), var(--border)); }
.step { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; }
.step-num {
  position: relative; z-index: 1; display: grid; place-content: center;
  width: 3rem; height: 3rem; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--bg);
  font: 600 1.1rem/1 var(--serif);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.step:hover .step-num { border-color: var(--red); color: var(--red-text); }
.step h3 { margin: 0.35rem 0 0.75rem; font-size: clamp(1.5rem, 2.4vw, 1.85rem); }
.step p { max-width: 32rem; color: var(--muted); font-size: 1.05rem; line-height: 1.8; }

/* ---- Contact ------------------------------------------------------------- */
.cta { position: relative; padding: clamp(5.5rem, 12vw, 10rem) 0; border-top: 1px solid var(--border); text-align: center; overflow: hidden; }
.cta-glow { position: absolute; top: 40%; left: 50%; width: 44rem; height: 44rem; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(227, 6, 19, 0.09) 0%, transparent 65%); pointer-events: none; }
.cta-inner { position: relative; }
.cta h2 { max-width: 50rem; margin: 0 auto 1.5rem; font-size: clamp(2.5rem, 5.2vw, 5rem); }
.cta-sub { max-width: 32rem; margin: 0 auto 3.5rem; color: var(--muted); font-size: 1.1rem; }

.numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; max-width: 56rem; margin-inline: auto; text-align: left; }
.numbers li { padding: 2rem; background: var(--surface); border: 1px solid var(--border); transition: border-color 0.4s ease, transform 0.4s ease; }
.numbers li:hover { border-color: var(--border-strong); }
.number { margin-bottom: 1.5rem; font: 600 clamp(1.4rem, 2.4vw, 1.75rem)/1.2 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.number span { display: block; margin-top: 0.5rem; color: var(--muted); font: 400 0.875rem/1.4 var(--sans); letter-spacing: 0.04em; }
.number-actions { display: flex; gap: 0.75rem; }
.number-actions .btn { flex: 1; padding-inline: 1rem; }

.contact-extra { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
.contact-extra:not(:has(a:not([hidden]))) { display: none; }
.cta-place { margin-top: 3rem; color: var(--muted); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase; }

/* ---- Footer -------------------------------------------------------------- */
.footer {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem 3rem;
  padding: 4.5rem var(--pad) 2.5rem; border-top: 1px solid var(--border);
}
.footer:not(:has(.footer-social a:not([hidden]))) { grid-template-columns: 2fr 1fr 1fr; }
.footer-social:not(:has(a:not([hidden]))) { display: none; }
.footer-about p { max-width: 20rem; margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }
.footer-col { display: grid; align-content: start; }
.footer-col h4 { margin-bottom: 0.75rem; font: 600 0.75rem/1.4 var(--sans); letter-spacing: 0.15em; text-transform: uppercase; }
.footer-col a,
.footer-col span { display: flex; align-items: center; min-height: 2.75rem; color: var(--muted); font-size: 0.9rem; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { grid-column: 1 / -1; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8rem; }

/* ---- Scroll reveals (only when the animation script is running) ---------- */
.anim .reveal { opacity: 0; transform: translateY(40px); }
.anim .reveal.from-scale { transform: scale(0.95); }
.anim .reveal.from-left { transform: translateX(-30px); }
.anim .reveal.from-right { transform: translateX(30px); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 64rem) {
  .hero-content { width: 100%; padding-inline: var(--pad); }
  .hero-canvas { width: 100%; opacity: 0.3; }
  .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .covers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-row { grid-template-columns: minmax(0, 1fr); }
  .feature-row.is-reverse .feature-text { order: 0; }
  .footer,
  .footer:not(:has(.footer-social a:not([hidden]))) { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 52rem) {
  .nav { gap: 0.75rem; }
  .nav-cta { margin-left: auto; padding-inline: 1rem; }
  .menu-toggle { display: grid; }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 0.25rem var(--pad) 1rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .menu.is-open { display: flex; }
  .nav:has(.menu.is-open) { background: var(--bg); }
  .menu a { min-height: 3.5rem; color: var(--text); font-size: 0.85rem; border-bottom: 1px solid var(--border); }
  .menu a::after { display: none; }
  .menu a:last-child { border-bottom: 0; }
}

@media (max-width: 40rem) {
  .nav-cta { display: none; }
  .menu-toggle { margin-left: auto; }
  .brand img { height: 2.25rem; }
  .hero { padding-top: 6.5rem; }
  .hero-sub { font-size: 1.05rem; }
  .hero-actions .btn { width: 100%; }
  .strip { padding: 3.5rem 0; }
  .strip-grid,
  .covers-grid,
  .numbers { grid-template-columns: minmax(0, 1fr); }
  .label { letter-spacing: 0.22em; }
  .numbers li { padding: 1.5rem 1.25rem; }
  .steps::before { left: 1.375rem; }
  .step { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .step-num { width: 2.75rem; height: 2.75rem; }
  /* Sideways slides would push past the screen edge on a phone. */
  .anim .reveal.from-left,
  .anim .reveal.from-right { transform: translateY(40px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
