﻿/* CitizenX: style.css (zentrale Stylesheet-Datei)
   - importiert Reset/Vars/Loader aus styles/
   - enthält direkt alle Styles der Startseite (Hero, Sections,
     Responsive). Header und Footer werden via JS injiziert. */

@import url("styles/base.css");
@import url("styles/loader.css");

/* Hero section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  --dx1: 0px;
  --dy1: 0px;
  --dx2: 0px;
  --dy2: 0px;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(168,2,1,0.15) 0%, transparent 60%);
  transform: translate(var(--dx1), var(--dy1));
  transition: transform 0.8s ease-out, opacity 1.5s ease-out;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(94,2,0,0.2) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(89,2,0,0.15) 0%, transparent 50%);
  transform: translate(var(--dx2), var(--dy2));
  transition: transform 0.8s ease-out, opacity 1.5s ease-out;
}

.particles {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--cx-red);
  opacity: 0;
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(168,2,1,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,2,1,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.hero-ring {
  position: absolute;
  width: 700px;
  height: 700px;
  border: 1px solid rgba(168,2,1,0.12);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(60deg);
  animation: ringRotate 30s linear infinite;
  z-index: 1;
  perspective: 1000px;
}
.hero-ring::before {
  content: '';
  position: absolute;
  inset: 40px;
  border: 1px solid rgba(168,2,1,0.08);
  border-radius: 50%;
  animation: ringRotate 20s linear infinite reverse;
}
.hero-ring::after {
  content: '';
  position: absolute;
  inset: 90px;
  border: 1px solid rgba(168,2,1,0.05);
  border-radius: 50%;
  animation: ringRotate 25s linear infinite;
}
@keyframes ringRotate {
  0% { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(0deg); }
  100% { transform: translate(-50%, -50%) rotateX(60deg) rotateZ(360deg); }
}

/* Grid light pulses */
.hero-grid-pulses {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.grid-pulse-h {
  position: absolute;
  height: 1px;
  left: -30%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.15) 60%, transparent 100%);
  width: 20%;
}
.grid-pulse-h:nth-child(1) { top: calc(60px * 2); animation: pulseH 7s linear infinite; }
.grid-pulse-h:nth-child(2) { top: calc(60px * 5); animation: pulseH 9s linear infinite; animation-delay: 3s; }
.grid-pulse-h:nth-child(3) { top: calc(60px * 8); animation: pulseH 11s linear infinite; animation-delay: 6s; }
.grid-pulse-h:nth-child(4) { top: calc(60px * 4); animation: pulseH 8s linear infinite; animation-delay: 1.5s; width: 15%; }
.grid-pulse-h:nth-child(5) { top: calc(60px * 10); animation: pulseH 10s linear infinite; animation-delay: 4.5s; width: 12%; }

.grid-pulse-v {
  position: absolute;
  width: 1px;
  top: -30%;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.15) 60%, transparent 100%);
  height: 20%;
}
.grid-pulse-v:nth-child(6)  { left: calc(60px * 3);  animation: pulseV 8s linear infinite; animation-delay: 2s; }
.grid-pulse-v:nth-child(7)  { left: calc(60px * 7);  animation: pulseV 10s linear infinite; animation-delay: 5s; }
.grid-pulse-v:nth-child(8)  { left: calc(60px * 12); animation: pulseV 9s linear infinite; animation-delay: 0.5s; }
.grid-pulse-v:nth-child(9)  { left: calc(60px * 18); animation: pulseV 11s linear infinite; animation-delay: 3.5s; height: 15%; }
.grid-pulse-v:nth-child(10) { left: calc(60px * 22); animation: pulseV 7s linear infinite; animation-delay: 7s; height: 12%; }

.grid-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  box-shadow: 0 0 6px rgba(255,255,255,0.2), 0 0 12px rgba(168,2,1,0.15);
  animation: dotFlash 4s ease-in-out infinite;
}
.grid-dot:nth-child(11) { top: calc(60px * 2); left: calc(60px * 7); animation-delay: 1s; }
.grid-dot:nth-child(12) { top: calc(60px * 5); left: calc(60px * 12); animation-delay: 3s; }
.grid-dot:nth-child(13) { top: calc(60px * 8); left: calc(60px * 3); animation-delay: 5s; }
.grid-dot:nth-child(14) { top: calc(60px * 4); left: calc(60px * 18); animation-delay: 2s; }
.grid-dot:nth-child(15) { top: calc(60px * 10); left: calc(60px * 22); animation-delay: 6s; }

@keyframes pulseH {
  0% { transform: translateX(0); opacity: 0; }
  5% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(calc(100vw + 60%)); opacity: 0; }
}
@keyframes pulseV {
  0% { transform: translateY(0); opacity: 0; }
  5% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(calc(100vh + 60%)); opacity: 0; }
}
@keyframes dotFlash {
  0%, 40%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.5); }
  60% { opacity: 0; transform: scale(0.5); }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
}

.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.title-line {
  display: block;
  overflow: hidden;
  position: relative;
}
.title-line .title-inner {
  display: block;
  transform: translateY(110%) skewY(5deg);
  opacity: 0;
}
.line-1 .title-inner {
  animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 2.3s forwards;
}
.line-2 .title-inner {
  animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards,
             glitchHard 0.3s linear 3.7s 2,
             glitchSubtle 0.08s linear 4.4s 5;
}
@keyframes titleReveal {
  0% { transform: translateY(110%) skewY(5deg); opacity: 0; }
  20% { opacity: 1; }
  60% { transform: translateY(-3%) skewY(0deg); }
  100% { transform: translateY(0) skewY(0deg); opacity: 1; }
}
@keyframes glitchHard {
  0% { transform: translate(0, 0) scaleX(1); opacity: 1; filter: brightness(1); }
  10% { transform: translate(-6px, 3px) scaleX(1.02); opacity: 0.7; filter: brightness(2); }
  20% { transform: translate(5px, -2px) scaleX(0.98); opacity: 1; filter: brightness(1); }
  30% { transform: translate(-3px, -3px) scaleX(1.01); opacity: 0.5; filter: brightness(3); }
  40% { transform: translate(4px, 2px) scaleX(1); opacity: 1; filter: brightness(1); }
  50% { transform: translate(-2px, 1px) scaleX(0.99); opacity: 0.8; filter: brightness(1.5); }
  60% { transform: translate(0, 0) scaleX(1); opacity: 1; filter: brightness(1); }
  100% { transform: translate(0, 0) scaleX(1); opacity: 1; filter: brightness(1); }
}
@keyframes glitchSubtle {
  0% { transform: translate(0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0); }
}

/* Glitch pseudo layers */
.line-2 {
  position: relative;
}
/* Prevent line-wrap during scramble. Width is locked via JS (script.js),
   wider random glyphs overflow but get clipped by .title-line's overflow:hidden. */
.line-2 .title-inner,
#remasteredText {
  display: inline-block;
  white-space: nowrap;
}
.line-2::before,
.line-2::after {
  content: 'REMASTERED';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--cx-red);
  opacity: 0;
  pointer-events: none;
}
.line-2::before {
  animation: glitchLayer1 3s ease-in-out 4.8s infinite;
  clip-path: inset(0 0 50% 0);
  text-shadow: -3px 0 #ff0000, 3px 0 rgba(168,2,1,0.5);
}
.line-2::after {
  animation: glitchLayer2 3s ease-in-out 4.9s infinite;
  clip-path: inset(50% 0 0 0);
  text-shadow: 3px 0 #ff3333, -3px 0 rgba(168,2,1,0.5);
}
@keyframes glitchLayer1 {
  0%, 82%, 100% { opacity: 0; transform: translate(0); }
  83% { opacity: 0.8; transform: translate(-6px, -2px) scaleX(1.03); }
  84% { opacity: 0; transform: translate(4px, 1px); }
  85% { opacity: 0.7; transform: translate(-3px, 2px) scaleX(0.98); }
  86% { opacity: 0; }
  87% { opacity: 0.5; transform: translate(5px, -1px); }
  88% { opacity: 0; transform: translate(0); }
}
@keyframes glitchLayer2 {
  0%, 84%, 100% { opacity: 0; transform: translate(0); }
  85% { opacity: 0.7; transform: translate(5px, 2px) scaleX(0.97); }
  86% { opacity: 0; transform: translate(-3px, -1px); }
  87% { opacity: 0.8; transform: translate(4px, -2px) scaleX(1.02); }
  88% { opacity: 0; }
  89% { opacity: 0.6; transform: translate(-5px, 1px); }
  90% { opacity: 0; transform: translate(0); }
}

.hero-title .accent {
  background: linear-gradient(90deg, #3a0000 0%, var(--cx-red) 20%, #ff2200 40%, #ff0000 50%, #ff2200 60%, var(--cx-red) 80%, #3a0000 100%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards,
             glitchHard 0.3s linear 3.7s 2,
             glitchSubtle 0.08s linear 4.4s 5,
             shimmer 12s linear 4.8s infinite;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 300% center; }
}

.hero-sub {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  line-height: 1.4;
  color: var(--cx-white);
  max-width: 650px;
  margin: 1.5rem auto 2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease 2.6s forwards;
  text-align: center;
}
.hero-sub-static {
  display: block;
  margin-bottom: 0.4rem;
}
.stacking-words {
  display: grid;
  grid-template-areas: "w";
  justify-items: center;
  align-items: center;
}
.stack-word {
  grid-area: w;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cx-red) 0%, #ff3333 50%, var(--cx-red) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.stack-word.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 620px;
  margin: 0 auto 3rem;
  font-weight: 300;
  text-align: center;
  opacity: 0;
  animation: fadeUp 1s ease 2.8s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s ease 2.8s forwards;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.5rem;
  background: var(--cx-red);
  color: var(--cx-white);
  border: none;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 0 40px rgba(168,2,1,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(168,2,1,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--cx-white);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-outline:hover {
  border-color: var(--cx-red);
  background: rgba(168,2,1,0.08);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  opacity: 0;
  transform: translate(-50%, 30px);
  animation: heroScrollIn 1s ease 3.2s forwards;
}
@keyframes heroScrollIn {
  from { opacity: 0; transform: translate(-50%, 30px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--cx-red), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}
.scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* Stats bar */
.stats-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 0;
  border-top: 1px solid rgba(168,2,1,0.15);
  border-bottom: 1px solid rgba(168,2,1,0.15);
  background: rgba(15,0,0,0.6);
  backdrop-filter: blur(20px);
}
.stat-item {
  flex: 1;
  max-width: 300px;
  padding: 2.5rem 2rem;
  text-align: center;
  border-right: 1px solid rgba(168,2,1,0.1);
  transition: background 0.3s ease;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(168,2,1,0.05); }
.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--cx-red);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}

/* Hero background slideshow */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 4s ease-in-out;
}
.hero-slideshow img.active {
  opacity: 0.12;
}

/* Section base */
.section {
  padding: 8rem 4rem;
  position: relative;
}
.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cx-red);
  font-weight: 600;
  margin-bottom: 1rem;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.section-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
  max-width: 550px;
}

/* Features section */
.features {
  background: linear-gradient(180deg, var(--cx-black) 0%, rgba(30,1,0,0.5) 50%, var(--cx-black) 100%);
}
.features-header {
  text-align: center;
  margin-bottom: 4rem;
}
.features-header .section-desc {
  margin: 0 auto;
}

/* Feature stack slider (3D deck) */
.feat-stack-wrap {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Scene reserves total scroll length - N cards x ~100vh */
.feat-stack-scene {
  position: relative;
  height: calc((var(--card-count) + 0.4) * 100vh);
}

/* Pin keeps the deck visible while scene scrolls */
.feat-stack-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 2400px;
  perspective-origin: 50% 30%;
}

/* HUD on top: counter + progress bar + label */
.feat-stack-hud {
  position: absolute;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 90%);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  z-index: 10;
}
.feat-stack-counter {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.7);
  display: flex;
  gap: 0.3rem;
  min-width: 60px;
}
.feat-stack-counter-sep,
.feat-stack-counter-total {
  color: rgba(168,2,1,0.5);
}
.feat-stack-progress {
  flex: 1;
  height: 2px;
  background: rgba(168,2,1,0.12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.feat-stack-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cx-red), #ff3333);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(168,2,1,0.5);
  will-change: width;
}
.feat-stack-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  min-width: 110px;
  text-align: right;
  transition: color 0.4s ease;
}

/* Deck holds all cards stacked in same space */
.feat-stack-deck {
  position: relative;
  width: min(960px, 90vw);
  height: min(560px, 65vh);
  transform-style: preserve-3d;
}

/* Each card: absolutely positioned, JS drives transform/opacity */
.feat-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background:
    linear-gradient(135deg, rgba(168,2,1,0.18) 0%, rgba(28,4,4,1) 55%, rgba(10,0,0,1) 100%),
    var(--cx-black);
  border: 1px solid rgba(168,2,1,0.28);
  border-radius: 24px;
  overflow: hidden;
  transform-origin: 50% 100%;
  will-change: transform, opacity, filter;
  box-shadow:
    0 40px 90px -30px rgba(0,0,0,0.85),
    0 0 0 1px rgba(168,2,1,0.05),
    inset 0 1px 0 rgba(255,255,255,0.04);
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
}
.feat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,2,1,0.6), transparent);
}
.feat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(168,2,1,0.18) 0%, transparent 55%);
  pointer-events: none;
  opacity: 0.7;
}

.feat-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(168,2,1,0.07) 0%, transparent 60%),
    linear-gradient(180deg, rgba(168,2,1,0.04) 0%, rgba(0,0,0,0.4) 100%);
  border-right: 1px solid rgba(168,2,1,0.1);
  overflow: hidden;
}
.feat-card-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168,2,1,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,2,1,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%);
  pointer-events: none;
}

.feat-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  position: relative;
  z-index: 1;
}
.feat-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(168,2,1,0.12);
  border: 1px solid rgba(168,2,1,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 30px rgba(168,2,1,0.18);
}
.feat-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cx-red);
  background: rgba(168,2,1,0.08);
  border: 1px solid rgba(168,2,1,0.18);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.feat-card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 1.2rem;
  color: var(--cx-white);
}
.feat-card-text {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  margin: 0;
  max-width: 36ch;
}
.feat-card-num {
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: rgba(168,2,1,0.18);
  line-height: 1;
  z-index: 2;
  letter-spacing: 0.05em;
}

/* Card animations */
.feat-anim {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 1. Performance: full-width bars */
.feat-anim-perf {
  align-items: flex-end;
  justify-content: stretch;
  gap: 4%;
  padding: 12% 8% 14%;
  box-sizing: border-box;
}
.perf-bar {
  flex: 1;
  min-width: 0;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--cx-red) 0%, rgba(168,2,1,0.85) 50%, rgba(168,2,1,0.15) 100%);
  height: 0;
  box-shadow: 0 0 20px rgba(168,2,1,0.3);
  animation: perfGrow 2.4s cubic-bezier(0.23,1,0.32,1) var(--d) infinite;
}
@keyframes perfGrow {
  0%, 100% { height: 12%; opacity: 0.35; }
  50%      { height: var(--h); opacity: 1; }
}
.perf-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(168,2,1,0.05) 1px, transparent 1px);
  background-size: 100% 12%;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 100%);
}
.perf-fps {
  position: absolute;
  top: 10%; right: 8%;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--cx-red);
  text-shadow: 0 0 12px rgba(168,2,1,0.6);
  animation: fpsTick 2.4s steps(1) infinite;
}
.perf-fps span {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.5);
  margin-left: 4px;
  vertical-align: super;
}
@keyframes fpsTick {
  0%, 100% { content: '144'; }
}

/* 2. Custom map: self-building 3D house */
.feat-anim-house {
  perspective: 800px;
  perspective-origin: 50% 60%;
}
.house-floor {
  position: absolute;
  bottom: 12%;
  left: 50%;
  width: 70%;
  height: 30%;
  transform: translateX(-50%) rotateX(70deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(168,2,1,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,2,1,0.1) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse, black 0%, transparent 75%);
}
.house-svg {
  width: 70%;
  height: auto;
  position: relative;
  z-index: 2;
  transform: rotateY(-12deg) rotateX(4deg);
  filter: drop-shadow(0 8px 22px rgba(168,2,1,0.25));
}
/* Drawing pattern: each part has dasharray and animates dashoffset to 0 */
.house-svg path,
.house-svg line,
.house-svg rect {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: hDraw 6s cubic-bezier(0.7,0,0.3,1) infinite;
}
.house-svg circle {
  opacity: 0;
  animation: hPop 6s ease infinite;
}
.h-base   { animation-delay: 0s !important; }
.h-wall-l { animation-delay: 0.4s !important; }
.h-wall-r { animation-delay: 0.55s !important; }
.h-wall-b { animation-delay: 0.7s !important; }
.h-wall-t { animation-delay: 0.85s !important; }
.h-roof-l { animation-delay: 1.05s !important; }
.h-roof-r { animation-delay: 1.2s !important; }
.h-roof-b { animation-delay: 1.35s !important; }
.h-chimney{ animation-delay: 1.55s !important; }
.h-window { animation-delay: 1.75s !important; }
.h-cross  { animation-delay: 1.95s !important; stroke-dasharray: 30; stroke-dashoffset: 30; }
.h-door   { animation-delay: 2.15s !important; }
.h-knob   { animation-delay: 2.35s !important; }
.h-smoke  { animation-delay: 2.55s !important; stroke-opacity: 0.5; stroke-dasharray: 60; stroke-dashoffset: 60; }
@keyframes hDraw {
  0%, 5%   { stroke-dashoffset: 220; opacity: 0.4; }
  45%, 80% { stroke-dashoffset: 0; opacity: 1; }
  95%, 100%{ stroke-dashoffset: 0; opacity: 0; }
}
@keyframes hPop {
  0%, 40%   { opacity: 0; transform: scale(0); transform-origin: center; }
  45%, 80%  { opacity: 1; transform: scale(1); }
  95%, 100% { opacity: 0; transform: scale(1); }
}

/* 3. Roleplay-Strang: DNA strand + floating words */
.feat-anim-strand {
  padding: 4% 0;
}
.strand-svg {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 0 14px rgba(168,2,1,0.4));
  animation: strandSway 6s ease-in-out infinite;
}
.strand-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: strandDraw 6s ease-in-out infinite;
}
.strand-line-2 { animation-delay: 0.4s; }
.strand-node {
  fill: var(--cx-red);
  filter: drop-shadow(0 0 6px rgba(168,2,1,0.7));
  animation: strandPulse 2s ease-in-out infinite;
}
.strand-node:nth-child(4) { animation-delay: 0.3s; }
.strand-node:nth-child(5) { animation-delay: 0.6s; }
.strand-node:nth-child(6) { animation-delay: 0.9s; }
.strand-node:nth-child(7) { animation-delay: 1.2s; }
@keyframes strandDraw {
  0%   { stroke-dashoffset: 600; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@keyframes strandSway {
  0%, 100% { transform: rotate(-1.5deg); }
  50%      { transform: rotate(1.5deg); }
}
@keyframes strandPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.6); opacity: 1; }
}
.strand-word {
  position: absolute;
  top: var(--t);
  left: 50%;
  transform: translate(calc(-50% + var(--x)), -50%) scale(0.85);
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  background: rgba(168,2,1,0.18);
  border: 1px solid rgba(168,2,1,0.5);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 16px rgba(168,2,1,0.2);
  animation: strandWord 5s ease-in-out var(--d) infinite;
}
@keyframes strandWord {
  0%, 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), -50%) scale(0.7); }
  20%, 70% { opacity: 1; transform: translate(calc(-50% + var(--x)), -50%) scale(1); }
}

/* 4. Custom scripts: matrix rain */
.feat-anim-matrix {
  background: radial-gradient(ellipse at center, rgba(168,2,1,0.06) 0%, transparent 70%);
  font-family: 'Courier New', monospace;
}
.mx-col {
  position: absolute;
  top: -40%;
  left: var(--x);
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(168,2,1,0.55);
  text-shadow: 0 0 6px rgba(168,2,1,0.45);
  letter-spacing: 0.05em;
  text-align: center;
  animation: matrixFall var(--s) linear var(--d) infinite;
  white-space: pre-line;
  user-select: none;
  /* Fade head→tail using mask */
  mask-image: linear-gradient(180deg, white 0%, white 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, white 0%, white 70%, transparent 100%);
}
.mx-col::first-line {
  color: #fff;
  text-shadow: 0 0 12px rgba(255,200,200,0.9), 0 0 4px var(--cx-red);
}
@keyframes matrixFall {
  0%   { transform: translateY(0); }
  100% { transform: translateY(140%); }
}
.mx-cursor {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 1.4rem;
  color: var(--cx-red);
  text-shadow: 0 0 10px rgba(168,2,1,0.7);
  animation: mxBlink 1s steps(2) infinite;
}
@keyframes mxBlink { 0%{opacity:1} 50%{opacity:0} }
.mx-tag {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(168,2,1,0.3);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  z-index: 5;
  backdrop-filter: blur(4px);
}

/* 5. Community: people joining together */
.feat-anim-group {
  perspective: 600px;
}
.grp-links {
  position: absolute;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
}
.grp-link {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  opacity: 0;
  animation: grpLink 5s ease-in-out var(--d) infinite;
}
@keyframes grpLink {
  0%, 30%   { stroke-dashoffset: 200; opacity: 0; }
  45%, 80%  { stroke-dashoffset: 0; opacity: 0.6; }
  95%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
.grp-person {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168,2,1,0.5), rgba(168,2,1,0.15));
  border: 1.5px solid var(--cx-red);
  box-shadow: 0 0 14px rgba(168,2,1,0.4);
  transform: translate(var(--ex), var(--ey)) scale(0);
  animation: grpJoin 5s cubic-bezier(0.5,0,0.2,1) var(--d) infinite;
}
.grp-person span {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
@keyframes grpJoin {
  0%        { transform: translate(var(--ex), var(--ey)) scale(0); opacity: 0; }
  10%       { transform: translate(var(--ex), var(--ey)) scale(1); opacity: 1; }
  35%, 80%  { transform: translate(0, 0) scale(0.75); opacity: 1; }
  92%, 100% { transform: translate(0, 0) scale(0.75); opacity: 0; }
}
.grp-core {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,2,1,0.35) 0%, rgba(168,2,1,0.05) 70%);
  border: 1px solid rgba(168,2,1,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 2;
  animation: grpCore 5s ease-in-out infinite;
}
@keyframes grpCore {
  0%, 30%   { opacity: 0; transform: scale(0.4); }
  45%, 80%  { opacity: 1; transform: scale(1); }
  95%, 100% { opacity: 0; transform: scale(0.4); }
}
.grp-core-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--cx-red);
  opacity: 0;
  animation: grpRing 2.5s ease-out infinite 2.5s;
}
.grp-core-ring-2 { animation-delay: 3.2s; }
@keyframes grpRing {
  0%   { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* 6. Anti-cheat: defending against threats */
.feat-anim-defense {
  font-family: 'Courier New', monospace;
}
.def-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(168,2,1,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,2,1,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 75%);
}
.def-shield {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  filter: drop-shadow(0 0 18px rgba(168,2,1,0.5));
  animation: defFloat 3s ease-in-out infinite;
}
.def-shield svg { width: 100%; height: 100%; }
@keyframes defFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.def-shield-pulse {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  border: 1.5px solid var(--cx-red);
  opacity: 0;
  animation: defPulse 2s ease-out infinite;
}
@keyframes defPulse {
  0%   { transform: scale(0.6); opacity: 0; }
  30%  { opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}
.def-threat {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  background: rgba(60,0,0,0.8);
  border: 1px solid rgba(255,80,80,0.6);
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  transform: translate(var(--sx), var(--sy)) scale(1);
  opacity: 0;
  text-shadow: 0 0 6px rgba(255,80,80,0.8);
  animation: defThreat 2.4s ease-in var(--d) infinite;
  white-space: nowrap;
}
@keyframes defThreat {
  0%        { transform: translate(var(--sx), var(--sy)) scale(1) rotate(0); opacity: 0; }
  15%       { opacity: 1; }
  60%       { transform: translate(calc(var(--sx) * 0.15), calc(var(--sy) * 0.15)) scale(1) rotate(0); opacity: 1; }
  72%       { transform: translate(0, 0) scale(1.4) rotate(8deg); opacity: 1; background: rgba(168,2,1,0.9); border-color: var(--cx-red); }
  82%, 100% { transform: translate(0, 0) scale(0) rotate(20deg); opacity: 0; }
}
.def-codeline {
  position: absolute;
  font-size: 0.7rem;
  color: rgba(168,2,1,0.55);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.8;
}
.def-codeline span {
  color: #6dffae;
  text-shadow: 0 0 6px rgba(109,255,174,0.6);
  margin-left: 4px;
}
.def-cl-1 { top: 10%; left: 8%; animation: defLine 3s ease-in-out infinite; }
.def-cl-2 { bottom: 14%; right: 10%; animation: defLine 3s ease-in-out 0.7s infinite; }
.def-cl-3 { bottom: 28%; left: 10%; animation: defLine 3s ease-in-out 1.4s infinite; }
@keyframes defLine {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
  .feat-card { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; }
  .feat-card-media { border-right: none; border-bottom: 1px solid rgba(168,2,1,0.1); }
  .feat-card-body { padding: 2rem 2rem; }
  .feat-stack-deck { height: min(620px, 72vh); }
}
@media (max-width: 768px) {
  .feat-stack-wrap { padding: 0 1rem; }
  .feat-card { border-radius: 18px; }
  .feat-card-body { padding: 1.5rem 1.4rem; }
  .feat-card-num { font-size: 2.8rem; top: 1rem; right: 1.2rem; }
  .feat-card-title { font-size: 1.5rem; margin-bottom: 0.8rem; }
  .feat-card-text { font-size: 0.88rem; }
  .feat-card-icon { width: 42px; height: 42px; margin-bottom: 1rem; }
  .feat-stack-deck { width: 92vw; height: min(580px, 75vh); }
  .feat-stack-hud { top: 8vh; gap: 0.7rem; }
  .feat-stack-label { display: none; }
  .feat-stack-counter { font-size: 0.85rem; }
}

/* Showcase: inhouse work */
.showcase {
  position: relative;
  padding: 8rem 0 10rem;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cx-black) 0%, rgba(20,1,0,0.6) 50%, var(--cx-black) 100%);
}

.sc-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 6rem;
  padding: 0 2rem;
}
.sc-intro .section-desc { margin: 0 auto; }

/* Block scaffolding */
.sc-block {
  max-width: 1320px;
  margin: 0 auto 10rem;
  padding: 0 2rem;
  position: relative;
}
.sc-block:last-child { margin-bottom: 0; }

.sc-block-head {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 720px;
}
.sc-block-head-right {
  margin-left: auto;
  text-align: right;
  flex-direction: row-reverse;
}
.sc-block-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4.5rem;
  line-height: 0.85;
  color: var(--cx-red);
  text-shadow: 0 0 24px rgba(168,2,1,0.4);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  position: relative;
  padding-right: 2rem;
}
.sc-block-head-right .sc-block-num { padding-right: 0; padding-left: 2rem; }
.sc-block-num::after {
  content: '';
  position: absolute;
  top: 12%; right: 0;
  width: 1px; height: 76%;
  background: linear-gradient(180deg, transparent, rgba(168,2,1,0.5), transparent);
}
.sc-block-head-right .sc-block-num::after { right: auto; left: 0; }
.sc-block-tag {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cx-red);
  background: rgba(168,2,1,0.08);
  border: 1px solid rgba(168,2,1,0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.sc-block-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
  color: var(--cx-white);
}
.sc-block-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  margin: 0;
  max-width: 52ch;
}
.sc-block-head-right .sc-block-desc { margin-left: auto; }

/* Block 01: code window + annotations */
.sc-code-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  position: relative;
  perspective: 2000px;
}
.code-window {
  position: relative;
  background: linear-gradient(180deg, #110102 0%, #060000 100%);
  border: 1px solid rgba(168,2,1,0.3);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 50px 100px -30px rgba(0,0,0,0.85),
    0 0 0 1px rgba(168,2,1,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transform: rotateY(-3deg) rotateX(2deg);
  transform-origin: 100% 50%;
  z-index: 2;
}
.code-window::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(168,2,1,0.12) 0%, transparent 50%);
  pointer-events: none;
}
.code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, #1a0203 0%, #0e0102 100%);
  border-bottom: 1px solid rgba(168,2,1,0.25);
  position: relative;
}
.cw-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.05);
}
.cw-dot:nth-child(1) { background: #ff5f56; }
.cw-dot:nth-child(2) { background: #ffbd2e; }
.cw-dot:nth-child(3) { background: #27c93f; }
.cw-tabs {
  display: flex;
  gap: 0.3rem;
  margin-left: 1.4rem;
}
.cw-tab {
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  padding: 0.3rem 0.7rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: 5px 5px 0 0;
  position: relative;
  top: 9px;
}
.cw-tab-active {
  color: var(--cx-white);
  background: linear-gradient(180deg, rgba(168,2,1,0.18), rgba(168,2,1,0.06));
  border-color: rgba(168,2,1,0.4);
  border-bottom-color: transparent;
}
.cw-path {
  margin-left: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}
.code-body {
  margin: 0;
  padding: 1.4rem 1.4rem 1.6rem;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  white-space: pre;
  overflow: hidden;
  counter-reset: ln;
  background:
    repeating-linear-gradient(180deg, transparent 0px, transparent 22px, rgba(168,2,1,0.015) 22px, rgba(168,2,1,0.015) 44px);
}
.code-body .ln {
  display: inline-block;
  width: 26px;
  text-align: right;
  margin-right: 14px;
  color: rgba(168,2,1,0.4);
  user-select: none;
  font-size: 0.7rem;
}
.code-body .kw { color: #ff7a8a; font-weight: 700; }
.code-body .fn { color: #ffae6e; }
.code-body .vr { color: #e9eaee; }
.code-body .st { color: #6dffae; }
.code-body .nm { color: #d18cff; }
.code-body .bo { color: #ff7a8a; font-style: italic; }
.code-body .cm { color: rgba(255,255,255,0.32); font-style: italic; }
/* Highlighted line backgrounds */
.code-body .hl-1, .code-body .hl-2, .code-body .hl-3, .code-body .hl-4 {
  display: inline-block;
  width: calc(100% + 2.8rem);
  margin-left: -1.4rem;
  padding-left: 1.4rem;
  position: relative;
  background: linear-gradient(90deg, rgba(168,2,1,0.16), rgba(168,2,1,0));
  border-left: 2px solid var(--cx-red);
  animation: codeHl 5s ease-in-out infinite;
}
.code-body .hl-1 { animation-delay: 0s; }
.code-body .hl-2 { animation-delay: 1.25s; }
.code-body .hl-3 { animation-delay: 2.5s; }
.code-body .hl-4 { animation-delay: 3.75s; }
@keyframes codeHl {
  0%, 100% { background: linear-gradient(90deg, rgba(168,2,1,0.05), transparent); border-left-color: rgba(168,2,1,0.2); }
  20%, 35% { background: linear-gradient(90deg, rgba(168,2,1,0.28), rgba(168,2,1,0.04)); border-left-color: var(--cx-red); }
}
.code-cursor {
  position: absolute;
  bottom: 1.6rem;
  left: 1.4rem;
  width: 8px; height: 14px;
  background: var(--cx-red);
  box-shadow: 0 0 10px rgba(168,2,1,0.7);
  animation: cwBlink 1s steps(2) infinite;
  opacity: 0.6;
}
@keyframes cwBlink { 0%{opacity:0.7} 50%{opacity:0} }

/* Code-block build sequence */
[data-build] .code-window {
  opacity: 0;
  transform: translateY(30px) rotateY(-3deg) rotateX(2deg) scale(0.96);
}
[data-build].is-building .code-window {
  animation: bldCodeWin 0.9s cubic-bezier(0.16,1,0.3,1) 0.7s both;
}
@keyframes bldCodeWin {
  0%   { opacity: 0; transform: translateY(30px) rotateY(-3deg) rotateX(2deg) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) rotateY(-3deg) rotateX(2deg) scale(1); }
}

/* Code body reveals top-to-bottom like it's being typed/loaded */
[data-build] .code-body {
  clip-path: inset(0 0 100% 0);
}
[data-build].is-building .code-body {
  animation: bldCodeBody 1.6s cubic-bezier(0.5,0,0.3,1) 1s both;
}
@keyframes bldCodeBody {
  0%   { clip-path: inset(0 0 100% 0); }
  100% { clip-path: inset(0); }
}

/* Cursor pulses faster during build, normal after */
[data-build] .code-cursor {
  opacity: 0;
}
[data-build].is-building .code-cursor {
  animation: bldCodeCursor 1.4s ease 1s both, cwBlink 1s steps(2) 2.4s infinite;
}
@keyframes bldCodeCursor {
  0%   { opacity: 0; transform: translateY(-200px); }
  100% { opacity: 0.7; transform: translateY(0); }
}

/* Annotations panel */
.code-annotations {
  position: relative;
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 0.6rem;
}
.ann {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(168,2,1,0.08), rgba(20,3,3,0.8));
  border: 1px solid rgba(168,2,1,0.2);
  border-radius: 10px;
  position: relative;
  z-index: 3;
  opacity: 0;
  transform: translateX(20px);
}
[data-build].is-building .ann {
  animation: annIn 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
[data-build].is-building .ann-1 { animation-delay: 2.6s; }
[data-build].is-building .ann-2 { animation-delay: 2.8s; }
[data-build].is-building .ann-3 { animation-delay: 3.0s; }
[data-build].is-building .ann-4 { animation-delay: 3.2s; }
@keyframes annIn {
  to { opacity: 1; transform: translateX(0); }
}
.ann-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cx-red);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(168,2,1,0.5);
}
.ann-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cx-white);
  margin-bottom: 0.15rem;
}
.ann-text {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.5);
  font-weight: 300;
}
.ann-lines {
  position: absolute;
  top: 0; left: 0;
  width: 3rem;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.ann-lines path {
  fill: none;
  stroke: var(--cx-red);
  stroke-width: 0.4;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  filter: drop-shadow(0 0 4px rgba(168,2,1,0.5));
}
[data-build].is-building .ann-lines path {
  animation: annLine 1s ease-out both;
}
[data-build].is-building .al-1 { animation-delay: 2.8s; }
[data-build].is-building .al-2 { animation-delay: 3.0s; }
[data-build].is-building .al-3 { animation-delay: 3.2s; }
[data-build].is-building .al-4 { animation-delay: 3.4s; }
@keyframes annLine { to { stroke-dashoffset: 0; } }

/* Stats row */
.sc-stats {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(168,2,1,0.06), rgba(10,1,1,0.6));
  border: 1px solid rgba(168,2,1,0.15);
  border-radius: 14px;
}
.sc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.3rem;
}
[data-build] .sc-stat {
  opacity: 0;
  transform: translateY(20px);
}
[data-build].is-building .sc-stat {
  animation: bldUp 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
[data-build].is-building .sc-stat:nth-of-type(1) { animation-delay: 3.6s; }
[data-build].is-building .sc-stat:nth-of-type(2) { animation-delay: 3.75s; }
[data-build].is-building .sc-stat:nth-of-type(3) { animation-delay: 3.9s; }
[data-build].is-building .sc-stat:nth-of-type(4) { animation-delay: 4.05s; }
.sc-stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--cx-white);
  letter-spacing: 0.04em;
  display: flex; align-items: baseline; gap: 0.1rem;
}
.sc-stat-num i {
  font-style: normal;
  font-size: 1.1rem;
  color: var(--cx-red);
}
.sc-stat-lbl {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* Block 02: vehicles (real photo grid + build sequence) */

/* Build-HUD: top-left status indicator */
.sc-build-hud {
  position: absolute;
  top: -2.5rem;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: rgba(168,2,1,0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.6s ease;
  z-index: 4;
}
[data-build].is-building .sc-build-hud {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}
.sc-build-hud-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cx-red);
  box-shadow: 0 0 8px var(--cx-red);
  animation: hudBlink 1s ease-in-out infinite;
}
@keyframes hudBlink { 0%,100%{opacity:1} 50%{opacity:.3} }
.sc-build-hud-bar {
  width: 100px;
  height: 2px;
  background: rgba(168,2,1,0.15);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}
.sc-build-hud-bar-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cx-red), #ff3333);
  box-shadow: 0 0 8px rgba(168,2,1,0.6);
  transform: scaleX(0);
  transform-origin: left;
}
[data-build].is-building .sc-build-hud-bar-fill {
  animation: hudFill 3s cubic-bezier(0.5,0,0.5,1) 0.2s forwards;
}
@keyframes hudFill {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}
/* Block head build-in */
[data-build] .sc-block-num,
[data-build] .sc-block-tag,
[data-build] .sc-block-title,
[data-build] .sc-block-desc {
  opacity: 0;
}
[data-build].is-building .sc-block-num {
  animation: bldNum 0.9s cubic-bezier(0.16,1,0.3,1) 0.15s both;
}
@keyframes bldNum {
  0%   { opacity: 0; transform: translateX(40px) scale(0.6); filter: blur(8px); }
  60%  { filter: blur(0); }
  100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
[data-build].is-building .sc-block-tag    { animation: bldUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.35s both; }
[data-build].is-building .sc-block-title  { animation: bldUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.45s both; }
[data-build].is-building .sc-block-desc   { animation: bldUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.55s both; }
@keyframes bldUp {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Subhead line draw */
[data-build] .sc-subhead-line {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.5,0,0.3,1);
}
[data-build] .sc-subhead-label {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-build].is-building .sc-subhead:nth-of-type(1) .sc-subhead-line { transform: scaleX(1); transition-delay: 0.5s; }
[data-build].is-building .sc-subhead:nth-of-type(1) .sc-subhead-label { opacity: 1; transform: none; transition-delay: 0.85s; }

[data-build].is-building .sc-subhead:nth-of-type(2) .sc-subhead-line { transform: scaleX(1); transition-delay: 1.85s; }
[data-build].is-building .sc-subhead:nth-of-type(2) .sc-subhead-label { opacity: 1; transform: none; transition-delay: 2.15s; }

/* Photo build-in: clean staggered fade-up */
[data-build] .sc-photo,
[data-build] .sc-tool-photo {
  opacity: 0;
  transform: translateY(28px);
}
[data-build].is-building .sc-photo,
[data-build].is-building .sc-tool-photo {
  animation: bldPhoto 0.9s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes bldPhoto {
  0%   { opacity: 0; transform: translateY(28px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Stagger the 3 build photos */
[data-build].is-building .sc-photo:nth-of-type(1) { animation-delay: 0.95s; }
[data-build].is-building .sc-photo:nth-of-type(2) { animation-delay: 1.1s; }
[data-build].is-building .sc-photo:nth-of-type(3) { animation-delay: 1.25s; }

/* Tool photos build after */
[data-build].is-building .sc-tool-photo:nth-of-type(1) { animation-delay: 2.2s; }
[data-build].is-building .sc-tool-photo:nth-of-type(2) { animation-delay: 2.35s; }



/* Subheader divider */
.sc-subhead {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.sc-subhead-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--cx-red) 0%, rgba(168,2,1,0.05) 100%);
}
.sc-subhead-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cx-red);
  white-space: nowrap;
}
.sc-subhead-line:last-child {
  background: linear-gradient(90deg, rgba(168,2,1,0.05) 0%, var(--cx-red) 100%);
}

/* Builds grid: 3 photos asymmetric */
.sc-photo-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 320px 220px;
  grid-template-areas:
    "p1 p2"
    "p3 p3";
  gap: 1.2rem;
  margin-bottom: 4rem;
}
.sc-photo {
  position: relative;
  background: #0a0202;
  border: 1px solid rgba(168,2,1,0.25);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1), border-color 0.4s, box-shadow 0.5s;
}
.sc-photo:nth-of-type(1) { grid-area: p1; }
.sc-photo:nth-of-type(2) { grid-area: p2; }
.sc-photo:nth-of-type(3) { grid-area: p3; }
.sc-photo:hover {
  transform: translateY(-6px) scale(1.005);
  border-color: var(--cx-red);
  box-shadow: 0 30px 70px -20px rgba(168,2,1,0.45);
}

/* Real image background, swap out via --img */
.sc-photo-img {
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-color: #1a0405;
  transition: transform 1.2s cubic-bezier(0.23,1,0.32,1), filter 0.6s;
  z-index: 0;
}
.sc-photo:hover .sc-photo-img {
  transform: scale(1.06);
  filter: brightness(1.1) saturate(1.1);
}
/* Empty-image fallback pattern */
.sc-photo-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(168,2,1,0.06) 25%, transparent 25%),
    linear-gradient(225deg, rgba(168,2,1,0.06) 25%, transparent 25%);
  background-size: 32px 32px;
  opacity: 0;
}
/* Gradient overlays for legibility */
.sc-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(8,0,0,0.55) 70%, rgba(8,0,0,0.92) 100%);
  pointer-events: none;
  z-index: 2;
}
.sc-photo::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, rgba(168,2,1,0.15) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
}

.sc-photo-meta {
  position: absolute;
  bottom: 1.2rem;
  left: 1.5rem;
  right: 1.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sc-photo-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: 'Syne', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(168,2,1,0.55);
  border: 1px solid var(--cx-red);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(168,2,1,0.3);
}
.sc-photo-cap {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--cx-white);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  line-height: 1.1;
}
.sc-photo-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.78);
  font-weight: 300;
  line-height: 1.5;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  max-width: 90%;
}
.sc-photo-sub em {
  font-style: normal;
  color: var(--cx-white);
  font-weight: 600;
}
.sc-photo-corner {
  position: absolute;
  top: 1rem; right: 1.3rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.1em;
  z-index: 3;
  background: rgba(168,2,1,0.25);
  border: 1px solid rgba(168,2,1,0.5);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  line-height: 1;
  backdrop-filter: blur(6px);
}

/* Tools grid: 2 process screenshots */
.sc-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.sc-tool-photo {
  position: relative;
  height: 340px;
  background: #0a0202;
  border: 1px solid rgba(168,2,1,0.3);
  border-radius: 14px;
  overflow: hidden;
  margin: 0;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1), border-color 0.4s, box-shadow 0.5s;
}
.sc-tool-photo:hover {
  transform: translateY(-6px);
  border-color: var(--cx-red);
  box-shadow: 0 30px 70px -20px rgba(168,2,1,0.45);
}
.sc-tool-photo .sc-photo-img {
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-color: #0d0303;
  transition: transform 1.2s cubic-bezier(0.23,1,0.32,1), filter 0.6s;
  filter: brightness(0.92);
}
.sc-tool-photo:hover .sc-photo-img {
  transform: scale(1.04);
  filter: brightness(1.05);
}
.sc-tool-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 30%, transparent 60%, rgba(8,0,0,0.95) 100%);
  z-index: 2;
}
.sc-tool-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0px, transparent 3px, rgba(0,0,0,0.07) 3px, rgba(0,0,0,0.07) 4px);
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
}
.sc-tool-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(168,2,1,0.5);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}
.sc-tool-badge svg { flex-shrink: 0; }
.sc-tool-photo .sc-photo-meta {
  bottom: 1.4rem;
  left: 1.5rem;
  right: 1.5rem;
}
.sc-tool-photo .sc-photo-corner {
  background: rgba(0,0,0,0.65);
  border-color: rgba(168,2,1,0.5);
}

/* Block 03: clothing (4-up strip) */
.sc-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.sc-strip-card {
  position: relative;
  height: 460px;
  background: var(--bg);
  border: 1px solid rgba(168,2,1,0.18);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1), border-color 0.4s;
  cursor: pointer;
}
.sc-strip-card:hover {
  transform: translateY(-10px);
  border-color: var(--cx-red);
  box-shadow: 0 30px 60px -20px rgba(168,2,1,0.45);
}
.sc-strip-card:nth-child(odd) { transform: translateY(0); }
.sc-strip-card:nth-child(even) { transform: translateY(20px); }
.sc-strip-card:nth-child(odd):hover { transform: translateY(-10px); }
.sc-strip-card:nth-child(even):hover { transform: translateY(10px); }
.sc-strip-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(168,2,1,0.22), transparent 60%),
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  z-index: 2;
}
.sc-strip-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168,2,1,0.05) 1px, transparent 1px);
  background-size: 100% 24px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
}
.sc-strip-tag {
  position: absolute;
  top: 1rem; left: 1rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(168,2,1,0.3);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  z-index: 3;
  backdrop-filter: blur(8px);
}
.sc-strip-shape {
  position: absolute;
  top: 50%; left: 50%;
  width: 70%;
  height: 60%;
  transform: translate(-50%, -55%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 1;
  filter: drop-shadow(0 10px 24px rgba(168,2,1,0.4));
  animation: shapeFloat 5s ease-in-out infinite;
}
.sc-shape-shirt {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 160' fill='none' stroke='%23a80201' stroke-width='1.5' stroke-linejoin='round'><path d='M30 25 L50 15 L70 15 L90 25 L110 40 L100 60 L90 50 L90 145 L30 145 L30 50 L20 60 L10 40 Z'/><path d='M50 15 Q60 30 70 15'/><circle cx='60' cy='50' r='2' fill='%23a80201'/></svg>");
}
.sc-shape-suit {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 170' fill='none' stroke='%23a80201' stroke-width='1.5' stroke-linejoin='round'><path d='M40 20 L50 12 L70 12 L80 20 L105 35 L100 75 L90 70 L90 155 L30 155 L30 70 L20 75 L15 35 Z'/><path d='M50 20 L60 60 L70 20'/><line x1='60' y1='60' x2='60' y2='155'/><circle cx='55' cy='100' r='2' fill='%23a80201'/><circle cx='65' cy='100' r='2' fill='%23a80201'/></svg>");
}
.sc-shape-uniform {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 170' fill='none' stroke='%23a80201' stroke-width='1.5' stroke-linejoin='round'><path d='M35 25 L50 15 L70 15 L85 25 L108 38 L98 60 L90 55 L90 150 L30 150 L30 55 L22 60 L12 38 Z'/><rect x='40' y='40' width='40' height='12'/><rect x='50' y='65' width='20' height='5' fill='%23a80201'/><rect x='50' y='80' width='20' height='5' fill='%23a80201'/></svg>");
}
.sc-shape-jacket {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 165' fill='none' stroke='%23a80201' stroke-width='1.5' stroke-linejoin='round'><path d='M30 20 L48 12 L60 28 L72 12 L90 20 L110 35 L100 65 L92 58 L92 150 L28 150 L28 58 L20 65 L10 35 Z'/><line x1='60' y1='28' x2='60' y2='150'/><path d='M48 12 L40 60 L60 28'/><path d='M72 12 L80 60 L60 28'/><circle cx='75' cy='80' r='2' fill='%23a80201'/><circle cx='75' cy='100' r='2' fill='%23a80201'/></svg>");
}
.sc-strip-cap {
  position: absolute;
  bottom: 1.4rem;
  left: 1.4rem;
  right: 1.4rem;
  z-index: 3;
}
.sc-strip-cap h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--cx-white);
  letter-spacing: -0.01em;
}
.sc-strip-cap p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  font-weight: 300;
}

/* Block 03: compare sliders (before / after) */

/* Build sequence: meta side slides in, slider fades + scales */
[data-build] .sc-compare-meta {
  opacity: 0;
  transform: translateX(-30px);
}
[data-build] .sc-compare-meta-right {
  transform: translateX(30px);
}
[data-build] .sc-compare {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
}

[data-build].is-building .sc-compare-meta {
  animation: bldMeta 0.8s cubic-bezier(0.16,1,0.3,1) both;
}
[data-build].is-building .sc-compare {
  animation: bldSlider 0.9s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes bldMeta {
  0%   { opacity: 0; transform: translateX(var(--bld-x, -30px)); }
  100% { opacity: 1; transform: translateX(0); }
}
[data-build] .sc-compare-meta-right { --bld-x: 30px; }
@keyframes bldSlider {
  0%   { opacity: 0; transform: translateY(30px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stagger the 2 compare blocks */
[data-build].is-building .sc-compare-wrap:nth-of-type(1) .sc-compare-meta { animation-delay: 0.7s; }
[data-build].is-building .sc-compare-wrap:nth-of-type(1) .sc-compare      { animation-delay: 0.9s; }
[data-build].is-building .sc-compare-wrap:nth-of-type(2) .sc-compare-meta { animation-delay: 1.5s; }
[data-build].is-building .sc-compare-wrap:nth-of-type(2) .sc-compare      { animation-delay: 1.7s; }


.sc-compare-wrap {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3rem;
}
.sc-compare-wrap:last-child { margin-bottom: 0; }

.sc-compare-meta { padding: 1rem 0; }
.sc-compare-meta-right {
  order: 2;
  text-align: right;
}
.sc-compare-meta-right + .sc-compare { order: 1; }
.sc-compare-tag {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--cx-red);
  margin-bottom: 0.8rem;
}
.sc-compare-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--cx-white);
  line-height: 1.1;
}
.sc-compare-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  margin: 0;
}
.sc-compare-desc em {
  font-style: normal;
  color: var(--cx-white);
  font-weight: 600;
}
.sc-compare-desc span {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: rgba(168,2,1,0.8);
  letter-spacing: 0.04em;
}

/* The slider */
.sc-compare {
  position: relative;
  height: 480px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(168,2,1,0.3);
  background: #0a0202;
  cursor: ew-resize;
  user-select: none;
  box-shadow:
    0 30px 70px -20px rgba(0,0,0,0.85),
    0 0 0 1px rgba(168,2,1,0.05);
}
.sc-compare-side {
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-color: #1a0405;
}
/* "Before" sits at the bottom (full image) */
.sc-compare-before {
  z-index: 1;
  filter: brightness(0.95) contrast(1.05);
}
/* "After" overlays: clip-path animated by JS (drag) or CSS (auto) */
.sc-compare-after {
  z-index: 2;
  clip-path: inset(0 var(--clip, 50%) 0 0);
  animation: cmpSweep 8s cubic-bezier(0.5,0,0.5,1) infinite;
}
.sc-compare:hover .sc-compare-after { animation-play-state: paused; }

@keyframes cmpSweep {
  0%, 8%   { clip-path: inset(0 95% 0 0); }
  44%, 56% { clip-path: inset(0 5% 0 0); }
  92%, 100%{ clip-path: inset(0 95% 0 0); }
}

/* Labels in corners */
.sc-compare-label {
  position: absolute;
  top: 1rem;
  z-index: 5;
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(168,2,1,0.5);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.sc-compare-label-l { left: 1rem; }
.sc-compare-label-r { right: 1rem; background: rgba(168,2,1,0.85); border-color: var(--cx-red); }

/* Divider line + handle */
.sc-compare-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--cx-red);
  box-shadow: 0 0 16px rgba(168,2,1,0.7), 0 0 4px #fff;
  z-index: 4;
  transform: translateX(-1px);
  pointer-events: none;
  animation: cmpDivSweep 8s cubic-bezier(0.5,0,0.5,1) infinite;
}
.sc-compare:hover .sc-compare-divider { animation-play-state: paused; }
@keyframes cmpDivSweep {
  0%, 8%   { left: 5%; }
  44%, 56% { left: 95%; }
  92%, 100%{ left: 5%; }
}

.sc-compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cx-red), #d11f1c);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  box-shadow:
    0 6px 20px rgba(168,2,1,0.5),
    0 0 30px rgba(168,2,1,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
  pointer-events: auto;
  cursor: ew-resize;
  animation: handlePulse 2s ease-in-out infinite;
}
@keyframes handlePulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(168,2,1,0.5), 0 0 30px rgba(168,2,1,0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
  50%      { box-shadow: 0 6px 20px rgba(168,2,1,0.7), 0 0 50px rgba(168,2,1,0.5), inset 0 1px 0 rgba(255,255,255,0.2); }
}

/* Subtle scanline overlay for "render" feel */
.sc-compare::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: multiply;
}

/* Block 04: skinning (dual marquee strips) */
.sc-marquee {
  position: relative;
  /* Break out wider than the standard block, capped so it never spans full viewport */
  width: min(1760px, calc(100vw - 2rem));
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  padding: 0.5rem 0;
  /* Fade edges so cards smoothly enter/exit */
  mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}
.sc-marquee + .sc-marquee { margin-top: 1.8rem; }

.sc-marquee-track {
  display: flex;
  gap: 1.8rem;
  width: max-content;
  will-change: transform;
}
.sc-marquee-left .sc-marquee-track {
  animation: marqueeL 55s linear infinite;
}
.sc-marquee-right .sc-marquee-track {
  animation: marqueeR 55s linear infinite;
}
@keyframes marqueeL {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marqueeR {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
/* Pause on hover so user can read */
.sc-marquee:hover .sc-marquee-track {
  animation-play-state: paused;
}

.sc-skin-card {
  position: relative;
  flex-shrink: 0;
  width: 440px;
  height: 420px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(168,2,1,0.22);
  background: var(--bg, #1a0405);
  box-shadow: 0 22px 50px -18px rgba(0,0,0,0.78);
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1), border-color 0.4s, box-shadow 0.5s;
  cursor: pointer;
}
.sc-skin-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--cx-red);
  box-shadow: 0 30px 60px -18px rgba(168,2,1,0.4);
}

/* Image layer, falls back to gradient if --img is missing */
.sc-skin-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  background-color: transparent;
  z-index: 0;
  transition: transform 1s cubic-bezier(0.23,1,0.32,1), filter 0.5s;
}
.sc-skin-card:hover::before {
  transform: scale(1.06);
  filter: brightness(1.1) saturate(1.1);
}
/* Bottom gradient for caption legibility */
.sc-skin-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.55) 70%, rgba(8,0,0,0.95) 100%),
    radial-gradient(circle at 80% 0%, rgba(168,2,1,0.18), transparent 60%);
  z-index: 1;
  pointer-events: none;
}

.sc-skin-card-num {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  z-index: 3;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(168,2,1,0.45);
  border: 1px solid var(--cx-red);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.sc-skin-card-meta {
  position: absolute;
  bottom: 1.5rem;
  left: 1.6rem;
  right: 1.6rem;
  z-index: 3;
  color: #fff;
}
.sc-skin-card-meta h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.85);
}
.sc-skin-card-meta p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  font-weight: 300;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* Old block 04 grid (unused, kept for compat) */
.sc-skin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.sc-skin {
  position: relative;
  height: 320px;
  background: var(--bg);
  border: 1px solid rgba(168,2,1,0.2);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.4s;
}
.sc-skin:hover { border-color: var(--cx-red); }
.sc-skin::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(168,2,1,0.25), transparent 55%),
    linear-gradient(135deg, transparent 30%, rgba(0,0,0,0.6) 100%);
  z-index: 2;
  transition: opacity 0.5s;
}
.sc-skin::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(168,2,1,0.04) 1px, transparent 1px);
  background-size: 16px 16px;
}
.sc-skin-shape {
  position: absolute;
  top: 50%;
  left: 28%;
  width: 50%;
  height: 70%;
  transform: translate(-50%, -50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 1;
  filter: drop-shadow(0 8px 20px rgba(168,2,1,0.4));
  transition: transform 0.6s cubic-bezier(0.23,1,0.32,1);
}
.sc-skin:hover .sc-skin-shape {
  transform: translate(-50%, -50%) scale(1.06);
}
.sc-shape-face {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 130' fill='none' stroke='%23a80201' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='50' cy='55' rx='28' ry='35'/><circle cx='40' cy='52' r='2' fill='%23a80201'/><circle cx='60' cy='52' r='2' fill='%23a80201'/><path d='M44 70 Q50 76 56 70'/><path d='M22 50 Q12 70 22 90'/><path d='M78 50 Q88 70 78 90'/></svg>");
}
.sc-shape-tattoo {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 130' fill='none' stroke='%23a80201' stroke-width='1.4' stroke-linejoin='round'><path d='M40 10 L60 10 L60 30 L80 30 L80 100 L60 110 L60 120 L40 120 L40 110 L20 100 L20 30 L40 30 Z'/><path d='M30 50 Q50 40 70 50' stroke-dasharray='3 3'/><path d='M30 70 Q50 60 70 70' stroke-dasharray='3 3'/><circle cx='50' cy='85' r='6'/><path d='M44 85 L56 85 M50 79 L50 91'/></svg>");
}
.sc-shape-hair {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 130' fill='none' stroke='%23a80201' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='50' cy='65' rx='26' ry='32'/><path d='M24 45 Q15 20 30 12 Q45 0 60 12 Q80 5 82 30 Q88 45 76 60'/><circle cx='42' cy='62' r='1.8' fill='%23a80201'/><circle cx='58' cy='62' r='1.8' fill='%23a80201'/><path d='M42 88 Q50 95 58 88'/><path d='M40 100 Q50 110 60 100' stroke-opacity='0.5'/></svg>");
}
.sc-shape-armor {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 130' fill='none' stroke='%23a80201' stroke-width='1.4' stroke-linejoin='round'><circle cx='50' cy='30' r='14'/><path d='M30 40 L70 40 L75 70 L70 110 L30 110 L25 70 Z'/><line x1='38' y1='25' x2='62' y2='25'/><circle cx='50' cy='75' r='5'/><path d='M50 70 L50 80 M45 75 L55 75' fill='%23a80201'/><circle cx='35' cy='30' r='2' fill='%23a80201'/><circle cx='65' cy='30' r='2' fill='%23a80201'/></svg>");
}
.sc-skin-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem 1.5rem;
}
.sc-skin-num {
  align-self: flex-end;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: rgba(168,2,1,0.55);
  letter-spacing: 0.08em;
  line-height: 1;
}
.sc-skin-info { transform: translateY(8px); transition: transform 0.5s cubic-bezier(0.23,1,0.32,1); }
.sc-skin:hover .sc-skin-info { transform: translateY(0); }
.sc-skin-info h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--cx-white);
  letter-spacing: -0.01em;
}
.sc-skin-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  opacity: 0.7;
  transition: opacity 0.4s;
}
.sc-skin:hover .sc-skin-info ul { opacity: 1; }
.sc-skin-info li {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sc-skin-info li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--cx-red);
  box-shadow: 0 0 6px rgba(168,2,1,0.7);
}

/* Showcase responsive */
@media (max-width: 1024px) {
  .sc-code-stage { grid-template-columns: 1fr; }
  .code-window { transform: none; }
  .code-annotations { padding-left: 0; padding-top: 1.5rem; flex-direction: row; flex-wrap: wrap; }
  .ann { flex: 1 1 calc(50% - 0.5rem); }
  .ann-lines { display: none; }
  .sc-photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 280px 220px 220px;
    grid-template-areas: "p1" "p2" "p3";
  }
  .sc-tools-grid { grid-template-columns: 1fr; }
  .sc-tool-photo { height: 280px; }
  .sc-skin-card { width: 360px; height: 340px; }
  .sc-marquee-left .sc-marquee-track,
  .sc-marquee-right .sc-marquee-track { animation-duration: 50s; }
  .sc-strip { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .sc-strip-card { height: 380px; }
  .sc-stats { grid-template-columns: repeat(2, 1fr); }
  .sc-compare-wrap { grid-template-columns: 1fr; gap: 1.5rem; }
  .sc-compare-meta-right { order: 0; text-align: left; }
  .sc-compare-meta-right + .sc-compare { order: 0; }
  .sc-compare { height: 380px; }
}
@media (max-width: 640px) {
  .showcase { padding: 5rem 0 6rem; }
  .sc-block { margin-bottom: 6rem; padding: 0 1rem; }
  .sc-block-head, .sc-block-head-right { flex-direction: column; text-align: left; gap: 0.8rem; margin-left: 0; }
  .sc-block-head-right .sc-block-num { padding-left: 0; }
  .sc-block-head-right .sc-block-num::after { display: none; }
  .sc-block-num { padding-right: 0; font-size: 3rem; }
  .sc-block-num::after { display: none; }
  .sc-block-head-right .sc-block-desc { margin-left: 0; }
  .code-body { font-size: 0.7rem; padding: 1rem 0.8rem; }
  .code-body .ln { width: 18px; margin-right: 8px; }
  .ann { flex: 1 1 100%; }
  .sc-photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 220px);
    grid-template-areas: "p1" "p2" "p3";
  }
  .sc-tool-photo { height: 240px; }
  .sc-photo-cap { font-size: 1.05rem; }
  .sc-strip { grid-template-columns: 1fr; }
  .sc-strip-card:nth-child(even) { transform: translateY(0); }
  .sc-strip-card { height: 320px; }
  .sc-compare { height: 300px; }
  .sc-compare-title { font-size: 1.35rem; }
  .sc-compare-handle { width: 36px; height: 36px; }
  .sc-skin-card { width: 300px; height: 290px; }
  .sc-skin-card-meta h4 { font-size: 1.15rem; }
  .sc-skin-card-meta p { font-size: 0.82rem; }
  .sc-marquee-left .sc-marquee-track,
  .sc-marquee-right .sc-marquee-track { animation-duration: 40s; }
  .sc-skin-grid { grid-template-columns: 1fr; }
  .sc-stats { grid-template-columns: 1fr 1fr; padding: 1.2rem; }
  .sc-stat-num { font-size: 2rem; }
}

/* Gallery / experience */
.experience {
  background: linear-gradient(180deg, var(--cx-black) 0%, rgba(25,1,0,0.4) 50%, var(--cx-black) 100%);
}
.experience-header {
  text-align: center;
  margin-bottom: 4rem;
}
.experience-header .section-desc { margin: 0 auto; }
.experience-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.exp-card {
  position: relative;
  height: 350px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(168,2,1,0.1);
  cursor: default;
  transition: all 0.5s ease;
}
.exp-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: background 0.5s ease;
}
.exp-card:nth-child(1)::before {
  background: linear-gradient(135deg, rgba(168,2,1,0.3) 0%, rgba(15,0,0,0.95) 70%);
}
.exp-card:nth-child(2)::before {
  background: linear-gradient(225deg, rgba(94,2,0,0.3) 0%, rgba(15,0,0,0.95) 70%);
}
.exp-card:nth-child(3)::before {
  background: linear-gradient(45deg, rgba(78,1,0,0.3) 0%, rgba(15,0,0,0.95) 70%);
}
.exp-card:nth-child(4)::before {
  background: linear-gradient(315deg, rgba(89,2,0,0.3) 0%, rgba(15,0,0,0.95) 70%);
}
.exp-card:hover {
  transform: scale(1.02);
  border-color: rgba(168,2,1,0.3);
  box-shadow: 0 0 60px rgba(168,2,1,0.1);
}
.exp-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem;
  z-index: 2;
}
.exp-card-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cx-red);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.exp-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.exp-card-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

/* Experience build sequence */
.experience[data-build] .experience-header > .section-label,
.experience[data-build] .experience-header > .section-title,
.experience[data-build] .experience-header > .section-desc,
.experience[data-build] .exp-card {
  opacity: 0;
  transform: translateY(28px);
}
.experience[data-build].is-building .experience-header > .section-label { animation: bldUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.15s both; }
.experience[data-build].is-building .experience-header > .section-title { animation: bldUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.3s both; }
.experience[data-build].is-building .experience-header > .section-desc  { animation: bldUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.45s both; }
.experience[data-build].is-building .exp-card                             { animation: bldUp 0.9s cubic-bezier(0.16,1,0.3,1) both; }
.experience[data-build].is-building .exp-card:nth-of-type(1) { animation-delay: 0.7s; }
.experience[data-build].is-building .exp-card:nth-of-type(2) { animation-delay: 0.85s; }
.experience[data-build].is-building .exp-card:nth-of-type(3) { animation-delay: 1.0s; }
.experience[data-build].is-building .exp-card:nth-of-type(4) { animation-delay: 1.15s; }

/* Faction CTA: eigene Fraktion gründen */
.faction-cta {
  position: relative;
  max-width: 1100px;
  margin: 6rem auto 0;
  padding: 4rem 3rem;
  background: linear-gradient(135deg, rgba(168,2,1,0.08) 0%, rgba(15,0,0,0.92) 60%, rgba(8,0,0,0.96) 100%);
  border: 1px solid rgba(168,2,1,0.22);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
.faction-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,2,1,0.7), transparent);
}
.faction-cta-glow {
  position: absolute;
  top: -40%; right: -20%;
  width: 70%; height: 140%;
  background: radial-gradient(circle, rgba(168,2,1,0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.faction-cta-head {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.faction-cta-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0.8rem 0 1.2rem;
  color: var(--cx-white);
}
.faction-cta-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.62);
  margin: 0;
}
.faction-cta-desc strong {
  color: var(--cx-red);
  font-weight: 700;
}

/* 3 Steps */
.faction-cta-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.faction-step {
  position: relative;
  padding: 2rem 1.6rem;
  background: linear-gradient(135deg, rgba(168,2,1,0.06), rgba(20,3,3,0.7));
  border: 1px solid rgba(168,2,1,0.18);
  border-radius: 14px;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1), border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.faction-step:hover {
  transform: translateY(-6px);
  border-color: var(--cx-red);
  background: linear-gradient(135deg, rgba(168,2,1,0.12), rgba(20,3,3,0.8));
  box-shadow: 0 20px 50px -20px rgba(168,2,1,0.4);
}
.faction-step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem;
  color: var(--cx-red);
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 20px rgba(168,2,1,0.4);
}
.faction-step h4 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  color: var(--cx-white);
}
.faction-step p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
}

/* Perks row */
.faction-cta-perks {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding: 1.4rem 1.5rem;
  margin-bottom: 2.5rem;
  border-top: 1px solid rgba(168,2,1,0.12);
  border-bottom: 1px solid rgba(168,2,1,0.12);
}
.faction-perk {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.72);
  font-weight: 400;
}
.faction-perk-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cx-red);
  box-shadow: 0 0 10px rgba(168,2,1,0.7);
  flex-shrink: 0;
}

/* Action row */
.faction-cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
}
.faction-cta-hint {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  max-width: 360px;
  line-height: 1.55;
  font-style: italic;
}
.faction-cta-hint strong {
  color: var(--cx-white);
  font-style: normal;
  font-weight: 600;
}

/* Faction build sequence */
.faction-cta[data-build] .faction-cta-head > .section-label,
.faction-cta[data-build] .faction-cta-title,
.faction-cta[data-build] .faction-cta-desc,
.faction-cta[data-build] .faction-step,
.faction-cta[data-build] .faction-perk,
.faction-cta[data-build] .faction-cta-actions {
  opacity: 0;
  transform: translateY(24px);
}
.faction-cta[data-build].is-building .faction-cta-head > .section-label { animation: bldUp 0.7s cubic-bezier(0.16,1,0.3,1) 0.15s both; }
.faction-cta[data-build].is-building .faction-cta-title                  { animation: bldUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.3s both; }
.faction-cta[data-build].is-building .faction-cta-desc                   { animation: bldUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.45s both; }

.faction-cta[data-build].is-building .faction-step { animation: bldUp 0.9s cubic-bezier(0.16,1,0.3,1) both; }
.faction-cta[data-build].is-building .faction-step:nth-of-type(1) { animation-delay: 0.75s; }
.faction-cta[data-build].is-building .faction-step:nth-of-type(2) { animation-delay: 0.95s; }
.faction-cta[data-build].is-building .faction-step:nth-of-type(3) { animation-delay: 1.15s; }

.faction-cta[data-build].is-building .faction-perk { animation: bldUp 0.6s cubic-bezier(0.16,1,0.3,1) both; transform: translateY(14px); }
.faction-cta[data-build].is-building .faction-perk:nth-of-type(1) { animation-delay: 1.55s; }
.faction-cta[data-build].is-building .faction-perk:nth-of-type(2) { animation-delay: 1.65s; }
.faction-cta[data-build].is-building .faction-perk:nth-of-type(3) { animation-delay: 1.75s; }
.faction-cta[data-build].is-building .faction-perk:nth-of-type(4) { animation-delay: 1.85s; }

.faction-cta[data-build].is-building .faction-cta-actions { animation: bldUp 0.8s cubic-bezier(0.16,1,0.3,1) 2.05s both; }

/* Mobile */
@media (max-width: 1024px) {
  .faction-cta { padding: 3rem 2rem; margin-top: 5rem; }
  .faction-cta-steps { grid-template-columns: 1fr; gap: 1rem; }
  .faction-step { padding: 1.5rem 1.4rem; }
}
@media (max-width: 640px) {
  .faction-cta { padding: 2.5rem 1.4rem; border-radius: 16px; margin-top: 4rem; }
  .faction-cta-head { margin-bottom: 2rem; }
  .faction-cta-perks { gap: 0.7rem 1.2rem; padding: 1rem; margin-bottom: 2rem; }
  .faction-perk { font-size: 0.82rem; }
  .faction-cta-actions { flex-direction: column; gap: 1.2rem; }
  .faction-cta-hint { text-align: center; max-width: 100%; }
}

/* Animated background elements */
.bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Community / CTA */
.community {
  position: relative;
  text-align: center;
  overflow: hidden;
  padding: 10rem 4rem;
}
.community::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(168,2,1,0.1) 0%, transparent 70%);
}
.community-content {
  position: relative;
  z-index: 2;
}
.community .section-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
}
.community .section-desc {
  max-width: 600px;
  margin: 0 auto 3rem;
}
.community .btn-primary {
  font-size: 1.1rem;
  padding: 1.2rem 3rem;
}

/* Animated lines */
.anim-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.anim-line {
  position: absolute;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(168,2,1,0.1), transparent);
  animation: lineMove 8s ease-in-out infinite;
}
.anim-line:nth-child(1) { left: 10%; animation-delay: 0s; }
.anim-line:nth-child(2) { left: 25%; animation-delay: 2s; }
.anim-line:nth-child(3) { left: 50%; animation-delay: 4s; }
.anim-line:nth-child(4) { left: 75%; animation-delay: 1s; }
.anim-line:nth-child(5) { left: 90%; animation-delay: 3s; }
@keyframes lineMove {
  0%, 100% { opacity: 0; transform: scaleY(0); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Community-CTA: buttons and hint */
.community-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}
.community-actions .btn-primary,
.community-actions .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.community-hint {
  margin-top: 1.4rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.02em;
  font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
  nav { padding: 1.2rem 2rem; }
}
@media (max-width: 540px) {
  .community-actions { flex-direction: column; align-items: stretch; }
  .community-actions .btn-primary,
  .community-actions .btn-outline { justify-content: center; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 1.5rem; }
  .experience-cards { grid-template-columns: 1fr; gap: 1.2rem; }
  .stats-bar { flex-direction: column; align-items: stretch; }
  .stat-item { max-width: none; border-right: none; border-bottom: 1px solid rgba(168,2,1,0.1); padding: 1.5rem 1rem; }
  .stat-item:last-child { border-bottom: none; }
  .stat-number { font-size: 2.2rem; }
  .nav-links { display: none; }
  nav { padding: 1rem 1.2rem; }
  nav.scrolled { padding: 0.8rem 1.2rem; }
  .nav-logo { font-size: 1.4rem; }
  footer { flex-direction: column; padding: 2.5rem 1.5rem; gap: 2rem; }
  .footer-bottom { padding: 1.5rem; }
  .hero-ring { width: 300px; height: 300px; }
  .hero-content { padding: 0 1.2rem; }
  .hero-title { font-size: clamp(1.8rem, 8vw, 3.2rem); }
  .hero-sub { font-size: clamp(1rem, 4vw, 1.4rem); margin: 1rem auto 1.5rem; }
  .hero-desc { font-size: 0.98rem; max-width: 92%; margin: 0 auto 2rem; }
  .hero-actions { flex-direction: column; align-items: center; gap: 0.8rem; }
  .btn-primary, .btn-outline { width: 100%; max-width: 280px; justify-content: center; }
  .hero-scroll { bottom: 1.5rem; }
  .exp-card { height: 260px; }
  .exp-card-title { font-size: 1.25rem; }
  .community { padding: 6rem 1.5rem; }
  .community .section-title { font-size: clamp(2rem, 6vw, 3rem); }
  .community .btn-primary { width: auto; max-width: none; padding: 1rem 2.5rem; font-size: 1rem; }
  .section-title { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  .section-desc { font-size: 0.9rem; }
  .features-header .section-desc { max-width: 90%; }
  .experience-header .section-desc { max-width: 90%; }
  .line-2::before, .line-2::after { font-size: clamp(1.8rem, 8vw, 3.2rem); }
  .hero-grid-pulses { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.4rem, 7vw, 2.2rem); }
  .line-2::before, .line-2::after { font-size: clamp(1.4rem, 7vw, 2.2rem); }
  .hero-ring { width: 220px; height: 220px; }
  .stat-number { font-size: 1.8rem; }
  .section { padding: 3rem 1rem; }
  .exp-card { height: 220px; }
  .exp-card-content { padding: 1.5rem; }
  .community { padding: 5rem 1rem; }
  nav { padding: 0.8rem 1rem; }
  .nav-logo { font-size: 1.2rem; }
  footer { padding: 2rem 1rem; }
}

/* Mobile optimizations: comprehensive polish for ≤768px */

@media (max-width: 768px) {
  /* global */
  body { -webkit-text-size-adjust: 100%; }

  /* hero */
  .hero { min-height: 92vh; padding-top: 4rem; }
  .hero-grid { background-size: 30px 30px; }
  .hero-actions { padding: 0 1rem; }

  /* section paddings */
  .section { padding: 4rem 1.2rem; }
  .features-header { margin-bottom: 2.5rem; padding: 0 1rem; }

  /* feature stack: shorter scroll, tighter layout on mobile */
  .feat-stack-scene {
    /* Each card transition takes ~70vh of scroll on mobile (instead of 100vh) */
    height: calc((var(--card-count) + 0.4) * 70vh);
  }
  .feat-stack-pin {
    perspective: 1600px;
  }

  /* showcase: tighter padding */
  .showcase { padding: 4rem 0 5rem; }
  .sc-intro { margin-bottom: 3rem; padding: 0 1.2rem; }

  /* code window: drop 3D rotation, allow horizontal scroll */
  .code-window { transform: none !important; }
  .code-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.7rem;
    padding: 1rem 0.9rem;
  }
  .code-body .ln { width: 18px; margin-right: 8px; font-size: 0.6rem; }
  .cw-tabs { gap: 0.2rem; margin-left: 0.6rem; }
  .cw-tab { font-size: 0.65rem; padding: 0.25rem 0.5rem; }
  .cw-path { display: none; }
  .code-body .hl-1, .code-body .hl-2, .code-body .hl-3, .code-body .hl-4 {
    width: calc(100% + 1.8rem); margin-left: -0.9rem; padding-left: 0.9rem;
  }

  /* compare slider: bigger handle for touch targets */
  .sc-compare-handle { width: 48px; height: 48px; }
  .sc-compare-label { font-size: 0.62rem; padding: 0.3rem 0.6rem; }

  /* build HUD: hidden on small screens */
  .sc-build-hud { display: none; }

  /* stats: scaled down */
  .sc-stats { padding: 1.4rem 1rem; gap: 1rem; }
  .sc-stat-num { font-size: 2rem; }
  .sc-stat-num i { font-size: 0.85rem; }
  .sc-stat-lbl { font-size: 0.62rem; }

  /* annotations: tighter on mobile */
  .ann { padding: 0.7rem 0.85rem; }
  .ann-title { font-size: 0.8rem; }
  .ann-text { font-size: 0.72rem; }

  /* photo grid: reduced heights */
  .sc-photo-meta { left: 1rem; right: 1rem; bottom: 1rem; gap: 0.3rem; }
  .sc-photo-cap { font-size: 1rem; }
  .sc-photo-sub { font-size: 0.75rem; }

  /* stat-bar and community CTA */
  .community-content { padding: 0 1rem; }

}

@media (max-width: 480px) {
  /* even tighter on small phones */
  .section { padding: 3rem 1rem; }
  .feat-stack-deck { width: 94vw; height: min(540px, 78vh); }
  .feat-stack-hud { top: 6vh; }
  .feat-card-body { padding: 1.2rem 1.1rem; }
  .feat-card-num { font-size: 2.4rem; }
  .feat-card-title { font-size: 1.35rem; }
  .feat-card-text { font-size: 0.82rem; }

  /* Code annotations stack as single column on phones */
  .ann { flex: 1 1 100%; }

  /* Stats: 2-column on phones */
  .sc-stats { grid-template-columns: 1fr 1fr; }

  /* Compare slider smaller */
  .sc-compare { height: 260px; }
  .sc-compare-title { font-size: 1.2rem; }
  .sc-compare-desc { font-size: 0.85rem; }

  /* Marquee cards more compact */
  .sc-skin-card { width: 270px; height: 260px; }
  .sc-skin-card-meta h4 { font-size: 1.05rem; }
  .sc-skin-card-meta p { font-size: 0.78rem; }

  /* Block num smaller */
  .sc-block-num { font-size: 2.6rem; padding: 0; }

  /* Community CTA */
  .community .btn-primary { padding: 0.9rem 2rem; font-size: 0.95rem; }
}
