/* ==========================================================================
   base.css · tokens, tipografía, componentes y shell compartidos
   ========================================================================== */

@font-face {
  font-family: 'Big Shoulders Display';
  src: url('../assets/fonts/display.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('../assets/fonts/barlow-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('../assets/fonts/barlow-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('../assets/fonts/barlow-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  src: url('../assets/fonts/barlow-sc-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  src: url('../assets/fonts/barlow-sc-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Martian Mono';
  src: url('../assets/fonts/mono.woff2') format('woff2');
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --ink: #060607;
  --ink-1: #0b0b0d;
  --ink-2: #111114;
  --ink-3: #19191d;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --line-3: rgba(255, 255, 255, 0.28);

  --fg: #f3f2ef;
  --fg-2: #c8c7c3;
  --mute: #8d8c88;
  --dim: #5b5a57;

  --red: #ff2238;
  --red-hot: #ff5363;
  --red-deep: #8f0b19;
  --red-glow: rgba(255, 34, 56, 0.5);
  --red-soft: rgba(255, 34, 56, 0.12);

  --f-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --f-sans: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-semi: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --f-mono: 'Martian Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap: cubic-bezier(0.2, 0.9, 0.1, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1360px;
  --nav-h: 68px;
  --radius: 4px;

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--red); color: #fff; }

[tabindex='-1']:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 12px;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- tipografía ---------- */

.display {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.h1 { font-size: clamp(56px, 10vw, 168px); }
.h2 { font-size: clamp(44px, 7.4vw, 120px); }
.h3 { font-size: clamp(30px, 3.6vw, 52px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.eyebrow::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
}

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 56ch;
}

.red { color: var(--red); }
.muted { color: var(--mute); }

/* ---------- botones ---------- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-line: var(--line-2);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--btn-line);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s, transform 0.15s var(--ease-out);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary { --btn-bg: var(--fg); --btn-fg: var(--ink); --btn-line: var(--fg); }
.btn-primary::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 14px var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.btn-ghost:hover { --btn-line: var(--line-3); }
.btn-red { --btn-bg: var(--red); --btn-fg: #fff; --btn-line: var(--red); }
.btn-danger { --btn-fg: var(--red-hot); --btn-line: rgba(255, 34, 56, 0.35); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 11px; }
.btn-block { width: 100%; }

@media (hover: hover) {
  .btn-primary:hover::after { transform: scaleX(1); }
  .btn-red:hover { box-shadow: 0 0 28px var(--red-glow); }
  .btn-danger:hover { --btn-bg: var(--red-soft); }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color 0.2s;
}
.link-arrow svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out); }
.link-arrow:hover { color: var(--fg); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- formularios ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label,
.label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.field .hint { color: var(--dim); text-transform: none; letter-spacing: 0; }

.input,
.field input[type='text'],
.field input[type='number'],
.field textarea,
.field select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--fg);
  font-size: 15px;
  transition: border-color 0.2s, background-color 0.2s;
}
.field textarea, textarea.input { min-height: 120px; resize: vertical; line-height: 1.55; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--fg-2);
  background: rgba(255, 255, 255, 0.04);
}

.toggle { position: relative; display: inline-flex; flex: none; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle-track {
  width: 42px; height: 24px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  background: var(--ink-3);
  transition: background-color 0.25s, border-color 0.25s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--mute);
  transition: transform 0.3s var(--ease-out), background-color 0.25s;
}
.toggle input:checked + .toggle-track { background: var(--red); border-color: var(--red); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); background: #fff; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--fg); outline-offset: 2px; }

/* ---------- piezas pequeñas ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
}
.tag-red { border-color: rgba(255, 34, 56, 0.45); color: var(--red-hot); }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}
.dot.live {
  background: var(--red);
  box-shadow: 0 0 0 0 var(--red-glow);
  animation: pulse 2s infinite;
}
.dot.on { background: var(--fg); }
.dot.half { background: transparent; border: 1.5px solid var(--fg-2); }
.dot.stop { background: var(--red); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--red-glow); }
  70% { box-shadow: 0 0 0 9px rgba(255, 34, 56, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 34, 56, 0); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--fg-2);
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.pending { color: var(--fg); }
.pill.in_review { color: var(--fg-2); }
.pill.in_progress { color: var(--red-hot); border-color: rgba(255, 34, 56, 0.4); }
.pill.waiting_client { color: var(--fg); border-style: dashed; }
.pill.completed { color: var(--mute); }
.pill.cancelled { color: var(--dim); text-decoration: line-through; }

.stars { display: inline-flex; gap: 3px; color: var(--fg); }
.stars svg { width: 13px; height: 13px; fill: currentColor; }
.stars .off { color: var(--ink-3); }

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-3) 50%, var(--ink-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty {
  padding: 36px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--mute);
  font-size: 14px;
  text-align: center;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 11, 13, 0.82);
}

/* ---------- fondo: canvas nocturno + grano ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: var(--ink);
  pointer-events: none;
}
.bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 55%;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1.6s var(--ease-out);
  will-change: transform;
}
.bg.loaded img { opacity: 1; }
.bg-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(6, 6, 7, 0.35), rgba(6, 6, 7, 0.95)),
    var(--ink);
  transition: opacity 1s var(--ease-out);
}
.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 6, 7, 0.55) 0%, transparent 18%, transparent 70%, rgba(6, 6, 7, 0.7) 100%);
}
#night {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- cursor: mira ---------- */

.has-crosshair, .has-crosshair a, .has-crosshair button, .has-crosshair label, .has-crosshair [role='button'] { cursor: none; }
.has-crosshair input, .has-crosshair textarea, .has-crosshair select { cursor: auto; }
.crosshair {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  width: 0; height: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.crosshair.on { opacity: 1; }
.crosshair i {
  position: absolute;
  background: var(--fg);
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}
.crosshair i:nth-child(1), .crosshair i:nth-child(2) { width: 2px; height: 7px; left: -1px; }
.crosshair i:nth-child(3), .crosshair i:nth-child(4) { height: 2px; width: 7px; top: -1px; }
.crosshair i:nth-child(1) { top: -12px; }
.crosshair i:nth-child(2) { top: 5px; }
.crosshair i:nth-child(3) { left: -12px; }
.crosshair i:nth-child(4) { left: 5px; }
.crosshair b {
  position: absolute;
  top: -2px; left: -2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}
.crosshair.hot i { background: var(--red); }
.crosshair.hot i:nth-child(1) { transform: translateY(-5px); }
.crosshair.hot i:nth-child(2) { transform: translateY(5px); }
.crosshair.hot i:nth-child(3) { transform: translateX(-5px); }
.crosshair.hot i:nth-child(4) { transform: translateX(5px); }
.crosshair.down i:nth-child(1) { transform: translateY(3px); }
.crosshair.down i:nth-child(2) { transform: translateY(-3px); }
.crosshair.down i:nth-child(3) { transform: translateX(3px); }
.crosshair.down i:nth-child(4) { transform: translateX(-3px); }

/* ---------- navegación ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background-color 0.4s, border-color 0.4s, transform 0.5s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 6, 7, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav.hidden { transform: translateY(-100%); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
}
.wordmark i {
  width: 14px;
  height: 4px;
  background: var(--red);
  box-shadow: 0 0 12px var(--red), 0 0 2px var(--red);
}
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 8px 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  transition: color 0.2s;
}
.nav-links a small { color: var(--dim); margin-right: 6px; font-size: 9px; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-links a.active small { color: var(--red); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.menu-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.account-slot { display: flex; align-items: center; min-height: 36px; }
.account-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-height: 36px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: border-color 0.2s, color 0.2s;
}
.account-login svg { width: 15px; height: 15px; }
.account-login:hover { border-color: var(--line-3); color: var(--fg); }

.account { position: relative; }
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  font-size: 13px;
  transition: border-color 0.2s;
}
.account-chip:hover, .account.open .account-chip { border-color: var(--line-3); }
.account-chip img { width: 28px; height: 28px; border-radius: 50%; background: var(--ink-3); }
.account-chip svg { width: 12px; height: 12px; color: var(--mute); transition: transform 0.25s; }
.account.open .account-chip svg { transform: rotate(180deg); }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--ink-1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.25s var(--ease-out), visibility 0.2s;
}
.account.open .account-menu { opacity: 1; visibility: visible; transform: none; }
.account-menu a,
.account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 14px;
  color: var(--fg-2);
  text-align: left;
}
.account-menu a:hover, .account-menu button:hover { background: var(--ink-3); color: var(--fg); }
.account-menu svg { width: 15px; height: 15px; color: var(--mute); }
.account-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  background: rgba(6, 6, 7, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-display);
  font-size: clamp(38px, 11vw, 64px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.4s;
}
.mobile-menu nav a small { font-family: var(--f-mono); font-size: 11px; color: var(--red); font-weight: 400; }
.menu-open .mobile-menu nav a { transform: none; opacity: 1; }
.menu-open .mobile-menu nav a:nth-child(2) { transition-delay: 0.04s; }
.menu-open .mobile-menu nav a:nth-child(3) { transition-delay: 0.08s; }
.menu-open .mobile-menu nav a:nth-child(4) { transition-delay: 0.12s; }
.menu-open .mobile-menu nav a:nth-child(5) { transition-delay: 0.16s; }
.menu-open .mobile-menu nav a:nth-child(6) { transition-delay: 0.2s; }
.mobile-account { display: flex; flex-direction: column; gap: 10px; }
.mobile-account .who { display: flex; align-items: center; gap: 12px; color: var(--fg-2); }
.mobile-account .who img { width: 36px; height: 36px; border-radius: 50%; }
.menu-open { overflow: hidden; }

@media (max-width: 960px) {
  .nav-links, .nav .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-right { margin-left: auto; }
  .nav .account-slot { display: none; }
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
  background: rgba(6, 6, 7, 0.88);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer h4 {
  margin-bottom: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.footer li + li { margin-top: 8px; }
.footer li a { font-size: 14px; color: var(--fg-2); transition: color 0.2s; }
.footer li a:hover { color: var(--fg); }
.footer-brand p { margin-top: 14px; max-width: 34ch; font-size: 14px; color: var(--mute); }
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--dim);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- toasts y diálogo ---------- */

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--red);
  border-radius: var(--radius);
  background: var(--ink-1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.toast.ok { border-left-color: var(--fg); }
.toast.in { opacity: 1; transform: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s;
}
.modal.in { opacity: 1; }
.modal-card {
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--ink-1);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.35s var(--ease-out);
}
.modal.in .modal-card { transform: none; }
.modal-card p { color: var(--fg-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.cookie-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--ink-1);
  font-size: 13px;
  color: var(--fg-2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
.cookie-note.in { opacity: 1; transform: none; }
.cookie-note a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.page-home .cookie-note { bottom: 88px; }

/* ---------- motion: estados base (motion.js) ---------- */

[data-reveal] {
  --d: 0s;
  transition:
    opacity 0.9s var(--ease-out) var(--d),
    transform 1.1s var(--ease-out) var(--d),
    clip-path 1.1s var(--ease-io) var(--d),
    filter 0.9s var(--ease-out) var(--d);
}
html:not(.no-js):not(.reduced-motion) [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(28px); }
html:not(.no-js):not(.reduced-motion) [data-reveal='fade']:not(.is-in) { transform: none; }
html:not(.no-js):not(.reduced-motion) [data-reveal='left']:not(.is-in) { transform: translateX(-40px); }
html:not(.no-js):not(.reduced-motion) [data-reveal='scale']:not(.is-in) { transform: scale(0.94); }
html:not(.no-js):not(.reduced-motion) [data-reveal='blur']:not(.is-in) { transform: translateY(12px); filter: blur(10px); }
html:not(.no-js):not(.reduced-motion) [data-reveal='clip']:not(.is-in) { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); }
[data-reveal='clip'].is-in { clip-path: inset(0 0 0 0); }

.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.16em 0.02em 0.06em; margin: -0.16em -0.02em -0.06em; }
.split-word > span {
  display: inline-block;
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0s) + var(--i) * 0.06s);
}
html:not(.no-js):not(.reduced-motion) [data-split][data-reveal] { opacity: 1; transform: none; }
html:not(.no-js):not(.reduced-motion) [data-split]:not(.is-in) .split-word > span { transform: translateY(105%); }

.fill-word { transition: color 0.35s, text-shadow 0.35s; color: var(--dim); }
.fill-word.lit { color: var(--fg); }
.fill-word.lit.em { color: var(--red); text-shadow: 0 0 22px var(--red-glow); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .grain { animation: none; }
}
