/*
Theme Name: Halves
Theme URI: https://halves.dev
Description: Tema comercial para la plataforma Halves. Clásico PHP, sin FSE. Compatible con halves-i18n.
Version: 1.0.0
Author: Halves
Text Domain: halves-theme
Requires at least: 5.5
Requires PHP: 7.4
*/

/* ─── Reset ──────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Variables ──────────────────────────────────────────────────────── */

:root {
    /* Constantes — no dependen del tema activo. */
    --bg-dark:    #08080f;
    --radius:     4px;
    --container:  1100px;
    --header-h:   64px;
    --font:       'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:  'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 30px rgba(0,0,0,.08);
}

/* ─── Base ───────────────────────────────────────────────────────────── */

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    /* Bridge a halves-tokens.css. Vive aquí (no en :root) para que
       var(--text-color) se resuelva en body, donde
       html.theme-light body / html.theme-dark body redefinen los
       tokens del tema. Los descendientes heredan el valor reactivo. */
    --fg:         var(--text-color,   #0f172a);
    --fg-muted:   var(--muted-color,  #64748b);
    --fg-light:   var(--muted-color,  #94a3b8);
    --bg:         var(--bg-color,     #ffffff);
    --bg-surface: var(--surface-color,#f8fafc);
    --border:     var(--border-color, #e2e8f0);

    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--fg);
    background:
        radial-gradient(ellipse 50% 30% at 20% 12%, color-mix(in srgb, var(--accent-color) 12%, transparent), transparent 100%),
        radial-gradient(ellipse 40% 25% at 80% 8%,  color-mix(in srgb, var(--accent-alt)   12%, transparent), transparent 100%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background .25s ease, color .25s ease;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-skip-ink: auto; }
button { font-family: var(--font); }
ul, ol { list-style: none; }

/* ─── Typography ─────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.025em;
    color: var(--fg);
}

h1 { font-size: clamp(1.75rem,  3vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h3 { font-size: clamp(1.1rem,  1.5vw, 1.375rem); font-weight: 300; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: .9375rem; }

p { max-width: 68ch; }
strong { font-weight: 600; }

code, kbd, samp {
    font-family: var(--font-mono);
    font-size: .875em;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: .125em .4em;
    border-radius: var(--radius);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
}

/* ─── Layout ─────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.site-main {
    padding-top: var(--header-h);
    min-height: calc(100svh - 64px - 96px);
}

/* ─── Skip link ──────────────────────────────────────────────────────── */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: .5rem 1rem;
    background: var(--fg);
    color: var(--bg);
    font-size: .875rem;
    font-weight: 600;
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    z-index: 999;
    transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ─── Header ─────────────────────────────────────────────────────────── */

.site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 100;
    height: var(--header-h);
    background: var(--header-bg, rgba(255,255,255,.92));
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: background .25s ease, border-color .25s ease;
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-logo {
    font-size: 1.125rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--fg);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .2s ease;
}
.site-logo:hover { color: #fff; }
.site-logo .hv-caption {
    font-size: .9375rem;
    color: rgba(255, 255, 255, .55);
    transition: color .2s ease;
}
.site-logo:hover .hv-caption { color: #fff; }
@media (prefers-color-scheme: light) {
    html:not(.theme-dark) .site-logo { transition: color .2s ease; }
    html:not(.theme-dark) .site-logo:hover { color: var(--fg); }
    html:not(.theme-dark) .site-logo .hv-caption { color: var(--fg-muted); }
    html:not(.theme-dark) .site-logo:hover .hv-caption { color: var(--fg); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0;
}

/* ─── Primary navigation ─────────────────────────────────────────────── */

.primary-nav { display: flex; align-items: center; }
.primary-nav ul { display: flex; align-items: center; gap: 1.75rem; }

.primary-nav a {
    font-size: .875rem;
    font-weight: 500;
    color: var(--fg-muted);
    text-decoration: none;
    letter-spacing: .005em;
    transition: color .15s ease;
    white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-page-ancestor > a {
    color: var(--fg);
}

/* ─── Language switcher ──────────────────────────────────────────────── */

.site-lang {
    display: flex;
    align-items: center;
    border-left: 1px solid var(--border);
    margin-left: 1.5rem;
    padding-left: 1.5rem;
}

/* Override plugin styles */
ul.halves-lang-switcher {
    display: flex;
    gap: .875rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.halves-lang-switcher a {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fg-muted);
    text-decoration: none;
    transition: color .15s ease;
    opacity: .7;
}

.halves-lang-switcher a:hover,
.halves-lang-switcher .current-lang a,
.halves-lang-switcher [aria-current="true"] {
    color: var(--fg);
    opacity: 1;
}

/* Hide emoji flags — no emojis per copy policy */
.lang-flag { display: none; }

/* ─── Mobile nav toggle ──────────────────────────────────────────────── */

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--fg);
    margin-left: 1rem;
    flex-shrink: 0;
}

.nav-toggle svg { pointer-events: none; }

/* ─── Mobile menu — panel deslizante desde la derecha ───────────────── */

/* El .nav-drawer es un hijo directo de <body>, no del header.
   Así evita todo conflicto de stacking context con position:fixed. */

.nav-drawer {
    display: none;
}

.nav-veil {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 200;
}

body.nav-is-open .nav-veil {
    display: block;
}

body.nav-is-open .nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(80vw, 320px);
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, .35);
    padding: calc(var(--header-h) + 1.5rem) 1.75rem 2rem;
    overflow-y: auto;
    z-index: 201;
    animation: nav-slide-in .22s ease;
}

@keyframes nav-slide-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.nav-drawer ul {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-drawer ul a {
    display: block;
    padding: .875rem 0;
    font-size: 1.0625rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    width: 100%;
    color: var(--fg);
    text-decoration: none;
}

.nav-drawer .site-lang {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
    margin-top: 1.5rem;
}

.nav-drawer .site-lang .halves-lang-switcher a {
    font-size: .6875rem;
    opacity: .55;
}

.nav-drawer .site-lang .halves-lang-switcher .current-lang a,
.nav-drawer .site-lang .halves-lang-switcher [aria-current="true"] {
    opacity: 1;
}

@media (max-width: 768px) {
    .primary-nav { display: none; }
    .nav-toggle   { display: flex; }
    .nav-toggle[aria-expanded="true"] { opacity: .55; }
}

/* ─── Page content ───────────────────────────────────────────────────── */

.entry-content {
    padding-block: 5rem 0;
}

.entry-content > * + * { margin-top: 1.5rem; }
.entry-content > h2,
.entry-content > h3 { margin-top: 3rem; }

.entry-content > h2:first-child,
.entry-content > h3:first-child { margin-top: 0; }

/* Intro paragraph */
.page-intro {
    font-size: 1.125rem;
    color: var(--fg-muted);
    line-height: 1.75;
    max-width: 60ch;
}

/* ─── Block styles ───────────────────────────────────────────────────── */

/* Separator */
.wp-block-separator,
.entry-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin-block: 3rem;
    opacity: 1;
}

/* Tables */
.wp-block-table { overflow-x: auto; margin-block: 2rem; }
.wp-block-table table { width: 100%; border-collapse: collapse; }

.wp-block-table th {
    text-align: left;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fg-muted);
    padding: .75rem 1.25rem;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    background: var(--bg-surface);
}

.wp-block-table td {
    padding: .9375rem 1.25rem;
    border: 1px solid var(--border);
    font-size: .9375rem;
    vertical-align: top;
}

/* Roadmap & included table column widths */
.roadmap-table td:first-child,
.included-table td:first-child { white-space: nowrap; font-weight: 600; }

/* Scopes table */
.scopes-table { margin-top: var(--space-8); }
.scopes-table th {
    font-family: var(--font-sans);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    background: transparent;
    border-color: var(--border-color);
    border-bottom: 2px solid var(--accent-alt);
    padding: var(--space-3) var(--space-4);
}
.scopes-table td {
    font-size: var(--fs-sm);
    border-color: var(--border-color);
    padding: var(--space-3) var(--space-4);
    vertical-align: middle;
}
.scopes-table code {
    font-size: 0.78rem;
    color: var(--accent-alt);
    background: transparent;
    padding: 0;
}

/* Lists */
.wp-block-list,
.entry-content ul:not(.halves-lang-switcher),
.entry-content ol {
    padding-left: 1.5rem;
    margin-block: 1rem;
}
.entry-content ul:not(.halves-lang-switcher) { list-style: disc; }
.entry-content ol { list-style: decimal; }
.wp-block-list li,
.entry-content li { margin-bottom: .375rem; }

/* Buttons — mapeo de clases Gutenberg al sistema de tokens */
.wp-block-button { margin-block: 1.5rem; }
.wp-block-button .wp-block-button__link,
.wp-element-button {
    display: inline-flex;
    align-items: center;
    padding: .75rem 1.5rem;
    border-radius: var(--radius-sm, 4px);
    font-family: var(--font);
    font-size: var(--fs-base, .9rem);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none !important;
    transition: opacity .15s ease, transform .12s ease;
    white-space: nowrap;
    /* primary por defecto */
    background: var(--accent-color);
    color: #fff !important;
}
.wp-block-button .wp-block-button__link:not(:disabled):hover,
.wp-element-button:not(:disabled):hover { transform: translateY(-1px); opacity: .88; }

/* Primary en landing/dark → accent sólido */
body.landing .wp-block-button:not(.is-style-outline) .wp-block-button__link,
body.landing .wp-element-button,
html.theme-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link,
html.theme-dark .wp-element-button {
    background: var(--accent-color);
}

/* Dark mode: texto oscuro sobre azul claro (#009fe3) — contraste AAA */
html.theme-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    color: #0d0d1a !important;
}
@media (prefers-color-scheme: dark) {
    html:not(.theme-light) body.landing .wp-block-button:not(.is-style-outline) .wp-block-button__link {
        color: #0d0d1a !important;
    }
}
/* Light mode: texto blanco sobre azul oscuro (#1d71b8) */
@media (prefers-color-scheme: light) {
    html:not(.theme-dark) body.landing .wp-block-button:not(.is-style-outline) .wp-block-button__link {
        color: #fff !important;
    }
}
html.theme-light .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    color: #fff !important;
}

/* Secondary (outline) */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-element-button {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--accent-color) !important;
    border-color: var(--accent-color);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: color-mix(in srgb, var(--accent-color) 10%, transparent) !important;
    transform: translateY(-1px);
    opacity: 1;
}

/* Buttons group */
.wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-block: 2rem;
}

/* Columns */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-block: 2rem;
}
.wp-block-column { flex: 1 1 280px; }

/* Cover */
.wp-block-cover {
    padding: 5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
}

/* Pullquote / quote */
.wp-block-pullquote {
    border-top: 3px solid var(--fg);
    border-bottom: 3px solid var(--fg);
    padding-block: 2rem;
    margin-block: 2.5rem;
    text-align: center;
}
.wp-block-pullquote blockquote p {
    font-size: 1.25rem;
    font-weight: 500;
    max-width: 56ch;
    margin-inline: auto;
}

/* Code block — terminal/demo */
.wp-block-code {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin-block: 2rem;
    overflow-x: auto;
    box-shadow: var(--shadow);
}
.wp-block-code code {
    display: block;
    font-family: var(--font-mono);
    font-size: .8125rem;
    line-height: 1.65;
    color: var(--fg);
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
    white-space: pre;
    tab-size: 2;
}

/* ─── Plugin accent colors ───────────────────────────────────────────── */

:root {
    --bridge: #4f46e5;
    --bridge-light: #eef2ff;
    --events: #059669;
    --events-light: #ecfdf5;
    --translations: #7c3aed;
    --analytics:    #0891b2;
    --seo:          #d97706;
    --abtests:      #db2777;
    --protect:      #dc2626;
    --manager:      #475569;
}

/* ─── Product cards ──────────────────────────────────────────────────── */

.product-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

.product-card .wp-block-list {
    font-size: .875rem;
    color: var(--fg-muted);
}
.product-card .wp-block-list li {
    margin-bottom: .625rem;
}

.product-card .wp-block-buttons {
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 1rem;
    padding-bottom: 0;
    justify-content: center;
}
.product-card .wp-block-buttons .wp-block-button {
    margin-block: 0;
}

/* ─── Hero section ───────────────────────────────────────────────────── */

.hero-section { padding-block: 1.5rem 3rem; }

/* ─── CTA section ────────────────────────────────────────────────────── */

.cta-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    margin-block: 2rem;
}
.cta-section p { margin-inline: auto; }

/* ─── Pricing tables (Precios page) ──────────────────────────────────── */

.pricing-note {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    font-size: .9375rem;
    color: var(--fg-muted);
}

/* ─── Footer ─────────────────────────────────────────────────────────── */

/* ─── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
    background:
        radial-gradient(ellipse 120% 60% at 50% -20%, color-mix(in srgb, var(--accent-alt) 6%, transparent), transparent 100%),
        var(--bg);
    border-top: 1px solid color-mix(in srgb, var(--accent-alt) 30%, transparent);
    padding-block: 2.5rem;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
    padding-inline: max(1.5rem, calc(50% - var(--container) / 2 + 1.5rem));
    box-sizing: border-box;
}

.footer-logo {
    display: block;
    color: var(--fg);
    text-decoration: none;
    transition: color .15s ease;
    flex-shrink: 0;
}
.footer-logo:hover { color: var(--fg); }
.footer-logo svg {
    height: 20px;
    width: auto;
    display: block;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.25rem;
}

.footer-nav {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-nav a {
    font-size: .875rem;
    color: var(--fg-muted);
    text-decoration: none;
    transition: color .15s ease;
}
.footer-nav a:hover { color: var(--fg); }

.footer-bottom {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-copy {
    font-size: .75rem;
    color: var(--fg-muted);
    opacity: .5;
    white-space: nowrap;
}

.footer-legal-nav {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-legal-nav a {
    font-size: .75rem;
    color: var(--fg-muted);
    opacity: .5;
    text-decoration: none;
    transition: opacity .15s ease;
    white-space: nowrap;
}
.footer-legal-nav a:hover { opacity: 1; }

/* ─── 404 ────────────────────────────────────────────────────────────── */

.error-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-block: 8rem;
    gap: 1.5rem;
}

.error-404 .code {
    font-size: clamp(5rem, 12vw, 9rem);
    font-weight: 800;
    color: var(--border);
    line-height: 1;
    letter-spacing: -.06em;
}

.error-404 a {
    display: inline-flex;
    align-items: center;
    padding: .75rem 1.75rem;
    background: var(--fg);
    color: var(--bg);
    text-decoration: none;
    font-weight: 600;
    font-size: .9375rem;
    border-radius: var(--radius);
}

/* ─── Utilities ──────────────────────────────────────────────────────── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* WordPress admin bar adjustment */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

/* ─── Theme toggle button ─────────────────────────────────────────── */

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--fg-muted);
    margin-left: .75rem;
    flex-shrink: 0;
    transition: color .15s ease, border-color .15s ease;
}
.theme-toggle-btn:hover { color: var(--fg); }
.theme-toggle-btn svg { pointer-events: none; display: block; }

/* Sun visible only in dark mode, moon only in light mode */
.theme-toggle-btn .icon-sun  { display: none; }
.theme-toggle-btn .icon-moon { display: block; }
html.theme-dark  .theme-toggle-btn .icon-sun  { display: block; }
html.theme-dark  .theme-toggle-btn .icon-moon { display: none; }
html.theme-light .theme-toggle-btn .icon-sun  { display: none; }
html.theme-light .theme-toggle-btn .icon-moon { display: block; }

/* ─── Landing page sections ───────────────────────────────────────── */

/* Content constraint: mirrors .container without max-width on the block itself */
.entry-content > .wp-block-group {
    padding-inline: max(1.5rem, calc(50% - var(--container) / 2 + 1.5rem));
    box-sizing: border-box;
}

.section-hero {
    padding-block: 6rem 4rem;
}
.section-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 200;
    letter-spacing: -.04em;
    line-height: 1.08;
    max-width: 18ch;
    margin-bottom: 1.5rem;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.15em;
}
.body-lg { line-height: 1.5; }

.section-hero .body-lg {
    max-width: 52ch;
    margin-bottom: 2.5rem;
}
.section-argument,
.section-pillars,
.section-steps,
.section-products,
.section-cta {
    padding-block: 4rem;
    border-top: 1px solid var(--border);
}

/* Secciones con fondo propio no necesitan borde — el contraste de superficie ya separa */
.section-steps { border-top: none; }
.section-steps + * { border-top: none; }
.section-steps {
    background: var(--bg-surface);
    margin-block: 2rem;
}
.section-argument p + p { margin-top: 1rem; }
.section-argument h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -.03em;
    line-height: 1.15;
    max-width: 28ch;
    margin-bottom: 1rem;
}
.section-cta {
    text-align: center;
}
.section-cta h2 {
    font-weight: 300;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.15em;
}
.section-cta .body-lg { margin-inline: auto; margin-bottom: 2rem; }
.section-cta .wp-block-buttons { justify-content: center; }

/* ─── SECTION STEPS — plano de metro ─── */
.section-steps .wp-block-columns {
    position: relative;
    align-items: flex-start;
}

/* Línea de metro — solo en escritorio */
@media (min-width: 782px) {
    .section-steps .wp-block-columns::before {
        content: '';
        position: absolute;
        top: 16px;
        left: 0;
        right: 0;
        height: 32px;
        background: var(--border);
        border-radius: 9999px;
        z-index: 0;
        pointer-events: none;
    }
}

.section-steps .wp-block-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-number {
    --circle: 64px;
    width: var(--circle);
    height: var(--circle);
    border-radius: 50%;
    border: none;
    background: var(--accent-alt);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 var(--space-5) !important;
    position: relative;
    z-index: 1;
    /* reset gradient text heredado */
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    padding-bottom: 0;
}

/* Eyebrow dentro de bloques Gutenberg */
.wp-block-group .eyebrow,
p.eyebrow {
    color: var(--accent-color);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: .75rem !important;
}

/* Eyebrow de acción — magenta en lugar de cyan */
.section-steps .eyebrow,
p.eyebrow--action {
    color: var(--accent-alt);
}

/* Product cards en dark/landing — gradiente por plugin */
html.theme-dark .product-card,
body.landing .product-card {
    background: var(--bg-surface);
    border-color: rgba(255,255,255,.1);
}

body.landing .plugin-events,
html.theme-dark .plugin-events {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 14%, transparent) 0%, transparent 25%),
        var(--bg-surface);
}

body.landing .plugin-bridge,
html.theme-dark .plugin-bridge {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-alt) 14%, transparent) 0%, transparent 25%),
        var(--bg-surface);
}

/* Light mode — borde y fondo visibles */
@media (prefers-color-scheme: light) {
    html:not(.theme-dark) .product-card {
        border-color: var(--border);
    }
    html:not(.theme-dark) .plugin-events,
    html:not(.theme-dark) .plugin-bridge {
        background:
            linear-gradient(135deg, color-mix(in srgb, var(--accent-color) 8%, transparent) 0%, transparent 60%),
            var(--bg-surface);
    }
    html:not(.theme-dark) .plugin-bridge {
        background:
            linear-gradient(135deg, color-mix(in srgb, var(--accent-alt) 8%, transparent) 0%, transparent 60%),
            var(--bg-surface);
    }
}

/* Precio del producto */
.product-price {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -.03em;
    color: var(--accent-color);
    margin: -.25rem 0 1.25rem !important;
}

/* Párrafo intro de la sección de productos */
.section-products-intro {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    font-weight: 300;
    line-height: 1.5;
    color: color-mix(in srgb, var(--accent-alt) 50%, var(--fg-muted));
    max-width: 44ch;
    margin-bottom: 2.5rem !important;
}

/* Párrafo cierre de pilares */
.pillars-closing {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    font-weight: 300;
    line-height: 1.5;
    color: color-mix(in srgb, var(--accent-alt) 50%, var(--fg-muted));
    margin-top: 2rem !important;
}

/* Último paso — efecto "destino" */
@media (min-width: 782px) {
    .section-steps .wp-block-column:last-child {
        background: color-mix(in srgb, var(--accent-alt) 5%, transparent);
        border-radius: var(--radius);
        padding: 0 .75rem 1rem;
        /* Inset border via box-shadow — no afecta al layout ni al alineamiento del círculo */
        box-shadow:
            inset 0 0 0 1px color-mix(in srgb, var(--accent-alt) 30%, transparent),
            0 0 32px -8px color-mix(in srgb, var(--accent-alt) 20%, transparent);
    }

    .section-steps .wp-block-column:last-child .step-number {
        box-shadow:
            0 0 0 6px color-mix(in srgb, var(--accent-alt) 20%, transparent),
            0 0 24px color-mix(in srgb, var(--accent-alt) 35%, transparent);
    }
}

/* ─── Pie de página de agentes IA ───────────────────────────────────── */
.section-footnote { display: none; }

.section-cta .footnote {
    font-size: .75rem;
    color: var(--fg-muted);
    opacity: .5;
    margin-top: 1.5rem !important;
    max-width: none;
}

/* ─── Hero text CTA (Bridge gratuito) ───────────────────────────────── */
.hero-bridge-cta {
    font-size: .875rem;
    color: var(--fg-muted);
    margin-top: -.5rem !important;
}
.hero-bridge-cta a {
    color: var(--fg-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .15s ease;
}
.hero-bridge-cta a:hover { color: var(--fg); }

/* ─── Calculator placeholder ─────────────────────────────────────────── */
.calculator-placeholder {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--fg-muted);
    font-size: .875rem;
    font-style: italic;
    margin-block: 2rem !important;
}

/* ─── Products roadmap note ──────────────────────────────────────────── */
.products-roadmap-note {
    font-size: .875rem;
    color: var(--fg-muted);
    margin-top: 1.5rem !important;
}

/* ─── hv-chat — panel de conversación ───────────────────────────────── */
.hv-chat {
    background: var(--bg-surface, #111120);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: var(--font);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hv-chat__row {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,.06);
}

.hv-chat__row:first-of-type { border-top: none; }

.hv-chat__avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.hv-chat__row--user .hv-chat__avatar {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.5);
}

.hv-chat__row--agent .hv-chat__avatar {
    background: color-mix(in srgb, var(--accent-color) 18%, transparent);
    color: var(--accent-color);
}

.hv-chat__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}

.hv-chat__agent {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--fg);
}

.hv-chat__pill {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.hv-chat__pill--ok {
    background: color-mix(in srgb, #22c55e 15%, transparent);
    color: #22c55e;
}

.hv-chat__title {
    width: 100%;
    margin: 4px 0 2px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fg);
    font-family: var(--font-mono);
}

.hv-chat__detail {
    width: 100%;
    margin: 0;
    font-size: 0.82rem;
    color: var(--fg-muted, var(--muted-color));
    line-height: 1.5;
}

.hv-chat__audit {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.06);
    font-size: 0.72rem;
    color: rgba(255,255,255,.25);
    letter-spacing: .02em;
    font-family: var(--font-mono);
}

/* hv-chat overrides para modo claro */
@media (prefers-color-scheme: light) {
    html:not(.theme-dark) .hv-chat {
        border-color: var(--border);
    }
    html:not(.theme-dark) .hv-chat__row {
        border-top-color: var(--border);
    }
    html:not(.theme-dark) .hv-chat__row--user .hv-chat__avatar {
        background: var(--bg-surface);
        color: var(--fg-muted);
        border: 1px solid var(--border);
    }
    html:not(.theme-dark) .hv-chat__audit {
        border-top-color: var(--border);
        color: var(--fg-muted);
    }
}

html.theme-light .hv-chat {
    border-color: var(--border);
}
html.theme-light .hv-chat__row {
    border-top-color: var(--border);
}
html.theme-light .hv-chat__row--user .hv-chat__avatar {
    background: var(--bg-surface);
    color: var(--fg-muted);
    border: 1px solid var(--border);
}
html.theme-light .hv-chat__audit {
    border-top-color: var(--border);
    color: var(--fg-muted);
}

/* ─── Accesibilidad global ───────────────────────────────────────────── */

/* Foco visible para usuarios de teclado. Aplica a cualquier
   elemento foqueable; los componentes pueden afinar pero no
   suprimir sin sustituto. */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* ─── Calculator ─────────────────────────────────────────────────────── */

.hv-calc {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-block: 2rem;
}

.hv-calc__sliders {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hv-calc__field { display: flex; flex-direction: column; gap: .5rem; }

.hv-calc__label {
    font-size: .8125rem;
    font-weight: 500;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.hv-calc__value {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -.03em;
    color: var(--fg);
    line-height: 1;
    margin-bottom: .25rem;
}

.hv-calc__range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 9999px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}
.hv-calc__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent-alt);
    cursor: pointer;
    border: none;
}
.hv-calc__range::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent-alt);
    cursor: pointer;
    border: none;
}

.hv-calc__results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .hv-calc__results { grid-template-columns: 1fr; }
}

.hv-calc__result {
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    background: color-mix(in srgb, var(--accent-alt) 6%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--accent-alt) 20%, transparent);
}

.hv-calc__result--savings {
    background: color-mix(in srgb, var(--accent-color) 8%, var(--bg));
    border-color: color-mix(in srgb, var(--accent-color) 25%, transparent);
}

.hv-calc__result-label {
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fg-muted);
    margin-bottom: .5rem;
}

.hv-calc__result-value {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: var(--accent-alt);
    letter-spacing: -.02em;
    line-height: 1.2;
}

.hv-calc__result--savings .hv-calc__result-value {
    color: var(--accent-color);
}

/* ─── Events features ────────────────────────────────────────────────── */

/* ─── FAQ ────────────────────────────────────────────────────────────── */

.section-faq .faq-q {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: .375rem;
}

.section-faq .faq-q + .faq-a {
    color: var(--fg-muted);
    max-width: 64ch;
    margin-top: 0;
}

.section-faq .faq-q:first-of-type { margin-top: 1.5rem; }

/* ─── Events features ────────────────────────────────────────────────── */

.section-events-features .hv-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.hv-feature {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    background: var(--bg-surface);
}

.hv-feature__name {
    font-weight: 600;
    font-size: .9375rem;
    margin-bottom: .5rem;
    color: var(--fg);
}

.hv-feature__desc {
    font-size: .875rem;
    color: var(--fg-muted);
    line-height: 1.5;
}

/* Respetar la preferencia del SO de reducir movimiento. Cubre
   animaciones, transiciones y scroll suave en todo el tema y
   los plugins que renderizan dentro de él. */
/* ─── Tables ────────────────────────────────────────────────────── */
.hv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    margin-block: 1.5rem;
}
.hv-table th,
.hv-table td {
    padding: .625rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.hv-table th:last-child,
.hv-table td:last-child { text-align: right; }
.hv-table th {
    font-weight: 600;
    color: var(--fg-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.hv-table td:first-child { color: var(--fg-muted); }
.hv-table--compare td:not(:first-child) { text-align: center; font-weight: 500; }
.hv-table--compare th:not(:first-child) { text-align: center; }
.hv-table--compare td:last-child { color: var(--accent); }
.hv-table__separator td { background: none; font-size: .75rem; padding-top: 2rem; padding-bottom: .375rem; color: var(--fg-muted); border-bottom-color: transparent; }
.hv-table__pro td { color: var(--fg-muted); opacity: .5; }

/* ─── Doc nav cards ─────────────────────────────────────────────── */
.hv-doc-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}
.hv-doc-nav__card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border-top: 3px solid var(--accent-color);
    padding: 1.5rem;
    gap: .5rem;
}
.hv-doc-nav__card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.hv-doc-nav__card p {
    font-size: .875rem;
    color: var(--fg-muted);
    margin: 0;
    flex: 1;
}
.hv-doc-nav__link {
    font-size: .875rem;
    font-weight: 500;
    color: var(--accent-alt);
    text-decoration: none;
    margin-top: 1rem;
}
.hv-doc-nav__link:hover { text-decoration: underline; }
.hv-back-toc { display: inline-block; margin-top: 2rem; font-size: .8125rem; color: var(--fg-muted); text-decoration: none; }
.hv-back-toc:hover { color: var(--accent-color); }

/* ─── Docs ──────────────────────────────────────────────────────── */
.section-docs {
    padding-block: 4rem;
    border-top: 1px solid var(--border);
}
.section-docs h3 { margin-top: 2.5rem; }
.section-docs h3:first-child { margin-top: 0; }
.section-docs .wp-block-code { margin-block: 1rem; }
.section-docs .wp-block-code + p { margin-top: 1rem; }

.hv-details-group { margin-block: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hv-details { border-bottom: 1px solid var(--border); }
.hv-details:last-child { border-bottom: none; }
.hv-details summary { padding: .875rem 1.25rem; cursor: pointer; font-weight: 500; font-size: .9375rem; list-style: none; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.hv-details summary::-webkit-details-marker { display: none; }
.hv-details summary::after { content: "+"; font-size: 1.125rem; font-weight: 300; color: var(--fg-muted); transition: transform .15s ease; }
.hv-details[open] summary::after { content: "−"; }
.hv-details summary:hover { background: color-mix(in srgb, var(--border) 30%, transparent); }
.hv-details__body { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); }
.hv-details__body p { font-size: .9375rem; margin-bottom: .75rem; }
.hv-details__body p:last-child { margin-bottom: 0; }
.hv-details__body pre { background: var(--bg-surface); border: none; border-radius: 0; padding: 1rem 1.25rem; overflow-x: auto; margin-block: .75rem; }
.hv-details__body pre code { font-size: .8125rem; font-family: var(--font-mono, monospace); color: var(--fg); background: none; border: none; padding: 0; border-radius: 0; }
@media (max-width: 600px) {
    .hv-table { font-size: .8125rem; }
    .hv-table th, .hv-table td { padding: .5rem .625rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
