/*
 * base.css — Nuestro Tiempo Theme
 *
 * Sistema de diseño principal:
 *  - Variables CSS (custom properties)
 *  - Reset mínimo
 *  - Tipografía global
 *  - Utilidades base (container, secciones)
 *
 * @package nuestro-tiempo
 */

/* =============================================================================
   1. VARIABLES GLOBALES (Design Tokens)
   ============================================================================= */

:root {
    /* Paleta de color */
    --c-crema: #F9F7F2;
    --c-negro: #1A1A1A;
    --c-cobre: #C87941;
    --c-tierra: #8B5E3C;
    --c-cobre-light: rgba(200, 121, 65, 0.15);
    --c-cobre-mid: rgba(200, 121, 65, 0.30);
    --c-negro-90: rgba(26, 26, 26, 0.90);
    --c-negro-80: rgba(26, 26, 26, 0.80);
    --c-negro-60: rgba(26, 26, 26, 0.60);
    --c-negro-40: rgba(26, 26, 26, 0.40);
    --c-negro-20: rgba(26, 26, 26, 0.20);
    --c-negro-10: rgba(26, 26, 26, 0.10);
    --c-crema-80: rgba(249, 247, 242, 0.80);
    --c-crema-60: rgba(249, 247, 242, 0.60);
    --c-crema-40: rgba(249, 247, 242, 0.40);

    /* Tipografía */
    --f-serif: 'Playfair Display', 'Georgia', serif;
    --f-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Tamaños de texto fluidos */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */
    --text-6xl: 3.75rem;
    /* 60px */
    --text-7xl: 4.5rem;
    /* 72px */
    --text-8xl: 6rem;
    /* 96px */

    /* Letter spacing */
    --tracking-tight: -0.01em;
    --tracking-normal: 0em;
    --tracking-wide: 0.05em;
    --tracking-wider: 0.1em;
    --tracking-widest: 0.2em;
    --tracking-mega: 0.4em;

    /* Espaciado de sección */
    --space-section-sm: clamp(3rem, 6vw, 5rem);
    --space-section: clamp(4rem, 8vw, 4rem);
    --space-section-lg: clamp(5rem, 10vw, 5rem);

    /* Container */
    --container-max: 80rem;
    /* 1280px */
    --container-pad: clamp(1rem, 4vw, 3rem);

    /* Radios */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Sombras */
    --shadow-cobre: 0 1px 0 0 rgba(200, 121, 65, 0.15);
    --shadow-md: 0 4px 24px rgba(26, 26, 26, 0.12);

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-slower: 0.7s ease;
}


/* =============================================================================
   2. RESET MÍNIMO
   ============================================================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;

    /* Scrollbar Estandarizada (Firefox) */
    scrollbar-color: var(--c-cobre-mid) var(--c-negro);
    scrollbar-width: thin;
}

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

::-webkit-scrollbar-track {
    background: var(--c-negro);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(200, 121, 65, 0.5);
    /* Cobre semitransparente */
    border-radius: 4px;
    border: 2px solid var(--c-negro);
    /* Margen óptico interno para verse más delgada */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--c-cobre);
    /* Cobre sólido al acercar mouse */
}

body {
    font-family: var(--f-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--c-negro);
    background-color: var(--c-negro);
    /* comienza oscuro → evita flash blanco */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.nt-loaded {
    background-color: var(--c-crema);
    transition: background-color 0.3s ease;
}

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

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

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

ul,
ol {
    list-style: none;
}

/* Screen reader only */
.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;
}


/* =============================================================================
   3. TIPOGRAFÍA GLOBAL
   ============================================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--f-serif);
    font-weight: 400;
    line-height: 1.1;
    color: inherit;
}

p {
    font-family: var(--f-sans);
    line-height: 1.7;
    text-align: justify;
    /*hyphens: auto;*/
    /*-webkit-hyphens: auto;*/
}


/* =============================================================================
   4. LAYOUT UTILITARIOS
   ============================================================================= */

/* Container principal */
.nt-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* Sección base */
.nt-section {
    position: relative;
    overflow: hidden;
}

.nt-section--crema {
    background-color: var(--c-crema);
}

.nt-section--negro {
    background-color: var(--c-negro);
}

/* Padding estándar de sección */
.nt-section__inner {
    padding-block: var(--space-section);
}

.nt-section__inner--sm {
    padding-block: var(--space-section-sm);
}


/* =============================================================================
   5. ELEMENTOS DECORATIVOS REUTILIZABLES
   ============================================================================= */

/* Línea separadora horizontal de cobre */
.nt-divider {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--c-cobre-mid), transparent);
    pointer-events: none;
}

.nt-divider--top {
    top: 0;
}

.nt-divider--bottom {
    bottom: 0;
}

/* Label de sección: línea corta + texto en tracking ancho */
.nt-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nt-label__line {
    display: block;
    width: 3rem;
    height: 1px;
    background-color: var(--c-cobre);
    flex-shrink: 0;
}

.nt-label__text {
    font-family: var(--f-sans);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-mega);
    text-transform: uppercase;
    color: var(--c-cobre);
}

/* Textura de puntos de fondo (decorativa) */
.nt-texture {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--c-cobre) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.025;
    pointer-events: none;
}

.nt-texture--dark {
    background-image: radial-gradient(var(--c-negro) 1px, transparent 1px);
}


/* =============================================================================
   6. BOTONES GLOBALES
   ============================================================================= */

/* Botón primario — fondo cobre */
.nt-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--f-sans);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-mega);
    text-transform: uppercase;
    transition: background-color var(--transition-base), transform var(--transition-fast);
}

.nt-btn--primary {
    background-color: var(--c-cobre);
    color: var(--c-crema);
}

.nt-btn--primary:hover {
    background-color: var(--c-tierra);
    transform: scale(1.02);
}

/* Botón secundario — solo borde */
.nt-btn--secondary {
    border: 1px solid rgba(249, 247, 242, 0.4);
    color: var(--c-crema);
}

.nt-btn--secondary:hover {
    border-color: var(--c-cobre);
    color: var(--c-cobre);
}

/* Link CTA de texto */
.nt-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--f-sans);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-mega);
    text-transform: uppercase;
    color: var(--c-cobre);
    transition: gap var(--transition-base), color var(--transition-base);
}

.nt-link:hover {
    gap: 1.25rem;
}

.nt-link__icon {
    flex-shrink: 0;
    width: 0.75rem;
    height: 0.75rem;
    transition: transform var(--transition-base);
}

.nt-link:hover .nt-link__icon {
    transform: translateX(4px);
}


/* =============================================================================
   7. FOCUS VISIBLE (accesibilidad)
   ============================================================================= */

:focus-visible {
    outline: 2px solid var(--c-cobre);
    outline-offset: 3px;
}


/* =============================================================================
   8. RESPONSIVE HELPERS
   ============================================================================= */

@media (max-width: 767px) {
    :root {
        --space-section: clamp(3rem, 8vw, 5rem);
        --space-section-lg: clamp(4rem, 10vw, 6rem);
    }
}