/* ==========================================================================
   Mariscal Records — Sistema visual
   Estructura:
   1. Tokens (variables)        6. Header / navegación
   2. Reset y base              7. Componentes (botones, cards, etc.)
   3. Tipografía                8. Secciones de páginas
   4. Layout (contenedor/grid)  9. Footer
   5. Utilidades                10. Movimiento / accesibilidad
   ========================================================================== */

/* 1. TOKENS ================================================================ */
:root {
  /* Marca (heredada del sitio actual) */
  --c-red: #f0000e;
  --c-red-strong: #cf010b;
  --c-red-hover: #e0000d;
  --c-red-deep: #990000;
  --c-red-text: #ff4049;          /* rojo legible sobre fondo oscuro */

  /* Superficies oscuras */
  --c-bg: #0a0a0b;
  --c-surface: #131315;
  --c-surface-2: #1b1b1e;
  --c-line: rgba(255, 255, 255, 0.1);
  --c-text: #f3f3f1;
  --c-muted: #a6a6ad;

  /* Superficies claras (secciones editoriales) */
  --c-paper: #f4f2ef;
  --c-paper-2: #e9e6e1;
  --c-ink: #141414;
  --c-ink-muted: #55555a;
  --c-ink-line: rgba(0, 0, 0, 0.1);

  /* Tipografía */
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --fs-lg: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.6vw, 1.55rem);
  --fs-h2: clamp(1.85rem, 1.35rem + 2vw, 3rem);
  --fs-h1: clamp(2.35rem, 1.6rem + 3.4vw, 4.4rem);

  /* Espaciado */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --section-y: clamp(4rem, 3rem + 5vw, 8rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);

  /* Medidas */
  --container: 1240px;
  --container-narrow: 820px;
  --header-h: 72px;

  /* Radios y bordes */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Movimiento */
  --t-fast: 160ms;
  --t-base: 280ms;
  --t-slow: 600ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
}

/* 2. RESET Y BASE ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
ul[class], ol[class] { list-style: none; padding: 0; }
p, li { text-wrap: pretty; }

::selection { background: var(--c-red-strong); color: #fff; }

:focus-visible {
  outline: 2px solid var(--c-red-text);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--light :focus-visible { outline-color: var(--c-red-strong); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 1000;
  padding: var(--sp-3) var(--sp-4);
  background: #fff;
  color: var(--c-ink);
  border-radius: var(--r-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); }

/* 3. TIPOGRAFÍA ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
h4 { font-size: var(--fs-md); font-weight: 700; }

.lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--c-muted); }
.section--light .lead { color: var(--c-ink-muted); }
.text-muted { color: var(--c-muted); }
.accent { color: var(--c-red-text); }
.section--light .accent { color: var(--c-red-strong); }

/* Etiqueta tipo "canal" de consola: 01 — SERVICIOS */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-red-text);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}
.eyebrow__num { color: var(--c-muted); }
.section--light .eyebrow { color: var(--c-red-strong); }
.section--light .eyebrow__num { color: var(--c-ink-muted); }

.prose > * + * { margin-top: var(--sp-4); }
.prose h2, .prose h3 { margin-top: var(--sp-7); }
.prose a { color: var(--c-red-text); }

/* 4. LAYOUT ================================================================ */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 2 * var(--gutter), var(--container-narrow)); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section--surface { background: var(--c-surface); }
.section--light { background: var(--c-paper); color: var(--c-ink); }
.section--light .text-muted { color: var(--c-ink-muted); }

.section-head {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  max-width: 760px;
}
.section-head--split {
  max-width: none;
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1.2fr 1fr; gap: var(--sp-7); }
}
.section-head h2 + p { margin-top: 0; }

.grid { display: grid; gap: var(--gap, var(--sp-5)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-media { grid-template-columns: 1.15fr 0.85fr; }
  .split--reverse > :first-child { order: 2; }
}

.stack > * + * { margin-top: var(--stack, var(--sp-4)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* 5. UTILIDADES ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.center { text-align: center; margin-inline: auto; }

/* Media con proporción fija y recorte */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--c-surface-2);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--1x1 { aspect-ratio: 1; }

/* 6. HEADER Y NAVEGACIÓN =================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  border-bottom: 1px solid transparent;
}
/* El fondo con desenfoque va en ::before y no en el header: un backdrop-filter en el
   header lo convierte en el contenedor de los elementos position:fixed, y el menú
   móvil (.nav, fijo a pantalla completa) quedaba recortado al alto del header. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
  pointer-events: none;
}
.site-header.is-solid::before,
.site-header--solid::before { opacity: 1; }
.site-header.is-solid,
.site-header--solid { border-bottom-color: var(--c-line); }
/* Con el menú móvil abierto, la barra es opaca para que no se transparente la página. */
body.nav-open .site-header::before { background: var(--c-bg); opacity: 1; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { width: clamp(112px, 4vw + 80px, 136px); height: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  border-radius: var(--r-sm);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

.nav__list { display: flex; gap: var(--sp-1); }
.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--c-text);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav__link[aria-current="page"] { color: var(--c-red-text); }
.nav__chevron {
  width: 10px; height: 10px;
  transition: transform var(--t-base) var(--ease);
}
[aria-expanded="true"] > .nav__chevron { transform: rotate(180deg); }

.submenu__title {
  display: block;
  font-weight: 600;
  color: var(--c-text);
}
.submenu__desc { display: block; font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.4; }
.submenu__link {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: background var(--t-fast);
}
.submenu__link:hover { background: rgba(255, 255, 255, 0.06); }
.submenu__link:hover .submenu__title { color: var(--c-red-text); }
.submenu__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
  display: grid; place-items: center;
}
.submenu__icon .icon { width: 22px; height: 22px; background: var(--c-red-text); }
.tag-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--c-red-strong);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.nav__cta { margin-left: var(--sp-3); }
/* Botón "Reservar" fijo en la barra superior en móvil (junto al botón del menú). */
.header-cta { margin-left: auto; }

/* Navegación móvil (< 1080px) */
@media (max-width: 1079.98px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--c-bg);
    padding: var(--sp-5) var(--gutter) var(--sp-7);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s linear var(--t-base);
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--c-line); }
  .nav__link {
    min-height: 56px;
    justify-content: space-between;
    font-family: var(--f-display);
    font-size: 1.25rem;
    font-weight: 700;
    padding-inline: 0;
  }
  .nav__link:hover { background: none; }
  .submenu { display: none; padding-bottom: var(--sp-3); }
  .nav__item.is-open > .submenu { display: grid; }
  .submenu__link { padding-inline: 0; }
  .submenu__link:hover { background: none; }
  .nav__cta { display: none; } /* en móvil el botón vive en la barra (.header-cta) */
  body.nav-open { overflow: hidden; }
}

/* Navegación escritorio (>= 1080px) */
@media (min-width: 1080px) {
  .nav-toggle, .site-header .header-cta { display: none; }
  .nav { display: flex; align-items: center; }
  .nav__item { position: relative; }
  .submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    width: 340px;
    padding: var(--sp-3);
    display: grid;
    gap: 2px;
    background: rgba(19, 19, 21, 0.98);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 6px);
    transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s linear var(--t-base);
  }
  /* puente invisible para no perder el hover entre botón y panel */
  .submenu::before { content: ""; position: absolute; inset: -12px 0 auto 0; height: 12px; }
  .nav__item.is-open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
  }
  @media (hover: hover) and (pointer: fine) {
    .nav__item--has-sub:hover > .submenu {
      opacity: 1;
      visibility: visible;
      transform: translate(-50%, 0);
      transition-delay: 0s;
    }
  }
}

/* 7. COMPONENTES =========================================================== */

/* Iconos: PNG de mariscal_recursos usados como máscara para colorearlos */
.icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* Botones */
.btn {
  --btn-bg: var(--c-red-strong);
  --btn-fg: #fff;
  --btn-bd: var(--c-red-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.btn:hover { --btn-bg: var(--c-red-hover); --btn-bd: var(--c-red-hover); }
.btn:active { transform: translateY(1px); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-text); --btn-bd: rgba(255, 255, 255, 0.35); }
.btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.08); --btn-bd: #fff; }
.section--light .btn--ghost { --btn-fg: var(--c-ink); --btn-bd: rgba(0, 0, 0, 0.3); }
.section--light .btn--ghost:hover { --btn-bg: rgba(0, 0, 0, 0.05); --btn-bd: var(--c-ink); }
.btn--sm { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.875rem; }
.btn--lg { min-height: 56px; padding: 1rem 2rem; font-size: 1rem; }
.btn__arrow { width: 16px; height: 16px; transition: transform var(--t-base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* Enlace con flecha */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  text-decoration: none;
  color: var(--c-text);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--t-base) var(--ease); color: var(--c-red-text); }
.link-arrow:hover svg { transform: translateX(4px); }
.section--light .link-arrow { color: var(--c-ink); }
.section--light .link-arrow svg { color: var(--c-red-strong); }

/* Card de servicio grande (imagen + texto superpuesto) */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(360px, 30vw + 160px, 520px);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: #fff;
  background: var(--c-surface-2);
}
.service-card__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0) 25%, rgba(10, 10, 11, 0.55) 55%, rgba(10, 10, 11, 0.94) 100%);
}
.service-card:hover .service-card__img { transform: scale(1.04); }
.service-card__num {
  position: absolute;
  top: clamp(1.25rem, 1rem + 1vw, 2rem);
  left: clamp(1.25rem, 1rem + 1vw, 2rem);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(10, 10, 11, 0.7);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  color: #fff;
}
.service-card__badge {
  position: absolute;
  top: clamp(1.1rem, 0.9rem + 1vw, 1.8rem);
  right: clamp(1.1rem, 0.9rem + 1vw, 1.8rem);
}
.service-card h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin-bottom: var(--sp-2); }
.service-card p { color: rgba(255, 255, 255, 0.82); max-width: 44ch; }
.service-card .link-arrow { margin-top: var(--sp-4); color: #fff; }
.service-card:hover .link-arrow svg { transform: translateX(4px); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--c-red-strong);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.badge--outline { background: transparent; border: 1px solid var(--c-line); color: var(--c-muted); }

/* Card simple (texto + icono) */
.card {
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  transition: border-color var(--t-base), transform var(--t-base) var(--ease);
}
.card:hover { border-color: rgba(255, 255, 255, 0.22); }
.card .icon { color: var(--c-red-text); width: 40px; height: 40px; margin-bottom: var(--sp-4); }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--c-muted); }
.section--light .card { background: #fff; border-color: var(--c-ink-line); }
.section--light .card p { color: var(--c-ink-muted); }
.section--light .card .icon { color: var(--c-red-strong); }

/* Lista de datos (tipo hoja técnica) */
.spec-list { border-top: 1px solid var(--c-line); }
.spec-list__row {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) 1fr;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--c-line);
}
.spec-list dt {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding-top: 3px;
}
.spec-list dd { font-weight: 500; }

/* Hechos breves */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: var(--sp-5);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-ink-line);
}
.fact__value {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.fact__label { display: block; margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--c-ink-muted); }

/* Medidor/ecualizador decorativo (detalle de interfaz musical) */
.meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.meter span {
  width: 3px;
  height: 100%;
  border-radius: 1px;
  background: var(--c-red-text);
  transform-origin: bottom;
  animation: meter 1.4s ease-in-out infinite;
}
.meter span:nth-child(2) { animation-delay: -0.3s; }
.meter span:nth-child(3) { animation-delay: -0.7s; }
.meter span:nth-child(4) { animation-delay: -0.15s; }
.meter span:nth-child(5) { animation-delay: -0.9s; }
@keyframes meter {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.rec {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.rec::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-red);
  box-shadow: 0 0 0 4px rgba(240, 0, 14, 0.2);
}

/* Flujo de pasos (distribución / marketing) */
.flow {
  display: grid;
  gap: var(--sp-3);
  counter-reset: flow;
}
@media (min-width: 760px) {
  .flow { grid-template-columns: repeat(var(--flow-cols, 3), 1fr); gap: 0; }
}
.flow__step {
  position: relative;
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  border-radius: var(--r-md);
}
@media (min-width: 760px) {
  .flow__step { border-radius: 0; border-left-width: 0; }
  .flow__step:first-child { border-left-width: 1px; border-radius: var(--r-md) 0 0 var(--r-md); }
  .flow__step:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
  .flow__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -9px;
    z-index: 1;
    width: 16px; height: 16px;
    background: var(--c-surface);
    border-top: 1px solid var(--c-line);
    border-right: 1px solid var(--c-line);
    transform: translateY(-50%) rotate(45deg);
  }
}
.flow__step::before {
  counter-increment: flow;
  content: counter(flow, decimal-leading-zero);
  display: block;
  margin-bottom: var(--sp-3);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--c-red-text);
}
.flow__step h3 { font-size: var(--fs-md); text-transform: uppercase; letter-spacing: 0.04em; }
.flow__step p { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--c-muted); }
.flow__step--accent { background: var(--c-red-strong); border-color: var(--c-red-strong); }
.flow__step--accent::before, .flow__step--accent p { color: rgba(255, 255, 255, 0.85); }
.flow__step--accent:not(:last-child)::after { background: var(--c-red-strong); border-color: var(--c-red-strong); }

/* Chips de plataformas */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-red-text);
}

/* Testimonios */
.reviews {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(85%, 360px);
  gap: var(--sp-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--sp-4);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scrollbar-width: thin;
}
@media (min-width: 960px) {
  .reviews {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}
.review {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--c-ink-line);
}
.review__stars { color: var(--c-red-strong); letter-spacing: 2px; font-size: 0.95rem; }
.review blockquote { flex: 1; color: var(--c-ink); }
.review figcaption { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); }
.review__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
.review__name { font-weight: 600; display: block; }
.review__source { color: var(--c-ink-muted); display: block; font-size: var(--fs-xs); }

/* Modal (formularios AuroraCRM) */
.modal {
  width: min(100% - 2rem, 560px);
  max-height: min(90vh, 900px);
  max-height: min(90dvh, 900px);
  /* El reset global (* { margin: 0 }) anula el margin:auto con el que el
     navegador centra los <dialog>; se restablece para centrarlo en pantalla. */
  margin: auto;
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-paper);
  color: var(--c-ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); }
.modal[open] { display: flex; flex-direction: column; animation: modal-in var(--t-base) var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } }
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-ink-line);
}
.modal__title { font-size: var(--fs-md); }
.modal__close {
  width: 44px; height: 44px;
  margin-right: -10px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--c-ink);
}
.modal__close:hover { background: rgba(0, 0, 0, 0.06); }
.modal__body { flex: 1; min-height: 0; overflow: auto; }
.crm-frame {
  display: block;
  width: 100%;
  height: var(--frame-h, 620px);
  border: 0;
  background: transparent;
}
/* Formulario de contacto (AuroraCRM): alto medido según el ancho del iframe
   (621 px desde 520 px de ancho; 691 px a 358 px; 727 px a 320 px) + margen
   para los mensajes de validación, así no aparece barra de scroll. */
.crm-frame--contacto { height: 860px; }
@media (min-width: 400px) { .crm-frame--contacto { height: 820px; } }
@media (min-width: 460px) { .crm-frame--contacto { height: 780px; } }
@media (min-width: 560px) { .crm-frame--contacto { height: 760px; } }
/* Newsletter: el formulario mide ~660 px a 520 px de ancho y crece en móvil */
.crm-frame--newsletter { height: 780px; }
@media (min-width: 400px) { .crm-frame--newsletter { height: 740px; } }
@media (min-width: 560px) { .crm-frame--newsletter { height: 700px; } }
.crm-frame-wrap { background: transparent; }

/* 8. SECCIONES ============================================================= */

/* Hero (portada): carrusel de diapositivas apiladas que se cruzan con un fundido */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 5vw, 6rem));
  padding-bottom: clamp(2.5rem, 2rem + 4vw, 5rem);
  isolation: isolate;
  overflow: hidden;
}
.hero__slides { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hero__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.9s ease, visibility 0s; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-pos, 50% 60%);
  transform: scale(1.06);
  transition: transform 7s ease-out;
}
.hero__slide.is-active .hero__media img { transform: scale(1); }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 11, 0.75) 0%, rgba(10, 10, 11, 0.2) 30%, rgba(10, 10, 11, 0.55) 62%, var(--c-bg) 100%),
    linear-gradient(90deg, rgba(10, 10, 11, 0.85) 0%, rgba(10, 10, 11, 0.2) 70%);
}
/* Títulos de las diapositivas: mismo estilo que las cabeceras de Servicios (ver sección 11) */
.hero .page-hero__title { margin-bottom: var(--sp-4); }
.hero .page-hero__title em { font-style: normal; color: var(--c-red-text); }
.hero .lead { color: rgba(255, 255, 255, 0.82); max-width: 58ch; }
.hero__actions { margin-top: var(--sp-6); }
.hero__footer { position: relative; }
.hero__controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: clamp(1.75rem, 1.25rem + 2vw, 3rem);
}
.hero__controls[hidden] { display: none; }
.hero__dots { display: flex; gap: var(--sp-2); }
.hero__dot {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.hero__dot::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  transition: background-color 0.3s ease;
}
.hero__dot[aria-current="true"]::before { background: var(--c-red-text); }
.hero__dot:hover::before { background: rgba(255, 255, 255, 0.65); }
.hero__dot[aria-current="true"]:hover::before { background: var(--c-red-text); }
.hero__btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: rgba(10, 10, 11, 0.35);
  color: var(--c-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.hero__btn:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(10, 10, 11, 0.6); }
.hero__btn svg { width: 16px; height: 16px; }
.hero__btn[data-slider-pause] { margin-left: auto; }
.hero__icon-play { display: none; }
.hero__btn[aria-pressed="true"] .hero__icon-pause { display: none; }
.hero__btn[aria-pressed="true"] .hero__icon-play { display: block; }
@media (prefers-reduced-motion: reduce) {
  .hero__slide, .hero__slide.is-active { transition: none; }
  .hero__media img, .hero__slide.is-active .hero__media img { transform: none; transition: none; }
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-6);
  align-items: center;
  margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-sm);
  color: var(--c-muted);
}
.hero__controls:not([hidden]) + .hero__meta { margin-top: var(--sp-5); }
.hero__meta strong { color: var(--c-text); font-weight: 600; }

/* Encabezado de páginas internas */
.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 5vw, 6rem));
  padding-bottom: clamp(3rem, 2rem + 4vw, 5rem);
  isolation: isolate;
  overflow: hidden;
}
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, 50% 50%); }
.page-hero--image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 10, 11, 0.92) 0%, rgba(10, 10, 11, 0.6) 60%, rgba(10, 10, 11, 0.4) 100%),
              linear-gradient(0deg, var(--c-bg) 0%, transparent 40%);
}
.page-hero__content { max-width: 760px; }
.page-hero h1 { margin-bottom: var(--sp-4); }
.page-hero .lead { color: rgba(255, 255, 255, 0.82); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--c-text); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--sp-2); opacity: 0.5; }

/* Home — intro */
.intro__media { position: relative; }
.intro__media .media { aspect-ratio: 4 / 3; }
.intro__tag {
  position: absolute;
  left: var(--sp-4);
  bottom: var(--sp-4);
  padding: var(--sp-2) var(--sp-3);
  background: rgba(10, 10, 11, 0.8);
  color: #fff;
  border-radius: var(--r-sm);
}

/* Home — servicios */
.services-grid {
  display: grid;
  gap: var(--sp-4);
}
/* 5 servicios con foto vertical 4:5 completa y texto debajo:
   1 col (móvil) → 2 → 3 → 5 en una fila (escritorio). */
@media (min-width: 560px) { .services-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-6) var(--sp-4); } }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .services-grid { grid-template-columns: repeat(5, 1fr); } }
.service-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--c-text);
}
.service-tile__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface-2);
}
.service-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.service-tile:hover .service-tile__media img { transform: scale(1.04); }
.service-tile__num {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(10, 10, 11, 0.7);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  color: #fff;
}
.service-tile__badge { position: absolute; top: var(--sp-3); right: var(--sp-3); }
.service-tile h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); margin-bottom: var(--sp-2); }
.service-tile p { color: var(--c-muted); font-size: 0.9375rem; }
.service-tile .link-arrow { margin-top: auto; padding-top: var(--sp-4); }
.service-tile:hover .link-arrow svg { transform: translateX(4px); }
.services-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.services-extra p { color: var(--c-muted); }
.services-extra strong { color: var(--c-text); }

/* Home — destacados (distribución / marketing) */
.feature {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(207, 1, 11, 0.28) 0%, transparent 55%),
    var(--c-surface);
  border: 1px solid var(--c-line);
  padding: clamp(1.5rem, 1rem + 3vw, 4rem);
}
.signal {
  display: grid;
  gap: var(--sp-4);
  align-items: center;
}
@media (min-width: 760px) { .signal { grid-template-columns: 1fr auto 1.4fr auto 1fr; } }
.signal__node {
  padding: var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  background: rgba(10, 10, 11, 0.6);
  text-align: center;
}
.signal__node .icon { width: 36px; height: 36px; color: var(--c-red-text); margin: 0 auto var(--sp-3); }
.signal__label {
  display: block;
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.signal__node--platforms .chips { justify-content: center; margin-top: var(--sp-3); }
.signal__wire {
  justify-self: center;
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, var(--c-red-text), transparent);
}
@media (min-width: 760px) {
  .signal__wire { width: 48px; height: 2px; background: linear-gradient(90deg, var(--c-red-text), rgba(255, 64, 73, 0.15)); }
}

.mosaic {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
}
.mosaic > :first-child { grid-row: span 2; aspect-ratio: auto; }
.mosaic .media { height: 100%; min-height: 220px; }
.mosaic .media img { position: absolute; inset: 0; }
.mosaic > :not(:first-child) { aspect-ratio: 4 / 3; }

.pillars {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-block: var(--sp-5);
  padding: 0;
  list-style: none;
}
.pillars li {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 500;
}
.pillars .icon { width: 26px; height: 26px; color: var(--c-red-text); }

/* Galería */
.gallery-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .gallery-grid--home { grid-template-columns: repeat(6, 1fr); } }
.gallery-grid .media { aspect-ratio: 4 / 5; }
.gallery-grid img { transition: transform var(--t-slow) var(--ease), filter var(--t-base); }
.gallery-grid a:hover img { transform: scale(1.04); }

/* CTA final */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(5rem, 3rem + 8vw, 10rem);
  text-align: center;
}
.cta-band__media { position: absolute; inset: 0; z-index: -2; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(153, 0, 0, 0.82), rgba(10, 10, 11, 0.92));
}
.cta-band h2 { font-size: clamp(2.1rem, 1.4rem + 3vw, 4rem); max-width: 16ch; margin-inline: auto; }
.cta-band .lead { color: rgba(255, 255, 255, 0.85); max-width: 52ch; margin: var(--sp-5) auto 0; }
.cta-band .cluster { justify-content: center; margin-top: var(--sp-6); }
.cta-band .btn--primary-light { --btn-bg: #fff; --btn-fg: var(--c-ink); --btn-bd: #fff; }
.cta-band .btn--primary-light:hover { --btn-bg: var(--c-paper-2); --btn-bd: var(--c-paper-2); }

/* 9. FOOTER ================================================================ */
.site-footer {
  background: #060607;
  border-top: 1px solid var(--c-line);
  padding-top: clamp(3rem, 2rem + 4vw, 5rem);
  font-size: var(--fs-sm);
  color: var(--c-muted);
}
.footer-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: var(--sp-7); }
}
.footer-brand img { width: 150px; margin-bottom: var(--sp-4); }
.footer-brand p { max-width: 36ch; }
.footer-title {
  margin-bottom: var(--sp-4);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text);
}
.footer-links { display: grid; gap: var(--sp-2); }
.footer-links a { text-decoration: none; transition: color var(--t-fast); }
.footer-links a:hover { color: var(--c-text); }
.footer-contact { font-style: normal; display: grid; gap: var(--sp-3); }
.footer-contact a { text-decoration: none; color: var(--c-text); }
.footer-contact a:hover { color: var(--c-red-text); }
.social { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  color: var(--c-text);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.social a:hover { background: var(--c-red-strong); border-color: var(--c-red-strong); }
.social svg { width: 18px; height: 18px; }
.footer-newsletter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}
.footer-newsletter strong { display: block; color: var(--c-text); font-size: var(--fs-base); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--c-line);
  font-size: var(--fs-xs);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--c-text); }

/* Botón flotante WhatsApp */
.wa-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform var(--t-fast);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 28px; height: 28px; }

/* 10. MOVIMIENTO / ACCESIBILIDAD =========================================== */
/* Revelado al hacer scroll: solo se oculta si JS está activo */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* 11. PÁGINAS INTERNAS ===================================================== */

/* --- Cabeceras internas: con foto, partida (texto + foto) y solo texto --- */
.page-hero h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.9rem); }
.page-hero h1 em { font-style: normal; color: var(--c-red-text); }
.page-hero .cluster { margin-top: var(--sp-6); }
.page-hero--image {
  min-height: min(76svh, 700px);
  display: grid;
  align-items: end;
}
.page-hero--plain {
  background:
    radial-gradient(55% 85% at 90% 0%, rgba(207, 1, 11, 0.26) 0%, transparent 62%),
    radial-gradient(40% 60% at 0% 100%, rgba(153, 0, 0, 0.14) 0%, transparent 70%),
    var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.page-hero--plain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 80px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 40%, #000 60%, transparent);
}
.page-hero__grid {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.page-hero__visual { position: relative; }
.page-hero__visual .media { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .page-hero__grid { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  /* Cabeceras con grid (Empresa, Servicios y portada): el bloque arranca arriba y el espacio superior depende del alto
     de la pantalla, para que los CTA queden visibles en monitores bajos (20", 1366×768). */
  :is(.page-hero, .hero):has(.page-hero__grid) { padding-top: calc(var(--header-h) + clamp(1.25rem, 5svh, 6rem)); }
  .page-hero__grid .page-hero__visual .media { max-height: min(540px, calc(100svh - var(--header-h) - 4rem)); }
  .page-hero--image { align-items: start; }
  .page-hero__visual .media { aspect-ratio: 4 / 5; max-height: 540px; }
  .page-hero__visual .media--wide { aspect-ratio: 4 / 3; }
}
.page-hero__visual .intro__tag { z-index: 1; }
.page-hero--post h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem); }
/* Títulos de Servicios y Empresa: siempre en dos líneas (parte blanca / parte roja).
   La letra se reduce solo si la línea más larga (~20 caracteres) no cabe en la columna. */
.page-hero__content:has(> .page-hero__title) { container-type: inline-size; }
:is(.page-hero, .hero) .page-hero__title { font-size: min(clamp(2.2rem, 1.5rem + 3vw, 3.9rem), 100cqi / 10.6); }
.page-hero__title em { display: block; }
.breadcrumb li[aria-current] { color: var(--c-text); }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-5);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Menú: sección actual */
.nav__item.is-current > .nav__link { color: var(--c-red-text); }
.submenu__link[aria-current="page"] .submenu__title { color: var(--c-red-text); }

/* --- Encabezado de sección centrado --- */
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* --- Fotos agrupadas (imágenes del sitio actual con esquinas redondeadas) --- */
.photo-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  align-content: start;
}
.photo-stack img { width: 100%; height: auto; }
.photo-stack > :first-child { grid-column: 1 / -1; }
.photo-stack--grid > :first-child { grid-column: auto; }

/* --- Lista con check --- */
.check-list { display: grid; gap: var(--sp-3); }
.check-list li { position: relative; padding-left: 1.9rem; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--c-red-text);
  border-bottom: 2px solid var(--c-red-text);
  transform: rotate(-45deg);
}
.section--light .check-list li::before { border-color: var(--c-red-strong); }

/* --- Cards con enlace --- */
.card { display: flex; flex-direction: column; }
.card .link-arrow { margin-top: auto; padding-top: var(--sp-4); }
a.card { text-decoration: none; color: inherit; }
a.card:hover h3 { color: var(--c-red-text); }
.section--light a.card:hover h3 { color: var(--c-red-strong); }
.card--plain { background: transparent; }

/* --- Chips como enlaces / chips grandes --- */
a.chip { text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast); }
a.chip:hover { border-color: var(--c-red-text); background: rgba(240, 0, 14, 0.1); }

/* --- Flujo: conectores en móvil y variante de 5 pasos --- */
.flow__step .icon { display: block; width: 34px; height: 34px; color: var(--c-red-text); margin-bottom: var(--sp-3); }
.flow__step--accent .icon { color: #fff; }
.flow__step h3 a { text-decoration: none; }
.flow__step h3 a:hover { color: var(--c-red-text); }
.flow--5 { --flow-cols: 5; }
@media (max-width: 759.98px) {
  .flow { gap: var(--sp-5); }
  .flow__step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -17px;
    width: 11px;
    height: 11px;
    border-right: 1.5px solid var(--c-red-text);
    border-bottom: 1.5px solid var(--c-red-text);
    transform: translateX(-50%) rotate(45deg);
  }
}
@media (min-width: 760px) and (max-width: 1023.98px) {
  .flow--5 { grid-template-columns: 1fr; gap: var(--sp-5); }
  .flow--5 .flow__step,
  .flow--5 .flow__step:first-child,
  .flow--5 .flow__step:last-child { border-radius: var(--r-md); border-left-width: 1px; }
  .flow--5 .flow__step:not(:last-child)::after {
    top: auto;
    right: auto;
    left: 50%;
    bottom: -17px;
    width: 11px;
    height: 11px;
    background: none;
    border-top: 0;
    border-right: 1.5px solid var(--c-red-text);
    border-bottom: 1.5px solid var(--c-red-text);
    transform: translateX(-50%) rotate(45deg);
  }
}

/* --- Pasos numerados (1, 2, 3, 4) --- */
.steps { display: grid; gap: var(--sp-4); counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  position: relative;
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-top: 2px solid var(--c-red-strong);
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: linear-gradient(180deg, rgba(207, 1, 11, 0.1), rgba(255, 255, 255, 0.02) 60%);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--sp-4);
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 2rem + 1.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4);
}
.step h3 { margin-bottom: var(--sp-2); }
.step p { color: var(--c-muted); }

/* --- Plataformas digitales --- */
.platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (min-width: 700px) { .platforms { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .platforms { grid-template-columns: repeat(6, 1fr); } }
.platform {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}
.platform--more {
  grid-column: 1 / -1;
  min-height: 56px;
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-muted);
  border-style: dashed;
  background: transparent;
}

/* --- Estado vacío (vacantes) --- */
.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: var(--r-lg);
  text-align: center;
}
.empty-state .icon { width: 48px; height: 48px; color: var(--c-red-text); }
.empty-state p { color: var(--c-muted); }

/* --- Equipamiento --- */
.equip {
  display: grid;
  gap: var(--sp-4);
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.equip__col { display: grid; gap: var(--sp-4); }
.equip__group {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
}
.equip__group summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 60px;
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
  font-family: var(--f-display);
  font-size: var(--fs-md);
  font-weight: 700;
}
.equip__group summary::-webkit-details-marker { display: none; }
.equip__group summary .icon { width: 26px; height: 26px; flex-shrink: 0; color: var(--c-red-text); }
.equip__count {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  white-space: nowrap;
}
.equip__group summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--t-base) var(--ease);
}
.equip__group[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.equip__group summary:hover { color: var(--c-red-text); }
.equip__list { padding: 0 var(--sp-5) var(--sp-3); }
.equip__list li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0 var(--sp-3);
  padding-block: var(--sp-3);
  border-top: 1px solid var(--c-line);
}
.equip__qty { font-family: var(--f-mono); font-size: var(--fs-sm); color: var(--c-red-text); }
.equip__name { font-weight: 600; line-height: 1.4; }
.equip__type { grid-column: 2; font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.4; }
.equip__note { padding: 0 var(--sp-5) var(--sp-3); font-size: var(--fs-sm); color: var(--c-muted); }

/* --- Blog: listado --- */
.post-list {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  transition: border-color var(--t-base);
}
.post-card:hover { border-color: rgba(255, 255, 255, 0.24); }
.post-card .media { border-radius: 0; aspect-ratio: 16 / 9; }
.post-card .media img { transition: transform var(--t-slow) var(--ease); }
.post-card:hover .media img { transform: scale(1.03); }
.post-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
}
.post-card__meta {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.post-card :is(h2, h3) { font-size: var(--fs-h3); line-height: 1.2; }
.post-card :is(h2, h3) a { text-decoration: none; }
.post-card :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; }
.post-card:hover :is(h2, h3) a { color: var(--c-red-text); }
.post-card p { color: var(--c-muted); }
.post-card .link-arrow { margin-top: auto; }

/* --- Artículo (blog y textos legales) --- */
.article-layout { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); }
.container.article-layout { width: min(100% - 2 * var(--gutter), 1120px); }
@media (min-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
  .article-aside { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.toc {
  padding: var(--sp-5);
  border: 1px solid var(--c-ink-line);
  border-radius: var(--r-md);
  background: #fff;
}
.toc h2 {
  margin-bottom: var(--sp-3);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
}
.toc ol { display: grid; gap: var(--sp-2); counter-reset: toc; }
.toc li {
  counter-increment: toc;
  display: grid;
  grid-template-columns: 1.7rem 1fr;
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  padding-top: 2px;
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  color: var(--c-red-strong);
}
.toc a { text-decoration: none; color: var(--c-ink); }
.toc a:hover { color: var(--c-red-strong); text-decoration: underline; }

.article { max-width: 74ch; font-size: 1.0625rem; }
.article > * + * { margin-top: var(--sp-4); }
.article h2 { margin-top: var(--sp-8); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.article h3 { margin-top: var(--sp-6); font-size: var(--fs-md); }
.article h2:first-child { margin-top: 0; }
.article a:not(.btn) { color: var(--c-red-strong); }
.article ul:not([class]), .article ol:not([class]) { padding-left: 1.3rem; }
.article li + li { margin-top: var(--sp-1); }
.article .media { margin-block: var(--sp-6); }
.article-lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--c-ink-muted); }
.article .article-cover { margin: 0 0 var(--sp-6); aspect-ratio: 16 / 9; }

.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-left: 3px solid var(--c-red-strong);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: #fff;
}
.article .note { margin-block: var(--sp-6); }
.note svg { width: 20px; height: 20px; margin-top: 4px; color: var(--c-red-strong); }

.compare {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.article .compare { margin-block: var(--sp-6); }
.compare--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.compare__item {
  padding: var(--sp-5);
  border: 1px solid var(--c-ink-line);
  border-radius: var(--r-md);
  background: #fff;
}
.article .compare__item h3 { margin: 0 0 var(--sp-2); }
.compare__item p { font-size: var(--fs-sm); color: var(--c-ink-muted); }
.compare__item--photo { padding: 0; overflow: hidden; min-height: 220px; }
.compare__item--photo img { width: 100%; height: 100%; object-fit: cover; }
.article .compare__item--photo { margin: 0; }

.figure-split { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 700px) { .figure-split { grid-template-columns: 1fr 1fr; } }
.article .figure-split .media { margin: 0; }
.article .figure-split h3 { margin: 0 0 var(--sp-2); }

.post-cta {
  margin-top: var(--sp-8);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(207, 1, 11, 0.45) 0%, transparent 60%),
    var(--c-ink);
  color: #fff;
}
.article .post-cta h2 { margin-top: 0; color: #fff; }
.post-cta p { margin-top: var(--sp-3); color: rgba(255, 255, 255, 0.8); }
.post-cta a:not(.btn) { color: #fff; }
.post-cta .cluster { margin-top: var(--sp-5); }
.section--light .post-cta .btn--ghost { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.4); }
.section--light .post-cta .btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.1); --btn-bd: #fff; }

/* --- Newsletter --- */
.newsletter {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(80% 140% at 100% 100%, rgba(207, 1, 11, 0.22) 0%, transparent 60%),
    var(--c-surface);
}
.newsletter .media { width: 120px; aspect-ratio: 1; border-radius: 50%; }
.newsletter h2 { font-size: var(--fs-h3); }
.newsletter p { margin-top: var(--sp-2); color: var(--c-muted); }
@media (min-width: 760px) { .newsletter { grid-template-columns: auto 1fr auto; gap: var(--sp-6); } }

/* --- Contacto --- */
.contact-layout { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
@media (min-width: 1000px) { .contact-layout { grid-template-columns: 1.15fr 0.85fr; } }
.contact-title { font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
.contact-list { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.contact-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--sp-4);
  align-items: start;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
}
.contact-item__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--c-surface-2);
  color: var(--c-red-text);
}
.contact-item__icon svg { width: 20px; height: 20px; }
.contact-item h3 {
  margin-bottom: var(--sp-1);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.contact-item a { font-weight: 600; text-decoration: none; }
.contact-item a:hover { color: var(--c-red-text); }
.contact-item p + p { margin-top: var(--sp-1); }
.contact-item .btn { margin-top: var(--sp-3); }
.map {
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface-2);
}
@media (min-width: 760px) { .map { aspect-ratio: 21 / 8; } }
.map iframe { width: 100%; height: 100%; border: 0; }

/* --- Galería completa y visor --- */
@media (min-width: 1100px) { .gallery-grid--page { grid-template-columns: repeat(4, 1fr); } }
.gallery-grid--page li { display: block; }
.gallery-grid--page .media { display: block; height: 100%; }

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 5, 6, 0.95);
  color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox__img {
  width: auto;
  height: auto;
  max-width: min(92vw, 1000px);
  max-height: 84vh;
  border-radius: var(--r-md);
}
.lightbox__btn,
.lightbox__close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background var(--t-fast);
}
.lightbox__btn:hover,
.lightbox__close:hover { background: var(--c-red-strong); border-color: var(--c-red-strong); }
.lightbox__btn { top: 50%; transform: translateY(-50%); }
.lightbox__btn--prev { left: max(0.75rem, 2vw); }
.lightbox__btn--next { right: max(0.75rem, 2vw); }
.lightbox__close { top: 1rem; right: 1rem; width: 48px; height: 48px; }
.lightbox svg { width: 20px; height: 20px; }
.lightbox__count {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--c-muted);
}
@media (max-width: 599.98px) {
  .lightbox__btn { top: auto; bottom: 0.75rem; transform: none; }
}

/* --- Formulario embebido --- */
.form-note { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--c-muted); }
.form-note a { color: var(--c-text); }

/* Home — Nuestro estudio: tira de fotos que avanza lentamente a la derecha.
   Dos listas iguales en fila; al desplazar una lista completa el ciclo empalma sin salto. */
.photo-strip {
  --strip-gap: var(--sp-4);
  --strip-cols: 2;
  container-type: inline-size;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
@media (min-width: 760px) { .photo-strip { --strip-cols: 4; } }
.photo-strip__track {
  display: flex;
  flex: none;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: photo-strip 70s linear infinite;
}
.photo-strip:hover .photo-strip__track { animation-play-state: paused; }
.photo-strip__item {
  flex: none;
  width: calc((100cqi - (var(--strip-cols) - 1) * var(--strip-gap)) / var(--strip-cols));
  margin-right: var(--strip-gap);
  aspect-ratio: 576 / 306;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-surface);
}
.photo-strip__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes photo-strip {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .photo-strip { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .photo-strip__track { animation: none; }
  .photo-strip__track[aria-hidden="true"] { display: none; }
}

/* --- Trabaja con nosotros: correo para enviar la hoja de vida --- */
.cv-mail {
  display: grid;
  justify-items: start;
  gap: var(--sp-3);
  align-self: center;
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border: 1px solid var(--c-ink-line);
  border-radius: var(--r-lg);
  background: #fff;
  color: var(--c-ink);
}
.cv-mail__icon { width: 44px; height: 44px; color: var(--c-red-strong); }
.cv-mail__label {
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
}
.cv-mail__address {
  font-family: var(--f-display);
  font-size: clamp(1.35rem, 1rem + 1.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cv-mail__address:hover { color: var(--c-red-strong); }
.cv-mail__hint { color: var(--c-ink-muted); }
.cv-mail .btn { margin-top: var(--sp-2); }

/* ---------------------------------------------------------
   Medalla de calificación de Google (portada, Opiniones)
   Nota fija 5,0 — sin API; enlaza al perfil de Google Maps.
   El anillo y las estrellas se animan al recibir .is-visible
   (lo pone el revelado de [data-reveal] en main.js).
   --------------------------------------------------------- */
.section-head__aside { display: grid; gap: var(--sp-5); justify-items: start; }

.medal {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  width: fit-content;
  max-width: 100%;
  padding: var(--sp-4) clamp(1.1rem, 0.8rem + 1.5vw, 2rem) var(--sp-4) var(--sp-4);
  background: #fff;
  border: 1px solid var(--c-ink-line);
  border-radius: 26px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 18px 40px rgba(0, 0, 0, 0.08);
}

.medal__score {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  flex: none;
  width: 108px;
  height: 108px;
  line-height: 1;
}
.medal__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* arranca en las 12 en punto */
}
.medal__ring-track,
.medal__ring-fill { fill: none; stroke-width: 7; stroke-linecap: round; }
.medal__ring-track { stroke: var(--c-red); opacity: 0.14; }
.medal__ring-fill {
  stroke: var(--c-red-strong);
  stroke-dasharray: 276.46;   /* 2π × 44 */
  stroke-dashoffset: 276.46;  /* vacío hasta entrar en pantalla */
}
/* 5,0 de 5 = anillo completo */
.medal.is-visible .medal__ring-fill {
  animation: medalla-anillo 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
@keyframes medalla-anillo { to { stroke-dashoffset: 0; } }

.medal__score-value {
  position: relative;
  font-family: var(--f-display);
  font-size: 2.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--c-ink);
}
.medal.is-visible .medal__score-value {
  animation: medalla-nota 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}
@keyframes medalla-nota { from { opacity: 0; transform: scale(0.72); } }

.medal__score-label {
  position: relative;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
}

.medal__body { display: flex; flex-direction: column; gap: var(--sp-1); }
.medal__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-ink);
}
.medal__title svg { width: 20px; height: 20px; flex: none; }

.medal__stars { display: flex; gap: 2px; color: var(--c-red-strong); }
.medal__stars svg { width: 18px; height: 18px; fill: currentColor; }
.medal.is-visible .medal__stars svg {
  animation: medalla-estrella 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.medal.is-visible .medal__stars svg:nth-child(1) { animation-delay: 0.45s; }
.medal.is-visible .medal__stars svg:nth-child(2) { animation-delay: 0.55s; }
.medal.is-visible .medal__stars svg:nth-child(3) { animation-delay: 0.65s; }
.medal.is-visible .medal__stars svg:nth-child(4) { animation-delay: 0.75s; }
.medal.is-visible .medal__stars svg:nth-child(5) { animation-delay: 0.85s; }
@keyframes medalla-estrella { from { opacity: 0; transform: scale(0.4) translateY(4px); } }

.medal__count { margin: 0; font-size: var(--fs-sm); color: var(--c-ink-muted); }
.medal__link {
  align-self: flex-start;
  margin-top: var(--sp-1);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-red-strong);
  text-decoration: none;
}
.medal__link:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 420px) {
  .medal { gap: var(--sp-4); }
  .medal__score { width: 88px; height: 88px; }
  .medal__score-value { font-size: 1.75rem; }
}

/* Sin JS no hay .is-visible: mostrar todo completo */
html:not(.js) .medal__ring-fill { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: reduce) {
  .medal.is-visible .medal__score-value,
  .medal.is-visible .medal__stars svg { animation: none; }
  .medal .medal__ring-fill { animation: none; stroke-dashoffset: 0; }
}

/* Opiniones: eje central — título, medalla y reseñas alineados al centro */
.section-head--center + .medal {
  margin: calc(-1 * clamp(0.75rem, 0.5rem + 1vw, 1.75rem)) auto clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.section-head--center .lead { max-width: 620px; }

/* ---------------------------------------------------------
   SEO: el eyebrow forma parte del H1 (palabra clave en el encabezado
   principal) pero se ve exactamente igual que el eyebrow de párrafo.
   --------------------------------------------------------- */
h1 > .eyebrow {
  display: flex;
  width: fit-content;
  line-height: 1.4;
  text-wrap: initial;
}

/* ---------------------------------------------------------
   Preguntas frecuentes (AEO) — acordeón nativo con <details>
   --------------------------------------------------------- */
.faq { display: grid; gap: var(--sp-3); }
.faq__item {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface);
  transition: border-color var(--t-base) var(--ease);
}
.faq__item[open] { border-color: rgba(255, 64, 73, 0.45); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__q { font-size: var(--fs-base); font-family: var(--f-body); font-weight: 600; line-height: 1.4; }
.faq__icon {
  position: relative;
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px; height: 2px;
  margin: -1px 0 0 -5px;
  background: var(--c-red-text);
  transition: transform var(--t-base) var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__a { padding: 0 var(--sp-5) var(--sp-5); color: var(--c-muted); }
.faq__a a { color: var(--c-text); text-decoration: underline; text-underline-offset: 3px; }
.faq__a a:hover { color: var(--c-red-text); }

.section--light .faq__item { background: #fff; border-color: var(--c-ink-line); }
.section--light .faq__item[open] { border-color: rgba(207, 1, 11, 0.35); }
.section--light .faq__icon { border-color: var(--c-ink-line); }
.section--light .faq__icon::before,
.section--light .faq__icon::after { background: var(--c-red-strong); }
.section--light .faq__a { color: var(--c-ink-muted); }
.section--light .faq__a a { color: var(--c-ink); }
.section--light .faq__a a:hover { color: var(--c-red-strong); }

@media (prefers-reduced-motion: reduce) {
  .faq__icon::before, .faq__icon::after { transition: none; }
}
