/* ============================================================
   ASHWA RACING — IT SUBSYSTEM PAGE
   Barlow Condensed (display) + Barlow (body) + JetBrains Mono (code)
   Dark-all-the-way: Three.js sphere lives behind the hero,
   sections sit on --charcoal / --black alternating surfaces.
   ============================================================ */

/* ─── Tokens ────────────────────────────────────────────────── */
:root {
  --red:        #e8001d;
  --red-dark:   #b5001a;
  --black:      #000000;
  --charcoal:   #0e0e0e;
  --dark-grey:  #181818;
  --mid-grey:   #252525;
  --white:      #ffffff;
  --muted:      rgba(255,255,255,0.38);
  --dim:        rgba(255,255,255,0.12);

  /* code colours — Ashwa-branded dark theme */
  --c-kw:   #e8001d;   /* keywords */
  --c-type: #7ecfff;   /* types */
  --c-str:  #a8e6a0;   /* strings */
  --c-prop: #c8c8ff;   /* properties */
  --c-fn:   #ffd580;   /* functions */
  --c-var:  #ffffff;   /* variables */
  --c-op:   rgba(255,255,255,0.5); /* operators */

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --ease-expo:    cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
}

/* ─── Reveal ─────────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition:
    opacity  0.55s var(--ease-expo) var(--delay, 0s),
    transform 0.55s var(--ease-expo) var(--delay, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   THREE.JS CANVAS
   Fixed, full-screen, z-index -1 so it sits behind the hero
   but the hero section itself is transparent — canvas shows through.
═══════════════════════════════════════════════════════════════ */
#it-hero-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
.it-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
  padding: 120px 7% 80px;
  /* transparent — Three.js canvas shows through */
  background: transparent;
  z-index: 1;
}

/* Subtle grid overlay on hero */
.it-hero-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* Red vertical stripe — right side */
.it-hero-stripe {
  position: absolute; top: 0; right: 8%; z-index: 1;
  width: 3px; height: 100%;
  background: var(--red);
  pointer-events: none;
}
.it-hero-stripe::before {
  content: '';
  position: absolute; top: 0; left: -14px;
  width: 1px; height: 100%;
  background: var(--red); opacity: 0.25;
}

/* ─── Left: terminal ─────────────────────────────────────────── */
.it-hero-left {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: flex-start;
}

.terminal {
  width: 100%; max-width: 480px;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
  animation: terminalFadeIn 0.8s var(--ease-expo) 0.4s both;
}

@keyframes terminalFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.tb-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.tb-close { background: #ff5f57; }
.tb-min   { background: #febc2e; }
.tb-max   { background: #28c840; }

.tb-title {
  font-family: var(--font-mono);
  font-size: 0.72rem; color: rgba(255,255,255,0.3);
  margin-left: 8px; letter-spacing: 0.04em;
}

.terminal-body {
  padding: 20px 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem; line-height: 1.8;
  min-height: 220px;
  color: rgba(255,255,255,0.75);
}

/* Terminal line types */
.tl-prompt { color: var(--red); }
.tl-cmd    { color: rgba(255,255,255,0.85); }
.tl-out    { color: rgba(255,255,255,0.45); padding-left: 4px; }
.tl-green  { color: #4ade80; }
.tl-blue   { color: #7ecfff; }
.tl-yellow { color: #ffd580; }
.tl-blank  { display: block; height: 6px; }

/* Cursor blink */
.cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--red);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ─── Right: hero text ───────────────────────────────────────── */
.it-hero-right {
  position: relative; z-index: 2;
  padding-left: 6%;
  animation: heroTextIn 0.8s var(--ease-expo) 0.2s both;
}
@keyframes heroTextIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: none; }
}

.it-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red);
  padding: 6px 14px;
  border: 1px solid rgba(232,0,29,0.25);
  background: rgba(232,0,29,0.07);
  border-radius: 2px;
  margin-bottom: 24px;
}
.it-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  animation: pulse 1.4s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(232,0,29,0.6);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,0,29,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(232,0,29,0); }
}

.it-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  font-weight: 800; line-height: 0.87;
  letter-spacing: -0.02em; text-transform: uppercase;
  color: var(--white); margin-bottom: 20px;
}
.it-hero-title em { font-style: italic; color: var(--red); display: block; }

.it-hero-desc {
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  line-height: 1.75; color: var(--muted);
  font-weight: 300; max-width: 400px;
  margin-bottom: 36px;
}

/* Stats row */
.it-hero-stats {
  display: flex; align-items: center; gap: 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.its { display: flex; flex-direction: column; padding-right: 32px; }
.its-n {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 800;
  color: var(--white); line-height: 1;
  letter-spacing: -0.02em;
}
.its-l {
  font-family: var(--font-display);
  font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-top: 5px;
}
.its-sep {
  width: 1px; height: 36px;
  background: rgba(255,255,255,0.1);
  margin-right: 32px; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS — shared
═══════════════════════════════════════════════════════════════ */
.it-section {
  position: relative; z-index: 2;
}
.it-section-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 96px 7%;
}

/* Alternating backgrounds */
.it-about    { background: var(--charcoal); }
.it-domains  { background: var(--black); }
.it-roadmap  { background: var(--charcoal); }

/* Section label */
.it-section-label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red); margin-bottom: 36px;
}
.sec-num { color: var(--red); font-weight: 800; }
.sec-dash { display: block; width: 22px; height: 2px; background: var(--red); flex-shrink: 0; }

/* Section heading */
.it-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800; line-height: 0.9;
  letter-spacing: -0.01em; text-transform: uppercase;
  color: var(--white); margin-bottom: 32px;
}
.it-heading em { font-style: italic; color: var(--red); display: block; }

/* ═══════════════════════════════════════════════════════════════
   ABOUT — split layout
═══════════════════════════════════════════════════════════════ */
.it-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.it-lead {
  font-size: 1.05rem; line-height: 1.75;
  color: rgba(255,255,255,0.75); font-weight: 400;
  margin-bottom: 20px;
}
.it-about-text p {
  font-size: 0.9rem; line-height: 1.8;
  color: rgba(255,255,255,0.45); font-weight: 300;
  margin-bottom: 14px;
}
.it-about-text strong { color: var(--red); font-weight: 600; }

/* Code block */
.code-block {
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-lang {
  font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red);
}
.code-file {
  font-family: var(--font-mono);
  font-size: 0.65rem; color: rgba(255,255,255,0.25);
}

.code-body {
  padding: 20px 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem; line-height: 1.75;
  white-space: pre; overflow-x: auto;
}

/* Syntax colours */
.c-kw   { color: var(--c-kw);   font-weight: 500; }
.c-type { color: var(--c-type); }
.c-str  { color: var(--c-str);  }
.c-prop { color: var(--c-prop); }
.c-fn   { color: var(--c-fn);   }
.c-var  { color: var(--c-var);  }
.c-op   { color: var(--c-op);   }

/* ═══════════════════════════════════════════════════════════════
   DOMAINS GRID
═══════════════════════════════════════════════════════════════ */
.domains-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 48px;
}

.domain-card {
  background: var(--dark-grey);
  padding: 36px 28px;
  position: relative; overflow: hidden;
  border-top: 2px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease-expo);
  cursor: default;
}
.domain-card::before {
  content: '';
  position: absolute; inset: 0; left: -100%;
  background: linear-gradient(90deg, transparent, rgba(232,0,29,0.06), transparent);
  transition: left 0.55s ease;
}
.domain-card:hover::before { left: 100%; }
.domain-card:hover {
  background: #202020;
  border-top-color: var(--red);
  transform: translateY(-5px);
}

.dc-num {
  font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.2); margin-bottom: 16px;
}
.dc-icon {
  font-size: 1.6rem; color: var(--red);
  margin-bottom: 16px;
  transition: transform 0.3s var(--ease-expo);
}
.domain-card:hover .dc-icon { transform: scale(1.15); }

.domain-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--white); margin-bottom: 12px; line-height: 1.2;
}
.domain-card p {
  font-size: 0.8rem; line-height: 1.7;
  color: rgba(255,255,255,0.4); font-weight: 300;
  margin-bottom: 20px;
}

.dc-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.dc-tags span {
  font-family: var(--font-mono);
  font-size: 0.6rem; letter-spacing: 0.08em;
  padding: 3px 8px;
  background: rgba(232,0,29,0.08);
  border: 1px solid rgba(232,0,29,0.18);
  color: rgba(232,0,29,0.8);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   ROADMAP
═══════════════════════════════════════════════════════════════ */
.it-vision-intro {
  font-size: 1rem; line-height: 1.8; font-weight: 300;
  color: rgba(255,255,255,0.45); max-width: 700px;
  padding-left: 20px;
  border-left: 2px solid var(--red);
  margin-bottom: 64px;
}

.roadmap-list {
  display: flex; flex-direction: column; gap: 0;
  position: relative;
}
/* Connector line */
.roadmap-list::before {
  content: '';
  position: absolute;
  left: 88px; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.06);
}

.roadmap-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  align-items: start;
  transition: background 0.2s ease;
}
.roadmap-item:last-child { border-bottom: none; }
.roadmap-item:hover { background: rgba(255,255,255,0.015); }

/* Left column */
.ri-left {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 10px;
  padding-top: 4px;
}

.ri-status {
  font-family: var(--font-display);
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px;
  white-space: nowrap;
}
.ri-active   { background: rgba(232,0,29,0.12); border: 1px solid rgba(232,0,29,0.25); color: var(--red); }
.ri-planned  { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); }
.ri-research { background: rgba(125,219,255,0.08); border: 1px solid rgba(125,219,255,0.2); color: #7ecfff; }

.ri-num {
  font-family: var(--font-mono);
  font-size: 1.8rem; font-weight: 300;
  color: rgba(255,255,255,0.08);
  line-height: 1;
}

/* Right column */
.ri-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--white); margin-bottom: 10px; line-height: 1.1;
}
.ri-content p {
  font-size: 0.87rem; line-height: 1.75;
  color: rgba(255,255,255,0.38); font-weight: 300;
  max-width: 640px; margin-bottom: 18px;
}

/* Progress bar */
.ri-bar {
  height: 3px; width: 100%; max-width: 360px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px; overflow: hidden;
  margin-bottom: 8px;
}
.ri-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--red);
  border-radius: 2px;
  transition: width 1s var(--ease-expo);
}
.ri-bar-fill.animated { width: var(--pct); }

.ri-bar-label {
  font-family: var(--font-mono);
  font-size: 0.65rem; color: rgba(255,255,255,0.25);
  letter-spacing: 0.06em;
}
.ri-pct { color: var(--red); }

/* ─── Accessibility ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .ri-bar-fill { width: var(--pct) !important; }
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .domains-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .it-hero { grid-template-columns: 1fr; min-height: auto; padding: 100px 6% 60px; gap: 48px; }
  .it-hero-right { padding-left: 0; }
  .it-about-grid { grid-template-columns: 1fr; gap: 40px; }
  .terminal { max-width: 100%; }
}

@media (max-width: 640px) {
  .it-section-inner { padding: 64px 5%; }
  .domains-grid { grid-template-columns: 1fr; }
  .roadmap-list::before { display: none; }
  .roadmap-item { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .ri-left { flex-direction: row; align-items: center; }
  .ri-num { font-size: 1.2rem; }
  .it-hero { padding: 90px 5% 52px; }
}