/* ============================================================
   yvan.thecreator — "Señal Corrupta"
   shared design tokens + base + components
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Fondos */
  --bg-primary: #0A0C0A;
  --bg-secondary: #131614;
  --bg-tertiary: #1A1E1C;

  /* Textos */
  --text-primary: #E4E8E0;
  --text-secondary: #9DA69D;
  --text-muted: #5F6B5F;

  /* Acentos — defaults (overridable by Tweaks) */
  --accent: #7FFF8E;
  --accent-dim: #4A9954;
  --accent-red: #FF3B5C;
  --accent-amber: #FFB84D;

  /* Bordes */
  --border-subtle: rgba(228, 232, 224, 0.08);
  --border-hover: color-mix(in oklab, var(--accent) 30%, transparent);

  /* Tipografía */
  --font-display: 'Syne', 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Layout */
  --maxw: 1440px;
  --gutter: clamp(20px, 5vw, 80px);
  --section-pad-y: clamp(96px, 14vw, 180px);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 240ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: #000; }

/* ---------- Scrollbar ---------- */
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Cursor (terminal reticle) ---------- */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, [role="button"], input, textarea, select, label { cursor: none; }
  .cursor {
    position: fixed; top: 0; left: 0; width: 20px; height: 20px;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 160ms var(--ease), height 160ms var(--ease), opacity 160ms var(--ease);
  }
  .cursor::before, .cursor::after {
    content: ""; position: absolute; background: var(--accent);
  }
  .cursor::before { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
  .cursor::after { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
  .cursor.is-hover { width: 36px; height: 36px; }
  .cursor.is-hover::before, .cursor.is-hover::after { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

  /* HUD coords readout attached to the cursor */
  .cursor-hud {
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 9999;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--accent);
    text-shadow: 0 0 6px rgba(127,255,142,0.35);
    white-space: nowrap;
    padding: 3px 6px;
    background: rgba(10,12,10,0.55);
    border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
    transform: translate(18px, 18px);
    opacity: 0;
    transition: opacity 200ms var(--ease);
    mix-blend-mode: normal;
  }
  .cursor-hud.is-on { opacity: 0.9; }
  .cursor-hud .sep { color: var(--accent-dim); margin: 0 4px; }
  .cursor-hud .tag { color: var(--accent); margin-left: 6px; }
}
@media (hover: none) { .cursor { display: none; } }

/* ---------- Typography ---------- */
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.display { font-family: var(--font-display); font-weight: 700; line-height: 0.92; letter-spacing: -0.02em; }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-dim);
  text-transform: lowercase;
}

.comment { color: var(--accent-dim); font-family: var(--font-mono); font-size: 13px; }
.comment::before { content: "// "; }

.bracket-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 3px 8px;
  border: 1px solid var(--border-hover);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
  display: inline-block;
}

/* ---------- Container ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg-primary) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0;
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  position: relative;
}
.nav-brand::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--accent); margin-right: 10px; vertical-align: 1px; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.nav-links {
  display: flex; gap: 36px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--dur) var(--ease);
  position: relative;
}
.nav-links a.is-ip { color: var(--accent-dim); }
.nav-links a:hover, .nav-links a.is-active { color: var(--accent); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px;
  height: 1px; background: var(--accent);
  transition: right var(--dur) var(--ease);
}
.nav-links a:hover::after { right: 0; }

@media (max-width: 640px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 10px; letter-spacing: 0.1em; }
}

/* ---------- Konami terminal ---------- */
.kterm {
  position: fixed; z-index: 10001;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, 90vw);
  max-height: 70vh;
  background: rgba(8,10,8,0.96);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  box-shadow: 0 0 0 1px rgba(127,255,142,0.08), 0 30px 80px rgba(0,0,0,0.6), 0 0 40px rgba(127,255,142,0.15);
  font-family: var(--font-mono);
  color: var(--accent);
  display: flex; flex-direction: column;
  opacity: 0;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.kterm.is-on { opacity: 1; }
.kterm-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-dim);
  text-transform: uppercase;
}
.kterm-head .close { color: var(--accent-dim); cursor: pointer; }
.kterm-head .close:hover { color: var(--accent); }
.kterm-body {
  padding: 14px 16px 16px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
}
.kterm-body .line { white-space: pre-wrap; }
.kterm-body .dim { color: var(--accent-dim); }
.kterm-body .mut { color: var(--text-muted); }
.kterm-body .prompt::before { content: "$ "; color: var(--accent-dim); }
.kterm-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 14px;
  border-top: 1px solid color-mix(in oklab, var(--accent) 15%, transparent);
}
.kterm-input-row .ps { color: var(--accent-dim); font-size: 13px; }
.kterm-input {
  flex: 1;
  background: transparent; border: none; outline: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  caret-color: var(--accent);
}

/* ---------- Code rain (matrix-style background) ---------- */
.code-rain {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.code-rain canvas {
  display: block;
  width: 100%;
  height: 100%;
}
/* Section variants — some only show on sides, some full */
.code-rain--side {
  left: auto;
  right: 0;
  width: min(520px, 42%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
}
.code-rain--left {
  right: auto;
  left: 0;
  width: min(520px, 42%);
  mask-image: linear-gradient(270deg, transparent 0%, #000 40%);
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 40%);
}
/* Horizontal scrolling variant — fades on left/right edges instead of top/bottom */
.code-rain--x {
  opacity: 0.42;
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
@media (prefers-reduced-motion: reduce) {
  .code-rain { display: none; }
}

/* Ensure content sits above rain */
.section--has-rain { position: relative; }
.section--has-rain > .wrap { position: relative; z-index: 1; }

/* ---------- Global random glitch (screen tear) ---------- */
.glitch-tear {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none;
  opacity: 0;
}
.glitch-tear.is-on {
  opacity: 1;
  background:
    linear-gradient(rgba(255,59,92,0.08), rgba(127,255,142,0.08));
  animation: tear-shake 90ms steps(3) 1;
}
.glitch-tear.is-on::before,
.glitch-tear.is-on::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 8px;
  background:
    repeating-linear-gradient(90deg,
      rgba(127,255,142,0.35) 0 2px,
      transparent 2px 5px);
  mix-blend-mode: screen;
}
.glitch-tear.is-on::before { top: 32%; transform: translateX(4px); }
.glitch-tear.is-on::after  { top: 61%; transform: translateX(-6px); background:
  repeating-linear-gradient(90deg, rgba(255,59,92,0.4) 0 2px, transparent 2px 5px); }
@keyframes tear-shake {
  0%   { transform: translateX(0); }
  33%  { transform: translateX(-3px); }
  66%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .glitch-tear { display: none; }
}

/* ---------- Boot sequence overlay ---------- */
.boot {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  pointer-events: all;
  transition: opacity 420ms var(--ease);
}
.boot.is-out { opacity: 0; pointer-events: none; }
.boot-inner {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--accent);
  letter-spacing: 0.03em;
  width: min(560px, 82vw);
  padding: 24px 28px;
  text-shadow: 0 0 8px rgba(127,255,142,0.15);
}
.boot-inner .dim { color: var(--accent-dim); }
.boot-inner .mut { color: var(--text-muted); }
.boot-inner .ok { color: var(--accent); }
.boot-inner .err { color: var(--accent-red); }
.boot-line {
  opacity: 0;
  transform: translateX(-6px);
  animation: boot-in 120ms var(--ease) forwards;
  white-space: pre;
}
@keyframes boot-in {
  to { opacity: 1; transform: translateX(0); }
}
.boot-cursor {
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 4px;
  animation: boot-blink 0.9s steps(2) infinite;
}
@keyframes boot-blink { 50% { opacity: 0; } }
.boot-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(127,255,142,0.04) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
  mix-blend-mode: screen;
}
@media (prefers-reduced-motion: reduce) {
  .boot { display: none; }
}

/* ---------- Section header (numbered) ---------- */
.section-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 64px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.section-head .num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  margin: 0;
  letter-spacing: -0.01em;
  flex: 1;
}
.section-head .sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-dim);
  letter-spacing: 0.04em;
}
.section-head .sub::before { content: "// "; }
@media (max-width: 640px) {
  .section-head { flex-wrap: wrap; gap: 8px 20px; }
  .section-head .sub { flex-basis: 100%; }
}

.section { padding: var(--section-pad-y) 0; position: relative; }
.section--alt { background: var(--bg-secondary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 18px 28px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.btn:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 0 1px var(--accent), 0 0 32px color-mix(in oklab, var(--accent) 40%, transparent);
  animation: btn-glitch 220ms steps(3, end);
}
@keyframes btn-glitch {
  0% { transform: translate(0, 0); }
  30% { transform: translate(-1px, 1px); }
  60% { transform: translate(2px, -1px); }
  100% { transform: translate(0, 0); }
}
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost {
  border-color: var(--border-subtle);
  color: var(--text-primary);
}
.btn--ghost:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
  animation: none;
}

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 10px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: lowercase;
  text-shadow: 0 0 6px color-mix(in oklab, var(--accent) 55%, transparent);
}
.field label::before { content: "> "; color: var(--accent); }
.field input, .field textarea, .field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 2px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-shadow: 0 0 6px color-mix(in oklab, var(--accent) 55%, transparent);
  caret-color: var(--accent);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  outline: none;
}
.field input::placeholder, .field textarea::placeholder {
  color: color-mix(in oklab, var(--accent) 38%, transparent);
  text-shadow: none;
  font-style: italic;
}
.field textarea { min-height: 110px; resize: vertical; font-family: var(--font-mono); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent), 0 8px 24px -12px color-mix(in oklab, var(--accent) 55%, transparent);
}
.field select { appearance: none; padding-right: 24px; background-image: linear-gradient(45deg, transparent 50%, var(--accent-dim) 50%), linear-gradient(135deg, var(--accent-dim) 50%, transparent 50%); background-position: calc(100% - 12px) center, calc(100% - 7px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--bg-secondary); color: var(--text-primary); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
}
.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
}
.footer-brand .name {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}
.footer-brand .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.8;
}
.footer-brand .meta::before { content: "// "; color: var(--accent-dim); }
.footer-socials { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-socials a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
}
.footer-socials a:hover { color: var(--accent); }
.footer-socials a::before { content: "· "; color: var(--accent-dim); }
.footer-socials a:first-child::before { content: ""; }

/* Live log strip (appended to footer by JS) */
.live-log {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 10px;
  min-height: 18px;
  overflow: hidden;
  white-space: nowrap;
}
.live-log .lbl {
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  flex-shrink: 0;
}
.live-log .lbl::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  margin-right: 8px; vertical-align: 1px;
  animation: pulse 1.4s ease-in-out infinite;
}
.live-log .log-track {
  display: flex; gap: 22px;
  flex: 1; overflow: hidden;
}
.live-log .evt {
  opacity: 0;
  animation: evt-in 260ms var(--ease) forwards;
}
.live-log .evt .ts { color: var(--accent-dim); margin-right: 6px; }
.live-log .evt .k { color: var(--text-secondary); }
@keyframes evt-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  color: var(--text-primary);
  min-width: 280px;
  display: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.tweaks.is-open { display: block; }
.tweaks-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.tweaks-head .t { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.tweaks-head .t::before { content: "// "; color: var(--accent-dim); }
.tweaks-head .close { color: var(--text-muted); font-size: 14px; padding: 4px 8px; }
.tweaks-head .close:hover { color: var(--accent); }
.tweaks-body { padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.tweaks-body h4 { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; }
.tweaks-group { display: flex; flex-direction: column; gap: 6px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px;
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: transform var(--dur) var(--ease);
}
.swatch[data-active="true"] { border-color: var(--text-primary); }
.swatch[data-active="true"]::after {
  content: ""; position: absolute; inset: -3px; border: 1px solid currentColor;
}
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pill[data-active="true"] { color: var(--accent); border-color: var(--accent); }
.pill:hover { color: var(--accent); }

/* ---------- Scanlines (optional overlay) ---------- */
.scanlines {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 50;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,0.015) 3px,
    rgba(255,255,255,0.015) 4px
  );
  opacity: 0;
  transition: opacity 300ms var(--ease);
  mix-blend-mode: overlay;
}
body[data-scanlines="on"] .scanlines { opacity: 1; }

/* ---------- Utility: link-mono (inline mono link) ---------- */
.link-mono {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: color var(--dur) var(--ease);
}
.link-mono:hover { color: var(--accent); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE — móvil (<= 760px)
   Pasada global sobre elementos compartidos
   Reducción general de tamaños para que nada se corte.
   ============================================================ */
@media (max-width: 760px) {
  :root {
    --section-pad-y: 56px;
  }

  /* Contenedor más apretado */
  .wrap { padding-left: 18px; padding-right: 18px; }

  /* Nav — cabida sin scroll horizontal */
  .nav-inner { padding: 12px 0; flex-wrap: wrap; gap: 8px; }
  .nav-brand { font-size: 11px; letter-spacing: 0.02em; }
  .nav-brand::before { width: 5px; height: 5px; margin-right: 7px; }
  .nav-links { gap: 12px; flex-wrap: wrap; }
  .nav-links a { font-size: 9px; letter-spacing: 0.06em; }

  /* Tipografías gigantes bajan */
  h1, h2 { line-height: 1.05; }
  h2 { font-size: clamp(22px, 6.5vw, 34px) !important; letter-spacing: -0.02em; }

  /* Secciones */
  .section { padding: 56px 0; }
  .section-head { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 22px; padding-bottom: 14px; }
  .section-head .num { font-size: 11px; }
  .section-head h2 { font-size: clamp(24px, 7vw, 34px); letter-spacing: -0.02em; }
  .section-head .sub { flex-basis: 100%; font-size: 10px; }

  /* Hero (home) */
  .hero { min-height: auto; padding: 28px 0 48px; }
  .hero-inner { padding: 28px 0 48px; }
  .hero-system { font-size: 9px; margin-bottom: 16px; letter-spacing: 0.06em; }
  .hero h1.display { font-size: clamp(24px, 7.2vw, 44px) !important; max-width: 100%; margin-bottom: 14px; letter-spacing: -0.03em; }
  .hero-tagline { font-size: 12px; margin-bottom: 22px; max-width: 100%; letter-spacing: 0.01em; }
  .hero-sub { font-size: 14px !important; margin-bottom: 28px; }
  .hero-ip-link { font-size: 10px; line-height: 1.5; }
  .hero-ip-link .comment { font-size: 10px; }
  .hero-ip-link a { font-size: 10px; }
  .hero-foot { gap: 8px; }
  .hero-portrait { opacity: 0.12; width: 110vw; right: -20%; }
  .hero-meta { flex-wrap: wrap; gap: 10px 16px; font-size: 9px; bottom: 14px; }

  /* Logos / clientes */
  .logos-section { padding: 44px 0 52px; }
  .logos-label { font-size: 9px; margin-bottom: 20px; letter-spacing: 0.1em; }
  .logos-minor-label { font-size: 9px; margin-bottom: 18px; }
  .logos-row, .logos-featured, .logos-minor {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px 16px !important;
  }
  .logos-featured { margin-bottom: 44px; padding-bottom: 40px; }
  .logo-feat { min-height: 78px; gap: 6px; }
  .logo-feat img { max-height: 40px; }
  .logo-feat .ft-name { font-size: 15px; letter-spacing: -0.01em; }
  .logo-feat .ft-sub { font-size: 8px; letter-spacing: 0.1em; }
  .logo-mini { height: 66px; }
  .logo-mini img { max-height: 44px; }
  .logo-mini .txt { font-size: 13px; }

  /* Services */
  .services-intro { margin-bottom: 28px; }
  .services-intro .lead { font-size: clamp(18px, 5.2vw, 24px) !important; }
  .services-intro .sub-lead { font-size: clamp(14px, 4vw, 18px) !important; }
  .services-grid { gap: 16px !important; }
  .service-card { padding: 22px 20px 24px; min-height: unset; gap: 14px; }
  .service-card h3 { font-size: clamp(22px, 6.5vw, 30px) !important; }
  .service-card .duration { font-size: 11px; }
  .service-card p { font-size: 13px; line-height: 1.5; }
  .service-card .arrow-pos { font-size: 11px; }
  .service-card--wide h3 { font-size: clamp(18px, 5.5vw, 24px) !important; }
  .bracket-tag { font-size: 9px; padding: 2px 6px; letter-spacing: 0.08em; }
  .services-cta { margin-top: 44px; gap: 16px; }
  .services-cta .sep { font-size: 8px; letter-spacing: 0.2em; }
  .services-cta .dossier { font-size: 10px; }

  /* Process */
  .process-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .process-item { padding-top: 18px; }
  .process-item .num { font-size: 11px; margin-bottom: 10px; }
  .process-item h3 { font-size: clamp(22px, 7vw, 32px) !important; margin-bottom: 12px; }
  .process-item p { font-size: 13px; line-height: 1.55; }

  /* Portfolio / proyectos */
  .portfolio-list { gap: 64px !important; }
  .proj, .proj.reverse {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .proj-meta { font-size: 11px; line-height: 1.8; }
  .proj-meta .row .k { width: 58px; }
  .proj-meta h3 { font-size: clamp(24px, 8vw, 40px) !important; margin-bottom: 12px; }
  .proj-meta .desc { font-size: 11px; line-height: 1.55; margin-bottom: 16px; }
  .proj-meta .cta { font-size: 11px; }
  .proj-visual.is-vertical { max-width: 280px; }

  /* Authority bar */
  .auth { margin-top: 60px; padding-top: 28px; }
  .auth-head { font-size: 10px; margin-bottom: 24px; }
  .auth-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 14px !important; padding-bottom: 24px; }
  .auth-cell .num { font-size: clamp(30px, 9vw, 52px) !important; }
  .auth-cell .label { font-size: 9px; margin-top: 8px; letter-spacing: 0.06em; }
  .auth-foot { font-size: 10px; margin-top: 16px; }

  /* IP transition (Yvan y Lolo teaser) */
  .ip-trans { padding: 64px 0; }
  .ip-trans h2 { font-size: clamp(38px, 12vw, 68px) !important; margin-bottom: 18px; }
  .ip-trans p { font-size: 14px !important; margin-bottom: 28px; }
  .ip-trans .section-head h2 { font-size: 15px !important; letter-spacing: 0.04em; }
  .ip-trans .section-head { margin-bottom: 14px !important; }

  /* Contact on home */
  .contact-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .contact-left h3 { font-size: clamp(28px, 8vw, 44px) !important; margin-bottom: 16px; }
  .contact-left p { font-size: 14px; margin-bottom: 16px; }
  .contact-left .direct { font-size: 11px; margin-top: 20px; }
  .contact-form { gap: 18px; }
  .field label { font-size: 10px; }
  .field input, .field textarea, .field select { font-size: 13px; }

  /* Botones */
  .btn { font-size: 11px; padding: 14px 20px; letter-spacing: 0.1em; gap: 8px; }

  /* Footer */
  .footer { padding: 36px 0 24px; }
  .footer-grid { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-brand .name { font-size: 13px; }
  .footer-brand .meta { font-size: 9px; }
  .footer-socials { gap: 12px; flex-wrap: wrap; }
  .footer-socials a { font-size: 9px; letter-spacing: 0.1em; }

  /* Live log oculto en móvil (ruido innecesario con poco ancho) */
  .live-log { display: none; }

  /* Boot sequence más compacto */
  .boot { font-size: 10px; }
  .boot-inner { font-size: 11px; padding: 18px 20px; }
}

/* ============================================================
   RESPONSIVE — móvil pequeño (<= 420px)
   ============================================================ */
@media (max-width: 420px) {
  .wrap { padding-left: 14px; padding-right: 14px; }
  .nav-brand { font-size: 10px; }
  .nav-links { gap: 8px; }
  .nav-links a { font-size: 8px; letter-spacing: 0.04em; }

  .hero h1.display { font-size: clamp(22px, 7.5vw, 36px) !important; letter-spacing: -0.035em; }
  .hero-tagline { font-size: 11px; }
  .hero-sub { font-size: 13px !important; }

  h2 { font-size: clamp(20px, 7vw, 30px) !important; }
  .section-head h2 { font-size: clamp(20px, 7vw, 30px); }

  .service-card h3 { font-size: clamp(20px, 7vw, 26px) !important; }
  .process-item h3 { font-size: clamp(20px, 7.5vw, 28px) !important; }
  .proj-meta h3 { font-size: clamp(22px, 8.5vw, 34px) !important; }
  .ip-trans h2 { font-size: clamp(32px, 12vw, 56px) !important; }
  .contact-left h3 { font-size: clamp(24px, 8vw, 36px) !important; }
  .auth-cell .num { font-size: clamp(26px, 9vw, 42px) !important; }

  .btn { font-size: 10px; padding: 12px 16px; }
}
