/* =================================================================
   amarketingdynamics — sistema de diseño
   Monocromo de alto contraste. Montserrat + Source Sans 3.
   ================================================================= */

/* ---------- Tokens ---------- */
:root {
    --ink: #0b0b0c;
    --ink-soft: #17181a;
    --ink-mute: #2a2c30;
    --paper: #ffffff;
    --paper-soft: #f4f5f6;
    --paper-mute: #e8e9eb;

    --gray-900: #17181a;
    --gray-700: #3a3c41;
    --gray-500: #6b6f76;
    --gray-400: #9aa0a6;
    --gray-300: #c9cdd2;
    --gray-200: #e2e4e7;

    --line: rgba(11, 11, 12, .12);
    --line-dark: rgba(255, 255, 255, .16);

    /* ---------------------------------------------------------------
       Tokens de texto según la superficie.
       Las superficies oscuras los redefinen en un único sitio, de modo
       que ningún texto quede con contraste insuficiente por olvidar una
       regla. Todos los pares cumplen WCAG AA (4.5:1 normal, 3:1 grande).
       --------------------------------------------------------------- */
    --fg: var(--gray-700);        /* texto corriente     10.2:1 sobre blanco */
    --fg-muted: var(--gray-500);  /* texto secundario     4.9:1 sobre blanco */
    --fg-heading: var(--ink);     /* títulos             18.9:1 sobre blanco */
    --fg-line: var(--line);

    /* Único punto donde se define un color de acento.
       Cambiar aquí tiñe botones y detalles de todo el sitio. */
    --accent: var(--ink);
    --accent-contrast: var(--paper);

    --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius: 4px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(11, 11, 12, .06), 0 4px 12px rgba(11, 11, 12, .05);
    --shadow-md: 0 8px 30px rgba(11, 11, 12, .1);
    --shadow-lg: 0 24px 60px rgba(11, 11, 12, .16);

    --container: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section-y: clamp(4rem, 9vw, 8rem);

    --ease: cubic-bezier(.22, .61, .36, 1);
    --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

/* ---------------------------------------------------------------------
   Superficies oscuras: un único punto donde se invierten los tokens.
   Cualquier bloque nuevo que use estas clases hereda contraste correcto.
   --------------------------------------------------------------------- */
.section--dark,
.on-dark,
.site-header,
.hero,
.page-hero,
.article-hero,
.cta-band,
.site-footer,
.card--dark,
.plan--featured {
    --fg: var(--gray-300);        /* 12.1:1 sobre el negro de marca */
    --fg-muted: var(--gray-400);  /*  6.9:1 sobre el negro de marca */
    --fg-heading: var(--paper);   /* 19.8:1 sobre el negro de marca */
    --fg-line: var(--line-dark);
}

/* ---------------------------------------------------------------------
   Superficies CLARAS anidadas dentro de una oscura.
   Sin esto heredan --fg-heading: white y el texto queda blanco sobre
   blanco. Cualquier bloque claro dentro de .section--dark debe llevar
   .on-light (o una de las clases de aquí abajo, que ya lo aplican).
   --------------------------------------------------------------------- */
.on-light,
.section--dark .card:not(.card--dark),
.section--dark .plan:not(.plan--featured),
.section--dark .form-panel,
.form-panel,
.hero__badge,
.plan__badge {
    --fg: var(--gray-700);        /* 10.2:1 sobre blanco */
    --fg-muted: var(--gray-500);  /*  4.9:1 sobre blanco */
    --fg-heading: var(--ink);     /* 18.9:1 sobre blanco */
    --fg-line: var(--line);
    color: var(--fg);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
    line-height: 1.65;
    color: var(--fg);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    border-radius: 2px;
}
.on-dark :focus-visible, .site-footer :focus-visible, .cta-band :focus-visible {
    outline-color: var(--paper);
}

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

.skip-link {
    position: absolute; top: -100%; left: 1rem; z-index: 999;
    padding: .75rem 1.25rem; background: var(--ink); color: var(--paper);
    font-weight: 600; border-radius: 0 0 var(--radius) var(--radius);
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4, h5, h6, .display {
    font-family: var(--font-display);
    color: var(--fg-heading);
    line-height: 1.06;
    letter-spacing: -.02em;
    font-weight: 800;
    text-wrap: balance;
    /* Red de seguridad: un titular en mayúsculas con una palabra larga
       ("VENEZUELA") desbordaba su columna en pantallas medianas. */
    overflow-wrap: break-word;
}

h1, .h1 { font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5rem); text-transform: uppercase; letter-spacing: -.03em; }
h2, .h2 { font-size: clamp(1.9rem, 1.35rem + 2.6vw, 3.4rem); text-transform: uppercase; }
h3, .h3 { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.75rem); line-height: 1.2; }
h4, .h4 { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); line-height: 1.3; }

p { text-wrap: pretty; }
strong { color: var(--fg-heading); font-weight: 600; }

.kicker {
    font-family: var(--font-display);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.kicker::before {
    content: "";
    width: 28px; height: 2px;
    background: currentColor;
    flex: none;
}

.lead {
    font-size: clamp(1.0625rem, 1rem + .35vw, 1.3rem);
    line-height: 1.6;
    color: var(--fg);
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section--dark, .on-dark {
    background: var(--ink);
    color: var(--fg);
}

.section--soft { background: var(--paper-soft); }

.section-head { max-width: 780px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .kicker { justify-content: center; }
.section-head p { margin-top: 1.25rem; }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ---------- Botones ---------- */
.btn {
    --btn-bg: var(--ink);
    --btn-fg: var(--paper);
    --btn-bd: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .95rem 1.9rem;
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1.5px solid var(--btn-bd);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .25s var(--ease), background-color .25s var(--ease),
                color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
    text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-bd: var(--paper); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--ink); }
.btn--outline:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); }
/* Sobre fondo oscuro un botón outline quedaba negro sobre negro. */
.section--dark .btn--outline, .on-dark .btn--outline, .cta-band .btn--outline,
.hero .btn--outline, .page-hero .btn--outline, .site-footer .btn--outline {
    --btn-fg: var(--paper); --btn-bd: rgba(255, 255, 255, .45);
}
.section--dark .btn--outline:hover, .on-dark .btn--outline:hover, .cta-band .btn--outline:hover,
.hero .btn--outline:hover, .page-hero .btn--outline:hover, .site-footer .btn--outline:hover {
    --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-bd: var(--paper);
}
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--paper); --btn-bd: rgba(255,255,255,.4); }
.btn--ghost:hover { --btn-bd: var(--paper); --btn-bg: rgba(255,255,255,.08); }

.btn--sm { padding: .65rem 1.35rem; font-size: .75rem; }
.btn--lg { padding: 1.1rem 2.4rem; font-size: .875rem; }
.btn--block { display: flex; width: 100%; }

.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn-row { display: flex; flex-wrap: wrap; gap: .875rem; }

.link-arrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: var(--font-display); font-weight: 700;
    font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--fg-heading);
    border-bottom: 2px solid currentColor;
    padding-bottom: .25rem;
    transition: gap .25s var(--ease), opacity .2s var(--ease);
}
.link-arrow:hover { gap: .9rem; }

/* ---------- Cabecera ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 11, 12, .92);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line-dark);
    transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: .75rem; }
.brand__mark { filter: invert(1); flex: none; width: 40px; height: 40px; }
.brand__mark--invert { filter: invert(1); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -.02em;
    color: var(--paper);
}
.brand__name strong { font-weight: 900; color: var(--paper); }
.brand__tag {
    font-size: .625rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-top: .15rem;
}
.brand--footer .brand__name { font-size: 1.375rem; }

.site-nav__list { display: flex; align-items: center; gap: clamp(.5rem, 1.6vw, 1.65rem); }
.site-nav a {
    position: relative;
    display: block;
    padding: .5rem 0;
    font-size: .875rem;
    font-weight: 500;
    color: var(--fg);
    transition: color .2s var(--ease);
}
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 2px;
    background: var(--paper);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--paper); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}

.site-header__actions { display: flex; align-items: center; gap: .75rem; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block;
    width: 20px; height: 2px;
    background: var(--paper);
    transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: var(--ink);
    color: var(--gray-300);
    padding-block: clamp(4rem, 9vw, 8rem);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 520px at 78% 32%, rgba(255,255,255,.09), transparent 62%),
        radial-gradient(600px 400px at 10% 90%, rgba(255,255,255,.05), transparent 65%);
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 5rem);
}
.hero h1 { margin-bottom: 1.5rem; }
.hero__sub {
    font-family: var(--font-display);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 2.25rem;
}
.hero .btn-row { margin-bottom: 2.5rem; }

.hero__points { display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; }
.hero__point {
    display: flex; align-items: center; gap: .625rem;
    font-size: .9375rem; color: var(--fg);
}
.hero__point svg { flex: none; color: var(--fg-heading); }

.hero__visual { position: relative; display: grid; place-items: center; }
.hero__mark {
    width: min(100%, 420px);
    filter: invert(1);
    animation: float 7s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
.hero__badge {
    position: absolute;
    bottom: -.5rem; left: 0;
    background: var(--paper);
    color: var(--ink);
    padding: .875rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex; align-items: baseline; gap: .5rem;
}
.hero__badge b { font-family: var(--font-display); font-size: 1.75rem; font-weight: 900; line-height: 1; }
.hero__badge span { font-size: .8125rem; color: var(--gray-500); }

/* ---------- Tarjetas ---------- */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--gray-300); }
.card h3 { margin-bottom: .75rem; }
.card p { color: var(--fg-muted); }

.card--dark {
    background: var(--ink-soft);
    border-color: var(--line-dark);
    color: var(--gray-300);
}
.card--dark:hover { border-color: rgba(255,255,255,.32); box-shadow: none; }

.card__num {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: var(--paper-mute);
    margin-bottom: 1rem;
}
.card--dark .card__num { color: rgba(255,255,255,.16); }

.card__icon {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    border: 1.5px solid var(--fg-line);
    border-radius: 14px;
    margin-bottom: 1.25rem;
    color: var(--fg-heading);
    flex: none;
}
.card--dark .card__icon { border-color: var(--fg-line); color: var(--fg-heading); }

/* ---------- Planes ---------- */
.plans { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); align-items: stretch; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 3vw, 2.5rem);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.plan:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.plan--featured {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--gray-300);
    box-shadow: var(--shadow-lg);
}

.plan__badge {
    position: absolute;
    top: -.75rem; left: 50%;
    transform: translateX(-50%);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: .4rem 1rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.plan__name {
    font-family: var(--font-display);
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 1rem;
}

.plan__price {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem);
    font-weight: 900;
    line-height: 1;
    color: var(--fg-heading);
    display: flex;
    align-items: baseline;
    gap: .25rem;
}
.plan__price span { font-size: 1rem; font-weight: 600; color: var(--fg-muted); }

.plan__ideal {
    font-size: .875rem;
    color: var(--fg-muted);
    margin-top: .875rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--fg-line);
}

.plan__features { display: flex; flex-direction: column; gap: .75rem; margin: 1.5rem 0; flex: 1; }
.plan__feature {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    font-size: .9375rem;
    color: var(--fg);
    line-height: 1.45;
}
.plan__feature svg { flex: none; margin-top: .2rem; color: var(--fg-heading); }

.plan__extra {
    font-size: .8125rem;
    color: var(--fg-muted);
    padding-top: 1rem;
    margin-bottom: 1.25rem;
    border-top: 1px dashed var(--fg-line);
}

/* ---------- Grupos del catálogo de funciones ---------- */
.funciones-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem);
    text-transform: uppercase;
    letter-spacing: -.01em;
}
.funciones-group__count {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 .5rem;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* ---------- Logos de clientes ---------- */
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
    display: flex;
    gap: clamp(2rem, 5vw, 4.5rem);
    width: max-content;
    animation: marquee 42s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.marquee__item {
    flex: none;
    width: clamp(96px, 12vw, 140px);
    height: clamp(60px, 8vw, 84px);
    display: grid;
    place-items: center;
}
.marquee__item img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) contrast(.85);
    opacity: .55;
    transition: opacity .3s var(--ease), filter .3s var(--ease);
    mix-blend-mode: multiply;
}
.marquee__item img:hover { opacity: 1; filter: grayscale(0); }

/* ---------- Acordeón ---------- */
.accordion { border-top: 1px solid var(--fg-line); }

/* El encabezado solo aporta semántica: el estilo vive en el botón interior.
   Sin esto, un h2 impondría mayúsculas y tamaño de titular a la pregunta. */
.accordion__question {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: none;
    line-height: inherit;
    margin: 0;
}

.accordion__item { border-bottom: 1px solid var(--fg-line); }

.accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 0;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-display);
    font-size: clamp(1rem, .95rem + .35vw, 1.1875rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--fg-heading);
    transition: opacity .2s var(--ease);
}
.accordion__trigger:hover { opacity: .65; }

.accordion__icon {
    flex: none;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    position: relative;
    transition: transform .3s var(--ease);
}
.accordion__icon::before, .accordion__icon::after {
    content: ""; position: absolute;
    background: currentColor;
    transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.accordion__icon::before { width: 13px; height: 1.5px; }
.accordion__icon::after { width: 1.5px; height: 13px; }
.accordion__trigger[aria-expanded="true"] .accordion__icon { transform: rotate(180deg); }
.accordion__trigger[aria-expanded="true"] .accordion__icon::after { opacity: 0; }

.accordion__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s var(--ease);
}
.accordion__panel[data-open="true"] { grid-template-rows: 1fr; }
.accordion__panel > div { overflow: hidden; }
.accordion__panel p { padding-bottom: 1.5rem; max-width: 68ch; color: var(--fg-muted); }

/* ---------- Estadísticas ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.stat__value {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4rem);
    font-weight: 900;
    line-height: 1;
    color: var(--fg-heading);
    letter-spacing: -.03em;
}
.stat__label {
    margin-top: .625rem;
    font-size: .8125rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--fg-muted);
}

/* ---------- Portafolio ---------- */
.project {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding-block: clamp(2.5rem, 5vw, 4rem);
    border-bottom: 1px solid var(--line);
    scroll-margin-top: calc(var(--header-h) + 2rem);
}
.project:last-child { border-bottom: 0; }
.project:nth-child(even) .project__media { order: 2; }

.project__media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper-soft);
    box-shadow: var(--shadow-sm);
}
.project__media img {
    width: 100%;
    transition: transform .6s var(--ease);
}
.project__media:hover img { transform: scale(1.03); }

.project h2, .project h3 { margin: .75rem 0 .625rem; }
.project__subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg-muted);
    margin-bottom: 1.25rem;
}
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.tag {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .375rem .875rem;
    border: 1px solid var(--fg-line);
    border-radius: var(--radius-pill);
    color: var(--fg-muted);
}

/* ---------- Blog ---------- */
.posts { display: grid; gap: clamp(1.5rem, 3vw, 2rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-mute); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }

.post-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; gap: .75rem; }
.post-card__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: .625rem;
    font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted);
}
.post-card h3 { font-size: 1.1875rem; line-height: 1.3; }
.post-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-card p { font-size: .9375rem; color: var(--fg-muted); flex: 1; }

.chip {
    display: inline-block;
    font-family: var(--font-display);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .3rem .75rem;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--paper);
}
.chip--outline { background: transparent; border: 1px solid var(--fg-line); color: var(--fg); }
.chip--outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Artículo ---------- */
.article-hero { background: var(--ink); color: var(--fg); padding-block: clamp(3rem, 7vw, 5.5rem); }
.article-hero h1 {
    font-size: clamp(1.9rem, 1.3rem + 2.8vw, 3.4rem);
    text-transform: none;
    letter-spacing: -.025em;
}
.article-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: .875rem;
    margin-top: 1.5rem;
    font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted);
}
.article-meta .chip { background: var(--paper); color: var(--ink); }

.article-figure {
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 940px;
    box-shadow: var(--shadow-md);
}

.prose { max-width: 72ch; margin-inline: auto; font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 {
    font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
    text-transform: none;
    letter-spacing: -.02em;
    margin-top: 2.75rem;
}
.prose h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.35rem; display: flex; flex-direction: column; gap: .625rem; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 1.1rem; }
.prose ul > li::before {
    content: "";
    position: absolute; left: 0; top: .68em;
    width: 7px; height: 7px;
    background: var(--ink);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.prose ol { list-style: decimal; }
.prose ol > li { padding-left: .35rem; }
.prose li::marker { color: var(--gray-500); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-thickness: 3px; }
.prose blockquote {
    border-left: 3px solid var(--ink);
    padding: .5rem 0 .5rem 1.5rem;
    font-size: 1.1875rem;
    color: var(--ink);
    font-style: italic;
}
.prose img { border-radius: var(--radius-lg); margin-block: 2rem; }
.prose strong { color: var(--ink); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: .5rem; }
.field label {
    font-family: var(--font-display);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    /* Token, no color fijo: así una etiqueta sobre fondo oscuro sigue legible. */
    color: var(--fg-muted);
}
.field input, .field select, .field textarea {
    width: 100%;
    padding: .9rem 1.1rem;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(11, 11, 12, .08);
}
.field input::placeholder, .field textarea::placeholder { color: var(--gray-400); }
.field--error input, .field--error select, .field--error textarea { border-color: #b3261e; }
.field__error { font-size: .8125rem; color: #b3261e; font-weight: 500; }

.field--check { flex-direction: row; align-items: flex-start; gap: .75rem; }
.field--check input { width: 20px; height: 20px; flex: none; margin-top: .15rem; accent-color: var(--ink); }
.field--check label {
    font-family: var(--font-body);
    font-size: .9375rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
    color: var(--fg);
}
.field--check a { text-decoration: underline; text-underline-offset: 2px; }

.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }

.alert {
    padding: 1.125rem 1.375rem;
    border-radius: 12px;
    border: 1.5px solid;
    font-size: .9375rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}
.alert svg { flex: none; margin-top: .15rem; }
.alert--ok { border-color: #1b7f4d; background: #eaf6ef; color: #14603a; }
.alert--error { border-color: #b3261e; background: #fdecea; color: #8c1d18; }

/* ---------- Bloques de contacto ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1.75rem; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item__icon {
    width: 46px; height: 46px; flex: none;
    display: grid; place-items: center;
    border: 1.5px solid var(--fg-line);
    border-radius: 12px;
    color: var(--fg-heading);
}
.contact-item h3 {
    font-size: .8125rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: .3rem;
    font-weight: 700;
}
.contact-item p, .contact-item a { color: var(--fg-heading); font-size: 1.0625rem; }
.contact-item a:hover { text-decoration: underline; text-underline-offset: 3px; }

.form-panel {
    background: var(--paper);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 4vw, 3rem);
    box-shadow: var(--shadow-lg);
}

/* ---------- Banda CTA ---------- */
.cta-band {
    background: var(--ink);
    color: var(--fg);
    padding-block: clamp(3rem, 7vw, 5.5rem);
    border-bottom: 1px solid var(--fg-line);
}
.cta-band__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto;
    gap: clamp(1.75rem, 4vw, 3rem);
    align-items: center;
}
.cta-band__title { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.75rem); }
.cta-band__text { margin-top: 1rem; color: var(--fg-muted); max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .875rem; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: var(--fg-muted); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 3rem);
}
.site-footer__pitch { margin: 1.25rem 0 1.5rem; max-width: 38ch; font-size: .9375rem; }
.site-footer__heading {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--fg-heading);
    margin-bottom: 1.25rem;
}
.site-footer__col ul { display: flex; flex-direction: column; gap: .75rem; }
.site-footer__col a, .site-footer__contact li { font-size: .9375rem; }
.site-footer__col a:hover { color: var(--fg-heading); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__contact { display: flex; flex-direction: column; gap: .75rem; }

.social { display: flex; gap: .625rem; }
.social a {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    color: var(--gray-400);
    transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.social a:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); transform: translateY(-3px); }

.site-footer__bottom {
    margin-top: clamp(2.5rem, 5vw, 4rem);
    padding-top: 1.75rem;
    border-top: 1px solid var(--line-dark);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: .875rem;
}
.site-footer__bottom a:hover { color: var(--paper); text-decoration: underline; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
    position: fixed;
    /* env() respeta la barra de gestos de iOS y el notch. */
    right: calc(clamp(1rem, 3vw, 1.75rem) + env(safe-area-inset-right, 0px));
    bottom: calc(clamp(1rem, 3vw, 1.75rem) + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    width: 56px; height: 56px;
    display: grid; place-items: center;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(37, 211, 102, .4);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08) translateY(-2px); box-shadow: 0 14px 36px rgba(37, 211, 102, .5); }

/* ---------- Migas de pan ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8125rem; color: var(--fg-muted); margin-bottom: 1.5rem; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: .5rem; opacity: .5; }
.breadcrumb a:hover { color: var(--fg-heading); text-decoration: underline; }

/* ---------- Cabecera de página ---------- */
.page-hero { background: var(--ink); color: var(--fg); padding-block: clamp(3rem, 7vw, 6rem); }
.page-hero p { margin-top: 1.5rem; max-width: 62ch; }

/* ---------- Página 404 ---------- */
.error-page { display: grid; place-items: center; text-align: center; padding-block: clamp(4rem, 10vw, 8rem); }
.error-page__code {
    font-family: var(--font-display);
    font-size: clamp(6rem, 4rem + 12vw, 14rem);
    font-weight: 900;
    line-height: .85;
    /* Antes usaba --paper-mute (1.2:1): el "404" era prácticamente invisible. */
    color: var(--gray-500);
    letter-spacing: -.05em;
}

/* ---------- Animación de entrada ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .cta-band__inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__visual { order: -1; }
    .hero__mark { width: min(62%, 280px); }
    .hero__badge { position: static; transform: none; margin-top: 1.5rem; display: inline-flex; }
}

/* El portafolio pasa a una columna antes de 900px: a 993-1249px la columna
   de texto quedaba en 367px y el titular en mayúsculas se salía. */
@media (max-width: 1100px) {
    .project, .project:nth-child(even) .project__media { grid-template-columns: 1fr; order: 0; }
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto;
        background: var(--ink);
        border-bottom: 1px solid var(--line-dark);
        padding: 1.5rem var(--gutter) 2rem;
        transform: translateY(-120%);
        transition: transform .38s var(--ease);
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
    }
    .site-nav.is-open { transform: translateY(0); }
    .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav a { padding: .95rem 0; font-size: 1.0625rem; border-bottom: 1px solid var(--line-dark); }
    .site-nav a::after { display: none; }
    .site-header__actions .btn { display: none; }
}

@media (max-width: 560px) {
    .site-footer__grid { grid-template-columns: 1fr; }
    .btn { width: 100%; }
    .btn-row { flex-direction: column; align-items: stretch; }
    .brand__tag { display: none; }
}

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

@media print {
    .site-header, .site-footer, .cta-band, .wa-float, .nav-toggle { display: none !important; }
    body { color: #000; }
}
