/* ============================================================
 * DRY 2040 · base.css
 * Reset moderno + typography + globales
 * ============================================================ */

/* ── Modern reset ────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--dry-font-sans);
    font-size: var(--dry-font-body);
    line-height: var(--dry-line-normal);
    color: var(--dry-texto);
    background: var(--dry-blanco);
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

a {
    color: var(--dry-azul);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--dry-azul-profundo);
}

a:focus-visible {
    outline: 2px solid var(--dry-azul);
    outline-offset: 2px;
    border-radius: 2px;
}

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

ul,
ol {
    padding: 0;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--dry-font-sans);
    color: var(--dry-tinta);
    font-weight: 700;
    line-height: var(--dry-line-tight);
}

h1 { font-size: var(--dry-font-h1); }
h2 { font-size: var(--dry-font-h2); }
h3 { font-size: var(--dry-font-h3); font-weight: 600; }
h4 { font-size: var(--dry-font-h4); font-weight: 600; }

code,
pre,
.mono {
    font-family: var(--dry-font-mono);
}

/* ── Layout · container ──────────────────────────────────── */

.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.container--narrow {
    max-width: 768px;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--dry-azul);
    color: var(--dry-blanco);
    border-radius: 0.25rem;
    transition: top 0.15s ease;
}

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

/* ── Screen reader only ──────────────────────────────────── */

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

/* ── Helpers ─────────────────────────────────────────────── */

[x-cloak] {
    display: none !important;
}

.placeholder {
    color: var(--dry-texto-terc);
    font-style: italic;
    padding: 2rem;
    text-align: center;
    background: var(--dry-fondo-claro);
    border-radius: 0.5rem;
}

/* ── Reduced motion ──────────────────────────────────────── */

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