/* ==========================================================================
   Artesanos Digitales — hoja de estilos principal
   Paleta "Terracota y Petróleo": petróleo #0F3D4C (confianza) + terracota #B5471F (oficio, acciones)
   sobre fondo crema #FAF6F0. La terracota se reserva para botones y acentos; el petróleo domina.
   Contrastes verificados con WCAG 2.x (ver comentarios).
   ========================================================================== */

:root {
  /* Marca: terracota (acciones y acentos) */
  --accent:       #b5471f;  /* fondo de botones; texto blanco 5.4:1 */
  --accent-hover: #9e3d19;
  --on-accent:    #ffffff;  /* texto sobre --accent */
  --accent-icon:  #b5471f;  /* íconos y detalles sobre crema (5.0:1) */
  --accent-text:  #9e3d19;  /* enlaces y etiquetas (6.2:1 sobre crema) */
  --accent-100:   #f0d4c6;
  --accent-50:    #f8eae2;

  /* Marca: petróleo (confianza, bloques oscuros, títulos) */
  --petrol-900: #0f3d4c;
  --petrol-800: #164b5d;
  --petrol-700: #1f5a6e;
  --petrol-600: #3d6b7a;
  --petrol-100: #d5e3e8;
  --petrol-50:  #eaf1f3;

  /* Apoyo: teal apagado y ámbar (solo decorativo: 2.0:1 sobre crema) */
  --teal-500: #3e7a8a;
  --teal-100: #cfe1e6;
  --teal-50:  #e6f0f2;
  --amber:    #e8a33d;
  --hl-bg:    rgba(232, 163, 61, .5);   /* subrayado de palabras destacadas en titulares */

  /* Semánticos (cambian con el tema; ver [data-theme="dark"] más abajo) */
  --bg:        #faf6f0;           /* crema */
  --bg-soft:   #f3ece2;           /* arena: secciones alternas */
  --bg-tint:   #edf3f3;           /* tinte petróleo: secciones de apoyo */
  --surface:   #ffffff;           /* tarjetas, campos, insignias */
  --header-bg: rgba(250, 246, 240, .88);
  --ink:       var(--petrol-900); /* títulos y etiquetas (10.9:1) */
  --ink-2:     #1f4a58;           /* navegación (9.0:1) */
  --text:      #2f3a3e;           /* cuerpo (10.9:1) */
  --text-muted:#5a6569;           /* secundario (5.6:1 crema, 5.1:1 arena) */
  --heading:   var(--ink);
  --border:    #e7ddcf;
  --field-border: #8a9498;        /* borde de campos: 3.1:1 sobre blanco (WCAG 1.4.11) */
  --placeholder:  #6b7579;        /* 4.6:1 sobre blanco */
  --danger:    #c62f3f;
  --danger-bg: #fdecee;
  --danger-text: #9b1c2a;
  --success-text: #1d5e3a;
  --success-bg: #e5f2ea;
  --success-border: #c6e2d1;
  color-scheme: light;

  /* Tipografía */
  --font-head: "Red Hat Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-logo: "Outfit", "Red Hat Display", system-ui, sans-serif;

  /* Forma */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(15, 61, 76, .06), 0 2px 8px rgba(15, 61, 76, .05);
  --shadow:    0 10px 30px -10px rgba(15, 61, 76, .18);
  --shadow-lg: 0 24px 60px -20px rgba(15, 61, 76, .28);
  --shadow-accent: 0 12px 28px -10px rgba(181, 71, 31, .5);
  --glow-accent: rgba(181, 71, 31, .12);  /* brillos decorativos de fondo */
  --glow-petrol: rgba(15, 61, 76, .08);

  --container: 1200px;
  --gutter: 20px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* ---------- Tema oscuro ----------
   Se activa con <html data-theme="dark"> (lo decide el script del <head> según la hora o la elección del visitante).
   Fondo petróleo profundo; la terracota se aclara para mantener contraste. */
:root[data-theme="dark"] {
  --bg:        #0b2b36;
  --bg-soft:   #0e3340;
  --bg-tint:   #0d303b;
  --surface:   #123a47;
  --header-bg: rgba(11, 43, 54, .88);
  --ink:       #f3ede3;           /* 12.8:1 */
  --ink-2:     #e2dacd;
  --text:      #c9d6da;           /* 10.0:1 */
  --text-muted:#9fb4bb;           /* 6.9:1 fondo, 5.6:1 tarjeta */
  --border:    #1e4856;
  --field-border: #5f8794;        /* 3.2:1 sobre la superficie oscura */
  --placeholder:  var(--text-muted);
  --danger-bg: rgba(198, 47, 63, .16);
  --danger-text: #ff9aa5;
  --success-text: #8fe0b0;
  --success-bg: rgba(143, 224, 176, .1);
  --success-border: rgba(143, 224, 176, .25);

  --accent:       #e5794f;        /* texto petróleo encima: 5.1:1 */
  --accent-hover: #ec8c66;
  --on-accent:    #0b2b36;
  --accent-icon:  #e5794f;
  --accent-text:  #f0a07e;        /* 7.1:1 fondo, 5.8:1 tarjeta */
  --accent-100: rgba(229, 121, 79, .26);
  --accent-50:  rgba(229, 121, 79, .12);
  --petrol-100: #24505f;
  --petrol-50:  #164150;
  --teal-500:   #7fb3c2;
  --teal-100:   rgba(127, 179, 194, .3);
  --teal-50:    rgba(127, 179, 194, .14);
  --hl-bg:      rgba(229, 121, 79, .38);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow:    0 10px 30px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --shadow-accent: 0 12px 28px -10px rgba(229, 121, 79, .45);
  --glow-accent: rgba(229, 121, 79, .14);
  --glow-petrol: rgba(127, 179, 194, .08);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C9D6DA' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: dark;
}
:root[data-theme="dark"] .section--dark,
:root[data-theme="dark"] .site-footer { background: #071f27; }
:root[data-theme="dark"] .cta-banner { background: var(--petrol-900); }
:root[data-theme="dark"] .btn--dark { --btn-bg: var(--ink); --btn-fg: var(--petrol-900); --btn-bd: var(--ink); }
:root[data-theme="dark"] .btn--dark:hover { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: var(--accent); }
/* Palomita de listas: trazo oscuro sobre la terracota clara del tema nocturno */
:root[data-theme="dark"] .check-list li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2B36' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
/* Insignias con logo: fondo blanco para que los logos de colores oscuros mantengan contraste */
:root[data-theme="dark"] .chip--logo { background: #fff; border-color: transparent; color: var(--petrol-900); }
:root[data-theme="dark"] .thumb__window { box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); }
/* Las ilustraciones con fondo pastel se atenúan un poco para no deslumbrar */
:root[data-theme="dark"] .media-panel img[src*="/generadas/"],
:root[data-theme="dark"] .photo-frame__img { filter: brightness(.9) saturate(.95); }

/* Elementos que solo existen en un tema (logo, ilustraciones con versión nocturna) */
:root[data-theme="dark"] .only-light,
:root:not([data-theme="dark"]) .only-dark { display: none !important; }

/* Transición suave al cambiar de tema (solo durante el cambio, para no animar la carga) */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease !important;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.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: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--petrol-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--petrol-900); color: #c2cfd3; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split > *, .grid > * { min-width: 0; }
.split--reverse > :first-child { order: 2; }
.stack > * + * { margin-top: 16px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-lg { margin-top: 48px; }

/* ---------- Encabezados de sección ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .82rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text); background: var(--accent-50);
  border: 1px solid var(--accent-100);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.section--dark .eyebrow { background: rgba(229, 121, 79, .14); border-color: rgba(229, 121, 79, .35); color: #f0a07e; }
.section--dark .eyebrow::before { background: #e5794f; }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head--left { margin-left: 0; text-align: left; }
.lead { font-size: 1.15rem; color: var(--text-muted); }
.section--dark .lead { color: #a9bcc2; }

.hl { position: relative; white-space: nowrap; color: var(--ink); z-index: 0; }
.hl::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .08em; height: .36em;
  background: var(--hl-bg); border-radius: 6px; z-index: -1;
}
.text-accent { color: var(--accent-text); }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1;
  padding: 16px 26px; border-radius: 999px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg); border: 2px solid var(--btn-bd);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); }
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary:hover { --btn-bg: var(--accent-hover); box-shadow: var(--shadow-accent); }
.btn--dark { --btn-bg: var(--petrol-900); --btn-fg: #fff; --btn-bd: var(--petrol-900); }
.btn--dark:hover { --btn-bg: var(--petrol-700); box-shadow: var(--shadow); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--ink); }
.btn--outline:hover { --btn-bg: var(--ink); --btn-fg: var(--bg); }
.btn--white { --btn-bg: #fff; --btn-fg: var(--petrol-900); --btn-bd: #fff; }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .4); }
.btn--ghost-light:hover { --btn-bd: #fff; }
.btn--sm { padding: 11px 18px; font-size: .92rem; }
.btn--lg { padding: 19px 32px; font-size: 1.06rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 700; color: var(--ink);
}
.link-arrow .icon { width: 1.1em; height: 1.1em; color: var(--accent-icon); transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Encabezado del sitio ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: 0 6px 24px -14px rgba(15, 61, 76, .3); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
/* Logotipo: sello SVG + nombre en Outfit (el nombre toma el color del tema) */
.brand { display: inline-flex; border-radius: 12px; }
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark { width: 48px; height: 48px; flex-shrink: 0; transition: transform .5s var(--ease); }
.brand:hover .logo__mark { transform: rotate(-12deg); }
.logo__word {
  font-family: var(--font-logo); font-weight: 500; font-size: 1.2rem; line-height: .98;
  letter-spacing: -.01em; color: var(--ink); white-space: nowrap;
}
.logo--footer { margin-bottom: 18px; }
.logo--footer .logo__mark { width: 56px; height: 56px; }
.logo--footer .logo__word { font-size: 1.35rem; color: #f3ede3; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-family: var(--font-head); font-weight: 600; color: var(--ink-2);
  padding: 10px 14px; border-radius: 999px; position: relative;
}
.nav__link:hover { color: var(--ink); background: var(--petrol-50); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 18px; height: 3px;
  transform: translateX(-50%); background: var(--accent); border-radius: 3px;
}
/* Submenú de Servicios */
.nav__item--sub { position: relative; display: flex; align-items: center; }
.nav__item--sub > .nav__link { padding-right: 6px; }
.nav__sub-toggle {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: -2px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.nav__sub-toggle:hover { background: var(--petrol-50); color: var(--ink); }
.nav__sub-toggle .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.nav__item--sub.is-open .nav__sub-toggle .icon { transform: rotate(180deg); }
.nav__sub {
  position: absolute; top: calc(100% + 12px); left: 50%; z-index: 120; width: min(720px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 14px; opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; } /* puente para el hover */
.nav__item--sub.is-open .nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) and (min-width: 961px) {
  .nav__item--sub:hover:not(.is-dismissed) .nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
.nav__sub-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.nav__sub-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  font-family: var(--font-head); font-weight: 600; font-size: .93rem; line-height: 1.25; color: var(--ink-2);
}
.nav__sub-link:hover, .nav__sub-link.is-active { background: var(--petrol-50); color: var(--ink); }
.nav__sub-icon {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
  background: var(--accent-50); color: var(--accent-icon);
}
.nav__sub-icon .icon { width: 18px; height: 18px; }
.nav__sub-all {
  display: inline-flex; align-items: center; gap: 6px; margin: 10px 12px 2px; font-family: var(--font-head);
  font-weight: 600; font-size: .92rem; color: var(--accent-text);
}
.nav__sub-all .icon { width: 16px; height: 16px; }
.header-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav__mobile-cta { display: none; }

/* Botón de tema: muestra el ícono del modo elegido (automático / claro / oscuro) */
.theme-toggle {
  position: relative; width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  display: inline-grid; place-items: center; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.theme-toggle:hover { background: var(--petrol-50); border-color: var(--petrol-100); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .icon { width: 22px; height: 22px; grid-area: 1 / 1; display: none; }
:root[data-theme-mode="auto"]  .theme-toggle__auto,
:root[data-theme-mode="light"] .theme-toggle__light,
:root[data-theme-mode="dark"]  .theme-toggle__dark { display: block; animation: theme-icon .4s var(--ease); }
:root:not([data-theme-mode]) .theme-toggle__auto { display: block; }
@keyframes theme-icon { from { opacity: 0; transform: rotate(-90deg) scale(.6); } }
.theme-toggle__tip {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 10;
  background: var(--ink); color: var(--bg); font-size: .82rem; font-weight: 600; white-space: nowrap;
  padding: 7px 12px; border-radius: 8px; pointer-events: none;
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
}
.theme-toggle:hover .theme-toggle__tip, .theme-toggle:focus-visible .theme-toggle__tip,
.theme-toggle.show-tip .theme-toggle__tip { opacity: 1; transform: none; }

/* ---------- Hero (inicio) ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(closest-side, var(--glow-accent), transparent 70%); z-index: -1;
}
.hero::after {
  content: ""; position: absolute; top: -20%; left: -15%; width: 50vw; height: 50vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(closest-side, var(--glow-petrol), transparent 70%); z-index: -1;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero__lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--text-muted); max-width: 560px; margin-bottom: 32px; }
.hero__art { position: relative; }
.hero__art img { width: 100%; filter: drop-shadow(0 30px 40px rgba(15, 61, 76, .12)); animation: float 7s ease-in-out infinite; }
.hero__badge {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow);
  font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: .95rem;
}
.hero__badge .icon { color: var(--accent-icon); width: 26px; height: 26px; }
.hero__badge--a { left: -4%; bottom: 14%; }
.hero__badge--b { right: 0; top: 4%; }
.trust { display: flex; align-items: center; gap: 14px; margin-top: 34px; color: var(--text-muted); font-size: .95rem; }
.trust .icon { color: var(--accent-icon); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Equipo: tarjetas centradas, se acomodan de 1 a 4 personas */
.team-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 270px)); justify-content: center; }

/* Cinta de cifras */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 28px 24px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat__value { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 3.4vw, 2.6rem); color: var(--ink); line-height: 1; }
.stat__value span { color: var(--accent-icon); }
.stat__label { color: var(--text-muted); font-size: .95rem; margin-top: 8px; }

/* Cinta de tecnologías en movimiento */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
/* Separación con margin (no gap) para que -50% equivalga exactamente a un conjunto de elementos */
.marquee__track { display: flex; width: max-content; }
.marquee__track > * { margin-right: var(--marquee-gap, 14px); flex-shrink: 0; }
.marquee.is-ready .marquee__track { animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
/* Sin JavaScript: fila estática centrada */
.no-js .marquee { mask-image: none; }
.no-js .marquee__track { flex-wrap: wrap; justify-content: center; width: auto; row-gap: 14px; padding: 0 var(--gutter); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Encabezado de páginas internas ---------- */
.page-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(48px, 7vw, 80px);
  background:
    radial-gradient(600px 300px at 90% 0%, var(--glow-accent), transparent 70%),
    radial-gradient(500px 260px at 0% 100%, var(--glow-petrol), transparent 70%),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); margin-bottom: 14px; }
.page-hero .lead { max-width: 720px; margin-bottom: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .92rem; color: var(--text-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--petrol-100); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; position: relative;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); }
.card--flat:hover { transform: none; box-shadow: none; border-color: var(--border); }

.icon-box {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent-50); color: var(--accent-text); margin-bottom: 22px;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.icon-box .icon { width: 28px; height: 28px; }
.icon-box--petrol { background: var(--petrol-50); color: var(--ink); }
.icon-box--teal { background: var(--teal-50); color: var(--teal-500); }
.card:hover .icon-box { background: var(--accent); color: var(--on-accent); transform: rotate(-6deg); }

/* Tarjeta de servicio completa con enlace */
.service-card { display: flex; flex-direction: column; color: inherit; }
.service-card p { flex: 1; }
.service-card .link-arrow { margin-top: 8px; }
.service-card:hover { color: inherit; }
.service-card__num {
  position: absolute; top: 24px; right: 28px; font-family: var(--font-head); font-weight: 800;
  font-size: 1rem; color: var(--petrol-100);
}

/* Lista con palomitas */
.check-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: ""; flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.check-list--2 { grid-template-columns: 1fr 1fr; }

/* Panel de imagen con fondo decorativo */
.media-panel {
  position: relative; border-radius: var(--radius-xl); padding: clamp(20px, 4vw, 40px);
  background: linear-gradient(145deg, var(--accent-50), var(--teal-50));
}
.media-panel img { width: 100%; }
.media-panel__chip {
  position: absolute; right: -12px; bottom: 28px; background: var(--petrol-900); color: #fff;
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-lg);
  font-family: var(--font-head);
}
/* Imagen generada con marco redondeado */
.photo-frame { position: relative; border-radius: var(--radius-xl); overflow: visible; }
.photo-frame__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.photo-frame__badge {
  position: absolute; left: -14px; bottom: 24px; width: 68px; height: 68px; border-radius: 20px;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent);
}
.photo-frame__badge .icon { width: 32px; height: 32px; }
/* Imágenes con fondo blanco: "multiply" hace que el blanco se funda con el fondo de la sección */
.hero__art img[src*="/generadas/"] { filter: none; mix-blend-mode: multiply; width: 122%; max-width: none; margin: -6% -11%; }
.hero__art:has(img[src*="/generadas/"]) .hero__badge { display: none; }
.error-page__img { width: min(340px, 80%); margin: 0 auto 4px; mix-blend-mode: multiply; }
/* Versiones nocturnas: su fondo es igual al de la página; "lighten" deja ver los brillos decorativos detrás */
.hero__art img[src*="-oscuro."], .error-page__img[src*="-oscuro."] { mix-blend-mode: lighten; }
/* Imágenes con fondo propio: el panel decorativo ya no hace falta */
.media-panel:has(img[src*="/generadas/"]) { padding: 0; background: none; }
.media-panel img[src*="/generadas/"] { border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); aspect-ratio: 3 / 2; object-fit: cover; }

/* Panel visual del detalle de servicio */
.service-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 320px; }
.icon-box--xl { width: 132px; height: 132px; border-radius: 36px; margin: 0; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.icon-box--xl .icon { width: 64px; height: 64px; }
.service-visual__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.service-visual__list li {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 9px 16px;
  font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: .93rem; box-shadow: var(--shadow-sm);
}
.service-visual__list .icon { color: var(--accent-icon); width: 18px; height: 18px; }
.media-panel__chip strong { display: block; font-size: 1.8rem; color: #f0a07e; line-height: 1; }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 31px; left: 10%; right: 10%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent-icon) 0 8px, transparent 8px 16px); opacity: .5;
}
.step { text-align: center; position: relative; }
.step__num {
  counter-increment: step; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 2px solid var(--accent);
  font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--ink);
  position: relative; z-index: 1; box-shadow: 0 0 0 8px var(--bg-soft);
  transition: background .3s, transform .3s var(--ease);
}
.step__num::before { content: "0" counter(step); }
.step:hover .step__num { background: var(--accent); color: var(--on-accent); transform: scale(1.08); }
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { font-size: .95rem; color: var(--text-muted); margin: 0; }
.section:not(.section--soft) .step__num { box-shadow: 0 0 0 8px var(--bg); }

/* ---------- Proyectos ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter-btn {
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; cursor: pointer;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  transition: background .2s, color .2s, border-color .2s;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project-card[hidden] { display: none; }
.project-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.project-card__body p { color: var(--text-muted); font-size: .97rem; flex: 1; }
.project-card__tag {
  align-self: flex-start; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-text); background: var(--accent-50); padding: 5px 10px; border-radius: 999px; margin-bottom: 12px;
}
.project-card h3 { font-size: 1.18rem; }

/* Miniatura ilustrada (ventana de navegador) cuando no hay foto */
.thumb {
  aspect-ratio: 16 / 10; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-100), var(--accent-50));
  display: grid; place-items: center; padding: 28px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.thumb--petrol { background: linear-gradient(135deg, var(--petrol-800), var(--petrol-900)); }
.thumb--teal  { background: linear-gradient(135deg, var(--teal-50), var(--teal-100)); }
.thumb__window {
  width: 86%; height: 82%; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden; transition: transform .4s var(--ease);
}
.project-card:hover .thumb__window { transform: scale(1.04) rotate(-1deg); }
.thumb__bar { display: flex; gap: 5px; padding: 9px 10px; background: var(--petrol-50); }
.thumb__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--petrol-100); }
.thumb__bar i:first-child { background: #e9a38c; }
.thumb__bar i:nth-child(2) { background: var(--amber); }
.thumb__bar i:nth-child(3) { background: var(--accent); }
.thumb__content { flex: 1; display: grid; grid-template-columns: 30% 1fr; gap: 10px; padding: 12px; }
.thumb__side { background: var(--petrol-50); border-radius: 6px; }
.thumb__main { display: flex; flex-direction: column; gap: 8px; }
.thumb__main i { display: block; height: 9px; border-radius: 5px; background: var(--petrol-100); }
.thumb__main i:nth-child(1) { width: 70%; background: var(--ink); }
.thumb__main i:nth-child(2) { width: 90%; }
.thumb__main i:nth-child(3) { width: 55%; background: var(--accent); }
.thumb__main i.block { height: auto; flex: 1; border-radius: 8px; background: linear-gradient(135deg, var(--accent-50), var(--teal-50)); }
.thumb__icon {
  position: absolute; right: 18px; bottom: 18px; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow);
}
.thumb__icon .icon { width: 26px; height: 26px; }

/* ---------- Testimonios ---------- */
.testimonial { display: flex; flex-direction: column; }
.testimonial__quote { color: var(--accent-icon); width: 40px; height: 40px; margin-bottom: 14px; }
.testimonial__text { font-size: 1.05rem; color: var(--text); flex: 1; }
.testimonial__stars { display: flex; gap: 2px; color: var(--amber); margin-bottom: 14px; }
.testimonial__stars .icon { width: 18px; height: 18px; fill: currentColor; }
.person { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.person strong { display: block; color: var(--ink); font-family: var(--font-head); }
.person span { font-size: .9rem; color: var(--text-muted); }
.avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--petrol-900); color: var(--accent); font-family: var(--font-head); font-weight: 800;
}

/* ---------- Equipo ---------- */
.team-card { text-align: center; padding: 0; overflow: hidden; }
.team-card__photo {
  aspect-ratio: 1; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, var(--accent-50), var(--teal-50));
}
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__initials {
  width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center;
  background: var(--petrol-900); color: var(--accent); font-family: var(--font-head); font-weight: 800; font-size: 2.2rem;
}
.team-card__body { padding: 20px 20px 24px; }
.team-card__body h3 { font-size: 1.1rem; margin-bottom: 4px; }
.team-card__body p { margin: 0; font-size: .93rem; }

/* ---------- Insignias / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-family: var(--font-head); font-weight: 600;
  color: var(--ink-2); font-size: .95rem; white-space: nowrap;
}
.section--dark .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #e2dacd; }

/* Insignia con logo de marca */
.chip--logo { gap: 10px; padding: 9px 16px 9px 12px; }
.chip__logo { width: 20px; height: 20px; flex-shrink: 0; color: var(--brand, var(--ink)); }
/* Logos tipo "wordmark" (texto horizontal): se amplían para que se lean */
.chip__logo--wide { width: 34px; height: 20px; transform: scale(1.6); margin: 0 6px; }

/* Sección de tecnologías: mosaicos con solo el logo, en dos filas en movimiento.
   Al pasar el cursor (o con foco) el nombre se despliega hacia la derecha ENCIMA de los vecinos,
   sin cambiar el tamaño del mosaico, para que el carrusel no se mueva bajo el cursor. */
.tech-rows { display: grid; gap: 16px; padding: 4px 0; }
.tech-rows .marquee { --marquee-gap: 16px; }
.tech-rows .chip {
  --tile: 76px;
  position: relative; width: var(--tile); height: var(--tile); padding: 0; gap: 0; justify-content: center;
  background: #fff; border: 0; border-radius: 20px; color: var(--petrol-900); cursor: default;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .5);
}
.tech-rows .chip__logo { position: relative; z-index: 2; width: 38px; height: 38px; transition: transform .3s var(--ease); }
.tech-rows .chip__logo--wide { width: 50px; height: 38px; transform: scale(1.35); margin: 0; }
.tech-rows .chip__name {
  position: absolute; z-index: 1; top: 0; left: 0; height: 100%;
  display: flex; align-items: center; white-space: nowrap;
  padding: 0 24px 0 var(--tile); border-radius: 20px; background: #fff;
  font-family: var(--font-head); font-size: 1.08rem; font-weight: 700; color: var(--petrol-900);
  clip-path: inset(0 calc(100% - var(--tile)) 0 0 round 20px);
  opacity: 0; transition: clip-path .4s var(--ease), opacity .2s, box-shadow .3s;
}
.tech-rows .chip:hover, .tech-rows .chip:focus-visible { z-index: 5; outline: none; }
.tech-rows .chip:hover .chip__name, .tech-rows .chip:focus-visible .chip__name {
  opacity: 1; clip-path: inset(0 0 0 0 round 20px);
  box-shadow: inset 0 0 0 2px var(--brand); /* interior: clip-path recortaría una sombra exterior */
}
.tech-rows .chip:hover .chip__logo, .tech-rows .chip:focus-visible .chip__logo { transform: scale(1.08); }
.tech-rows .chip:hover .chip__logo--wide, .tech-rows .chip:focus-visible .chip__logo--wide { transform: scale(1.45); }
.marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee--reverse.is-ready .marquee__track { animation-direction: reverse; }
@media (max-width: 640px) {
  .tech-rows .chip { --tile: 64px; }
  .tech-rows .chip__logo { width: 32px; height: 32px; }
}


/* ---------- Factos: verdades de oficio ----------
   El sello de tinta "FACTO" enlaza el sitio con la campaña de redes sin usar jerga en los textos. */
.ink-stamp {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-head); font-weight: 900; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-text); padding: .38em .7em .32em .92em; border-radius: 6px;
  border: 2.5px solid currentColor; outline: 1.5px solid currentColor; outline-offset: -6px; /* doble línea sin depender del fondo */
  transform: rotate(-6deg); opacity: .92;
  /* textura de tinta irregular */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.3 1.55'/%3E%3C/filter%3E%3Crect width='120' height='60' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.3 1.55'/%3E%3C/filter%3E%3Crect width='120' height='60' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ink-stamp--light { color: #f0a07e; }
.ink-stamp--sm { font-size: .66rem; padding: .34em .6em .3em .8em; border-width: 2px; outline-offset: -5px; outline-width: 1px; transform: rotate(-4deg); }

.facto-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 30px 32px; transition: transform .3s var(--ease), box-shadow .3s;
}
.facto-card:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.facto-card__text {
  margin: 4px 0 0; font-family: var(--font-head); font-weight: 800; color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.18; letter-spacing: -.01em; text-wrap: balance;
}
.facto-card__detail { margin: 0; color: var(--text-muted); font-size: .98rem; }

.facto-band { background: var(--petrol-900); color: #c2cfd3; padding: clamp(64px, 9vw, 112px) 0; position: relative; overflow: hidden; }
.facto-band::after {
  content: ""; position: absolute; left: -120px; bottom: -180px; width: 420px; height: 420px; border-radius: 50%;
  border: 2px solid rgba(250, 246, 240, .08); box-shadow: inset 0 0 0 30px rgba(250, 246, 240, .025), inset 0 0 0 32px rgba(250, 246, 240, .07);
}
.facto-band__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; position: relative; z-index: 1; }
.facto-band__inner .ink-stamp { align-self: center; font-size: .9rem; }
.facto-band__text {
  margin: 0; max-width: 18ch; font-family: var(--font-head); font-weight: 900; color: #f3ede3;
  font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1.04; letter-spacing: -.025em; text-wrap: balance;
}
.facto-band__detail { margin: 0; max-width: 560px; font-size: 1.12rem; color: #b4c4ca; }
:root[data-theme="dark"] .facto-band { background: #071f27; }

.facto-line { display: flex; align-items: center; gap: 14px; margin: 14px 0 22px; max-width: 720px; font-weight: 600; color: var(--ink); }
.facto-line .ink-stamp { flex-shrink: 0; }

/* ---------- Banner promocional / CTA ---------- */
.cta-banner {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  background: var(--petrol-900); color: #c2cfd3; padding: clamp(36px, 6vw, 64px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
}
.cta-banner::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(229, 121, 79, .35), transparent);
}
.cta-banner::after {
  /* Anillo de sello decorativo (motivo del logotipo) */
  content: ""; position: absolute; right: -70px; bottom: -150px; width: 340px; height: 340px; border-radius: 50%;
  border: 2px solid rgba(250, 246, 240, .1); box-shadow: inset 0 0 0 26px rgba(250, 246, 240, .03), inset 0 0 0 28px rgba(250, 246, 240, .08);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { margin: 0; font-size: 1.1rem; }
.cta-banner__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; position: relative; z-index: 1; }
.cta-banner__badge {
  display: inline-block; font-family: var(--font-head); font-weight: 800; color: var(--on-accent); background: var(--accent);
  padding: 4px 12px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem;
}

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; gap: 14px; max-width: 860px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-50); color: var(--accent-text); font-size: 1.4rem; font-weight: 600; transition: transform .25s, background .25s;
}
.faq details[open] summary::after { content: "−"; background: var(--accent); color: var(--on-accent); }
.faq details > div { padding: 0 26px 22px; color: var(--text-muted); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .field__label { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: .95rem; }
.field label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--field-border); border-radius: 12px; padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 140px; resize: vertical; }
.select {
  appearance: none; padding-right: 44px; cursor: pointer;
  background: var(--surface) var(--select-arrow, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F3D4C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")) right 14px center / 20px no-repeat;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-icon); box-shadow: 0 0 0 4px var(--accent-100); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: .87rem; min-height: 0; }
.field__error:empty { display: none; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: .94rem; color: var(--text-muted); cursor: pointer; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent-icon); flex-shrink: 0; cursor: pointer; }
.form-status { display: none; padding: 14px 18px; border-radius: 12px; font-weight: 500; }
.form-status.is-success { display: block; background: var(--accent-50); color: var(--success-text); border: 1px solid var(--accent-100); }
.form-status.is-error { display: block; background: var(--danger-bg); color: var(--danger-text); border: 1px solid #f7c6cc; }
.form__privacy { font-size: .86rem; color: var(--text-muted); margin: 0; line-height: 1.55; }
.form__privacy a { text-decoration: underline; }
.form__note { font-size: .82rem; color: var(--text-muted); margin: -6px 0 0; }
.form-card { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }

/* Spinner del botón al enviar */
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--petrol-900); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Información de contacto ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .icon-box { margin: 0; width: 52px; height: 52px; border-radius: 14px; }
.contact-list .icon-box .icon { width: 24px; height: 24px; }
.contact-list strong { display: block; font-family: var(--font-head); color: var(--ink); }
.contact-list a, .contact-list span { color: var(--text-muted); overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--accent-text); }

/* ---------- Ventana modal (cotización rápida) ---------- */
.modal {
  width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); color: var(--text); background: var(--surface);
}
.modal::backdrop { background: rgba(11, 43, 54, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .3s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal__inner { padding: clamp(24px, 4vw, 36px); }
.modal__close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--petrol-50); color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.modal__close:hover { background: var(--petrol-100); }
.modal h2 { font-size: 1.6rem; margin-bottom: 6px; padding-right: 40px; }
.modal .lead { font-size: 1rem; margin-bottom: 22px; }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--petrol-900); color: #b4c4ca; padding-top: clamp(56px, 8vw, 88px); }
.site-footer a { color: #e2dacd; }
.site-footer a:hover { color: var(--accent); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 40px; padding-bottom: 56px; }

.footer__title { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .icon { color: #f0a07e; margin-top: 3px; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s, color .2s, transform .2s;
}
.socials a[href]:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-3px); }
.socials .icon { width: 18px; height: 18px; }
.site-footer :focus-visible { outline-color: #f0a07e; }
.footer__legal { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0 0; }
.footer__legal nav { display: flex; gap: 10px 24px; flex-wrap: wrap; font-size: .92rem; }
.footer__link-btn {
  background: none; border: 0; padding: 0; font: inherit; color: #e2dacd; cursor: pointer; text-decoration: underline;
}
.footer__link-btn:hover { color: var(--accent); }
.footer__bottom { padding: 18px 0 24px; font-size: .85rem; color: #a9bcc2; }
.footer__bottom p { margin: 0; max-width: 980px; }

/* Banner de cookies (assets/js/consent.js) */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; margin: 0 auto; max-width: 980px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 20px 24px;
}
.cookie-banner[hidden], .cookie-banner [hidden] { display: none !important; }
.cookie-banner__inner { display: grid; gap: 14px; }
.cookie-banner__title { font-family: var(--font-head); font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.cookie-banner__text p { margin: 0; font-size: .92rem; }
.cookie-banner__text a { text-decoration: underline; }
.cookie-banner__prefs fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .7);
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float .icon { width: 30px; height: 30px; }

/* Texto legal (privacidad, términos, cookies, reembolsos) */
.prose { max-width: 820px; margin: 0 auto; }
.prose a { text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .94rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { font-family: var(--font-head); color: var(--ink); background: var(--bg-soft); }
.prose .table-wrap { overflow-x: auto; }
.legal-meta { font-size: .9rem; color: var(--text-muted); }
.legal-toc { background: var(--bg-soft); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 2em; }
.legal-toc ol { margin: 8px 0 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.legal-toc li { margin-bottom: .3em; break-inside: avoid; }
.datos-negocio { list-style: none; padding: 0; display: grid; gap: 6px; }
.datos-negocio strong { color: var(--ink); }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } .cookie-banner__actions .btn { flex: 1 1 100%; } }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }
.prose ul { margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }

/* Página 404 */
.error-page { text-align: center; padding: clamp(64px, 10vw, 140px) 0; }
.error-page__code { font-family: var(--font-head); font-weight: 800; font-size: clamp(6rem, 18vw, 11rem); line-height: 1; color: var(--ink); }
.error-page__code span { color: var(--accent-hover); }

/* ---------- Animaciones al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.no-js .reveal { opacity: 1; transform: none; }

/* =========================================================================
   Efectos visuales: fondos con parallax, capas, rótulo horizontal, inclinación y revelados.
   Lógica en assets/js/efectos.js. Con «reducir movimiento» todo queda estático.
   ========================================================================= */

/* Barra de progreso de lectura */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), #e8a33d); pointer-events: none;
}

/* Capa de fondo (imagen) con margen extra para que el parallax no deje huecos */
.fx-bg { position: absolute; inset: -18% 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fx-bg picture, .fx-bg img { display: block; width: 100%; height: 100%; }
.fx-bg img { object-fit: cover; object-position: 70% 50%; transform: scale(1.08); will-change: transform; }

/* Formas de la marca que flotan en capas */
.fx-shapes { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.shape { position: absolute; display: block; will-change: transform, translate; }
.shape--ring {
  width: 220px; height: 220px; border-radius: 50%; right: 6%; top: -60px;
  border: 2px solid rgba(250, 246, 240, .14); box-shadow: inset 0 0 0 22px rgba(250, 246, 240, .03), inset 0 0 0 24px rgba(250, 246, 240, .1);
}
.shape--dots {
  width: 150px; height: 110px; left: 46%; bottom: 14%;
  background-image: radial-gradient(rgba(240, 160, 126, .55) 1.6px, transparent 1.8px); background-size: 16px 16px;
}
.shape--seal {
  width: 26px; height: 26px; border-radius: 50%; right: 32%; top: 22%;
  background: var(--accent); box-shadow: 0 0 0 7px rgba(181, 71, 31, .22), 0 0 30px rgba(229, 121, 79, .6);
}
.shape--spark {
  width: 14px; height: 14px; left: 58%; top: 16%; border-radius: 3px; transform: rotate(45deg);
  background: #e8a33d; box-shadow: 0 0 18px rgba(232, 163, 61, .8);
}
/* En la portada (fondo claro) las formas usan tonos de la marca más suaves */
.fx-shapes--hero { z-index: -1; }
.fx-shapes--hero .shape--ring { border-color: rgba(15, 61, 76, .1); box-shadow: inset 0 0 0 22px rgba(15, 61, 76, .025), inset 0 0 0 24px rgba(15, 61, 76, .07); right: auto; left: -70px; top: auto; bottom: 8%; }
.fx-shapes--hero .shape--dots { left: auto; right: 4%; bottom: 6%; background-image: radial-gradient(rgba(181, 71, 31, .35) 1.6px, transparent 1.8px); }
.fx-shapes--hero .shape--seal { right: 46%; top: 12%; width: 18px; height: 18px; }
.fx-shapes--hero .shape--spark { left: 40%; top: auto; bottom: 18%; }
.fx-shapes--cta .shape--ring { display: none; }
.fx-shapes--cta .shape--dots { left: auto; right: 3%; bottom: 8%; }
.fx-shapes--franja .shape--ring { right: auto; left: 8%; top: 12%; }
.fx-shapes--franja .shape--dots { left: auto; right: 12%; bottom: auto; top: 14%; }

/* Encabezados de páginas internas con imagen de fondo */
.page-hero--fondo {
  position: relative; isolation: isolate; overflow: hidden; background: #0b2b36; border-bottom: 0;
  min-height: clamp(380px, 40vw, 540px); display: flex; align-items: center;
}
.page-hero--fondo > .container { position: relative; z-index: 1; width: 100%; }
.page-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 43, 54, .95) 0%, rgba(11, 43, 54, .86) 34%, rgba(11, 43, 54, .35) 66%, rgba(11, 43, 54, .12) 100%),
    linear-gradient(0deg, rgba(11, 43, 54, .7), transparent 30%);
}
.page-hero--fondo h1, .page-hero--fondo .facto-line, .page-hero--fondo .hl { color: #fff; }
.page-hero--fondo .lead { color: #d3dfe2; max-width: 620px; }
.page-hero--fondo .breadcrumb, .page-hero--fondo .breadcrumb a { color: #b9cace; }
.page-hero--fondo .breadcrumb li[aria-current] { color: #fff; }
.page-hero--fondo .breadcrumb li + li::before { color: rgba(255, 255, 255, .35); }
.page-hero--fondo .eyebrow { background: rgba(229, 121, 79, .16); border-color: rgba(229, 121, 79, .4); color: #f3b394; }
.page-hero--fondo .eyebrow::before { background: #e5794f; }
.page-hero--fondo .ink-stamp { color: #f0a07e; }
.page-hero--fondo .btn--outline { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .55); }
.page-hero--fondo .btn--outline:hover { --btn-bg: #fff; --btn-fg: #0b2b36; --btn-bd: #fff; }
.page-hero--fondo .breadcrumb a:focus-visible, .page-hero--fondo .btn:focus-visible { outline-color: #f0a07e; }

/* Llamada a la acción y franja con imagen */
.cta-banner { isolation: isolate; }
.cta-banner__bg { inset: -25% 0; }
.cta-banner__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 43, 54, .96) 0%, rgba(11, 43, 54, .88) 45%, rgba(11, 43, 54, .6) 100%);
}
.facto-band { isolation: isolate; }
.facto-band__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(11, 43, 54, .9) 30%, rgba(11, 43, 54, .55) 75%); }

/* Rótulo con parallax horizontal */
.rotulo { overflow: hidden; padding: clamp(28px, 5vw, 56px) 0; background: var(--bg); border-block: 1px solid var(--border); }
.rotulo__fila {
  display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); width: max-content; white-space: nowrap; will-change: transform;
  font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 5.2vw, 4.4rem); line-height: 1.15; letter-spacing: -.02em;
  color: var(--ink); margin-left: -12vw;
}
.rotulo__fila--contorno { color: transparent; -webkit-text-stroke: 1.5px var(--accent-icon); margin-left: -40vw; }
.rotulo__fila i { display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.rotulo__fila--contorno i { background: transparent; border: 2px solid var(--petrol-100); }

/* Inclinación 3D de tarjetas con brillo */
[data-tilt] { transform-style: preserve-3d; }
[data-tilt].is-tilting {
  transform: perspective(900px) rotateX(var(--tilt-x, 0)) rotateY(var(--tilt-y, 0)) translateY(-4px);
  transition: transform .08s linear, box-shadow .25s;
}
[data-tilt] { position: relative; }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, .35), transparent 55%);
}
[data-tilt].is-tilting::after { opacity: 1; }
:root[data-theme="dark"] [data-tilt]::after { background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(240, 160, 126, .14), transparent 55%); }

/* Variantes de revelado */
.reveal--zoom { transform: scale(.94); }
/* El recorte va en la imagen interna: si se recorta el elemento observado, el navegador no detecta que entró en pantalla. */
.reveal--clip { transform: none; }
.reveal--clip img { clip-path: inset(0 0 100% 0 round var(--radius-xl)); transition: clip-path 1.1s var(--ease) .1s; }
.reveal--clip.is-visible img { clip-path: inset(0 0 0 0 round var(--radius-xl)); }
.no-js .reveal--clip img { clip-path: none; }

@media (max-width: 760px) {
  .page-hero--fondo { min-height: 0; padding: 56px 0 48px; }
  .page-hero__bg::after { background: linear-gradient(0deg, rgba(11, 43, 54, .92), rgba(11, 43, 54, .8)); }
  .fx-bg img { object-position: 85% 50%; }
  .shape--ring, .shape--dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .reveal--clip img { clip-path: none; }
  .fx-bg img { transform: none !important; }
  .shape, .rotulo__fila { transform: none !important; translate: none !important; }
  [data-tilt].is-tilting { transform: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 20px var(--gutter) 32px;
    background: var(--bg); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  /* El desenfoque del encabezado convierte al header en contenedor de los elementos fijos y recortaba el menú: se quita al abrirlo. */
  .nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav-open { overflow: hidden; }
  .nav__link { font-size: 1.2rem; padding: 14px 16px; border-radius: 12px; }
  .nav__link.is-active { background: var(--accent-50); }
  .nav__link.is-active::after { display: none; }
  .nav__mobile-cta { display: flex; margin-top: 16px; }
  .nav__item--sub { flex-wrap: wrap; }
  .nav__item--sub > .nav__link { flex: 1; padding-right: 16px; }
  .nav__sub-toggle { width: 48px; height: 48px; border-radius: 12px; }
  .nav__sub-toggle .icon { width: 22px; height: 22px; }
  .nav__sub {
    position: static; width: 100%; transform: none; box-shadow: none; border: 0; border-radius: 0; background: transparent;
    padding: 0 0 8px 12px; display: none; opacity: 1; visibility: visible;
  }
  .nav__sub::before { display: none; }
  .nav__item--sub.is-open .nav__sub { display: block; transform: none; }
  .nav__sub-grid { grid-template-columns: 1fr; }
  .nav__sub-link { font-size: 1rem; }
  .logo__mark { width: 42px; height: 42px; }
  .logo__word { font-size: 1.08rem; }

  .hero__grid, .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .hero__art { max-width: 560px; margin: 0 auto; width: 100%; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .cta-banner { grid-template-columns: 1fr; }
  .cta-banner__actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; text-align: left; }
  .step { display: grid; grid-template-columns: 64px 1fr; gap: 0 18px; text-align: left; }
  .step__num { margin: 0; grid-row: span 2; }
  .form__row, .check-list--2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .card { padding: 26px; }
  .btn-row .btn { flex: 1 1 auto; }
  .hero__badge { display: none; }
  .media-panel__chip { right: 8px; }
  .section-head { margin-bottom: 40px; }
}
