/* ==========================================================================
   Dúo Vertical S.L. — Hoja de estilos principal
   Arquitectura por capas (cascade layers):
     reset → tokens → base → layout → components → sections → utilities
   Sin dependencias ni build: CSS moderno con mejora progresiva.
   ========================================================================== */

@layer reset, tokens, base, layout, components, sections, utilities;

/* --------------------------------------------------------------------------
   Fuentes (autoalojadas: rendimiento + RGPD, sin peticiones a terceros)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========================================================================== */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100svh; }
  img, picture, svg, video { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
}

/* ========================================================================== */
@layer tokens {
  :root {
    /* Marca */
    --navy-950: #061229;
    --navy-900: #0b1e3d;
    --navy-800: #13294f;
    --navy-700: #1d3a6b;
    --orange-500: #f26b0f;
    --orange-600: #e05d05;
    --orange-700: #b94c06;          /* naranja accesible sobre fondo claro (AA) */
    --orange-100: #fff1e6;

    /* Neutros */
    --ink: var(--navy-900);
    --muted: #4b5a74;
    --line: #dfe4ec;
    --surface: #ffffff;
    --tint: #f3f5f9;

    /* Tipografía fluida */
    --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --fs-sm: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
    --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --fs-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
    --fs-h3: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
    --fs-h2: clamp(1.9rem, 1.35rem + 2.4vw, 3.1rem);
    --fs-h1: clamp(2.1rem, 1.3rem + 3.2vw, 3.9rem);

    /* Espaciado */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1.25rem;
    --space-lg: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
    --space-xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

    /* Forma y profundidad */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgb(11 30 61 / 0.06), 0 2px 8px rgb(11 30 61 / 0.06);
    --shadow: 0 10px 30px -10px rgb(11 30 61 / 0.25);
    --shadow-lg: 0 30px 60px -20px rgb(6 18 41 / 0.45);

    --container: 1200px;
    --header-h: 72px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    interpolate-size: allow-keywords;
  }
}

/* ========================================================================== */
@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    color-scheme: light;
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  }

  body {
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
  }

  h1, h2, h3 {
    line-height: 1.08;
    font-weight: 800;
    font-stretch: 108%;
    letter-spacing: -0.015em;
    text-wrap: balance;
  }
  h3 { line-height: 1.25; font-size: var(--fs-h3); letter-spacing: -0.005em; }
  p, li, dd, summary { text-wrap: pretty; }
  strong { font-weight: 700; }

  a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
  a:hover { color: var(--orange-700); }

  :focus-visible {
    outline: 3px solid var(--orange-500);
    outline-offset: 3px;
    border-radius: 4px;
  }

  ::selection { background: var(--orange-500); color: #fff; }
}

/* ========================================================================== */
@layer layout {
  .container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
  }

  .section { padding-block: var(--space-xl); position: relative; }
  .section--tint { background: var(--tint); }
  .section--dark {
    background:
      radial-gradient(1200px 500px at 85% -10%, rgb(242 107 15 / 0.14), transparent 60%),
      var(--navy-900);
    color: #e7ecf5;
  }
  .section--dark :is(h2, h3) { color: #fff; }

  .section-head {
    display: grid;
    gap: var(--space-sm);
    max-width: 46rem;
    margin-block-end: var(--space-lg);
  }
  .section-head--split {
    max-width: none;
    align-items: end;
    gap: var(--space-md) var(--space-lg);
  }
  @media (min-width: 56em) {
    .section-head--split { grid-template-columns: 1.1fr 1fr; }
  }

  .section-title { font-size: var(--fs-h2); }
  .section-lead { font-size: var(--fs-lg); color: var(--muted); }
  .section--dark .section-lead { color: #b9c4d8; }
}

/* ========================================================================== */
@layer components {
  /* ---- Sprite e iconos ---- */
  .sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
  .icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* ---- Accesibilidad ---- */
  .skip-link {
    position: absolute;
    inset-inline-start: var(--space-md);
    inset-block-start: -100px;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--orange-500);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: inset-block-start 0.2s;
  }
  .skip-link:focus { inset-block-start: var(--space-md); color: #fff; }

  /* ---- Etiquetas ---- */
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: var(--fs-sm);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange-700);
  }
  .eyebrow::before {
    content: "";
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: var(--orange-500);
  }
  .eyebrow:has(.icon)::before { display: none; }
  .eyebrow--light { color: var(--orange-500); }
  .text-accent { color: var(--orange-500); }

  /* ---- Botones ---- */
  .btn {
    --_bg: transparent;
    --_fg: currentColor;
    --_bd: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    min-height: 48px;
    padding: 0.7em 1.35em;
    border: 2px solid var(--_bd);
    border-radius: 999px;
    background: var(--_bg);
    color: var(--_fg);
    font-weight: 700;
    font-size: var(--fs-base);
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.25s var(--ease), background-color 0.2s, box-shadow 0.25s, color 0.2s, border-color 0.2s;
  }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .btn--lg { min-height: 56px; padding-inline: 1.6em; font-size: var(--fs-lg); }
  .btn--primary {
    --_bg: var(--orange-500);
    --_fg: #fff;
    box-shadow: 0 10px 24px -10px rgb(242 107 15 / 0.75);
  }
  .btn--primary:hover { --_bg: var(--orange-600); color: #fff; box-shadow: 0 16px 30px -12px rgb(242 107 15 / 0.85); }
  .btn--ghost { --_fg: #fff; --_bd: rgb(255 255 255 / 0.35); }
  .btn--ghost:hover { --_bd: #fff; --_bg: rgb(255 255 255 / 0.08); color: #fff; }
  .btn--outline { --_fg: var(--navy-900); --_bd: var(--navy-900); }
  .btn--outline:hover { --_bg: var(--navy-900); color: #fff; }

  /* ---- Lista con checks ---- */
  .checklist { display: grid; gap: 0.4rem; font-size: var(--fs-sm); color: var(--muted); }
  .checklist li { display: flex; gap: 0.6rem; align-items: baseline; }
  .checklist li::before {
    content: "";
    flex: 0 0 0.5rem;
    height: 0.5rem;
    border-radius: 2px;
    background: var(--orange-500);
    transform: rotate(45deg) translateY(-1px);
  }

  /* ======================= Cabecera ======================= */
  .site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: rgb(255 255 255 / 0.86);
    backdrop-filter: saturate(1.6) blur(14px);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-block-end: 1px solid transparent;
  }
  @supports (animation-timeline: scroll()) {
    .site-header {
      animation: header-elevate linear both;
      animation-timeline: scroll(root);
      animation-range: 0 120px;
    }
    @keyframes header-elevate {
      to { border-color: var(--line); box-shadow: 0 6px 24px -12px rgb(11 30 61 / 0.25); background: rgb(255 255 255 / 0.95); }
    }
  }
  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    min-height: var(--header-h);
  }
  .brand { display: block; flex-shrink: 0; }
  .brand__logo { width: auto; height: 50px; }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--navy-900);
    color: #fff;
  }
  .nav-toggle .icon { width: 24px; height: 24px; }

  /* Menú móvil: Popover API nativo (sin JS para abrir/cerrar) */
  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(88vw, 380px);
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: calc(var(--space-lg) + 48px) var(--space-lg) var(--space-lg);
    border: 0;
    background: var(--navy-900);
    color: #fff;
    overflow-y: auto;
    flex-direction: column;
    gap: var(--space-lg);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease), overlay 0.35s allow-discrete, display 0.35s allow-discrete;
  }
  .site-nav:popover-open { display: flex; transform: translateX(0); }
  @starting-style { .site-nav:popover-open { transform: translateX(100%); } }
  .site-nav::backdrop {
    background: rgb(6 18 41 / 0.55);
    backdrop-filter: blur(3px);
  }
  .site-nav__close {
    position: absolute;
    inset: var(--space-md) var(--space-md) auto auto;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgb(255 255 255 / 0.2);
    border-radius: 12px;
    background: transparent;
    color: #fff;
  }
  .site-nav__close .icon { width: 24px; height: 24px; }
  .site-nav__list { display: grid; gap: 0.25rem; }
  .site-nav__list a {
    display: block;
    padding: 0.7rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    font-stretch: 108%;
    text-decoration: none;
    border-block-end: 1px solid rgb(255 255 255 / 0.1);
  }
  .site-nav__list a:hover,
  .site-nav__list a[aria-current="true"] { color: var(--orange-500); }
  .site-nav__cta { align-self: stretch; }

  @media (min-width: 64em) {
    .nav-toggle, .site-nav__close { display: none; }
    .site-nav,
    .site-nav:popover-open {
      position: static;
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: var(--space-md);
      width: auto;
      height: auto;
      padding: 0;
      background: none;
      color: var(--ink);
      overflow: visible;
      transform: none;
      transition: none;
    }
    .site-nav__list { display: flex; gap: 0.15rem; }
    .site-nav__list a {
      position: relative;
      padding: 0.5rem 0.7rem;
      font-size: 0.975rem;
      font-weight: 600;
      font-stretch: 100%;
      border: 0;
    }
    .site-nav__list a::after {
      content: "";
      position: absolute;
      inset: auto 0.7rem 0.2rem;
      height: 2px;
      background: var(--orange-500);
      border-radius: 2px;
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s var(--ease);
    }
    .site-nav__list a:hover { color: var(--ink); }
    .site-nav__list a:hover::after,
    .site-nav__list a[aria-current="true"]::after { transform: scaleX(1); }
    .site-nav__list a[aria-current="true"] { color: var(--ink); }
    .site-nav__cta { align-self: auto; min-height: 44px; padding-block: 0.55em; }
  }

  /* ======================= Antes / Después ======================= */
  .ba { display: grid; height: 100%; }
  .ba__frame {
    --pos: 50%;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--navy-800);
    isolation: isolate;
    touch-action: pan-y;
  }
  .ba__frame:has(.ba__range:focus-visible) { outline: 3px solid var(--orange-500); outline-offset: 3px; }
  .ba__frame picture { position: absolute; inset: 0; }
  .ba__img { width: 100%; height: 100%; object-fit: cover; }
  .ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); z-index: 1; }
  .ba__frame::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: var(--pos);
    width: 3px;
    translate: -50% 0;
    background: #fff;
    box-shadow: 0 0 12px rgb(0 0 0 / 0.35);
    z-index: 2;
    pointer-events: none;
  }
  .ba__handle {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: var(--pos);
    translate: -50% -50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--orange-500);
    color: #fff;
    border: 3px solid #fff;
    box-shadow: var(--shadow);
    pointer-events: none;
  }
  .ba__tag {
    position: absolute;
    inset-block-start: 0.75rem;
    z-index: 3;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 6px;
    pointer-events: none;
  }
  .ba__tag--before { inset-inline-start: 0.75rem; background: var(--navy-900); color: #fff; }
  .ba__tag--after { inset-inline-end: 0.75rem; background: var(--orange-500); color: #fff; }
  .ba__range {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
    appearance: none;
  }
}

/* ========================================================================== */
@layer sections {
  /* ======================= Hero ======================= */
  .hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(5rem, 4rem + 5vw, 8rem);
    color: #fff;
    background:
      radial-gradient(900px 600px at 100% 0%, rgb(242 107 15 / 0.22), transparent 60%),
      radial-gradient(700px 500px at 0% 100%, rgb(29 58 107 / 0.9), transparent 70%),
      var(--navy-900);
  }
  .hero__grid {
    position: relative;
    display: grid;
    gap: var(--space-lg);
    align-items: center;
  }
  .hero__content { display: grid; gap: var(--space-md); justify-items: start; }
  .hero__title { font-size: var(--fs-h1); font-stretch: 106%; text-transform: uppercase; letter-spacing: -0.01em; }
  .hero__lead { font-size: var(--fs-lg); color: #c9d3e6; max-width: 36rem; }
  .hero__lead strong { color: #fff; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-block-start: var(--space-xs); width: 100%; }
  @media (max-width: 35.99em) { .hero__actions .btn { flex: 1 1 100%; } }
  .hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: #dbe3f1;
  }
  .hero__trust li { display: inline-flex; align-items: center; gap: 0.4rem; }
  .hero__trust .icon { color: var(--orange-500); stroke-width: 3; width: 1.05em; height: 1.05em; }

  .hero__media { position: relative; justify-self: center; width: min(100%, 460px); }
  .hero__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--orange-500);
    clip-path: polygon(22% 0, 26% 0, 4% 100%, 0 100%);
  }
  .hero__media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 15%;
    clip-path: polygon(26% 0, 100% 0, 100% 100%, 4% 100%);
  }
  .hero__badge {
    position: absolute;
    inset-inline-end: 0;
    inset-block-end: 6%;
    max-width: 15.5rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    background: rgb(6 18 41 / 0.88);
    border: 1px solid rgb(255 255 255 / 0.12);
    backdrop-filter: blur(6px);
    font-size: var(--fs-sm);
    line-height: 1.4;
    color: #dbe3f1;
    box-shadow: var(--shadow-lg);
  }
  .hero__badge-title { display: block; color: var(--orange-500); font-weight: 800; font-size: 1.05rem; }

  @media (min-width: 56em) {
    .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
    .hero__media { justify-self: end; }
    .hero__badge { inset-inline-end: auto; inset-inline-start: -12%; }
  }

  /* ======================= Ventajas ======================= */
  .perks { position: relative; z-index: 2; margin-block-start: clamp(-4rem, -3rem - 2vw, -3rem); }
  .perks__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
  }
  .perk {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: var(--space-md) var(--space-md);
    border-block-end: 1px solid var(--line);
  }
  .perk p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
  .perk strong { display: block; color: var(--ink); font-size: var(--fs-base); margin-block-end: 0.15rem; }
  .perk__icon {
    width: 46px;
    height: 46px;
    padding: 11px;
    border-radius: 12px;
    background: var(--orange-100);
    color: var(--orange-600);
  }
  @media (min-width: 40em) {
    .perk { border-inline-end: 1px solid var(--line); }
  }

  /* ======================= Servicios ======================= */
  .services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
    gap: var(--space-md);
  }
  .services > li { container-type: inline-size; }
  .service-card {
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  }
  .service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
  .service-card__media { overflow: hidden; background: var(--navy-800); }
  .service-card__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: 50% 30%;
    transition: transform 0.6s var(--ease);
  }
  .service-card:hover .service-card__media img { transform: scale(1.06); }
  .service-card__body {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.7rem;
    padding: calc(var(--space-md) + 18px) var(--space-md) var(--space-md);
  }
  .service-card__body > p { color: var(--muted); }
  .service-card__icon {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: var(--space-md);
    translate: 0 -50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--navy-900);
    color: var(--orange-500);
    box-shadow: 0 8px 18px -8px rgb(11 30 61 / 0.6);
    border: 3px solid var(--surface);
  }
  .service-card__icon .icon { width: 26px; height: 26px; }
  .service-card__title { font-size: var(--fs-h3); }

  /* Tarjeta horizontal cuando el hueco es amplio (container query) */
  @container (min-width: 560px) {
    .service-card { grid-template-columns: 0.9fr 1fr; grid-template-rows: none; }
    .service-card__media img { height: 100%; aspect-ratio: auto; }
  }

  /* ======================= Nosotros ======================= */
  .about { display: grid; gap: var(--space-lg); align-items: center; }
  .about__media { position: relative; justify-self: center; width: min(100%, 440px); }
  .about__media::before {
    content: "";
    position: absolute;
    inset: clamp(0.75rem, 2vw, 1.25rem) calc(-1 * clamp(0.5rem, 2vw, 1.25rem)) calc(-1 * clamp(0.75rem, 2vw, 1.25rem)) clamp(0.75rem, 2vw, 1.25rem);
    border: 3px solid var(--orange-500);
    border-radius: var(--radius-lg);
  }
  .about__media img {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
  }
  .about__caption {
    position: absolute;
    inset-inline-start: 0.75rem;
    inset-block-end: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    background: var(--navy-900);
    color: #c9d3e6;
    font-size: var(--fs-sm);
    line-height: 1.35;
    box-shadow: var(--shadow-lg);
  }
  .about__caption strong { display: block; color: #fff; font-size: var(--fs-base); }
  .about__caption .icon { width: 34px; height: 34px; color: var(--orange-500); }
  .about__content { display: grid; gap: var(--space-md); }
  .about__content > p { color: var(--muted); }
  .about__content > p strong { color: var(--ink); }

  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-block: var(--space-xs);
  }
  .stat {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.2rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border-block-start: 4px solid var(--orange-500);
  }
  .stat dt { font-size: 0.8125rem; color: var(--muted); line-height: 1.3; }
  .stat dd { white-space: nowrap; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 900; font-stretch: 115%; line-height: 1; color: var(--navy-900); }
  .stat dd span { font-size: 0.55em; color: var(--orange-700); font-weight: 800; }

  .subhead { font-size: var(--fs-base); text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy-700); }
  .sectors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: 0.6rem;
  }
  .sectors li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: var(--fs-sm);
  }
  .sectors .icon { color: var(--orange-600); }

  @media (min-width: 56em) {
    .about { grid-template-columns: 5fr 7fr; gap: clamp(2.5rem, 5vw, 5rem); }
    .about__caption { inset-inline-start: -0.75rem; }
  }

  /* ======================= Seguridad ======================= */
  .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: var(--space-md);
  }
  .feature {
    display: grid;
    gap: 0.7rem;
    align-content: start;
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.02));
    border: 1px solid rgb(255 255 255 / 0.1);
    transition: border-color 0.3s, transform 0.35s var(--ease);
  }
  .feature:hover { border-color: rgb(242 107 15 / 0.6); transform: translateY(-4px); }
  .feature p { color: #b9c4d8; font-size: var(--fs-sm); }
  .feature__icon { width: 44px; height: 44px; color: var(--orange-500); stroke-width: 1.75; }
  .feature__title { font-size: var(--fs-h3); }

  /* ======================= Proceso ======================= */
  .steps {
    counter-reset: step;
    display: grid;
    gap: var(--space-md);
    position: relative;
  }
  .step {
    counter-increment: step;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    row-gap: 0.2rem;
    align-items: start;
    padding-inline-start: 0;
  }
  .step::before {
    content: counter(step);
    grid-row: span 3;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--orange-500);
    color: #fff;
    font-weight: 900;
    font-size: 1.3rem;
    font-stretch: 115%;
    box-shadow: 0 0 0 6px var(--orange-100);
    position: relative;
    z-index: 1;
  }
  .step::after {
    content: "";
    position: absolute;
    inset-inline-start: 25px;
    inset-block: 52px calc(-1 * var(--space-md));
    width: 2px;
    background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px);
  }
  .step:last-child::after { display: none; }
  .step__icon { width: 30px; height: 30px; color: var(--navy-700); margin-block-end: 0.3rem; }
  .step__title { font-size: var(--fs-h3); }
  .step p { color: var(--muted); font-size: var(--fs-sm); }

  @media (min-width: 62em) {
    .steps { grid-template-columns: repeat(5, 1fr); gap: var(--space-md); }
    .step { grid-template-columns: 1fr; row-gap: 0.6rem; text-align: center; justify-items: center; }
    .step::before { grid-row: auto; margin-block-end: 0.5rem; }
    .step::after {
      inset-block: 26px auto;
      inset-inline: calc(50% + 34px) calc(-50% + 34px);
      width: auto;
      height: 2px;
      background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px);
    }
  }

  /* ======================= Casos antes/después ======================= */
  .cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: var(--space-md);
  }
  .case {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: clip;
  }
  .case__body { display: grid; gap: 0.4rem; padding: var(--space-md); }
  .case__body p { color: var(--muted); font-size: var(--fs-sm); }

  /* ======================= FAQ ======================= */
  .faq { display: grid; gap: var(--space-lg); align-items: start; }
  @media (min-width: 62em) {
    .faq { grid-template-columns: 1fr 1.5fr; gap: clamp(3rem, 6vw, 6rem); }
    .faq__head { position: sticky; inset-block-start: calc(var(--header-h) + 2rem); }
  }
  .faq__list { display: grid; gap: 0.75rem; }
  .faq__item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.25s, box-shadow 0.25s;
  }
  .faq__item[open] { border-color: var(--orange-500); box-shadow: var(--shadow-sm); }
  .faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    font-weight: 700;
    font-size: var(--fs-lg);
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
  }
  .faq__item summary::-webkit-details-marker { display: none; }
  .faq__item summary::after {
    content: "";
    flex: 0 0 32px;
    height: 32px;
    border-radius: 50%;
    background:
      linear-gradient(currentColor 0 0) center / 12px 2px no-repeat,
      linear-gradient(currentColor 0 0) center / 2px 12px no-repeat,
      var(--tint);
    color: var(--navy-900);
    transition: transform 0.3s var(--ease), background-color 0.3s;
  }
  .faq__item[open] summary::after {
    transform: rotate(45deg);
    background:
      linear-gradient(#fff 0 0) center / 12px 2px no-repeat,
      linear-gradient(#fff 0 0) center / 2px 12px no-repeat,
      var(--orange-500);
  }
  .faq__item p { padding: 0 1.25rem 1.25rem; color: var(--muted); }
  .faq__item p strong { color: var(--ink); }
  @supports selector(::details-content) {
    .faq__item::details-content {
      block-size: 0;
      overflow: hidden;
      transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete;
    }
    .faq__item[open]::details-content { block-size: auto; }
  }

  /* ======================= Contacto ======================= */
  .contact__grid { display: grid; gap: var(--space-lg); align-items: start; }
  .contact__info { display: grid; gap: var(--space-md); }
  @media (min-width: 62em) {
    .contact__grid { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 5rem); }
  }
  .contact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0.75rem; }
  .contact-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 100%;
    padding: 0.95rem 1.1rem;
    border-radius: var(--radius);
    background: rgb(255 255 255 / 0.06);
    border: 1px solid rgb(255 255 255 / 0.12);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease);
  }
  .contact-list li:last-child { grid-column: 1 / -1; }
  .contact-card:hover { color: #fff; background: rgb(242 107 15 / 0.15); border-color: var(--orange-500); transform: translateY(-2px); }
  .contact-card .icon {
    width: 44px;
    height: 44px;
    padding: 11px;
    border-radius: 12px;
    background: var(--orange-500);
    color: #fff;
  }
  .contact-card small { display: block; font-size: 0.8125rem; font-weight: 500; color: #b9c4d8; }
  .contact__area { display: flex; gap: 0.6rem; align-items: center; color: #c9d3e6; }
  .contact__area .icon { color: var(--orange-500); }
  .contact__area strong { color: #fff; }

  .contact-form {
    display: grid;
    gap: 1rem;
    padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
  }
  .contact-form__title { font-size: var(--fs-h3); color: var(--ink) !important; }
  .field { display: grid; gap: 0.35rem; min-width: 0; }
  .field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
  .field label { font-size: var(--fs-sm); font-weight: 700; }
  .field :is(input, select, textarea) {
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--tint);
    font-size: 1rem; /* evita el zoom automático en iOS */
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  }
  .field textarea { resize: vertical; min-height: 120px; }
  .field :is(input, select, textarea):focus {
    outline: none;
    border-color: var(--orange-500);
    background: #fff;
    box-shadow: 0 0 0 4px rgb(242 107 15 / 0.18);
  }
  .field :is(input, textarea):user-invalid { border-color: #c62828; }
  .field--check { grid-template-columns: auto 1fr; align-items: start; gap: 0.6rem; }
  .field--check input { width: 20px; height: 20px; min-height: 0; margin-block-start: 0.2rem; accent-color: var(--orange-500); }
  .field--check label { font-weight: 500; }
  .field--check a { color: var(--orange-700); }
  .contact-form__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
  .contact-form__actions .btn { flex: 1 1 200px; }
  .contact-form__actions .btn[hidden] { display: none; }
  .btn--whatsapp { --_fg: var(--navy-900); --_bd: var(--navy-900); }
  .btn--whatsapp:hover { --_bg: var(--navy-900); color: #fff; }
  .contact-form__actions .btn:only-child { flex-basis: 100%; }
  .contact-form__actions .btn:only-child.btn--whatsapp { --_bg: var(--orange-500); --_fg: #fff; --_bd: transparent; }
  .field--trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .contact-form__status { font-weight: 600; }
  .contact-form__status:empty { display: none; }
  .contact-form__status[data-state="ok"] { color: #1b6e3a; }
  .contact-form__status[data-state="error"] { color: #b3261e; }
  .contact-form__note { font-size: 0.8125rem; color: var(--muted); }

  /* ======================= Pie ======================= */
  .site-footer {
    background: var(--navy-950);
    color: #aab6cb;
    padding-block: var(--space-xl) var(--space-lg);
    font-size: var(--fs-sm);
    border-block-start: 4px solid var(--orange-500);
  }
  .site-footer a { color: #dbe3f1; text-decoration: none; }
  .site-footer a:hover { color: var(--orange-500); }
  .site-footer__grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  }
  .site-footer__brand { display: grid; gap: 1rem; max-width: 22rem; }
  .site-footer__brand img { width: 190px; }
  .site-footer__title {
    margin-block-end: 0.9rem;
    font-size: 0.875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
  }
  .site-footer__nav ul { display: grid; gap: 0.45rem; }
  .site-footer address { font-style: normal; line-height: 2; }
  .site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-block-start: var(--space-lg);
    padding-block-start: var(--space-md);
    border-block-start: 1px solid rgb(255 255 255 / 0.1);
    font-size: 0.8125rem;
  }
  .site-footer__legal ul { display: flex; gap: 1.25rem; }

  /* ======================= Botón flotante de llamada (móvil) ======================= */
  .fab {
    position: fixed;
    inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--orange-500);
    color: #fff;
    box-shadow: 0 12px 28px -8px rgb(242 107 15 / 0.8);
    transition: transform 0.25s var(--ease), background-color 0.2s;
  }
  .fab:hover { color: #fff; transform: scale(1.06); }
  .fab:has(+ .call-menu:popover-open) { background: var(--navy-900); }
  .fab .icon { width: 26px; height: 26px; }

  .call-menu {
    position: fixed;
    inset: auto max(1rem, env(safe-area-inset-right)) calc(max(1rem, env(safe-area-inset-bottom)) + 58px + 0.75rem) auto;
    margin: 0;
    width: min(18rem, calc(100vw - 2rem));
    padding: 0.5rem;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: var(--radius-lg);
    background: var(--navy-900);
    color: #fff;
    box-shadow: var(--shadow-lg);
    overflow: visible;
    opacity: 0;
    translate: 0 12px;
    transform-origin: bottom right;
    transition: opacity 0.2s, translate 0.25s var(--ease), overlay 0.25s allow-discrete, display 0.25s allow-discrete;
  }
  .call-menu:popover-open { opacity: 1; translate: 0 0; display: grid; gap: 0.25rem; }
  @starting-style { .call-menu:popover-open { opacity: 0; translate: 0 12px; } }
  .call-menu::backdrop { background: rgb(6 18 41 / 0.35); }
  .call-menu__title {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b9c4d8;
  }
  .call-menu__link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 56px;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 800;
    text-decoration: none;
  }
  .call-menu__link:hover, .call-menu__link:active { background: rgb(242 107 15 / 0.18); color: #fff; }
  .call-menu__link .icon {
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 12px;
    background: var(--orange-500);
  }
  .call-menu__link small { display: block; font-size: 0.8125rem; font-weight: 500; color: #b9c4d8; }

  /* Selector de WhatsApp (aparece al enviar el formulario), centrado en pantalla en cualquier tamaño */
  .choose-menu {
    inset: 50% auto auto 50%;
    translate: -50% -50%;
    width: min(22rem, calc(100vw - 2rem));
    padding: 0.75rem;
  }
  .choose-menu:popover-open { translate: -50% -50%; }
  @starting-style { .choose-menu:popover-open { opacity: 0; translate: -50% calc(-50% + 12px); } }
  .choose-menu .call-menu__title { padding-inline: 0.5rem; font-size: 0.875rem; }
  .choose-menu .call-menu__link { width: 100%; border: 0; background: transparent; font-family: inherit; text-align: start; cursor: pointer; }
  .choose-menu .call-menu__link:hover { background: rgb(242 107 15 / 0.18); }
  .choose-menu__cancel {
    justify-self: center;
    min-height: 44px;
    margin-block-start: 0.25rem;
    padding: 0.4rem 1.25rem;
    border: 0;
    background: none;
    color: #b9c4d8;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  .choose-menu__cancel:hover { color: #fff; }

  @media (max-width: 63.99em) { .site-footer { padding-block-end: calc(var(--space-lg) + 72px); } }
  @media (min-width: 64em) { .fab, #menu-llamar { display: none !important; } }

  /* ======================= Aviso de cookies ======================= */
  .consent {
    position: fixed;
    inset: auto auto max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
    z-index: 45;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    max-width: min(26rem, calc(100vw - 1.5rem - 70px));
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius);
    background: rgb(11 30 61 / 0.96);
    color: #dbe3f1;
    font-size: 0.8125rem;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(6px);
  }
  .consent[hidden] { display: none; }
  .consent p { flex: 1 1 14rem; }
  .consent a { color: #fff; }
  .consent__actions { display: flex; gap: 0.4rem; }
  .consent__btn {
    min-height: 36px;
    padding: 0.3rem 0.85rem;
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
  }
  .consent__btn:hover { border-color: #fff; }
  .consent__btn--accept { background: var(--orange-500); border-color: var(--orange-500); }
  .consent__btn--accept:hover { background: var(--orange-600); border-color: var(--orange-600); }
  .link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
  .link-btn:hover { color: var(--orange-500); }
  .link-btn[hidden] { display: none; }

  /* ======================= Páginas legales ======================= */
  .legal { padding-block: var(--space-xl); }
  .legal .container { max-width: 50rem; display: grid; gap: 1rem; }
  .legal h1 { font-size: var(--fs-h2); margin-block-end: 0.5rem; }
  .legal h2 { font-size: var(--fs-h3); margin-block-start: 1.25rem; }
  .legal p, .legal li { color: var(--muted); }
  .legal ul { padding-inline-start: 1.25rem; display: grid; gap: 0.35rem; }
  .legal a { color: var(--orange-700); }
}

/* ========================================================================== */
@layer utilities {
  .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;
  }

  /* Aparición al hacer scroll (solo CSS, mejora progresiva) */
  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
      :is(.service-card, .feature, .step, .case, .perk, .stat, .faq__item) {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
      }
      @keyframes reveal {
        from { opacity: 0; translate: 0 28px; }
        to { opacity: 1; translate: 0 0; }
      }
    }
  }
}
