/* 1PXL Labs — base.css
   Tokens, reset, cursor, nav, hero, ticker, section scaffolding, footer.
   Extends the 1pxl.io system. Palette shifted to red / white / black. */

/* ── RESET & TOKENS ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --black: #0a0a0a;          /* Stock — the material */
  --deep: #101010;
  --surface: #151515;
  --border: #232323;
  --border-light: #303030;
  --muted: #6a6a6a;
  --ghost: #8f8f8f;
  --white: #ffffff;          /* Light */
  --white-dim: rgba(255,255,255,0.62);
  --white-ghost: rgba(255,255,255,0.07);
  --red: #EE1C25;            /* Cut — the cut line */
  --red-deep: #C40F18;
  --red-dim: rgba(238,28,37,0.14);
  --mono: 'DM Mono', monospace;
  --display: 'Syne', sans-serif;
  --gutter: 48px;
  --max: 1200px;
}
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: var(--white);
  padding: 10px 16px; z-index: 10000;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }
.red { color: var(--red); }
.outline-text { color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,0.55); }

/* ── CUSTOM CURSOR ── */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--red);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease;
  transform: translate(-100px, -100px) translate(-50%, -50%);
  will-change: transform;
}
.cursor.hover {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(238,28,37,0.2);
  border: 1px solid var(--red);
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1px solid rgba(238,28,37,0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-100px, -100px);
}
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 200;
  pointer-events: none;
}
.grain {
  position: fixed; inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── NAV ── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px var(--gutter);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.site-nav.scrolled, nav.site-nav.open {
  border-color: var(--border);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-mark svg { display: block; }
.nav-wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.025em;
  color: var(--red);
  line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  position: relative;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ghost);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-lang {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color 0.2s;
}
.nav-lang:hover { color: var(--red); }
.nav-cta {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  border: 0.5px solid var(--border-light);
  padding: 10px 20px;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.25s ease;
}
.nav-cta:hover { border-color: var(--red); color: var(--red); }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 0.5px solid var(--border-light);
  position: relative;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px;
  height: 1px; background: var(--white);
  transition: transform 0.25s ease, top 0.25s ease, background 0.2s;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 24px; }
.site-nav.open .nav-toggle span { background: var(--red); top: 19px; }
.site-nav.open .nav-toggle span:nth-child(1) { transform: rotate(45deg); }
.site-nav.open .nav-toggle span:nth-child(2) { transform: rotate(-45deg); }

/* ── HERO (home) ── */
.hero {
  height: min(100vh, 1080px);
  min-height: 640px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 58%);
  mask-image: linear-gradient(90deg, transparent 22%, #000 58%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--border) 0.5px, transparent 0.5px);
  background-size: 80px 80px;
  opacity: 0.3;
  animation: gridFade 3s ease forwards;
}
@keyframes gridFade { from { opacity: 0; } to { opacity: 0.3; } }
.hero-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.6;
}
.hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(10,10,10,0.85) 100%);
}
.hero-glow {
  position: absolute;
  bottom: -25%; left: -10%;
  width: 65%; height: 75%;
  background: radial-gradient(ellipse at center, rgba(238,28,37,0.12), transparent 65%);
  filter: blur(48px);
}
.hero-red-accent {
  position: absolute; top: 0; right: 0;
  width: 1px; height: min(60vh, 640px);
  background: linear-gradient(to bottom, var(--red), transparent);
  opacity: 0.6;
}
.hero-content { position: relative; z-index: 1; max-width: var(--max); }
.hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s ease forwards;
}
.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 40px;
}
.hero-title .line2 { color: var(--red); }
.hero-title .line3 { color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,0.55); }
.hero-title .hl { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.hero-title .hl-inner { display: inline-block; transform: translateY(110%); animation: lineUp 1s cubic-bezier(0.22, 0.7, 0.3, 1) forwards; }
.hero-title .hl:nth-of-type(1) .hl-inner { animation-delay: 0.45s; }
.hero-title .hl:nth-of-type(2) .hl-inner { animation-delay: 0.6s; }
.hero-title .hl:nth-of-type(3) .hl-inner { animation-delay: 0.75s; }
@keyframes lineUp { to { transform: translateY(0); } }
.hero-bottom {
  display: flex; align-items: flex-end; justify-content: flex-start;
  gap: 48px; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s ease forwards;
}
.hero-desc {
  font-size: 12px;
  color: var(--ghost);
  line-height: 1.9;
  max-width: 400px;
  letter-spacing: 0.04em;
}
.hero-actions { display: flex; gap: 2px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; right: var(--gutter); bottom: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s ease forwards;
}
.hero-scroll span {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); writing-mode: vertical-rl;
}
.scroll-line {
  width: 0.5px; height: 60px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  min-height: min(64vh, 700px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 160px var(--gutter) 72px;
  position: relative;
  overflow: hidden;
  border-bottom: 0.5px solid var(--border);
}
.page-hero .hero-title { font-size: clamp(44px, 6.4vw, 88px); margin-bottom: 32px; }
.page-hero .hero-desc { max-width: 520px; font-size: 13px; }
.page-hero-meta {
  position: absolute; right: var(--gutter); bottom: 72px; z-index: 1;
  text-align: right;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); line-height: 2.1;
}
.page-hero-meta b { color: var(--red); font-weight: 400; }

/* ── TICKER ── */
.ticker {
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  overflow: hidden;
  padding: 14px 0;
  background: var(--deep);
  position: relative;
}
.ticker-track { display: flex; white-space: nowrap; width: max-content; animation: ticker 36s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: flex; align-items: center; gap: 32px;
  padding-right: 64px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.ticker-dot { width: 4px; height: 4px; background: var(--red); flex-shrink: 0; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── SECTIONS ── */
section { padding: 120px var(--gutter); position: relative; overflow: hidden; }
section.deep { background: var(--deep); }
section.tight { padding-top: 88px; padding-bottom: 88px; }
.wrap { max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.section-label {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 48px;
  display: flex; align-items: center; gap: 16px;
}
.section-label::after {
  content: '';
  flex: 1; height: 0.5px;
  background: var(--border);
  max-width: 80px;
}
.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 68px);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--white);
}
.section-title::after {
  content: '';
  display: block;
  width: 64px; height: 4px;
  background: var(--red);
  margin-top: 28px;
}
.section-title.plain::after { display: none; }
.section-intro {
  font-size: 13px;
  color: var(--ghost);
  line-height: 1.9;
  max-width: 560px;
  margin-top: 32px;
}
.section-ghost {
  position: absolute;
  top: 48px; right: 24px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(72px, 13vw, 190px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.06);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

/* ── FOOTER ── */
footer.site-footer { border-top: 0.5px solid var(--border); padding: 72px var(--gutter) 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: var(--max);
  margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-brand span {
  font-family: var(--display); font-weight: 800; font-size: 24px;
  line-height: 1; letter-spacing: -0.025em; color: var(--red);
}
.footer-tag { font-size: 11px; color: var(--ghost); line-height: 1.9; margin-top: 20px; max-width: 300px; }
.footer-head {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red); margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a, .footer-col li {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ghost); text-decoration: none; transition: color 0.2s;
}
.footer-col a:hover { color: var(--red); }
.footer-base {
  max-width: var(--max);
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 0.5px solid var(--border);
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 10px; letter-spacing: 0.1em; color: var(--muted);
}
.footer-base a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-base a:hover { color: var(--red); }

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.56s; }
.no-js .reveal, .no-js .reveal-stagger > * { opacity: 1; transform: none; }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-grid, .ticker-track, .scroll-line { animation: none; }
  .hero-grid { opacity: 0.3; }
  .hero-eyebrow, .hero-bottom, .hero-scroll { animation: none; opacity: 1; }
  .hero-title .hl-inner { transform: none; animation: none; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ── TABLET ── */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .nav-links { gap: 24px; }
  section { padding: 96px var(--gutter); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── MOBILE ── */
@media (max-width: 860px) {
  :root { --gutter: 24px; }
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
  nav.site-nav { padding: 16px var(--gutter); }
  .nav-wordmark { font-size: 24px; }
  .nav-mark svg { width: 26px; height: 26px; }
  .nav-toggle { display: block; }
  .nav-right .nav-cta { display: none; }
  .nav-links {
    position: fixed; top: 73px; left: 0; right: 0; bottom: 0;
    height: calc(100vh - 73px); height: calc(100dvh - 73px);
    background: var(--black);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 24px var(--gutter) 48px;
    overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .site-nav.open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links li { width: 100%; border-bottom: 0.5px solid var(--border); }
  .nav-links a {
    display: block; padding: 20px 0;
    font-family: var(--display); font-weight: 800; font-size: 28px;
    letter-spacing: -0.02em; text-transform: none; color: var(--white);
  }
  .nav-links a::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--red); }
  .hero { padding: 0 var(--gutter) 64px; }
  .hero-title { font-size: clamp(40px, 12.4vw, 64px); }
  .hero-scroll { display: none; }
  .hero-bg canvas { -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 62%); mask-image: linear-gradient(180deg, #000 30%, transparent 62%); }
  .hero-bottom { gap: 28px; }
  .page-hero { min-height: 0; padding: 136px var(--gutter) 56px; }
  .page-hero .hero-title { font-size: clamp(38px, 11vw, 60px); }
  .page-hero-meta { position: static; text-align: left; margin-top: 32px; }
  section, section.tight { padding: 72px var(--gutter); }
  .section-title { font-size: 30px; line-height: 1.05; }
  .section-title::after { width: 44px; height: 3px; margin-top: 18px; }
  .section-ghost { top: 20px; right: 10px; }
  .section-label { margin-bottom: 24px; }
  footer.site-footer { padding: 56px var(--gutter) 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-base { margin-top: 48px; flex-direction: column; gap: 10px; }
}
