/* ==========================================================================
   Reales: portafolio. Hoja de estilos única.
   Reglas de forma: botones y chips = pill (999px), contenedores = 16px,
   campos de formulario = 12px. Un solo acento (esmeralda), tema oscuro por
   defecto y tema claro opcional ([data-theme="light"]).
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0f0d;
  --bg-2: #0f1613;
  --bg-3: #16201c;
  --line: rgba(230, 237, 234, 0.13);
  --line-strong: rgba(230, 237, 234, 0.28);
  --text: #e6edea;
  --text-2: #a7b5af;
  --accent: #2fcb8f;
  --accent-on: #04110c;
  --accent-text: #2fcb8f;
  --danger: #ff9a90;
  --muted: #7f8f88;
  --contrast-bg: #f4f6f5;
  --contrast-field: #fbfcfb;
  --contrast-text: #0f1412;
  --contrast-text-2: #4a5852;
  --contrast-line: rgba(15, 20, 18, 0.16);
  --contrast-line-strong: rgba(15, 20, 18, 0.36);
  --contrast-accent: #0b7a55;
  --contrast-accent-on: #f4f6f5;
  --contrast-danger: #b3261e;
  --space-section: clamp(56px, 8vw, 96px);
  --scrim: rgba(10, 15, 13, 0.72);
  --shadow: 0 18px 50px rgba(2, 8, 5, 0.45);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-card: 16px;
  --r-field: 12px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;
  --z-nav: 40;
  --z-banner: 60;
  --z-loader: 80;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f5;
  --bg-2: #fbfcfb;
  --bg-3: #e8eeeb;
  --line: rgba(15, 20, 18, 0.14);
  --line-strong: rgba(15, 20, 18, 0.32);
  --text: #0f1412;
  --text-2: #4a5852;
  --accent: #0b7a55;
  --accent-on: #f4f6f5;
  --accent-text: #0b7a55;
  --danger: #b3261e;
  --muted: #5d6b65;
  --contrast-bg: #0a0f0d;
  --contrast-field: #0f1613;
  --contrast-text: #e6edea;
  --contrast-text-2: #a7b5af;
  --contrast-line: rgba(230, 237, 234, 0.16);
  --contrast-line-strong: rgba(230, 237, 234, 0.32);
  --contrast-accent: #2fcb8f;
  --contrast-accent-on: #04110c;
  --contrast-danger: #ff9a90;
  --scrim: rgba(244, 246, 245, 0.8);
  --shadow: 0 18px 50px rgba(15, 20, 18, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.03em; line-height: 1.08; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-on); }

.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;
}
.skip-link {
  position: fixed; left: 16px; top: -64px; z-index: 100; padding: 10px 18px;
  background: var(--accent); color: var(--accent-on); border-radius: var(--r-pill);
  text-decoration: none; font-weight: 500; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: var(--r-pill);
  border: 1px solid transparent; font-weight: 500; font-size: 1rem; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav); height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: var(--scrim);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav.is-solid { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.brand svg { width: auto; height: 30px; }
.brand .node { fill: var(--accent); }
.nav-links { display: none; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-3); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent;
  color: var(--text); cursor: pointer; transition: border-color 0.2s, transform 0.25s var(--ease);
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn:active { transform: scale(0.94); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: inline-flex; }
.nav-cta { display: inline-flex; padding: 0 16px; }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
  .nav-cta { padding: 0 18px; }
}
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: var(--z-nav);
  background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 20px 24px;
  display: none; flex-direction: column; gap: 4px;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a:not(.btn) {
  color: var(--text); text-decoration: none; font-size: 1.25rem; font-weight: 500;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 16px; }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }

/* ---------- Hero con scroll-scrub ---------- */
.hero-track { position: relative; height: 420vh; height: 420svh; }
.hero-stage {
  position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden;
  background: #0a0f0d; color: #e6edea;
}
#heroFrame, #heroVideo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
}
#heroVideo { opacity: 0; transition: opacity 0.3s; }
.hero-stage.surface-video.is-media-ready #heroVideo { opacity: 1; }
.hero-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 15, 13, 0.82) 0%, rgba(10, 15, 13, 0.4) 38%, rgba(10, 15, 13, 0) 56%);
}
.hero-copy, .phase {
  position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none;
}
.hero-copy .wrap, .phase .wrap { position: relative; }
.hero-copy { top: 0; bottom: 0; display: flex; align-items: center; padding-top: var(--nav-h); }
.hero-copy .inner { max-width: 560px; pointer-events: auto; }
.hero-copy h1 {
  font-size: clamp(2.5rem, 4.4vw, 4rem); letter-spacing: -0.04em; line-height: 1.04; color: #e6edea;
}
.hero-copy p { margin-top: 22px; max-width: 46ch; color: #b4c2bc; font-size: 1.125rem; line-height: 1.55; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stage .btn-primary { background: #2fcb8f; color: #04110c; }
.hero-stage .btn-ghost { color: #e6edea; border-color: rgba(230, 237, 234, 0.4); }
.hero-stage .btn-ghost:hover { border-color: #e6edea; }
.hero-copy {
  opacity: clamp(0, calc(1 - (var(--progress, 0) - 0.03) * 9), 1);
  transform: translateY(calc(var(--progress, 0) * -48px));
}
.hero-copy.is-hidden { visibility: hidden; }
.phase { top: 0; bottom: 0; display: flex; align-items: center; padding-top: var(--nav-h); opacity: 0; }
.phase .inner { max-width: 440px; }
.phase h2 { font-size: clamp(1.9rem, 3.2vw, 3rem); letter-spacing: -0.035em; color: #e6edea; }
.phase p { margin-top: 14px; color: #b4c2bc; font-size: 1.0625rem; max-width: 34ch; }
.phase-1 {
  opacity: clamp(0, min(calc((var(--progress, 0) - 0.2) * 22), calc((0.46 - var(--progress, 0)) * 22)), 1);
  transform: translateY(calc((0.33 - var(--progress, 0)) * 60px));
}
.phase-2 {
  opacity: clamp(0, min(calc((var(--progress, 0) - 0.5) * 22), calc((0.72 - var(--progress, 0)) * 22)), 1);
  transform: translateY(calc((0.61 - var(--progress, 0)) * 60px));
}
.phase-3 {
  opacity: clamp(0, calc((var(--progress, 0) - 0.78) * 22), 1);
  transform: translateY(calc((0.89 - var(--progress, 0)) * 60px));
}
.hero-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: transparent;
}
.hero-bar i {
  display: block; height: 100%; width: 100%; background: var(--accent, #2fcb8f);
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}
.hero-stage .hero-bar i { background: #2fcb8f; }

/* carga */
.loader {
  position: fixed; inset: 0; z-index: var(--z-loader); background: #0a0f0d; color: #e6edea;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader svg { width: 56px; height: 56px; }
.loader .pct { font-family: var(--mono); font-size: 0.9375rem; color: #a7b5af; min-width: 4ch; text-align: center; }
html.is-loading { overflow: hidden; }

/* degradaciones: sin JS, movimiento reducido o error de carga */
html.no-js .hero-track, html.scrub-static .hero-track { height: 100vh; height: 100svh; }
html.no-js .phase, html.scrub-static .phase, html.no-js .hero-bar, html.scrub-static .hero-bar { display: none; }
html.no-js .hero-copy, html.scrub-static .hero-copy { opacity: 1; transform: none; }
html.no-js .loader { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-track { height: 100vh; height: 100svh; }
  .phase, .hero-bar { display: none; }
  .hero-copy { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 749px), (max-aspect-ratio: 1/1) {
  .hero-track { height: 460vh; height: 460svh; }
  .hero-stage::after {
    background: linear-gradient(0deg, rgba(10, 15, 13, 0.94) 0%, rgba(10, 15, 13, 0.7) 36%, rgba(10, 15, 13, 0) 62%);
  }
  .hero-copy, .phase { top: auto; bottom: 0; align-items: flex-end; padding: 0 0 calc(32px + (100lvh - 100svh)); }
  .hero-copy .inner { max-width: 100%; }
  .hero-copy h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero-copy p { font-size: 1rem; margin-top: 14px; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .phase { padding-bottom: calc(40px + (100lvh - 100svh)); }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--space-section); }
.section-head { max-width: 62ch; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.035em; }
.section-head p { margin-top: 18px; color: var(--text-2); font-size: 1.125rem; max-width: 56ch; }
.eyebrow {
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 16px; display: block;
}

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* logos de herramientas */
.stack { padding-block: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.stack h2 { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; color: var(--text-2); margin-bottom: 28px; }
.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 16px; align-items: center; }
.logos li { display: flex; justify-content: center; }
.logos svg { height: 42px; width: auto; max-width: 100%; fill: var(--text); opacity: 0.66; transition: opacity 0.25s, transform 0.3s var(--ease); }
.logos li:hover svg { opacity: 1; transform: translateY(-2px); }
@media (min-width: 640px) { .logos { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .logos { grid-template-columns: repeat(6, 1fr); } }

/* cifras de prueba social */
.proof { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); display: grid; gap: 28px; }
.proof strong { display: block; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.proof span { display: block; margin-top: 8px; color: var(--text-2); max-width: 34ch; }
@media (min-width: 760px) { .proof { grid-template-columns: repeat(3, 1fr); gap: 48px; } }

/* preguntas frecuentes */
.faq { margin-top: 48px; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; padding: 16px 0;
  cursor: pointer; list-style: none; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--accent-text); transition: transform 0.3s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; color: var(--text-2); max-width: 66ch; }
.faq details p a { font-weight: 500; }

/* servicios (mosaico asimétrico, 4 celdas) */
.services { display: grid; gap: 16px; margin-top: 56px; grid-template-columns: 1fr; }
.svc {
  position: relative; isolation: isolate; border-radius: var(--r-card); overflow: hidden;
  min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; border: 1px solid var(--line); background: #0a0f0d; color: #e6edea;
}
.svc img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.svc::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(10, 15, 13, 0.78);
}
.svc:hover img { transform: scale(1.05); }
.svc .ico { width: 44px; height: 44px; border-radius: var(--r-pill); display: grid; place-items: center; background: #2fcb8f; color: #04110c; margin-bottom: auto; }
.svc .ico svg { width: 24px; height: 24px; }
.svc h3 { font-size: 1.75rem; letter-spacing: -0.035em; }
.svc p { margin-top: 10px; color: #b9c7c1; max-width: 48ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-family: var(--mono); font-size: 0.8125rem; padding: 5px 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(230, 237, 234, 0.3); color: #e6edea;
}
@media (min-width: 900px) {
  .services { grid-template-columns: repeat(12, 1fr); }
  .svc { min-height: 420px; }
  .svc-1 { grid-column: span 7; }
  .svc-2 { grid-column: span 5; }
  .svc-3 { grid-column: span 5; }
  .svc-4 { grid-column: span 7; }
}

/* chatbots */
.bot { border-top: 1px solid var(--line); }
.band { background: var(--bg-2); border-block: 1px solid var(--line); }
.bot-grid { display: grid; gap: 48px; }
.bot h2 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.035em; max-width: 14ch; }
.bot .lead { margin-top: 20px; color: var(--text-2); font-size: 1.125rem; max-width: 52ch; }
.bot .note { margin-top: 24px; color: var(--text-2); font-size: 0.9375rem; max-width: 56ch; }
.flow { display: grid; gap: 0; }
.flow li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.flow li:last-child { border-bottom: 1px solid var(--line); }
.flow .ico { width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--bg-3); display: grid; place-items: center; color: var(--accent-text); }
.flow .ico svg { width: 22px; height: 22px; }
.flow h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.flow p { margin-top: 6px; color: var(--text-2); }
@media (min-width: 960px) { .bot-grid { grid-template-columns: 5fr 6fr; gap: 96px; align-items: start; } }

/* proyectos con pestañas */
.tabs { margin-top: 48px; }
.tablist { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  min-height: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: transparent; color: var(--text-2); font-weight: 500; cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.tab:hover { color: var(--text); border-color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.tabpanel { margin-top: 28px; display: grid; gap: 16px; }
.tabpanel[hidden] { display: none; }
.proj {
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px; background: var(--bg-2);
  display: flex; flex-direction: column; gap: 12px; transition: border-color 0.3s, transform 0.4s var(--ease);
}
.proj:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.proj h3 { font-size: 1.3125rem; letter-spacing: -0.02em; }
.proj p { color: var(--text-2); }
.proj .chips { margin-top: auto; padding-top: 6px; }
.proj .chip { border-color: var(--line-strong); color: var(--text-2); }
.proj a.ext { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 500; text-decoration: none; }
.proj a.ext:hover { text-decoration: underline; }
@media (min-width: 760px) { .tabpanel { grid-template-columns: repeat(2, 1fr); } }

/* caso destacado (TFM) */
.case { display: grid; gap: 40px; }
.case-media { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); min-height: 320px; background: #0a0f0d; }
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case h2 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.035em; }
.case .lead { margin-top: 20px; color: var(--text-2); font-size: 1.125rem; max-width: 58ch; }
.facts { display: grid; gap: 22px 32px; margin-top: 36px; grid-template-columns: 1fr; }
.facts h3 { font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--text); }
.facts p { margin-top: 6px; color: var(--text-2); font-size: 0.9688rem; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .case { grid-template-columns: 5fr 6fr; gap: 80px; align-items: center; } .case-media { min-height: 560px; height: 100%; } }

/* proceso */
.process { margin-top: 48px; }
.process li { display: grid; gap: 8px 40px; padding: 24px 0; border-top: 1px solid var(--line); }
.process li:last-child { border-bottom: 1px solid var(--line); }
.process h3 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); letter-spacing: -0.04em; }
.process p { color: var(--text-2); max-width: 52ch; align-self: center; }
@media (min-width: 800px) { .process li { grid-template-columns: 1fr 1fr; align-items: baseline; } }

/* proceso: la descripción se revela al pasar el cursor o enfocar (solo con puntero real; en táctil siempre visible) */
.process-reveal li { position: relative; }
.process-reveal .num { font-family: var(--mono, "Geist Mono", ui-monospace, monospace); font-size: 0.8125rem; color: var(--muted, var(--text-2)); letter-spacing: 0.04em; }
@media (hover: hover) and (pointer: fine) and (min-width: 800px) {
  .process-reveal li { grid-template-columns: 56px 1fr 1fr; cursor: default; outline-offset: 4px; }
  .process-reveal li::before { content: ""; position: absolute; inset: -1px auto auto 0; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
  .process-reveal h3 { color: var(--text-2); transition: color 0.4s var(--ease), transform 0.5s var(--ease); }
  .process-reveal .num { transition: color 0.3s var(--ease); }
  .process-reveal p { opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
  .process-reveal li:hover::before, .process-reveal li:focus-visible::before, .process-reveal li:focus-within::before { transform: scaleX(1); }
  .process-reveal li:hover h3, .process-reveal li:focus-visible h3 { color: var(--text); transform: translateX(8px); }
  .process-reveal li:hover .num, .process-reveal li:focus-visible .num { color: var(--accent-text); }
  .process-reveal li:hover p, .process-reveal li:focus-visible p { opacity: 1; transform: none; }
}
@media (hover: none), (pointer: coarse), (max-width: 799px) {
  .process-reveal li { grid-template-columns: auto 1fr; column-gap: 16px; }
  .process-reveal p { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .process-reveal li::before, .process-reveal h3, .process-reveal p, .process-reveal .num { transition: none; }
}

/* contacto */
.contact {
  --bg: var(--contrast-bg); --bg-2: var(--contrast-field); --bg-3: var(--contrast-field);
  --text: var(--contrast-text); --text-2: var(--contrast-text-2); --muted: var(--contrast-text-2);
  --line: var(--contrast-line); --line-strong: var(--contrast-line-strong);
  --accent: var(--contrast-accent); --accent-on: var(--contrast-accent-on); --accent-text: var(--contrast-accent);
  --danger: var(--contrast-danger);
  background: var(--contrast-bg); color: var(--contrast-text);
}
.contact .field input, .contact .field select, .contact .field textarea { background: var(--contrast-field); }
.contact { color-scheme: light; }
:root[data-theme="light"] .contact { color-scheme: dark; }
.contact-grid { display: grid; gap: 56px; }
.contact h2 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.035em; }
.about { margin-top: 22px; color: var(--text-2); font-size: 1.0625rem; max-width: 50ch; }
.about + .about { margin-top: 14px; }
.direct { margin-top: 24px; display: grid; gap: 0; }
.direct a, .direct span { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 500; }
.direct a:hover { color: var(--accent-text); }
.direct svg { color: var(--accent-text); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 5fr 6fr; gap: 96px; align-items: start; } }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-weight: 500; font-size: 0.9375rem; color: var(--text); }
.field .opt { color: var(--text-2); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-field);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-2); opacity: 0.85; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.field .help { font-size: 0.875rem; color: var(--muted); }
.field .err { font-size: 0.875rem; color: var(--danger); min-height: 1.25em; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 0.9375rem; color: var(--text-2); }
.check input { width: 24px; height: 24px; min-height: 0; margin: 10px 0 0; accent-color: var(--accent); }
.check label { display: block; padding-block: 10px; font-weight: 400; color: var(--text-2); }
.hp { position: absolute !important; left: -9999px; height: 0; width: 0; overflow: hidden; }
.form-status { padding: 16px 18px; border-radius: var(--r-field); border: 1px solid var(--line-strong); display: none; gap: 12px; align-items: flex-start; }
.form-status.show { display: flex; }
.form-status.ok { border-color: var(--accent); }
.form-status.ko { border-color: var(--danger); }
.form-status svg { flex: none; margin-top: 2px; }
.form-status.ok svg { color: var(--accent-text); }
.form-status.ko svg { color: var(--danger); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* pie */
.footer { border-top: 1px solid var(--line); padding-block: 56px 40px; }
.footer-top { display: grid; gap: 40px; }
.footer p { color: var(--text-2); max-width: 38ch; margin-top: 14px; font-size: 0.9375rem; }
.footer h2 { font-size: 0.9375rem; letter-spacing: 0; font-weight: 600; margin-bottom: 14px; }
.footer ul { display: grid; gap: 0; }
.footer a:not(.brand), .footer .linklike { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; font-size: 0.9688rem; }
.footer a:not(.brand):hover, .footer .linklike:hover { color: var(--text); text-decoration: underline; }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; transition: border-color 0.25s, color 0.25s, transform 0.25s var(--ease); }
.social a:hover { color: var(--accent-text); border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.social .icon { width: 22px; height: 22px; }
.proj-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (min-width: 800px) { .footer-top { grid-template-columns: repeat(2, 1fr); gap: 40px 64px; } }
@media (min-width: 1100px) { .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ---------- Banner de cookies ---------- */
.cc {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: var(--z-banner); max-width: 760px; margin-inline: auto;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow);
  display: none;
}
.cc.show { display: block; }
.cc h2 { font-size: 1.125rem; letter-spacing: -0.01em; }
.cc p { margin-top: 8px; color: var(--text-2); font-size: 0.9375rem; }
.cc-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cc-actions .btn { flex: 1 1 140px; }
.cc-actions .cc-cfg { flex: 0 1 auto; }
.cc-cats { margin-top: 18px; display: none; gap: 0; }
.cc.is-config .cc-cats { display: grid; }
.cc-cat { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.cc-cat strong { font-weight: 600; font-size: 0.9688rem; }
.cc-cat span { grid-column: 1; color: var(--text-2); font-size: 0.875rem; }
.switch { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--bg-3); border: 1px solid var(--line-strong); transition: background-color 0.25s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform 0.25s var(--ease); }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--accent-on); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + i { opacity: 0.65; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc-save { display: none; margin-top: 8px; }
.cc.is-config .cc-save { display: flex; }

/* ---------- Páginas legales ---------- */
.legal-hero { padding: calc(var(--nav-h) + 56px) 0 40px; border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); letter-spacing: -0.04em; }
.legal-hero p { margin-top: 16px; color: var(--text-2); max-width: 62ch; font-size: 1.125rem; }
.legal-hero .meta { margin-top: 20px; font-family: var(--mono); font-size: 0.875rem; color: var(--text-2); }
.legal { display: grid; gap: 40px; padding-block: 48px 120px; }
.toc { font-size: 0.9375rem; }
.toc h2 { font-size: 0.9375rem; letter-spacing: 0; margin-bottom: 12px; }
.toc ol { display: grid; gap: 2px; counter-reset: t; }
.toc a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text); border-left-color: var(--accent); background: var(--bg-2); }
.prose { max-width: 74ch; }
.prose h2 { font-size: 1.75rem; letter-spacing: -0.03em; margin: 56px 0 16px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1875rem; letter-spacing: -0.015em; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--text-2); }
.prose p { margin-top: 14px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul.bul { margin-top: 14px; display: grid; gap: 8px; padding-left: 22px; list-style: disc; }
.prose ul.bul li::marker { color: var(--accent-text); }
.prose ol.num { margin-top: 14px; display: grid; gap: 12px; padding-left: 22px; list-style: decimal; }
.prose ol.num li::marker { color: var(--accent-text); font-weight: 600; }
.callout { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--bg-2); color: var(--text-2); }
.callout strong { color: var(--text); }
.fill { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 4px; padding: 0 5px; color: var(--text); }
.tbl-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); }
.tbl { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.9375rem; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.tbl th { color: var(--text); font-weight: 600; background: var(--bg-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl code, .prose code { font-family: var(--mono); font-size: 0.875rem; color: var(--text); background: var(--bg-3); padding: 2px 7px; border-radius: 6px; }
@media (min-width: 1000px) {
  .legal { grid-template-columns: 260px 1fr; gap: 80px; }
  .toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
}

/* ---------- Manual de marca ---------- */
.mb-section { padding-block: 72px; border-top: 1px solid var(--line); }
.mb-section:first-of-type { border-top: 0; }
.mb-section > .wrap > h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.04em; }
.mb-section > .wrap > .lead { margin-top: 14px; color: var(--text-2); max-width: 64ch; font-size: 1.0625rem; }
.mb-grid { display: grid; gap: 16px; margin-top: 36px; }
@media (min-width: 760px) { .mb-grid.c2 { grid-template-columns: 1fr 1fr; } .mb-grid.c3 { grid-template-columns: repeat(3, 1fr); } .mb-grid.c4 { grid-template-columns: repeat(4, 1fr); } }
.mb-tile { border-radius: var(--r-card); border: 1px solid var(--line); min-height: 220px; display: grid; place-items: center; padding: 32px; position: relative; }
.mb-tile img { max-height: 120px; width: auto; max-width: 100%; }
.mb-tile.dark { background: #0a0f0d; }
.mb-tile.light { background: #f4f6f5; }
.mb-tile.green { background: #2fcb8f; }
.mb-tile figcaption { position: absolute; left: 16px; bottom: 12px; font-family: var(--mono); font-size: 0.75rem; color: #8a9a93; }
.mb-tile.light figcaption { color: #5b6a63; }
.mb-tile.green figcaption { color: #04110c; }
.mb-note { margin-top: 12px; color: var(--text-2); font-size: 0.9375rem; max-width: 70ch; }
.swatch { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.swatch .c { height: 120px; }
.swatch .t { padding: 16px; display: grid; gap: 4px; }
.swatch .t strong { font-weight: 600; }
.swatch .t span { font-family: var(--mono); font-size: 0.8125rem; color: var(--text-2); }
.type-spec { border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px; background: var(--bg-2); }
.type-spec .big { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.04em; line-height: 1.02; font-weight: 600; }
.type-spec .mono { font-family: var(--mono); }
.type-spec .meta { margin-top: 14px; color: var(--text-2); font-size: 0.9375rem; }
.scale { margin-top: 24px; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.scale > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: baseline; padding: 16px 20px; border-top: 1px solid var(--line); }
.scale > div:first-child { border-top: 0; }
.scale span.l { font-family: var(--mono); font-size: 0.8125rem; color: var(--text-2); }
.clear-demo { position: relative; padding: 56px; background: #f4f6f5; border-radius: var(--r-card); display: inline-block; }
.clear-demo img { height: 72px; width: auto; display: block; }
.clear-demo::before { content: ""; position: absolute; inset: 24px; border: 1px dashed #0e9f6e; border-radius: 8px; pointer-events: none; }
.clear-demo span { position: absolute; font-family: var(--mono); font-size: 0.75rem; color: #0b7a55; }
.donts figure { margin: 0; }
.donts .mb-tile { min-height: 170px; }
.donts figcaption.cap { position: static; margin-top: 10px; font-family: var(--font); font-size: 0.9375rem; color: var(--text-2); }
.dont-x { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: #b3261e; color: #fff; display: grid; place-items: center; }
.dont-x svg { width: 16px; height: 16px; }
.voice { display: grid; gap: 14px; margin-top: 28px; }
.voice .say { border-radius: var(--r-card); border: 1px solid var(--line); padding: 20px 22px; background: var(--bg-2); }
.voice .say small { display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.voice .say.yes { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.voice .say.no small { color: var(--danger); }
.dl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-strong); margin-right: 8px; vertical-align: -2px; }
.icon-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.icon-grid figure { margin: 0; display: grid; justify-items: center; gap: 10px; padding: 20px 8px 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg-2); }
.icon-grid figure span .icon { width: 28px; height: 28px; }
.icon-grid figcaption { font-family: var(--mono); font-size: 0.75rem; color: var(--text-2); text-align: center; overflow-wrap: anywhere; }

/* ---------- Módulo de ventas ---------- */
.preview-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: #ffb454; color: #1b1100; text-align: center; font-weight: 600; font-size: 0.875rem; padding: 8px 16px; }
.offer { display: grid; gap: 32px; border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: clamp(24px, 4vw, 48px); background: var(--bg-2); align-items: center; }
.offer h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); letter-spacing: -0.04em; }
.offer .lead { margin-top: 14px; color: var(--text-2); max-width: 46ch; font-size: 1.0625rem; }
.price { margin-top: 22px; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -0.03em; }
.tick { display: grid; gap: 14px; }
.tick li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; color: var(--text); }
.tick svg { color: var(--accent-text); margin-top: 3px; }
.tick-off li { color: var(--text-2); }
.tick-off svg { color: var(--text-2); }
@media (min-width: 900px) { .offer { grid-template-columns: 1.1fr 1fr; gap: 64px; } }
.sale { display: grid; gap: 48px; }
.sale-main h2 { font-size: 1.75rem; letter-spacing: -0.03em; margin: 48px 0 20px; }
.sale-main h2:first-child { margin-top: 0; }
.steps { margin-top: 8px; }
.steps li { grid-template-columns: 1fr; padding: 20px 0; }
.steps h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
.buy { border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: 28px; background: var(--bg-2); display: grid; gap: 16px; align-self: start; }
.buy h2 { font-size: 1.375rem; letter-spacing: -0.02em; }
.buy .price { margin-top: 0; }
.buy-note { color: var(--text-2); font-size: 0.9375rem; }
.buy-facts { display: grid; gap: 12px; }
.buy-facts li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; font-size: 0.9688rem; color: var(--text-2); }
.buy-facts svg { color: var(--accent-text); margin-top: 3px; }
.buy .btn { width: 100%; }
@media (min-width: 960px) { .sale { grid-template-columns: 1fr 380px; gap: 80px; } .buy { position: sticky; top: calc(var(--nav-h) + 24px); } }

@media print {
  .nav, .cc, .loader, .skip-link { display: none !important; }
}


/* proyecto destacado (TFM) */
.tfm { margin-top: 40px; display: grid; gap: 0; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--r-card); overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--bg-2)), var(--bg-2) 60%); }
.tfm-img { width: 100%; height: 160px; object-fit: cover; }
.tfm-body { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.tfm-body h3 { font-size: clamp(1.5rem, 3vw, 1.875rem); letter-spacing: -0.03em; }
.tfm-body p:not(.eyebrow) { color: var(--text-2); max-width: 62ch; }
.tfm-body .btn { margin-top: 6px; }
@media (min-width: 800px) { .tfm { grid-template-columns: 240px 1fr; } .tfm-img { height: 100%; min-height: 220px; } }

/* tarjetas destacadas en pestañas */
.proj-feature { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 8%, var(--bg-2)), var(--bg-2) 55%); }
.proj-feature h3 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); max-width: 30ch; }
.feat-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 14px 32px; }
.feat-list li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--accent); }
.feat-list strong { font-weight: 500; color: var(--text); }
.feat-list span { color: var(--text-2); font-size: 0.9688rem; }
@media (min-width: 760px) { .proj-feature { grid-column: 1 / -1; } .feat-list { grid-template-columns: 1fr 1fr; } }

/* tarjetas de webs con miniatura */
.proj-web .thumb { display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, var(--bg-3, #101815), var(--bg-2)); margin-bottom: 4px; }
.proj-web .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s var(--ease); }
.proj-web:hover .thumb img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .proj-web:hover .thumb img { transform: none; } }

/* iconos sociales del pie, centrados */
.footer .social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer .social li { display: block; }
.footer .social a:not(.brand) { display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--text); }
.footer .social a:not(.brand):hover { color: var(--accent-text); border-color: var(--accent); text-decoration: none; }
.footer .social .icon { display: block; width: 22px; height: 22px; }
.proj .ext.soon { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); }
