/* ==========================================================================
   AITCHBOT STUDIOS — design tokens + stylesheet
   Ref: docs/brand-guidelines.md
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@500;600;700;800&family=Allerta+Stencil&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* color */
  --graphite: #15171A;
  --graphite-deep: #0B0C0D;
  --steel: #454C53;
  --steel-light: #8A929A;
  --bone: #EDE7D9;
  --red: #C4402E;
  --yellow: #F0B429;
  --blue: #2FD8E8;
  --green: #3FA34D;

  --line: rgba(237, 231, 217, 0.14);
  --line-strong: rgba(237, 231, 217, 0.26);
  --blue-line: rgba(47, 216, 232, 0.22);

  /* type */
  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-stencil: 'Allerta Stencil', monospace;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', monospace;

  /* scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;

  --radius: 2px;
  --max-w: 1240px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 300ms;
}

/* alt style: industrial base + Ghostbusters-inspired palette (cream/khaki, black, red, slime-glow) */
:root[data-theme="ghostbusters"] {
  --graphite: #1B1812;
  --graphite-deep: #100E0A;
  --steel: #5A5240;
  --steel-light: #A89B7A;
  --bone: #F0E6C8;
  --red: #C41E2A;
  --yellow: #F0B429;
  --blue: #6FCF4A;
  --green: #6FCF4A;

  --line: rgba(240, 230, 200, 0.14);
  --line-strong: rgba(240, 230, 200, 0.26);
  --blue-line: rgba(111, 207, 74, 0.22);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--graphite);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--blue); color: var(--graphite-deep); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* background texture: fine technical grid + vignette */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- eyebrow / labels ---- */
.eyebrow {
  font-family: var(--font-stencil);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 0 8px 1px var(--blue);
}
.eyebrow.muted { color: var(--steel-light); }
.eyebrow.muted::before { background: var(--steel-light); box-shadow: none; }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--steel-light);
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--bone);
}
.btn-primary:hover { background: #d94b37; border-color: #d94b37; transform: translateY(-1px); }
.btn-ghost {
  color: var(--bone);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 23, 26, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: 88px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 64px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.01em;
}
.brand .dot { color: var(--blue); }
.brand .accent-bot { color: var(--red); }
.brand small {
  display: block;
  font-family: var(--font-stencil);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--steel-light);
  font-weight: 400;
  margin-top: 2px;
  line-height: 1;
}
.brand-mark { width: 54px; height: 54px; flex-shrink: 0; object-fit: contain; }

.main-nav ul {
  display: flex;
  gap: 32px;
}
.main-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-light);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--dur) var(--ease);
}
.main-nav a:hover { color: var(--bone); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.main-nav a:hover::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav-cta .btn { padding: 10px 18px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 1px; background: var(--bone);
  position: relative; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: 56px 0 var(--space-xl);
  overflow: clip;
}
.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: var(--space-md); }
.hero-title {
  font-size: clamp(48px, 6.4vw, 92px);
  line-height: 0.94;
  text-transform: uppercase;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: block; transform: translateY(110%); }
.hero-title .accent { color: var(--blue); }

.hero-sub {
  margin-top: var(--space-md);
  max-width: 46ch;
  font-size: 18px;
  color: var(--steel-light);
}
.hero-sub strong { color: var(--bone); font-weight: 600; }

.hero-actions {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-specs {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}
.hero-specs div { display: flex; flex-direction: column; gap: 4px; }
.hero-specs .num { font-family: var(--font-display); font-size: 30px; color: var(--bone); }
.hero-specs .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel-light); }

/* robot schematic panel */
.hero-visual {
  position: relative;
  aspect-ratio: 3/4;
  border: 1px solid var(--line-strong);
  background: var(--graphite-deep);
  overflow: hidden;
}
.hero-visual img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  z-index: 0;
}
.hero-visual::before {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(var(--blue-line) 1px, transparent 1px) 0 0/100% 24px,
    linear-gradient(90deg, var(--blue-line) 1px, transparent 1px) 0 0/24px 100%;
  mix-blend-mode: screen;
  opacity: 0.55;
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,12,13,0.65) 0%, rgba(11,12,13,0) 26%, rgba(11,12,13,0) 62%, rgba(11,12,13,0.85) 100%);
}

/* blueprint variant: cropped to the droid figure itself (center of the sketch),
   so the side dimension callouts don't fight the layout next to the hero copy.
   Ratio matches the hero copy's natural height so both columns line up. */
.hero-visual.is-blueprint {
  aspect-ratio: 920/1104;
  width: 100%;
}
.hero-visual.is-blueprint img { object-fit: cover; object-position: center; }
.hero-visual.is-blueprint::before,
.hero-visual.is-blueprint::after { display: none; }

/* wide establishing-shot variant (foto de taller — usada en 404.shtml) */
.hero-visual.is-wide { aspect-ratio: 2816/1536; }
.hero-visual .corner {
  position: absolute; width: 14px; height: 14px; z-index: 2;
  border: 1px solid var(--blue);
}
.hero-visual .corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hero-visual .corner.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.hero-visual .corner.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.hero-visual .corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.hero-visual .schematic-label {
  position: absolute; top: var(--space-md); left: var(--space-md); z-index: 2;
  font-family: var(--font-mono); font-size: 11px; color: var(--steel-light);
  letter-spacing: 0.05em;
}
.hero-visual .schematic-label .id { color: var(--blue); }

.hero-visual .caption {
  position: absolute; bottom: var(--space-md); left: var(--space-md); right: var(--space-md); z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: var(--font-mono); font-size: 11px; color: var(--steel-light);
}

/* ---- hero dashboard: consola de estado del archivo ---- */
.hero-dashboard {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) 52px;
  background:
    linear-gradient(var(--blue-line) 1px, transparent 1px) 0 0/100% 24px,
    linear-gradient(90deg, var(--blue-line) 1px, transparent 1px) 0 0/24px 100%;
  background-color: var(--graphite-deep);
}
.hero-dashboard::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-line), transparent);
  animation: dash-scan 7s linear infinite;
  pointer-events: none;
}
@keyframes dash-scan {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateY(640px); opacity: 0; }
}
.dash-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em;
  color: var(--steel-light);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.dash-head .id { color: var(--blue); }
.dash-head-status { margin-left: auto; color: var(--green); }
.dash-led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px 1px var(--green);
  animation: dash-led-pulse 2.2s ease-in-out infinite;
}
@keyframes dash-led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.dash-main { display: flex; flex-direction: column; }
.dash-big {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(56px, 6vw, 84px); line-height: 1; color: var(--bone);
}
.dash-big-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--steel-light); margin-top: 6px;
}
.dash-gauges { display: flex; flex-direction: column; gap: 12px; }
.dash-gauge-head {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--steel-light); margin-bottom: 5px;
}
.dash-bar {
  height: 8px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}
.dash-bar-fill {
  display: block; height: 100%; width: 0;
  transition: width 900ms var(--ease);
}
.dash-bar-fill.is-done { background: var(--green); box-shadow: 0 0 10px -2px var(--green); }
.dash-bar-fill.is-dev { background: var(--yellow); box-shadow: 0 0 10px -2px var(--yellow); }
.dash-wave {
  width: 100%; height: 26px; color: var(--blue);
  opacity: 0.75;
  stroke-dasharray: 6 3;
  animation: dash-wave-move 1.4s linear infinite;
}
@keyframes dash-wave-move {
  to { stroke-dashoffset: -18; }
}
.dash-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.dash-cell {
  background: var(--graphite-deep); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.dash-cell-num { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--bone); line-height: 1; }
.dash-cell-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel-light); }
.dash-latest { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line); padding-top: 10px; }
.dash-latest-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel-light); }
.dash-latest-row { display: flex; align-items: center; gap: 10px; }
.dash-latest-code { font-family: var(--font-mono); font-size: 14px; color: var(--blue); }
.dash-latest-status {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em;
  padding: 2px 7px; border: 1px solid; text-transform: uppercase;
}
.dash-latest-status.is-done { border-color: var(--green); color: var(--green); }
.dash-latest-status.is-dev { border-color: var(--yellow); color: var(--yellow); }
.dash-latest-title {
  font-size: 14px; color: var(--bone);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-log {
  font-family: var(--font-mono); font-size: 11px; color: var(--steel-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-log-prompt { color: var(--red); }
.dash-cursor {
  display: inline-block; width: 7px; height: 12px; margin-left: 4px;
  background: var(--blue); vertical-align: middle;
  animation: dash-cursor-blink 1s steps(1) infinite;
}
@keyframes dash-cursor-blink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dashboard::after, .dash-led, .dash-wave, .dash-cursor { animation: none; }
  .dash-bar-fill { transition: none; }
}

/* boot overlay */
.boot-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: var(--graphite-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); color: var(--blue); font-size: 14px;
  letter-spacing: 0.05em;
  transition: opacity 500ms var(--ease), visibility 500ms;
}
.boot-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-overlay .boot-line { white-space: nowrap; border-right: 2px solid var(--blue); padding-right: 4px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .boot-overlay { display: none; }
}

/* ==========================================================================
   TICKER
   ========================================================================== */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--graphite-deep);
  overflow: hidden;
  padding: var(--space-sm) 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: scroll-left 32s linear infinite;
}
.ticker-track span {
  font-family: var(--font-stencil);
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-light);
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.ticker-track span em { color: var(--blue); font-style: normal; }
.ticker-track span::after { content: "//"; color: var(--red); margin-left: var(--space-md); }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; overflow-x: auto; }
}

/* ==========================================================================
   SECTION shared
   ========================================================================== */
section { position: relative; z-index: 2; padding: var(--space-xl) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-md);
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 52px);
  text-transform: uppercase;
  line-height: 1;
}
.section-head p { max-width: 40ch; color: var(--steel-light); font-size: 15px; }
.section-num {
  font-family: var(--font-mono); font-size: 13px; color: var(--steel-light);
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   MANIFESTO
   ========================================================================== */
.manifesto {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}
.manifesto-traits li {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--bone);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.manifesto-traits li::before { content: "+"; color: var(--red); font-weight: 600; font-size: 18px; }
.manifesto-statement {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  text-transform: uppercase;
}
.manifesto-statement em {
  font-style: normal;
  color: var(--blue);
}

/* ==========================================================================
   DIVISIONS
   ========================================================================== */
.divisions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.division-card {
  background: var(--graphite);
  padding: var(--space-md);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: background var(--dur) var(--ease);
}
.division-card:hover { background: #1b1e22; }
.division-card .div-id { font-family: var(--font-mono); font-size: 12px; color: var(--blue); }
.division-card h3 { font-size: 21px; text-transform: uppercase; margin-top: var(--space-sm); line-height: 1.05; }
.division-card p { font-size: 13px; color: var(--steel-light); margin-top: 6px; line-height: 1.4; }

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.process-step { font-family: var(--font-mono); font-size: 13px; color: var(--steel-light); }
.process-item h3 { font-size: 24px; text-transform: uppercase; color: var(--bone); }
.process-item p { color: var(--steel-light); font-size: 15px; max-width: 52ch; }

/* ==========================================================================
   ARCHIVE / PROJECT CARDS
   ========================================================================== */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.project-card {
  border: 1px solid var(--line-strong);
  background: var(--graphite-deep);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 200ms var(--ease);
}
.project-card:hover { border-color: var(--blue); }
.project-thumb {
  aspect-ratio: 4/3;
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(var(--blue-line) 1px, transparent 1px) 0 0/20px 20px,
    linear-gradient(90deg, var(--blue-line) 1px, transparent 1px) 0 0/20px 20px,
    #0e0f11;
  display: flex; align-items: center; justify-content: center;
}
.project-thumb svg { width: 62%; opacity: 0.9; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 350ms var(--ease); }
.project-thumb .thumb-placeholder {
  font-family: var(--font-display); font-size: 32px; letter-spacing: 0.02em;
  color: var(--steel); text-transform: uppercase;
}
.thumb-video {
  position: absolute;
  bottom: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(11,12,13,0.7);
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--bone);
  font-size: 12px;
  text-decoration: none;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}
.thumb-video:hover { background: var(--red); transform: scale(1.08); }
.thumb-dots {
  position: absolute;
  bottom: 10px; left: 10px;
  display: flex; gap: 5px;
}
.thumb-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(237,231,217,0.35);
  transition: background 200ms var(--ease);
}
.thumb-dot.active { background: var(--bone); }
button.thumb-dot {
  width: 16px; height: 16px;
  padding: 5px;
  background-clip: content-box;
  border-radius: 50%;
  cursor: pointer;
}
button.thumb-dot:hover { background-color: rgba(237,231,217,0.6); }
button.thumb-dot.active:hover { background-color: var(--bone); }

.modal-photo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(11,12,13,0.7);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.modal-photo-arrow svg { width: 18px; height: 18px; }
.modal-photo-arrow:hover { border-color: var(--blue); color: var(--blue); }
.modal-photo-arrow.prev { left: var(--space-sm); }
.modal-photo-arrow.next { right: var(--space-sm); }
.project-body { padding: var(--space-md); }
.project-code { font-family: var(--font-mono); font-size: 12px; color: var(--steel-light); display: flex; justify-content: space-between; gap: var(--space-sm); }
.project-body h3 { font-size: 22px; text-transform: uppercase; margin-top: 10px; }
.project-desc { font-size: 13px; color: var(--steel-light); margin-top: 8px; line-height: 1.5; }
.project-meta { display: flex; gap: var(--space-md); margin-top: var(--space-sm); font-family: var(--font-mono); font-size: 11px; color: var(--steel-light); }
.archive-loading {
  grid-column: 1 / -1; text-align: center; padding: var(--space-xl) 0;
  font-family: var(--font-mono); font-size: 14px; color: var(--steel-light);
}

.stamp {
  position: absolute;
  top: var(--space-md); right: var(--space-md);
  border: 2px solid var(--red);
  color: var(--red);
  font-family: var(--font-stencil);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  transform: rotate(8deg) scale(0.85);
  opacity: 0;
  transition: transform 480ms var(--ease), opacity 480ms var(--ease);
  background: rgba(11,12,13,0.55);
}
.project-card.in .stamp { opacity: 1; transform: rotate(8deg) scale(1); }
.stamp.status-done { border-color: var(--green); color: var(--green); }
.stamp.status-dev { border-color: var(--yellow); color: var(--yellow); }
.stamp.status-soon { border-color: var(--red); color: var(--red); }

.project-card-empty {
  border-style: dashed;
  background: transparent;
  cursor: default;
}
.project-card-empty .project-thumb { background: transparent; border-bottom-style: dashed; }
.thumb-placeholder-empty {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--steel);
  opacity: 0.5;
}
.project-card-empty h3 { color: var(--steel-light); }
.btn-card-cta { margin-top: var(--space-sm); padding: 10px 16px; font-size: 12px; }

.archive-carousel {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.archive-carousel .archive-grid { flex: 1; min-width: 0; }
.archive-arrow {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--graphite-deep);
  color: var(--bone);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease);
}
.archive-arrow svg { width: 22px; height: 22px; }
.archive-arrow:hover { border-color: var(--blue); color: var(--blue); transform: scale(1.06); }
.archive-arrow[hidden] { display: none; }

/* ---- project detail modal ---- */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease);
}
.project-modal.open { opacity: 1; pointer-events: auto; }
.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11,12,13,0.82);
}
.project-modal-panel {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--graphite-deep);
  border: 1px solid var(--line-strong);
  transform: translateY(16px) scale(0.98);
  transition: transform 300ms var(--ease);
}
.project-modal.open .project-modal-panel { transform: translateY(0) scale(1); }
.project-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(11,12,13,0.75);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 200ms var(--ease);
}
.project-modal-close:hover { background: var(--red); }
.project-modal-visual { position: relative; }
.project-modal-media { aspect-ratio: 16/10; }
.video-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-toggle {
  position: absolute;
  bottom: var(--space-md); right: var(--space-md);
  z-index: 3;
  padding: 8px 14px;
  background: rgba(11,12,13,0.78);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease);
}
.video-toggle:hover { border-color: var(--red); color: var(--red); }
.project-modal-visual .stamp {
  opacity: 1;
  top: var(--space-md); right: var(--space-md);
}
.project-modal-body { padding: var(--space-lg); }
.project-modal-body h3 { font-size: clamp(24px, 3.4vw, 34px); }
.project-modal-body .project-meta { flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); font-size: 12px; }

/* ==========================================================================
   QUIÉNES SOMOS
   ========================================================================== */
.about-container { text-align: left; }
.about-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xl);
}
.engineer-text .about-head h2 { margin-bottom: 0; }
.about-head .about-tagline {
  color: var(--red);
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  align-self: center;
  max-width: 150px;
  margin-bottom: 0;
}
.about-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-lg);
}
.about-copy { min-width: 0; }
.about-body .about-badge {
  /* cuadrado completo (sin recorte), centrado en su columna, escala con el viewport */
  width: clamp(260px, 34vw, 360px);
  max-width: 100%;
  height: auto;
  justify-self: center;
  align-self: center;
  border: 1px solid var(--line);
}
.engineer-text h2 { font-size: clamp(30px, 3.6vw, 46px); text-transform: uppercase; line-height: 1.05; margin-bottom: var(--space-md); }
.engineer-text p { color: var(--steel-light); max-width: 56ch; margin-bottom: var(--space-md); font-size: 16px; }
.engineer-sig { margin-top: var(--space-lg); font-family: var(--font-stencil); font-size: 22px; color: var(--bone); }
.engineer-sig small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--steel-light); margin-top: 6px; letter-spacing: 0.05em; }

/* ==========================================================================
   UNBOXING
   ========================================================================== */
.unboxing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}
.unbox-item { text-align: left; }
.unbox-item .icon { width: 40px; height: 40px; color: var(--blue); margin-bottom: var(--space-sm); }
.unbox-item h4 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.unbox-item p { font-size: 13px; color: var(--steel-light); }

/* ==========================================================================
   CTA / CONTACT
   ========================================================================== */
.cta-section {
  border-top: 1px solid var(--line);
  background: var(--graphite-deep);
}
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.cta-copy h2 { font-size: clamp(32px, 4.2vw, 56px); text-transform: uppercase; line-height: 1; margin-bottom: var(--space-md); }
.cta-copy p { color: var(--steel-light); max-width: 44ch; margin-bottom: var(--space-lg); font-size: 16px; }
.cta-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.cta-list li { font-family: var(--font-mono); font-size: 13px; color: var(--steel-light); display: flex; gap: 10px; }
.cta-list li::before { content: "▸"; color: var(--blue); }

.form-field { margin-bottom: var(--space-md); }
.form-field label {
  display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--steel-light); margin-bottom: 8px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; background: var(--graphite);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  padding: 13px 14px;
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--blue);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-note { font-family: var(--font-mono); font-size: 12px; color: var(--steel-light); margin-top: var(--space-sm); }
.form-success {
  display: none; margin-top: var(--space-md); padding: var(--space-md);
  border: 1px solid var(--blue); font-family: var(--font-mono); font-size: 13px; color: var(--blue);
}
.form-success.visible { display: block; }
.form-success.error { border-color: var(--red); color: var(--red); }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-xl) 0 var(--space-md);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr 0.6fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
}
.footer-brand .brand { margin-bottom: var(--space-sm); }
.footer-brand p { color: var(--steel-light); font-size: 14px; max-width: 34ch; }
.footer-col h5 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--steel-light); margin-bottom: var(--space-sm);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--bone); transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--space-md); border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--steel-light);
  flex-wrap: wrap; gap: var(--space-sm);
}
.footer-seal { display: flex; align-items: center; gap: 10px; }
.footer-seal-mark { width: 36px; height: 36px; object-fit: contain; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; }
  .hero-visual.is-blueprint { max-width: 380px; margin: 0 auto; }
  .hero-visual.is-dashboard { max-width: 440px; aspect-ratio: auto; }
  .hero-visual.is-dashboard .hero-dashboard { position: relative; inset: auto; }
  .divisions-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-grid { grid-template-columns: 1fr; }
  .unboxing-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* header nav collapses earlier than content breakpoints: brand + 5 links + 2 CTAs
   run out of room around ~1150px, well above the 720px content breakpoint.
   The header CTA is dropped entirely (not just the ghost one) because the
   drawer (.mobile-nav) already repeats "Iniciar Proyecto" — keeping both
   crowded the header enough to push the hamburger icon off-screen on
   narrow phones (~375px and under). */
@media (max-width: 1180px) {
  .main-nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
  .brand { margin-right: var(--space-lg); }
}

@media (max-width: 720px) {
  .manifesto-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .divisions-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .process-item { grid-template-columns: 1fr; gap: var(--space-xs); }
  .unboxing-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-specs { flex-wrap: wrap; gap: var(--space-md); }
  section { padding: var(--space-xl) 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .about-head { flex-direction: column; align-items: flex-start; }
  .about-head .about-tagline { white-space: normal; margin-top: var(--space-sm); }
  .about-body { display: flex; flex-direction: column-reverse; }
  .about-body .about-badge { width: min(100%, 280px); align-self: center; }
  .archive-carousel { flex-wrap: wrap; justify-content: center; }
  .archive-carousel .archive-grid { order: 1; flex-basis: 100%; }
  .archive-arrow-prev { order: 2; }
  .archive-arrow-next { order: 3; }
}

/* ==========================================================================
   THEME TOGGLE
   ========================================================================== */
.theme-toggle {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(21, 23, 26, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-light);
  backdrop-filter: blur(8px);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.theme-toggle:hover { border-color: var(--blue); color: var(--bone); }
.theme-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.theme-toggle .swatch {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
  box-shadow: 4px 0 0 var(--blue);
}

/* mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed; inset: 88px 0 0 0; z-index: 40;
  background: var(--graphite-deep);
  padding: var(--space-lg) var(--space-md);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
}
.mobile-nav.open { transform: translateX(0); }
@media (max-width: 1180px) {
  .mobile-nav { display: block; }
}
.mobile-nav ul { display: flex; flex-direction: column; gap: var(--space-md); }
.mobile-nav a { font-family: var(--font-display); font-size: 28px; text-transform: uppercase; }
.mobile-nav .btn { margin-top: var(--space-lg); }

/* ============================== SEO / subpáginas ============================== */

/* texto solo para lectores de pantalla y crawlers (keyword accesible del H1) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* las tarjetas de división ahora son enlaces a su página */
a.division-card { display: block; text-decoration: none; color: inherit; }
a.division-card h3 { color: var(--bone); }

/* enlace al expediente completo dentro de las tarjetas del archivo */
.project-page-link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}
.project-page-link:hover { text-decoration: underline; }
.project-body h3 a { color: inherit; text-decoration: none; }
.project-body h3 a:hover { color: var(--blue); }

/* FAQ */
.faq-list { max-width: 880px; }
.faq-item {
  border: 1px solid var(--line);
  background: var(--graphite-deep);
  margin-bottom: 10px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 16px var(--space-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--blue);
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-q {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.faq-item > p {
  padding: 0 var(--space-md) var(--space-md);
  font-size: 14px;
  line-height: 1.6;
  color: var(--steel-light);
  max-width: 72ch;
}
.faq-item:hover { border-color: var(--line-strong); }

/* páginas interiores (divisiones y expedientes) */
.subpage { padding: var(--space-2xl) 0; }
.subpage .breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-bottom: var(--space-lg);
}
.subpage .breadcrumb a { color: var(--steel-light); }
.subpage .breadcrumb a:hover { color: var(--blue); }
.subpage h1 {
  font-size: clamp(34px, 5vw, 56px);
  text-transform: uppercase;
  line-height: 1.02;
  max-width: 20ch;
}
.subpage .subpage-intro {
  margin-top: var(--space-md);
  color: var(--steel-light);
  font-size: 16px;
  line-height: 1.65;
  max-width: 62ch;
}
.subpage-body {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.subpage-body p { color: var(--steel-light); font-size: 15px; line-height: 1.65; margin-bottom: var(--space-sm); }
.subpage-panel {
  border: 1px solid var(--line-strong);
  background: var(--graphite-deep);
  padding: var(--space-lg);
}
.subpage-panel h2 { font-size: 20px; text-transform: uppercase; margin-bottom: var(--space-sm); }
.subpage-panel ul { list-style: none; }
.subpage-panel li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--bone);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.subpage-panel li::before { content: "› "; color: var(--blue); }
.subpage-cta { margin-top: var(--space-lg); display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.expediente-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.expediente-photos img {
  width: 100%;
  border: 1px solid var(--line-strong);
  display: block;
}
.expediente-video { margin-top: var(--space-lg); aspect-ratio: 16/9; }
.expediente-video iframe { width: 100%; height: 100%; border: 1px solid var(--line-strong); }
@media (max-width: 860px) {
  .subpage { padding: var(--space-xl) 0; }
  .subpage-body { grid-template-columns: 1fr; }
}
