body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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)'/%3E%3C/svg%3E");
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* Selection */
::selection { background: var(--red); color: var(--white); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Skip link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

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

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 3.5rem);
}

/* Section base — diagonal texture on all dark sections */
section {
  position: relative;
  overflow: hidden;
  background-image: var(--section-texture);
}

/* ── Section header system ── */
.sec-header { text-align: center; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.sec-overline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
/* Flanking rules on overline */
.sec-overline::before,
.sec-overline::after {
  content: '';
  width: 20px; height: 1px;
  background: var(--red);
  opacity: 0.55;
  flex-shrink: 0;
}

.sec-title {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  /* Tighter tracking for editorial weight */
}

.sec-sub {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  color: var(--muted);
  margin-top: 1rem;
  letter-spacing: 0.02em;
  line-height: 1.7;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Left-aligned sec-header variant */
.sec-header.align-left {
  text-align: left;
}
.sec-header.align-left .sec-overline { justify-content: flex-start; }
.sec-header.align-left .sec-overline::before { display: none; }
.sec-header.align-left .sec-sub { margin-left: 0; }

/* Horizontal rule under section headers */
.sec-rule {
  width: 40px; height: 2px;
  background: var(--red);
  margin: 1rem auto 0;
}
.sec-header.align-left .sec-rule { margin-left: 0; }

.text-red  { color: var(--red); }
.text-blue { color: var(--blue); }

/* ── Button System ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 250ms var(--ease-out-expo);
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--red-glow);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 400ms var(--ease-out-expo);
}
.btn-primary:hover::before { transform: translateX(100%); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 15px 35px;
}
.btn-ghost:hover {
  border-color: var(--red);
  background: var(--red-dim);
  transform: translateY(-2px);
}

.btn-outline-red {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--border-red);
  padding: 13px 28px;
}
.btn-outline-red:hover {
  background: var(--red);
  color: #fff;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 250ms var(--ease-out-expo);
  text-decoration: none;
}
.btn-icon:hover {
  border-color: var(--border-red);
  background: var(--red-dim);
  color: var(--red);
}

/* Scissors SVG divider */
.scissors-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem 0;
  opacity: 0.15;
  pointer-events: none;
  user-select: none;
}
.scissors-divider::before,
.scissors-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--white);
}
.scissors-divider svg { color: var(--white); flex-shrink: 0; }

/* Preloader */
/* ── Preloader ── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #080810;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pl-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.pl-logo {
  width: 80px; height: 80px;
  object-fit: contain;
  animation: pl-up 0.8s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}
.pl-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  animation: pl-up 0.7s cubic-bezier(0.22,1,0.36,1) 0.3s both;
}
.pl-w1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  letter-spacing: 0.14em;
  color: #ffffff;
  line-height: 1;
}
.pl-w2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: #DC2626;
  line-height: 1;
}
.pl-line {
  width: 160px;
  height: 1px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  animation: pl-up 0.5s ease 0.5s both;
}
.pl-line-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #DC2626, rgba(220,38,38,0.3));
  animation: pl-fill 1.8s cubic-bezier(0.4,0,0.2,1) 0.4s both;
}
@keyframes pl-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pl-fill {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* ── Custom cursor — desktop only (fine pointer = mouse) ── */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, [role="button"], label, input[type="range"] { cursor: none; }
}
/* Ensure cursor elements never show on touch/mobile */
@media (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none !important; }
}

/* #cursor-dot = lagging diamond outline */
#cursor-dot {
  position: fixed;
  width: 22px; height: 22px;
  border: 1.5px solid rgba(230, 57, 70, 0.75);
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
  z-index: 99997;
  left: -80px; top: -80px;
  will-change: left, top;
  transition: width 0.28s cubic-bezier(0.16,1,0.3,1),
              height 0.28s cubic-bezier(0.16,1,0.3,1),
              border-color 0.2s, border-width 0.2s;
}
/* #cursor-ring = 4px precision dot (exact follower) */
#cursor-ring {
  position: fixed;
  width: 4px; height: 4px;
  background: var(--red);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  left: -80px; top: -80px;
  transform: translate(-50%, -50%);
  will-change: left, top;
  transition: opacity 0.15s, transform 0.15s;
}
body.cursor-hover #cursor-dot {
  width: 46px; height: 46px;
  border-color: var(--red);
  border-width: 2px;
}
body.cursor-hover #cursor-ring {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}
body.cursor-press #cursor-dot {
  width: 13px; height: 13px;
  border-width: 2px;
  border-color: var(--red);
  transition-duration: 0.08s;
}
body.cursor-press #cursor-ring {
  transform: translate(-50%, -50%) scale(2.5);
}

/* ── Glass card utility ── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  pointer-events: none;
}
.glow-card {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--border-red), 0 0 40px var(--red-glow);
}

/* ── Lucide icon utilities ── */
.icon-sm { width: 16px; height: 16px; stroke-width: 2; }
.icon-md { width: 20px; height: 20px; stroke-width: 1.75; }
.icon-lg { width: 32px; height: 32px; stroke-width: 1.5; }
[data-lucide] { display: inline-block; vertical-align: middle; color: inherit; }

/* ── Atmospheric orbs ── */
.atm-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.atm-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.07) 0%, transparent 70%);
  top: -200px; right: -150px;
  animation: orb-drift-1 18s ease-in-out infinite alternate;
}
.atm-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(10, 22, 40, 0.2) 0%, transparent 70%);
  bottom: 30%; left: -200px;
  animation: orb-drift-2 22s ease-in-out infinite alternate;
}
.atm-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.04) 0%, transparent 70%);
  bottom: -100px; right: 20%;
  animation: orb-drift-3 26s ease-in-out infinite alternate;
}
@keyframes orb-drift-1 { from { transform: translate(0, 0); } to { transform: translate(-80px, 60px); } }
@keyframes orb-drift-2 { from { transform: translate(0, 0); } to { transform: translate(60px, -80px); } }
@keyframes orb-drift-3 { from { transform: translate(0, 0); } to { transform: translate(-50px, -60px); } }

/* ── Prefers-reduced-motion guard ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
