/* ========================= */
/* Base */
/* ========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    color: var(--text);
    min-height: 100vh;
}

.page {
    width: min(1480px, calc(100% - 96px));
    margin: 0 auto;
}

.section,
.page-section {
    padding: 70px 0;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 500;
    display: block;
}

@keyframes floatUpFade {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.daily-fun-fact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(75, 159, 225, 0.2);
    border-radius: 999px;
    padding: 6px 16px 6px 8px;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 100%;
    text-align: left;
    animation: floatUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.daily-fun-fact:hover {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(75, 159, 225, 0.5);
    transform: translateY(-2px);
    box-shadow: none;
}

.daily-fun-fact:hover .fun-fact-icon {
    transform: rotate(15deg) scale(1.1);
}

.fun-fact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    font-size: 0.85rem;
    box-shadow: none;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fun-fact-content {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap; /* Permite que el texto baje de línea si no cabe */
    gap: 4px 8px;
}

.fun-fact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.05em;
    white-space: nowrap; /* Evita que la etiqueta se rompa en dos líneas */
    flex-shrink: 0;
}

.fun-fact-text {
    font-size: 0.85rem;
    color: var(--text);
    opacity: 0.9;
    font-weight: 500;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .fun-fact-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .daily-fun-fact {
        padding: 10px 16px 10px 10px;
        border-radius: var(--radius-lg); /* Un borde menos redondeado es mejor para varias líneas */
        align-items: flex-start; /* El icono se queda arriba si el texto ocupa mucho */
    }
    .fun-fact-icon {
        margin-top: 2px;
    }
}

.hero-description {
    max-width: 650px;
    color: var(--muted-dark);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 22px 0 0;
}

.hero-kicker {
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 18px;
    line-height: 1.4;
    color: var(--text);
    opacity: 0.95;
    max-width: 800px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.1;
    margin: 0;
}

.section-heading p {
    color: var(--muted);
    line-height: 1.8;
}

.centered-heading {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.card-label {
    margin: 0;
    color: var(--muted-dark);
    font-size: 0.9rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 34px;
}

.page-header h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.1;
    margin: 0;
}

.page-header p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.75;
    margin: 18px 0 0;
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}


/* ========================= */
/* Tipografía y piezas comunes del rediseño */
/* ========================= */

h1, h2, h3,
.brand-title {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0;
}

h1 { line-height: 1.05; }
h2 { line-height: 1.1; }

a { color: var(--info); }

/* Chapa tipo cartel de calle de rodaje: identifica cada módulo sin emojis */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2em;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.chip-dark {
    background: #0a0f11;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mono {
    font-family: var(--font-mono);
}
