/* =========================================================
   base.css
   Estilos base del sitio (desktop first)
   Reglas: diseño limpio, espaciado claro, consistencia tipográfica y color.
   ========================================================= */
/* 【3-e3816d】【1-2e05cb】 */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: var(--fs-base);
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    line-height: var(--lh-base);
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Prevent overflow from animations */
.site-wrapper {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* ---------- Layout helpers ---------- */
.container {
    width: min(var(--container), 100% - (var(--container-pad) * 2));
    max-width: 100%; /* Seguridad extra */
    margin-inline: auto;
    box-sizing: border-box;
}

.container--wide {
    width: min(1300px, 100% - (var(--container-pad) * 2));
}

.section {
    padding-block: clamp(60px, 8vw, 100px); 
}

.section--tight {
    padding-block: clamp(40px, 5vw, 60px);
}

.page-header {
    padding-top: clamp(120px, 15vw, 160px);
    padding-bottom: clamp(60px, 8vw, 90px);
}

.surface {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    /* Headings definidos */
    /* 【1-2e05cb】【2-65fe0c】 */
    letter-spacing: .5px;
    margin: 0 0 var(--space-3);
    line-height: 1.05;
}

h1 {
    font-size: var(--h1);
}

h2 {
    font-size: var(--h2);
}

h3 {
    font-size: var(--h3);
}

p {
    margin: 0 0 var(--space-3);
    color: var(--color-text-2);
}

.small {
    font-size: 0.92rem;
    color: var(--color-text-3);
}

/* ---------- Links ---------- */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    opacity: .92;
}

/* ---------- Media / images ---------- */
img {
    max-width: 100%;
    display: block;
}

/* ---------- Simple grid utilities (desktop) ---------- */
.grid {
    display: grid;
    gap: var(--space-5);
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.flex-col-center { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}
.max-w-hero { max-width: 850px; }

/* ---------- Hero Main (Video Background) ---------- */
.hero-main {
    position: relative;
    min-height: clamp(500px, 80vh, 700px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-block: var(--space-8);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 27, 45, 0.8), rgba(15, 27, 45, 0.6));
}

/* ---------- Header / footer base placeholders ----------
   (Se afinarán en components.css / pages/*.css)
--------------------------------------------------------- */

.site-footer {
    padding-block: var(--space-7);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

/* ---------- Accessibility ---------- */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* ---------- Responsive Grids ---------- */
@media (max-width: 1024px) {
    .grid-3, .grid-4, .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: 1fr;
        gap: var(--space-5) !important; /* Reducir gap al apilar */
    }
    
    .text-center-mobile {
        text-align: center;
    }
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

.reveal--up {
    transform: translateY(40px);
}

.reveal--left {
    transform: translateX(-40px);
}

.reveal--right {
    transform: translateX(40px);
}

.reveal--zoom {
    transform: scale(0.95);
}

.reveal.active {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Stagger delays for grids */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }