/* ==========================================================================
   ONZI PHARMA V2 — Design System
   Farmacéutica europea premium: claro, aireado, preciso.
   --------------------------------------------------------------------------
   Índice:
   1. Tokens (custom properties)
   2. Reset y base
   3. Tipografía
   4. Layout (container, section, grid)
   5. Componentes (botones, badges, cards, header, footer…)
   6. Secciones específicas (hero, stats, proceso, FAQ, CTA…)
   7. Animaciones y utilidades
   8. Responsive
   ========================================================================== */

/* 1. TOKENS
   ========================================================================== */
:root {
    /* Marca — derivados del logo (gradiente azul) */
    --brand-600: #0057d9;
    --brand-500: #0066ff;
    --brand-400: #3d8bff;
    --brand-300: #7ab3ff;
    --brand-100: #e3eeff;
    --brand-050: #f2f7ff;
    --cyan-500: #00b8e6;
    --cyan-100: #dff7fd;

    /* Tinta y neutros */
    --ink-900: #0a1633;
    --ink-700: #22304f;
    --ink-500: #4a5872;
    --ink-400: #6b7890;
    --ink-200: #c9d2e0;
    --ink-100: #e6ebf2;
    --paper: #ffffff;
    --paper-soft: #f7f9fc;
    --paper-tint: #eef3fa;

    /* Semánticos */
    --success: #0e9f6e;
    --gradient-brand: linear-gradient(135deg, #2f5dd0 0%, #0066ff 45%, #00b8e6 100%);
    --gradient-ink: linear-gradient(160deg, #0a1633 0%, #14264d 100%);

    /* Sombras — suaves, tono azulado */
    --shadow-xs: 0 1px 2px rgba(10, 22, 51, 0.06);
    --shadow-sm: 0 2px 8px rgba(10, 22, 51, 0.07);
    --shadow-md: 0 8px 24px rgba(10, 22, 51, 0.09);
    --shadow-lg: 0 20px 48px rgba(10, 22, 51, 0.13);
    --shadow-brand: 0 10px 30px rgba(0, 102, 255, 0.22);

    /* Tipografía */
    --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

    /* Escala fluida */
    --text-xs: 0.8125rem;
    --text-sm: 0.9rem;
    --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --text-lg: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    --text-xl: clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
    --text-2xl: clamp(1.6rem, 1.35rem + 1.2vw, 2.2rem);
    --text-3xl: clamp(2rem, 1.6rem + 2vw, 3rem);
    --text-hero: clamp(2.4rem, 1.8rem + 3.2vw, 4.2rem);

    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --section-y: clamp(4rem, 3rem + 5vw, 8rem);

    /* Bordes y radios */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --border: 1px solid var(--ink-100);

    /* Transiciones */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 0.18s var(--ease-out);
    --t-base: 0.32s var(--ease-out);
    --t-slow: 0.6s var(--ease-out);

    /* Layout */
    --container: 1200px;
    --container-wide: 1360px;
    --header-h: 76px;
}

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

* { margin: 0; padding: 0; }

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

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

img, svg, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

ul[role="list"], ol[role="list"] { list-style: none; }

::selection { background: var(--brand-100); color: var(--brand-600); }

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

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

/* Skip link accesible */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--ink-900);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top var(--t-fast);
}

.skip-link:focus { top: 1rem; }

/* 3. TIPOGRAFÍA
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink-900);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { max-width: 68ch; }

.lead {
    font-size: var(--text-lg);
    color: var(--ink-500);
    line-height: 1.7;
}

.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.container--wide { width: min(100% - 2.5rem, var(--container-wide)); }

.section { padding-block: var(--section-y); }

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

.section--ink {
    background: var(--gradient-ink);
    color: var(--ink-200);
}

.section--ink h2, .section--ink h3 { color: #fff; }

.section-head {
    max-width: 720px;
    margin-bottom: var(--space-12);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-head--center p { margin-inline: auto; }

.section-head h2 { margin-block: var(--space-4) var(--space-4); }

.section-head p { color: var(--ink-500); font-size: var(--text-lg); }

.section--ink .section-head p { color: var(--ink-200); }

/* Etiqueta de sección (eyebrow) */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-600);
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient-brand);
}

.section--ink .eyebrow { color: var(--cyan-500); }

/* Grids reutilizables */
.grid-2 { display: grid; gap: var(--space-8); grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: var(--space-6); grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: var(--space-6); grid-template-columns: repeat(4, 1fr); }

/* 5. COMPONENTES
   ========================================================================== */

/* --- Botones --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
    transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--t-fast); }

.btn--primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: var(--shadow-brand);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 102, 255, 0.3);
}

.btn--primary:hover svg { transform: translateX(3px); }

.btn--ghost {
    background: transparent;
    color: var(--ink-900);
    box-shadow: inset 0 0 0 1.5px var(--ink-200);
}

.btn--ghost:hover {
    box-shadow: inset 0 0 0 1.5px var(--brand-500);
    color: var(--brand-600);
    transform: translateY(-2px);
}

.btn--light {
    background: #fff;
    color: var(--ink-900);
    box-shadow: var(--shadow-md);
}

.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* --- Badges / chips --- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    background: var(--brand-050);
    color: var(--brand-600);
    font-size: var(--text-xs);
    font-weight: 600;
}

.chip--outline {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--ink-200);
    color: var(--ink-500);
}

/* --- Card base --- */
.card {
    background: var(--paper);
    border: var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: var(--space-6);
    border-radius: var(--radius-md);
    background: var(--brand-050);
    color: var(--brand-600);
    transition: background var(--t-base), color var(--t-base), transform var(--t-base);
}

.card__icon svg { width: 26px; height: 26px; }

.card:hover .card__icon {
    background: var(--gradient-brand);
    color: #fff;
    transform: scale(1.06) rotate(-3deg);
}

.card h3 { margin-bottom: var(--space-3); font-size: var(--text-lg); }

.card p { color: var(--ink-500); font-size: var(--text-sm); line-height: 1.7; }

.card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--space-6);
}

/* --- Header --- */
.header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    transition: background var(--t-base), box-shadow var(--t-base), backdrop-filter var(--t-base);
}

.header--scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.brand img { width: 40px; height: 40px; }

.brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink-900);
    letter-spacing: -0.01em;
}

.brand__name span { color: var(--brand-500); }

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav__link {
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-700);
    transition: color var(--t-fast), background var(--t-fast);
}

.nav__link:hover { color: var(--brand-600); background: var(--brand-050); }

.nav__link[aria-current="page"] {
    color: var(--brand-600);
    background: var(--brand-050);
    font-weight: 600;
}

.nav__cta { margin-left: var(--space-4); padding: 0.65rem 1.4rem; }

/* Menú móvil */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: var(--radius-sm);
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink-900);
    border-radius: 2px;
    transition: transform var(--t-base), opacity var(--t-base);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Footer --- */
.footer {
    background: var(--gradient-ink);
    color: var(--ink-200);
    padding-block: var(--space-16) var(--space-8);
}

.footer a { transition: color var(--t-fast); }

.footer a:hover { color: #fff; }

.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: var(--space-12);
    padding-bottom: var(--space-12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand p {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--ink-400);
    max-width: 34ch;
}

.footer__brand .brand__name { color: #fff; }

.footer h4 {
    color: #fff;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-6);
}

.footer ul { list-style: none; display: grid; gap: var(--space-3); }

.footer ul a { font-size: var(--text-sm); color: var(--ink-400); }

.footer address {
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--ink-400);
    display: grid;
    gap: var(--space-3);
}

.footer address a { color: var(--brand-300); }

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-8);
    font-size: var(--text-xs);
    color: var(--ink-400);
}

.footer__legal-links { display: flex; flex-wrap: wrap; gap: var(--space-6); }

.footer__credit { width: 100%; text-align: center; margin-top: var(--space-4); }

.footer__credit a { color: var(--brand-300); font-weight: 600; }

/* 6. SECCIONES ESPECÍFICAS
   ========================================================================== */

/* --- Hero --- */
.hero {
    position: relative;
    padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6.5rem));
    padding-bottom: var(--section-y);
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(52% 60% at 82% 12%, var(--brand-100) 0%, transparent 100%),
        radial-gradient(40% 45% at 8% 88%, var(--cyan-100) 0%, transparent 100%),
        var(--paper);
}

.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--ink-100) 1px, transparent 1px),
        linear-gradient(90deg, var(--ink-100) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.35;
    mask-image: radial-gradient(70% 60% at 50% 30%, black, transparent 80%);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, black, transparent 80%);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--space-16);
    align-items: center;
}

.hero__content .chip { margin-bottom: var(--space-6); }

.hero h1 { margin-bottom: var(--space-6); }

.hero .lead { margin-bottom: var(--space-8); max-width: 54ch; }

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

/* Marcadores de confianza bajo el hero */
.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-8);
    color: var(--ink-500);
    font-size: var(--text-sm);
    font-weight: 500;
}

.hero__trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.hero__trust svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }

/* Visual del hero: tarjeta de trazabilidad */
.hero__visual { position: relative; }

.trace-card {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: var(--border);
    padding: var(--space-8);
    max-width: 420px;
    margin-inline: auto;
}

.trace-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.trace-card__head strong { font-family: var(--font-display); color: var(--ink-900); }

.trace-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--success);
}

.trace-card__status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s infinite;
}

.trace-step {
    position: relative;
    display: flex;
    gap: var(--space-4);
    padding-bottom: var(--space-6);
}

.trace-step:last-child { padding-bottom: 0; }

.trace-step::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--ink-100);
}

.trace-step:last-child::before { display: none; }

.trace-step__dot {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--brand-050);
    color: var(--brand-600);
    z-index: 1;
}

.trace-step__dot svg { width: 15px; height: 15px; }

.trace-step--done .trace-step__dot { background: var(--gradient-brand); color: #fff; }

.trace-step strong {
    display: block;
    font-size: var(--text-sm);
    color: var(--ink-900);
    font-family: var(--font-display);
}

.trace-step span { font-size: var(--text-xs); color: var(--ink-400); }

/* Mini-tarjetas flotantes */
.float-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: var(--border);
    padding: 0.7rem 1.1rem;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--ink-700);
    animation: float 6s ease-in-out infinite;
}

.float-chip svg { width: 18px; height: 18px; color: var(--brand-500); }

.float-chip--1 { top: -18px; left: -28px; animation-delay: 0s; }
.float-chip--2 { bottom: 36px; right: -20px; animation-delay: 1.6s; }

/* --- Barra de cifras --- */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.stat {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--paper);
    border: var(--border);
}

.stat__value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1;
}

.stat__value span { color: var(--brand-500); }

.stat__label {
    display: block;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--ink-500);
}

/* --- Proceso de distribución (pasos) --- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    counter-reset: step;
}

.step {
    position: relative;
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: background var(--t-base), transform var(--t-base);
}

.step:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-4px); }

.step::before {
    counter-increment: step;
    content: "0" counter(step);
    display: block;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--space-4);
}

.step h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }

.step p { font-size: var(--text-sm); color: var(--ink-200); line-height: 1.7; }

/* --- Bloque split (imagen/contenido) --- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.split__panel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gradient-ink);
    aspect-ratio: 4 / 3.4;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
}

.split__panel img { width: 42%; opacity: 0.95; }

.split__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 55% at 70% 20%, rgba(0, 102, 255, 0.35), transparent),
        radial-gradient(45% 40% at 20% 85%, rgba(0, 184, 230, 0.25), transparent);
}

/* Lista de verificación */
.checklist { list-style: none; display: grid; gap: var(--space-4); margin-top: var(--space-8); }

.checklist li { display: flex; gap: var(--space-4); align-items: flex-start; }

.checklist svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--brand-500);
}

.checklist strong { display: block; color: var(--ink-900); font-family: var(--font-display); font-size: var(--text-base); }

.checklist p, .checklist span { font-size: var(--text-sm); color: var(--ink-500); }

/* --- FAQ (accordion) --- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: var(--space-4); }

.faq__item {
    border: var(--border);
    border-radius: var(--radius-md);
    background: var(--paper);
    overflow: hidden;
    transition: box-shadow var(--t-base), border-color var(--t-base);
}

.faq__item[open] { box-shadow: var(--shadow-md); border-color: var(--brand-300); }

.faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-6);
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink-900);
    list-style: none;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
    content: "+";
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-050);
    color: var(--brand-600);
    font-size: 1.2rem;
    font-weight: 400;
    transition: transform var(--t-base), background var(--t-base), color var(--t-base);
}

.faq__item[open] summary::after {
    content: "−";
    background: var(--gradient-brand);
    color: #fff;
}

.faq__item > p {
    padding: 0 var(--space-6) var(--space-6);
    color: var(--ink-500);
    font-size: var(--text-sm);
    line-height: 1.75;
    max-width: none;
}

/* --- CTA final --- */
.cta {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--gradient-ink);
    padding: clamp(3rem, 2rem + 4vw, 5.5rem);
    text-align: center;
    overflow: hidden;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(50% 80% at 15% 0%, rgba(0, 102, 255, 0.35), transparent),
        radial-gradient(40% 70% at 90% 100%, rgba(0, 184, 230, 0.28), transparent);
}

.cta > * { position: relative; }

.cta h2 { color: #fff; margin-bottom: var(--space-4); }

.cta p { color: var(--ink-200); margin-inline: auto; margin-bottom: var(--space-8); max-width: 52ch; }

.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); }

/* --- Página interior: cabecera --- */
.page-hero {
    position: relative;
    padding-top: calc(var(--header-h) + clamp(3rem, 6vw, 5rem));
    padding-bottom: clamp(3rem, 5vw, 5rem);
    background:
        radial-gradient(48% 70% at 85% 20%, var(--brand-100) 0%, transparent 100%),
        var(--paper-soft);
    overflow: hidden;
}

.page-hero .chip { margin-bottom: var(--space-6); }

.page-hero h1 { max-width: 18ch; margin-bottom: var(--space-6); }

.page-hero .lead { max-width: 58ch; }

/* --- Timeline (nosotros) --- */
.timeline {
    position: relative;
    display: grid;
    gap: var(--space-8);
    max-width: 760px;
    margin-inline: auto;
    padding-left: var(--space-8);
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--brand-500), var(--cyan-500));
    border-radius: 2px;
}

.timeline__item { position: relative; }

.timeline__item::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--space-8) - 0px);
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--brand-500);
}

.timeline__date {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--brand-600);
    font-size: var(--text-sm);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.timeline__item h3 { margin-block: var(--space-2) var(--space-3); }

.timeline__item p { color: var(--ink-500); }

/* --- Tabla de contacto / info --- */
.info-card {
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
    padding: var(--space-8);
    background: var(--paper);
    border: var(--border);
    border-radius: var(--radius-lg);
    transition: transform var(--t-base), box-shadow var(--t-base);
}

.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.info-card__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--brand-050);
    color: var(--brand-600);
}

.info-card__icon svg { width: 22px; height: 22px; }

.info-card h3 { font-size: var(--text-base); margin-bottom: var(--space-2); }

.info-card p, .info-card a { font-size: var(--text-sm); color: var(--ink-500); }

.info-card a:hover { color: var(--brand-600); }

/* --- Formulario --- */
.form { display: grid; gap: var(--space-6); }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }

.field { display: grid; gap: var(--space-2); }

.field label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-900);
    font-family: var(--font-display);
}

.field input, .field textarea, .field select {
    font: inherit;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--ink-200);
    background: #fff;
    color: var(--ink-900);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px var(--brand-100);
}

.field textarea { resize: vertical; min-height: 140px; }

.form__note { font-size: var(--text-xs); color: var(--ink-400); }

.form__note a { color: var(--brand-600); text-decoration: underline; }

/* --- Página legal --- */
.legal-body {
    max-width: 800px;
    margin-inline: auto;
    display: grid;
    gap: var(--space-8);
}

.legal-body section {
    padding: var(--space-8);
    background: var(--paper);
    border: var(--border);
    border-radius: var(--radius-lg);
}

.legal-body h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: var(--border);
}

.legal-body h3 { font-size: var(--text-base); color: var(--brand-600); margin-block: var(--space-4) var(--space-2); }

.legal-body p, .legal-body li { color: var(--ink-500); font-size: var(--text-sm); line-height: 1.8; max-width: none; }

.legal-body ul, .legal-body ol { padding-left: 1.4rem; display: grid; gap: var(--space-2); }

.legal-body a { color: var(--brand-600); text-decoration: underline; }

.legal-body strong { color: var(--ink-900); }

/* --- Cosmetics: acento propio --- */
.cosmetics-accent {
    --brand-600: #a8712f;
    --brand-500: #c9a86c;
    --brand-400: #d9bd8c;
    --brand-300: #e6d3ae;
    --brand-100: #f6ecd9;
    --brand-050: #fbf6ec;
    --cyan-500: #d98a9b;
    --cyan-100: #fbe9ed;
    --gradient-brand: linear-gradient(135deg, #a8712f 0%, #c9a86c 55%, #d98a9b 100%);
    --shadow-brand: 0 10px 30px rgba(201, 168, 108, 0.3);
}

/* --- Preloader de arranque --- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    background: var(--paper);
    transition: opacity 0.45s var(--ease-out), visibility 0.45s var(--ease-out);
    /* Fallback sin JS: se oculta solo pasados 2.6s */
    animation: preloader-auto-hide 0.45s ease 2.6s forwards;
}

.preloader--done {
    opacity: 0;
    visibility: hidden;
}

.preloader__logo {
    position: relative;
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
}

.preloader__logo img {
    width: 56px;
    height: 56px;
    animation: preloader-pulse 1.6s ease-in-out infinite;
}

.preloader__logo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--brand-100);
    border-top-color: var(--brand-500);
    animation: preloader-spin 1s linear infinite;
}

.preloader__label {
    margin-top: var(--space-6);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-400);
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.88); opacity: 0.75; }
}

@keyframes preloader-auto-hide {
    to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .preloader { display: none; }
}

/* --- Botón flotante de WhatsApp --- */
.whatsapp-float {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.42);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.whatsapp-float svg { width: 30px; height: 30px; }

.whatsapp-float:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 16px 36px rgba(37, 211, 102, 0.5);
}

/* --- Redes sociales (footer) --- */
.social-links {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.social-links a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-200);
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.social-links a:hover {
    background: var(--gradient-brand);
    color: #fff;
    transform: translateY(-3px);
}

.social-links svg { width: 18px; height: 18px; }

/* --- Área de clientes (login/registro) --- */
.auth-page {
    min-height: 100vh;
    display: grid;
    align-content: center;
    padding-top: calc(var(--header-h) + var(--space-8));
    padding-bottom: var(--space-16);
    background:
        radial-gradient(52% 60% at 82% 12%, var(--brand-100) 0%, transparent 100%),
        radial-gradient(40% 45% at 8% 88%, var(--cyan-100) 0%, transparent 100%),
        var(--paper-soft);
}

.auth-card {
    width: min(100% - 2.5rem, 460px);
    margin-inline: auto;
    background: #fff;
    border: var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-8);
}

.auth-card__logo {
    display: grid;
    place-items: center;
    margin-bottom: var(--space-6);
}

.auth-card__logo img { width: 52px; height: 52px; }

.auth-card h1 {
    font-size: var(--text-xl);
    text-align: center;
    margin-bottom: var(--space-2);
}

.auth-card__subtitle {
    text-align: center;
    color: var(--ink-500);
    font-size: var(--text-sm);
    margin-bottom: var(--space-8);
    max-width: none;
}

/* Tabs login/registro */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: var(--paper-tint);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-8);
}

.auth-tabs button {
    padding: 0.65rem;
    border-radius: var(--radius-full);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--ink-500);
    transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.auth-tabs button[aria-selected="true"] {
    background: #fff;
    color: var(--brand-600);
    box-shadow: var(--shadow-sm);
}

.auth-form[hidden] { display: none; }

.auth-form .btn { width: 100%; margin-top: var(--space-2); }

.auth-form__foot {
    margin-top: var(--space-4);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--ink-400);
}

.auth-form__foot a { color: var(--brand-600); font-weight: 600; }

/* Separador "o" */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-block: var(--space-6);
    color: var(--ink-400);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ink-100);
}

/* Botón biométrico */
.btn--biometric {
    width: 100%;
    background: var(--ink-900);
    color: #fff;
}

.btn--biometric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Sellos de seguridad bajo la tarjeta */
.auth-security {
    width: min(100% - 2.5rem, 460px);
    margin: var(--space-6) auto 0;
    display: grid;
    gap: var(--space-3);
}

.auth-security li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    list-style: none;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.75);
    border: var(--border);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    color: var(--ink-500);
}

.auth-security svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--success);
}

.auth-security strong { color: var(--ink-900); }

/* 7. ANIMACIONES Y UTILIDADES
   ========================================================================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(14, 159, 110, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(14, 159, 110, 0); }
}

/* Reveal on scroll (activado por JS) */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal--visible { opacity: 1; transform: none; }

/* Retrasos escalonados para grupos */
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .float-chip { animation: none; }
}

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

/* 8. RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
    .hero__grid { grid-template-columns: 1fr; gap: var(--space-12); }
    .hero__visual { max-width: 460px; margin-inline: auto; width: 100%; }
    .grid-4, .steps, .stats { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; gap: var(--space-12); }
    .split__panel { aspect-ratio: 16 / 10; }

    /* Nav móvil */
    .nav-toggle { display: flex; }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-2);
        padding: var(--space-6);
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: var(--shadow-lg);
        border-bottom: var(--border);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--t-base), opacity var(--t-base), visibility var(--t-base);
    }

    .nav--open { transform: none; opacity: 1; visibility: visible; }

    .nav__link { padding: 0.9rem 1.1rem; font-size: 1rem; }

    .nav__cta { margin: var(--space-2) 0 0; justify-content: center; }
}

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
    .float-chip--1 { left: 0; }
    .float-chip--2 { right: 0; }
    .hero__actions .btn { width: 100%; }
    .cta__actions .btn { width: 100%; }
}

/* Pantallas muy grandes: contener el ancho de lectura */
@media (min-width: 1800px) {
    :root { --container: 1280px; --container-wide: 1480px; }
}
