/* ============================================================
   base.css — Reset + Variables — Clinidental v2
   Concepto: "Precision Dark" — Moderno · Tecnológico · Quirúrgico
   ============================================================ */


/* ── 1. BOX SIZING ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }


/* ── 2. VARIABLES GLOBALES ──────────────────────────────────── */
:root {

    /* ── Paleta "Precision Dark" ── */
    --color-bg:          #070d1a;   /* negro azulado — base oscura        */
    --color-surface:     #0f1c2e;   /* superficie de cards                */
    --color-surface-2:   #162338;   /* superficie elevada                 */
    --color-border:      rgba(0, 212, 255, 0.12); /* borde cian sutil    */
    --color-border-soft: rgba(255,255,255,0.06);  /* borde muy sutil     */

    /* Colores de marca */
    --color-primary:     #00d4ff;   /* cian eléctrico — tecnología        */
    --color-primary-dark:#0099cc;   /* cian oscuro para hovers            */
    --color-secondary:   #7c3aed;   /* violeta quirúrgico — premium       */
    --color-secondary-light: #9d5cff;
    --color-accent:      #00ff88;   /* verde neón — salud, 3D             */
    --color-accent-dark: #00cc6a;
    --color-coral:       #ff6b6b;   /* coral — urgencia, CTAs             */

    /* Texto */
    --color-text:        #e2e8f0;   /* blanco suave — lectura cómoda      */
    --color-text-muted:  #8899aa;   /* texto secundario                   */
    --color-text-dim:    #4a6080;   /* texto muy sutil                    */
    --color-white:       #ffffff;

    /* Alias para componentes claros (si se usan en secciones blancas) */
    --color-dark:        #e2e8f0;
    --color-muted:       #8899aa;
    --color-light:       #0f1c2e;
    --color-gray:        #8899aa;

    /* Tipografía */
    --font-heading: 'Syne', 'Arial Black', sans-serif;
    --font-body:    'DM Sans', 'Arial', sans-serif;

    /* Escala tipográfica fluida */
    --fs-xs:   clamp(0.72rem,  0.70rem + 0.12vw, 0.82rem);
    --fs-sm:   clamp(0.875rem, 0.84rem + 0.18vw, 0.975rem);
    --fs-base: clamp(1rem,     0.96rem + 0.22vw, 1.125rem);
    --fs-lg:   clamp(1.2rem,   1.10rem + 0.50vw, 1.5rem);
    --fs-xl:   clamp(1.6rem,   1.40rem + 0.80vw, 2.2rem);
    --fs-xxl:  clamp(2.2rem,   1.70rem + 1.80vw, 3.8rem);
    --fs-hero: clamp(2.8rem,   2.00rem + 3.00vw, 5.5rem);

    /* Espaciado */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  3rem;
    --space-xl:  5rem;
    --space-xxl: 8rem;

    /* Secciones */
    --section-padding: clamp(4rem, 7vw, 7rem);

    /* Radios */
    --radius-sm:    6px;
    --radius-md:    12px;
    --radius-lg:    20px;
    --radius-xl:    32px;
    --radius-round: 9999px;

    /* Sombras con color de marca */
    --shadow-sm:      0 2px 8px  rgba(0, 0, 0, 0.4);
    --shadow-md:      0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg:      0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-cyan:    0 0 30px rgba(0, 212, 255, 0.20);
    --shadow-violet:  0 0 30px rgba(124, 58, 237, 0.25);
    --shadow-green:   0 0 30px rgba(0, 255, 136, 0.20);

    /* Glows para efectos neón */
    --glow-cyan:   0 0 20px rgba(0, 212, 255, 0.4),
                   0 0 60px rgba(0, 212, 255, 0.15);
    --glow-violet: 0 0 20px rgba(124, 58, 237, 0.4),
                   0 0 60px rgba(124, 58, 237, 0.15);
    --glow-green:  0 0 20px rgba(0, 255, 136, 0.4),
                   0 0 60px rgba(0, 255, 136, 0.15);

    /* Layout */
    --container-width: 1240px;
    --header-height:   72px;

    /* Transición */
    --transition:      260ms ease;
    --transition-slow: 500ms ease;
}


/* ── 3. RESET ───────────────────────────────────────────────── */

html {
    font-size: 16px;
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

body, h1,h2,h3,h4,h5,h6, p, figure, blockquote, dl, dd {
    margin: 0;
}

body {
    min-height: 100vh;
    line-height: 1.65;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

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

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-md) 0;
}

pre, code {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.9em;
}


/* ── 4. TIPOGRAFÍA ──────────────────────────────────────────── */

h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-white);
    letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); margin-bottom: var(--space-sm); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-base); }

p {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
}

/* Párrafos en flujo de texto */
article p, .bio-content p, .sobre-mi-content p,
.accordion-body p, .modal-content p {
    margin-bottom: var(--space-sm);
    line-height: 1.8;
}

strong { font-weight: 700; color: var(--color-white); }

/* Subtítulo de sección */
.section-subtitle {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0.5rem auto var(--space-md);
    line-height: 1.75;
}

/* Tag / etiqueta sobre títulos */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.20);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-round);
    margin-bottom: 0.75rem;
}

.section-tag--violet {
    color: var(--color-secondary-light);
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.20);
}

.section-tag--green {
    color: var(--color-accent);
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.20);
}


/* ── 5. CONTENEDOR ──────────────────────────────────────────── */

.container {
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--space-md);
}

@media (max-width: 480px) {
    .container { padding-inline: var(--space-sm); }
}

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

/* Sección con fondo de superficie (no el bg base) */
.section--surface {
    background: var(--color-surface);
}

/* Separador decorativo entre secciones */
.section-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-primary) 30%,
        var(--color-secondary) 70%,
        transparent 100%
    );
    opacity: 0.3;
    margin: 0;
}


/* ── 6. ACCESIBILIDAD ───────────────────────────────────────── */

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) { outline: none; }

.skip-link {
    position: fixed;
    top: -100%;
    left: var(--space-sm);
    z-index: 99999;
    background: var(--color-primary);
    color: var(--color-bg);
    font-weight: 700;
    font-size: var(--fs-sm);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    transition: top var(--transition);
}

.skip-link:focus { top: var(--space-sm); }

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

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


/* ── 7. UTILIDADES RÁPIDAS ──────────────────────────────────── */

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-primary { color: var(--color-primary) !important; }
.text-accent  { color: var(--color-accent) !important; }
.text-violet  { color: var(--color-secondary-light) !important; }
.text-muted   { color: var(--color-text-muted) !important; }
.text-white   { color: var(--color-white) !important; }

.mt-xs { margin-top: var(--space-xs) !important; }
.mt-sm { margin-top: var(--space-sm) !important; }
.mt-md { margin-top: var(--space-md) !important; }
.mt-lg { margin-top: var(--space-lg) !important; }
.mt-xl { margin-top: var(--space-xl) !important; }

.mb-sm { margin-bottom: var(--space-sm) !important; }
.mb-md { margin-bottom: var(--space-md) !important; }
.mb-lg { margin-bottom: var(--space-lg) !important; }

.mx-auto { margin-inline: auto !important; }
.w-100   { width: 100% !important; }
.hidden  { display: none !important; }

.d-flex         { display: flex !important; }
.flex-center    { display: flex !important; align-items: center !important; justify-content: center !important; }
.items-center   { align-items: center !important; }
.justify-center { justify-content: center !important; }
.gap-sm         { gap: var(--space-sm) !important; }
.gap-md         { gap: var(--space-md) !important; }

@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-desktop { display: none !important; } }


/* ── PULIDO FASE 4 ──────────────────────────────────────────── */

/* Selección de texto con color de marca */
::selection {
    background: rgba(0, 212, 255, 0.25);
    color: var(--color-white);
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.25);
    color: var(--color-white);
}

/* Scrollbar personalizada (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-round);
    border: 2px solid var(--color-bg);
    transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.25) var(--color-bg);
}

/* Estilos de impresión */
@media print {
    .site-header,
    .whatsapp-float,
    .nav-toggle,
    .hero-particles,
    .section-divider,
    footer .footer-map,
    footer .footer-social {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    h1, h2, h3 { color: #000; page-break-after: avoid; }
    p, li       { color: #333; line-height: 1.5; }

    a::after {
        content: ' (' attr(href) ')';
        font-size: 0.75em;
        color: #666;
    }

    .hero-full, .hero-small {
        background: #f0f0f0 !important;
        min-height: auto !important;
        padding: 2rem !important;
        color: #000 !important;
    }

    .hero-title, .hero-subtitle, .lead { color: #000 !important; }

    .btn {
        border: 1px solid #000 !important;
        background: transparent !important;
        color: #000 !important;
        padding: 0.3rem 0.6rem;
    }

    .card, .service-rich-card, .reseña-card {
        border: 1px solid #ccc !important;
        background: #fff !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .modal, .lightbox, .galeria-lightbox { display: none !important; }
}
