/* =====================================================================
   HOME — landing principal (templates/index.html)
   Usa los tokens de styles.css (modo oscuro por defecto + [data-theme="light"]).
   - Un solo acento (terracota). Ritmo con bandas de fondo: normal, suave, tinta.
   - Títulos en Neo Sans, texto en Plus Jakarta, etiquetas en mono.
   - Lo que da credibilidad son capturas reales, no ilustraciones.
   ===================================================================== */

.hm {
    --hm-fg: var(--text-primary);
    --hm-text: var(--text-secondary);
    --hm-line: var(--border-color);
    --hm-accent: var(--accent);
    --hm-surface: var(--bg-secondary);
    --hm-card: var(--bg-card);
    --hm-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --hm-head: var(--font-heading);
    --hm-gutter: clamp(16px, 4vw, 40px);
    --hm-ease: cubic-bezier(.22, 1, .36, 1);
    --hm-radius: 20px;
}

/* El header de styles.css se invierte sobre el hero; aquí el hero sigue el
   tema de la página, así que el header en reposo usa los colores normales. */
.hm .header:not(.is-scrolled) {
    --bg-primary: #13131f;
    --bg-secondary: #1a1a28;
    --bg-card: #1e1e2c;
    --bg-elevated: #262638;
    --text-primary: #ffffff;
    --text-secondary: #e0e0ea;
    --text-tertiary: #b0b0c0;
    --border-color: #2a2a3c;
    --btn-primary-bg: #ededf0;
    --btn-primary-text: #0f0f19;
}
[data-theme="light"] .hm .header:not(.is-scrolled) {
    --bg-primary: #f5f5f0;
    --bg-secondary: #eae8e1;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --text-primary: #13131f;
    --text-secondary: #4a4a44;
    --text-tertiary: #696961;
    --border-color: #d5d3cc;
    --btn-primary-bg: #13131f;
    --btn-primary-text: #f5f5f0;
}
.hm .header:not(.is-scrolled) .logo-icon { display: block; filter: none; }
.hm .header:not(.is-scrolled) .logo-icon-light { display: none; }
[data-theme="light"] .hm .header:not(.is-scrolled) .logo-icon { display: none; }
[data-theme="light"] .hm .header:not(.is-scrolled) .logo-icon-light { display: block; filter: brightness(0); height: 48px; }

.hm-main {
    background: var(--bg-primary);
    color: var(--hm-fg);
    overflow-x: clip;
}

.hm-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding-inline: var(--hm-gutter);
}

.hm-mono {
    font-family: var(--hm-mono);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    font-weight: 400;
}

.hm-h2 {
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(2.1rem, 4.6vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    max-width: 20ch;
    color: var(--hm-fg);
    text-wrap: balance;
}

.hm-h3 {
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: 1.35rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--hm-fg);
}

.hm-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: var(--hm-fg);
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: underline;
    text-decoration-color: var(--hm-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: color var(--transition);
}
.hm-link:hover { color: var(--hm-accent); }

.hm-anchor { position: relative; top: -96px; display: block; }

/* ── Botones ─────────────────────────────────────────────────────── */
.hm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    padding: 0 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), transform 0.2s var(--hm-ease);
}
.hm-btn:active { transform: translateY(1px); }
.hm-btn--primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    padding-left: 0.45rem;
}
.hm-btn--primary:hover { background: var(--btn-primary-hover-bg); }
.hm-btn--ghost {
    color: var(--hm-fg);
    border: 1px solid var(--hm-line);
}
.hm-btn--ghost:hover { border-color: var(--hm-fg); }
.hm-btn--lg { min-height: 58px; font-size: 1.08rem; padding-right: 1.7rem; }

.hm-faces { display: inline-flex; }
.hm-faces img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--btn-primary-bg);
}
.hm-faces img + img { margin-left: -10px; }
.hm-btn--lg .hm-faces img { width: 44px; height: 44px; }

/* ── Piezas pequeñas ─────────────────────────────────────────────── */
.hm-pill {
    display: inline-flex;
    gap: 0.5em;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hm-accent) 14%, transparent);
    color: var(--hm-accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.hm-stars { display: inline-flex; gap: 2px; }
.hm-stars svg { fill: var(--hm-accent); }

.hm-rating {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.75rem;
    color: var(--hm-text);
    font-size: 0.95rem;
}
.hm-rating strong { color: var(--hm-fg); }
.hm-rating--center { justify-content: center; margin-top: 1.25rem; }

.hm-chip {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--hm-line);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hm-fg);
}

.hm-checks {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}
.hm-checks li,
.hm-pack-list li {
    position: relative;
    padding-left: 1.85rem;
    line-height: 1.5;
}
.hm-checks li::before,
.hm-pack-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--hm-accent);
}
.hm-checks li::after,
.hm-pack-list li::after {
    content: '';
    position: absolute;
    left: 0.43rem;
    top: calc(0.12em + 0.27rem);
    width: 0.3rem;
    height: 0.55rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ── Marcos: navegador y móvil ───────────────────────────────────── */
.hm-browser {
    display: block;
    border: 1px solid var(--hm-line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--hm-card);
    box-shadow: 0 24px 60px -24px rgba(10, 10, 20, .35);
}
.hm-browser-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-bottom: 1px solid var(--hm-line);
}
.hm-browser-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hm-line);
}
.hm-browser-bar em {
    flex: 1;
    text-align: center;
    margin-right: 38px;
    font-family: var(--hm-mono);
    font-style: normal;
    font-size: 0.68rem;
    color: var(--hm-text);
}
.hm-browser img { display: block; width: 100%; height: auto; }

.hm-phone {
    display: block;
    border-radius: 24px;
    border: 5px solid #0d0d14;
    overflow: hidden;
    background: #0d0d14;
    box-shadow: 0 30px 60px -20px rgba(10, 10, 20, .45);
}
.hm-phone img { display: block; width: 100%; height: auto; border-radius: 19px; }

/* ── Secciones y bandas ──────────────────────────────────────────── */
.hm-section { padding-block: clamp(80px, 10vw, 140px); }
.hm-section--soft { background: var(--hm-surface); }

/* Banda tinta: siempre oscura, en los dos temas */
.hm-ink {
    --hm-fg: #ffffff;
    --hm-text: #b8b8c6;
    --hm-line: #2e2e42;
    --hm-card: #1d1d2b;
    --hm-surface: #1a1a27;
    --btn-primary-bg: #f5f5f0;
    --btn-primary-text: #13131f;
    --btn-primary-hover-bg: #ffffff;
    background: #13131f;
    color: var(--hm-fg);
}
:root:not([data-theme="light"]) .hm-ink { background: #0b0b12; }

.hm-head { margin-bottom: clamp(44px, 6vw, 72px); }
.hm-head--center { text-align: center; }
.hm-head--center .hm-h2,
.hm-head--center .hm-head-lead { margin-inline: auto; }
.hm-head-lead {
    margin-top: 1.1rem;
    max-width: 56ch;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--hm-text);
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hm-hero {
    padding-top: calc(var(--nav-height, 64px) + clamp(40px, 6vw, 88px));
    padding-bottom: clamp(64px, 8vw, 112px);
}
.hm-hero-grid {
    display: grid;
    gap: clamp(48px, 6vw, 72px);
    align-items: center;
}
.hm-hero-title {
    margin-top: 1.5rem;
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(3.1rem, 6.6vw, 5.6rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--hm-fg);
}
.hm-hero-title em { font-style: italic; color: var(--hm-accent); }
.hm-hero-sub {
    margin-top: 1.6rem;
    max-width: 44ch;
    font-size: clamp(1.08rem, 1.4vw, 1.22rem);
    line-height: 1.6;
    color: var(--hm-text);
}
.hm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 2.25rem;
}

.hm-hero-shot { min-width: 0; }

/* ── Slider de capturas ──────────────────────────────────────────── */
.hm-slider { position: relative; }
.hm-slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-radius: 24px;
}
.hm-slider-track::-webkit-scrollbar { display: none; }
.hm-slider-track:focus-visible { outline: 2px solid var(--hm-accent); outline-offset: 4px; }
.hm-slide {
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.hm-slide-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4%;
    aspect-ratio: 16 / 11;
    padding: 5%;
    border-radius: 24px;
    background: var(--hm-surface);
    border: 1px solid var(--hm-line);
    overflow: hidden;
}
.hm-slide-stage--desktop .hm-browser,
.hm-slide-stage--placeholder .hm-browser { width: 100%; }
/* Móviles: se dimensionan por ancho y se recortan por abajo, como si
   asomaran desde el borde del escenario */
.hm-slide-stage--mobile,
.hm-slide-stage--phones { align-items: flex-start; padding: 6% 5% 0; }
.hm-slide-stage--mobile .hm-phone,
.hm-slide-stage--phones .hm-phone { flex: none; width: 27%; }
.hm-slide-stage--mobile .hm-phone { width: 34%; }
.hm-slide-stage--phones .hm-phone:nth-child(2) { margin-top: 5%; }
.hm-slide-stage--phones .hm-phone:nth-child(3) { margin-top: 2%; }

.hm-slider-ui {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}
.hm-slider-caption {
    font-weight: 600;
    color: var(--hm-fg);
    min-height: 1.5em;
}
.hm-slider-ctrl { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.hm-slider-count { color: var(--hm-text); margin-right: 0.5rem; }
.hm-slider-count b { color: var(--hm-fg); font-weight: 500; }
.hm-slider-btn {
    display: grid;
    place-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--hm-line);
    background: transparent;
    color: var(--hm-fg);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.hm-slider-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-slider-btn:hover { border-color: var(--hm-fg); background: var(--hm-surface); }
.hm-slider-btn:focus-visible { outline: 2px solid var(--hm-accent); outline-offset: 2px; }
.hm-slider-dots { display: flex; gap: 6px; margin-top: 0.9rem; }
.hm-slider-dots span {
    flex: 1;
    max-width: 48px;
    height: 3px;
    border-radius: 3px;
    background: var(--hm-line);
    transition: background var(--transition);
}
.hm-slider-dots span.is-on { background: var(--hm-accent); }

/* ── Packs ───────────────────────────────────────────────────────── */
.hm-packs {
    display: grid;
    gap: 1.25rem;
    align-items: stretch;
}
.hm-pack {
    display: flex;
    flex-direction: column;
    padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.5rem, 2.5vw, 2.25rem);
    border-radius: var(--hm-radius);
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    color: var(--hm-fg);
}
/* El destacado va invertido: tinta en tema claro, claro en tema oscuro */
.hm-pack--featured {
    --hm-fg: #ffffff;
    --hm-text: #c4c4d0;
    --hm-line: #33334a;
    --btn-primary-bg: var(--accent);
    --btn-primary-text: #ffffff;
    --btn-primary-hover-bg: #b45f1f;
    background: #13131f;
    border-color: #13131f;
}
:root:not([data-theme="light"]) .hm-pack--featured {
    --hm-fg: #13131f;
    --hm-text: #55554f;
    --hm-line: #d5d3cc;
    background: #f5f5f0;
    border-color: #f5f5f0;
}

.hm-glyph {
    width: 64px;
    height: 48px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--hm-fg);
}
.hm-glyph rect:not(.f) { fill: var(--hm-card); }
.hm-pack--featured .hm-glyph rect:not(.f) { fill: transparent; }
.hm-glyph .f { fill: var(--hm-accent); stroke: none; }

.hm-pack-name {
    margin-top: 1.25rem;
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(1.6rem, 2.3vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
}
.hm-pack-price {
    margin-top: 1rem;
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(3rem, 4.8vw, 4rem);
    line-height: 1;
    letter-spacing: -0.035em;
    white-space: nowrap;
}
.hm-pack-price small {
    display: block;
    margin-bottom: 0.4rem;
    font-family: var(--hm-mono);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: var(--hm-text);
}
.hm-pack-price span {
    font-size: 0.3em;
    letter-spacing: 0;
    color: var(--hm-text);
    margin-left: 0.15em;
}
.hm-pack-tag {
    margin-top: 1rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--hm-line);
    font-weight: 600;
    line-height: 1.45;
}
.hm-pack-list {
    list-style: none;
    padding: 0;
    margin: 1.4rem 0 2rem;
    display: grid;
    gap: 0.85rem;
    flex: 1;
    align-content: start;
    font-size: 0.95rem;
    color: var(--hm-text);
}
.hm-pack-list strong { color: var(--hm-fg); font-weight: 600; }
.hm-pack-cta { justify-content: center; width: 100%; }
.hm-pack-cta.hm-btn--primary { padding-left: 1.4rem; }

.hm-partner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-top: 1.25rem;
    padding: 1.4rem clamp(1.5rem, 2.5vw, 2.25rem);
    border-radius: var(--hm-radius);
    border: 1px dashed var(--hm-line);
}
.hm-partner p { max-width: 70ch; line-height: 1.55; color: var(--hm-text); }
.hm-partner strong { color: var(--hm-fg); }

/* ── Cómo funciona ───────────────────────────────────────────────── */
.hm-steps {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.25rem;
    counter-reset: none;
}
.hm-step {
    position: relative;
    padding: 2rem;
    border-radius: var(--hm-radius);
    background: var(--hm-surface);
    overflow: hidden;
}
.hm-step-n {
    display: block;
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: 5.5rem;
    line-height: 0.8;
    letter-spacing: -0.05em;
    color: var(--hm-accent);
    margin-bottom: 1.5rem;
}
.hm-step p { margin-top: 0.7rem; color: var(--hm-text); line-height: 1.6; }

/* ── Proyectos ───────────────────────────────────────────────────── */
.hm-case {
    display: grid;
    gap: 2rem;
    align-items: center;
}
.hm-case + .hm-case { margin-top: clamp(72px, 9vw, 128px); }

.hm-case-media { min-width: 0; }

.hm-placeholder { border-style: dashed; }
.hm-placeholder-body {
    display: grid;
    place-content: center;
    gap: 0.5rem;
    aspect-ratio: 1424 / 890;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--hm-text);
}
.hm-placeholder-body small { font-family: var(--hm-mono); font-weight: 400; font-size: 0.72rem; }

.hm-case-sector { color: var(--hm-accent); }
.hm-case-name {
    margin-top: 0.6rem;
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.025em;
}
.hm-case-headline {
    margin-top: 1rem;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--hm-fg);
    max-width: 40ch;
}
.hm-case-info .hm-checks { margin-top: 1.5rem; color: var(--hm-text); }
.hm-case-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.75rem;
}

.hm-more-title {
    margin: clamp(72px, 9vw, 120px) 0 1.25rem;
    color: var(--hm-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.hm-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.hm-tile {
    padding: 0.75rem 0.75rem 1.25rem;
    border-radius: var(--hm-radius);
    background: var(--hm-surface);
    border: 1px solid var(--hm-line);
}
.hm-tile-media {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background: var(--hm-card);
    margin-bottom: 1rem;
}
.hm-tile-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Proyectos solo de móvil: el móvil entero, centrado */
.hm-tile-media--mobile { padding-top: 0.75rem; }
.hm-tile-media--mobile img { object-fit: contain; object-position: top center; }
.hm-tile-empty {
    display: grid;
    place-content: center;
    height: 100%;
    border: 1px dashed var(--hm-line);
    border-radius: 12px;
    font-family: var(--hm-mono);
    font-size: 0.75rem;
    color: var(--hm-text);
}
.hm-tile .hm-case-sector,
.hm-tile-name,
.hm-tile .hm-chip { margin-inline: 0.5rem; }
.hm-tile-name {
    margin-top: 0.4rem;
    margin-bottom: 0.9rem;
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: 1.3rem;
}
.hm-tile-name a { color: inherit; text-decoration: none; }
.hm-tile-name a:hover { color: var(--hm-accent); }

/* ── Garantías ───────────────────────────────────────────────────── */
.hm-promises { display: grid; gap: 1.25rem; }
.hm-promise {
    padding: 2rem 1.75rem;
    border-radius: var(--hm-radius);
    border: 1px solid var(--hm-line);
}
.hm-promise-big {
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(2.4rem, 3.6vw, 3.1rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--hm-accent);
}
.hm-promise .hm-h3 { margin-top: 0.35rem; }
.hm-promise p:last-child { margin-top: 1rem; color: var(--hm-text); line-height: 1.6; }

/* ── Equipo ──────────────────────────────────────────────────────── */
.hm-team { display: grid; gap: 2rem; align-items: end; }
.hm-team-copy { align-self: center; }
.hm-person { margin: 0; }
.hm-person img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 20%;
    border-radius: var(--hm-radius);
}
.hm-person figcaption { display: grid; gap: 0.25rem; margin-top: 0.9rem; }
.hm-person strong { font-family: var(--hm-head); font-weight: 500; font-size: 1.35rem; }
.hm-person .hm-mono { color: var(--hm-text); }

/* ── Opiniones ───────────────────────────────────────────────────── */
.hm-quotes { columns: 1; column-gap: 1.25rem; }
.hm-quote {
    break-inside: avoid;
    margin: 0 0 1.25rem;
    padding: 1.75rem;
    border-radius: var(--hm-radius);
    background: var(--hm-surface);
}
.hm-quote blockquote {
    margin: 1rem 0 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--hm-fg);
}
.hm-quote--lead { background: var(--hm-accent); }
.hm-quote--lead .hm-stars svg { fill: #13131f; }
.hm-quote--lead blockquote,
.hm-quote--lead figcaption,
.hm-quote--lead figcaption .hm-mono { color: #13131f; }
.hm-quote--lead blockquote {
    font-family: var(--hm-head);
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    line-height: 1.3;
}
.hm-quote figcaption {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    margin-top: 1.25rem;
}
.hm-quote figcaption .hm-mono { color: var(--hm-text); }

/* ── FAQ ─────────────────────────────────────────────────────────── */
.hm-faq-wrap { display: grid; gap: 2rem; }
.hm-faq { border-bottom: 1px solid var(--hm-line); }
.hm-faq-item { border-top: 1px solid var(--hm-line); }
.hm-faq-item summary {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem 0;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--hm-fg);
}
.hm-faq-item summary::-webkit-details-marker { display: none; }
.hm-faq-item summary::after {
    content: '+';
    flex: none;
    display: grid;
    place-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--hm-card);
    font-family: var(--hm-mono);
    color: var(--hm-fg);
    transition: transform 0.25s var(--hm-ease), background var(--transition);
}
.hm-faq-item[open] summary::after { transform: rotate(45deg); background: var(--hm-accent); color: #fff; }
.hm-faq-item summary:hover { color: var(--hm-accent); }
.hm-faq-item p {
    padding-bottom: 1.5rem;
    max-width: 66ch;
    color: var(--hm-text);
    line-height: 1.65;
}
.hm-faq-item p strong { color: var(--hm-fg); }

/* ── Cierre ──────────────────────────────────────────────────────── */
.hm-cta {
    padding-block: clamp(96px, 12vw, 168px);
    background: var(--hm-accent);
    color: #13131f;
    --btn-primary-bg: #13131f;
    --btn-primary-text: #ffffff;
    --btn-primary-hover-bg: #000000;
}
.hm-cta-inner { text-align: center; }
.hm-cta-title {
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}
.hm-cta-lead {
    margin: 1.5rem auto 2.5rem;
    max-width: 46ch;
    font-size: 1.15rem;
    line-height: 1.6;
}

/* ── Páginas interiores: /casos y detalle de caso ────────────────── */
.hm-page-hero {
    padding-top: calc(var(--nav-height, 64px) + clamp(40px, 6vw, 88px));
    padding-bottom: clamp(48px, 6vw, 80px);
}
.hm-page-title {
    margin-top: 1.25rem;
    font-family: var(--hm-head);
    font-weight: 500;
    font-size: clamp(2.8rem, 7vw, 5.4rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    color: var(--hm-fg);
    text-wrap: balance;
}
.hm-page-hero .hm-head-lead { margin-top: 1.25rem; }

.hm-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.hm-filter {
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--hm-line);
    background: transparent;
    color: var(--hm-fg);
    font: 600 0.92rem/1 var(--font-body);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.hm-filter:hover { border-color: var(--hm-fg); }
.hm-filter[aria-pressed="true"] { background: var(--hm-fg); color: var(--bg-primary); border-color: var(--hm-fg); }
.hm-filter:focus-visible { outline: 2px solid var(--hm-accent); outline-offset: 2px; }
.hm-filters-empty { color: var(--hm-text); }

.hm-case-row + .hm-case-row { margin-top: clamp(72px, 9vw, 128px); }
.hm-case-row[hidden] { display: none; }
.hm-draft-note { margin-top: 1rem; color: var(--hm-accent); }
.hm-more { margin-top: clamp(48px, 6vw, 72px); text-align: center; }

.hm-back {
    display: inline-flex;
    gap: 0.4rem;
    margin-bottom: 1.75rem;
    color: var(--hm-text);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}
.hm-back:hover { color: var(--hm-accent); }
.hm-detail-hero .hm-case-sector { margin-bottom: 0.25rem; }
.hm-detail-hero .hm-page-title { margin-top: 0.5rem; }
.hm-detail-lead {
    margin-top: 1.25rem;
    max-width: 38ch;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.45;
    color: var(--hm-fg);
}
.hm-detail-gallery { padding-bottom: clamp(56px, 7vw, 96px); }
.hm-detail-gallery .hm-slide-stage { aspect-ratio: 16 / 9.5; }

.hm-detail-grid { display: grid; gap: 3rem; }
.hm-detail-label { margin-bottom: 1.5rem; }
.hm-detail-checks { font-size: 1.1rem; color: var(--hm-fg); gap: 1rem; }
.hm-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.25rem; }
.hm-result { padding: 1.75rem; border-radius: var(--hm-radius); background: var(--hm-surface); }
.hm-result-label { margin-top: 0.6rem; font-weight: 600; color: var(--hm-fg); }
.hm-result-note { margin-top: 0.35rem; font-size: 0.9rem; color: var(--hm-text); }

.hm-story { display: grid; gap: 3.5rem; }
.hm-prose {
    margin-top: 1.25rem;
    max-width: 64ch;
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--hm-text);
}
.hm-prose p + p, .hm-prose ul, .hm-prose ol { margin-top: 1rem; }
.hm-prose ul, .hm-prose ol { padding-left: 1.25rem; }
.hm-prose strong { color: var(--hm-fg); }
.hm-prose a { color: var(--hm-fg); text-decoration-color: var(--hm-accent); }

.hm-detail-quote { max-width: 860px; margin-inline: auto; }
.hm-grid--spaced { margin-top: 2.5rem; }

/* ── Breakpoints ─────────────────────────────────────────────────── */
@media (min-width: 640px) {
    .hm-promises { grid-template-columns: repeat(2, 1fr); }
    .hm-quotes { columns: 2; }
    .hm-team { grid-template-columns: repeat(2, 1fr); }
    .hm-team-copy { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
    .hm-detail-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; align-items: start; }
    .hm-story { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; }
    .hm-steps { grid-template-columns: repeat(3, 1fr); }
    .hm-case { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2.5rem, 5vw, 4.5rem); }
    .hm-case--flip { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
    .hm-case--flip .hm-case-media { order: 2; }
    .hm-faq-wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4rem; }
    .hm-team { grid-template-columns: minmax(0, 5fr) minmax(0, 3.5fr) minmax(0, 3.5fr); gap: 1.5rem; }
    .hm-team-copy { grid-column: auto; padding-right: 2rem; }
    .hm-person:nth-of-type(2) { margin-bottom: 3rem; }
}

@media (min-width: 1024px) {
    .hm-hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
    .hm-packs { grid-template-columns: repeat(3, 1fr); }
    /* Subgrid: dibujo, nombre, precio, frase, lista y botón alineados */
    @supports (grid-template-rows: subgrid) {
        .hm-packs { grid-template-rows: repeat(6, auto); row-gap: 0; }
        .hm-pack { display: grid; grid-row: span 6; grid-template-rows: subgrid; }
        .hm-pack-name { align-self: start; }
        .hm-pack-price { align-self: end; }
    }
    .hm-pack--featured { transform: translateY(-12px); }
    .hm-promises { grid-template-columns: repeat(4, 1fr); }
    .hm-quotes { columns: 3; }
}

@media (max-width: 1023px) {
}

@media (max-width: 520px) {
    .hm-hero-actions .hm-btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-btn, .hm-faq-item summary::after { transition: none; }
}
