/*
|--------------------------------------------------------------------------
| Hoja de estilos principal
|--------------------------------------------------------------------------
| Este archivo concentra la capa visual del proyecto.
|--------------------------------------------------------------------------
*/

:root {
    --color-navy-950: #08111f;
    --color-navy-900: #10233d;
    --color-navy-700: #1f3b61;
    --color-gold-500: #b99149;
    --color-gold-300: #dcc08c;
    --color-ink-900: #171717;
    --color-white: #ffffff;
    --shadow-soft: 0 18px 48px rgba(8, 17, 31, 0.18);
    --shadow-card: 0 14px 30px rgba(16, 35, 61, 0.12);
    --border-soft: 1px solid rgba(185, 145, 73, 0.24);
    --container: min(1180px, calc(100% - 2rem));
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --transition-base: 180ms ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--color-ink-900);
    background:
        radial-gradient(circle at top, rgba(220, 192, 140, 0.16), transparent 22%),
        linear-gradient(180deg, #fbf8f1 0%, #f4ede1 42%, #fbf8f1 100%);
    font-family: 'Source Sans 3', sans-serif;
    line-height: 1.6;
}

img { max-width: 100%; display: block; height: 200px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.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;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 200;
    padding: 0.85rem 1rem;
    background: var(--color-navy-900);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    transition: top var(--transition-base);
}

.skip-link:focus { top: 1rem; }

.section-shell,
.nav-shell,
.site-footer__inner,
.site-footer__bar,
.page-hero__inner,
.content-grid,
.event-grid,
.gallery-grid,
.members-grid,
.timeline,
.home-story,
.home-highlights,
.callout-band__inner,
.hero-home__inner {
    width: var(--container);
    margin-inline: auto;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    color: var(--color-white);
    transition: background-color var(--transition-base), backdrop-filter var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: rgba(8, 17, 31, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(8, 17, 31, 0.18);
    border-color: rgba(255, 255, 255, 0.08);
}

.topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.topbar__text {
    width: var(--container);
    margin: 0 auto;
    padding: 0.65rem 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-mark__crest {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(220, 192, 140, 0.95), rgba(185, 145, 73, 0.9));
    color: var(--color-navy-950);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4);
}

.brand-mark__text strong,
.section-kicker,
.hero-panel__eyebrow,
.stat-card__label,
.footer-kicker,
.card-kicker {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brand-mark__text strong { font-size: 1.35rem; }

.brand-mark__text small {
    display: block;
    font-size: 0.78rem;
    opacity: 0.82;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.35rem;
}

.site-nav__link {
    position: relative;
    padding: 0.45rem 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.84rem;
}

.site-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after,
.site-nav__link.is-active::after { transform: scaleX(1); }

.nav-toggle { display: none; border: 0; background: transparent; padding: 0.25rem; cursor: pointer; }
.nav-toggle__line { display: block; width: 1.7rem; height: 2px; margin: 0.32rem 0; background: var(--color-white); }

.hero-home,
.page-hero {
    position: relative;
    isolation: isolate;
    overflow: clip;
}

.hero-home {
    min-height: 100vh;
    display: grid;
    align-items: end;
    padding: 11rem 0 4rem;
    color: var(--color-white);
    background:
        linear-gradient(180deg, rgba(8, 17, 31, 0.3), rgba(8, 17, 31, 0.82)),
        radial-gradient(circle at top, rgba(220, 192, 140, 0.16), transparent 22%),
        linear-gradient(140deg, #10233d 0%, #1c2c42 28%, #4a3420 100%);
}

.hero-home::before,
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(transparent 0%, rgba(255, 255, 255, 0.03) 100%),
        repeating-linear-gradient(90deg, transparent 0, transparent 118px, rgba(255, 255, 255, 0.04) 118px, rgba(255, 255, 255, 0.04) 119px);
    pointer-events: none;
}

.hero-home__inner,
.page-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2rem;
}

.hero-home__inner {
    grid-template-columns: 1.5fr 0.8fr;
    align-items: end;
}

.hero-copy h1,
.page-hero h1,
.section-heading h2,
.story-card h2,
.event-card h3,
.info-card h3,
.gallery-card h3,
.member-card h3,
.site-footer h2 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    line-height: 0.98;
}

.hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(3.8rem, 8vw, 6.8rem);
    margin-bottom: 1.2rem;
}

.hero-frame {
    position: relative;
    margin-bottom: 1.6rem;
    width: min(100%, 200px);
    min-height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-soft);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
        rgba(255, 255, 255, 0.08);
}

.hero-frame::before,
.hero-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-frame::before {
    background:
        linear-gradient(90deg, rgba(8, 17, 31, 0.9) 0%, rgba(8, 17, 31, 0.18) 18%, rgba(8, 17, 31, 0.18) 82%, rgba(8, 17, 31, 0.9) 100%),
        linear-gradient(180deg, rgba(8, 17, 31, 0.5) 0%, transparent 24%, transparent 76%, rgba(8, 17, 31, 0.55) 100%);
}

.hero-frame::after {
    inset: 1.25rem;
    border-radius: calc(var(--radius-lg) - 8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 48px rgba(255, 255, 255, 0.06);
}

.hero-frame__image {
    position: absolute;
    inset: 1.25rem;
    z-index: 0;
    width: calc(100% - 2.5rem);
    height: calc(100% - 2.5rem);
    border-radius: calc(var(--radius-lg) - 8px);
    object-fit: cover;
    object-position: center 40%;
    filter: saturate(0.92) contrast(1.04);
    transform: scale(1.01);
}

.hero-frame__placeholder {
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: 3rem;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(16, 35, 61, 0.28), rgba(16, 35, 61, 0.62)),
        radial-gradient(circle at top, rgba(220, 192, 140, 0.44), transparent 35%),
        linear-gradient(135deg, #7e633d, #20314d);
    position: relative;
    z-index: 0;
}

.hero-frame__placeholder strong {
    display: block;
    margin-bottom: 0.8rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
}

.hero-copy p,
.page-hero p,
.section-heading p,
.story-card p,
.event-card p,
.info-card p,
.gallery-card p,
.member-card p,
.site-footer p,
.timeline__content p { font-size: 1.08rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: 0.95rem 1.35rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    font-size: 0.82rem;
    transition: transform var(--transition-base), background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.button:hover,
.button:focus-visible { transform: translateY(-2px); }

.button--primary {
    background: linear-gradient(135deg, var(--color-gold-500), #d3ab62);
    color: var(--color-navy-950);
    box-shadow: var(--shadow-card);
}

.button--secondary {
    border-color: rgba(255, 255, 255, 0.48);
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.03);
}

.button--secondary-dark {
    border-color: rgba(16, 35, 61, 0.18);
    color: var(--color-navy-900);
    background: var(--color-white);
}

.hero-panel {
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.hero-panel__eyebrow,
.section-kicker,
.footer-kicker,
.card-kicker { margin-bottom: 0.8rem; color: var(--color-gold-300); font-size: 0.9rem; }

.hero-panel ul,
.footer-links,
.meta-list,
.check-list { list-style: none; margin: 0; padding: 0; }

.hero-panel li,
.check-list li,
.meta-list li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.7rem;
}

.hero-panel li::before,
.check-list li::before,
.meta-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.68rem;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: var(--color-gold-300);
}

.section-shell { padding: 6rem 0; }
.section-shell--tight { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.section-heading { max-width: 44rem; margin-bottom: 2.25rem; }
.section-heading h2, .page-hero h1, .story-card h2, .site-footer h2 { font-size: clamp(2.4rem, 5vw, 4rem); }

.content-grid,
.home-highlights,
.event-grid,
.gallery-grid,
.members-grid { display: grid; gap: 1.5rem; }

.content-grid { grid-template-columns: 1.3fr 0.9fr; align-items: start; }
.home-story { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1.5rem; }
.home-highlights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.event-grid,
.gallery-grid,
.members-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.story-card,
.info-card,
.event-card,
.gallery-card,
.member-card,
.stat-card,
.timeline__item,
.callout-band,
.quote-block {
    background: rgba(255, 255, 255, 0.86);
    border: var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.story-card,
.info-card,
.event-card,
.gallery-card,
.member-card,
.quote-block { padding: 1.75rem; }

.story-card--image,
.gallery-card__media {
    min-height: 280px;
    background:
        linear-gradient(180deg, rgba(16, 35, 61, 0.16), rgba(16, 35, 61, 0.4)),
        radial-gradient(circle at top, rgba(220, 192, 140, 0.52), transparent 35%),
        linear-gradient(135deg, #7e633d, #20314d);
    overflow: hidden;
}

.story-card--image { position: relative; }
.story-card--image::after {
    content: 'Memoria visual institucional';
    position: absolute;
    inset: auto 1.5rem 1.5rem 1.5rem;
    color: var(--color-white);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.stat-card { padding: 1.45rem; }
.stat-card__value {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.6rem;
    color: var(--color-navy-900);
}

.callout-band {
    margin-top: 3rem;
    overflow: hidden;
    background:
        linear-gradient(125deg, rgba(16, 35, 61, 0.95), rgba(31, 59, 97, 0.92)),
        linear-gradient(45deg, rgba(185, 145, 73, 0.16), transparent);
    color: var(--color-white);
}

.callout-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 0;
}

.page-hero {
    padding: 12rem 0 4rem;
    color: var(--color-white);
    background:
        linear-gradient(180deg, rgba(8, 17, 31, 0.28), rgba(8, 17, 31, 0.8)),
        linear-gradient(135deg, #10233d 0%, #284467 40%, #6b4f2a 100%);
}

.timeline {
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1.25rem;
}

.timeline__item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    padding: 1.5rem;
}

.timeline__year {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--color-navy-900);
}

.gallery-card__media {
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.gallery-card__media img { width: 100%; height: 280px; object-fit: cover; }
.gallery-card__placeholder { padding: 2rem; color: var(--color-white); text-align: center; }
.event-card__meta, .member-card__meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(16, 35, 61, 0.08);
    color: var(--color-navy-900);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    font-weight: 700;
}

.quote-block { border-left: 4px solid var(--color-gold-500); }
.quote-block blockquote {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    line-height: 1.15;
    color: var(--color-navy-900);
}

.site-footer {
    padding-top: 4rem;
    color: var(--color-white);
    background: linear-gradient(180deg, rgba(8, 17, 31, 0.94), rgba(8, 17, 31, 1)), radial-gradient(circle at top, rgba(220, 192, 140, 0.12), transparent 32%);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.footer-links li + li { margin-top: 0.7rem; }

.site-footer__bar {
    padding: 1.2rem 0 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-gold-500);
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .hero-home__inner,
    .content-grid,
    .home-story,
    .site-footer__inner,
    .callout-band__inner { grid-template-columns: 1fr; }

    .home-highlights,
    .event-grid,
    .gallery-grid,
    .members-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .topbar { display: none; }
    .nav-shell { padding: 0.9rem 0; }
    .nav-toggle { display: block; }

    .site-nav {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding: 1rem;
        border-radius: var(--radius-md);
        background: rgba(8, 17, 31, 0.96);
        box-shadow: var(--shadow-soft);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .site-nav.is-open { display: flex; }
    .hero-home { padding-top: 8.5rem; }
    .hero-copy h1 { max-width: none; font-size: clamp(3rem, 15vw, 5rem); }
    .hero-frame {
        width: 100%;
        min-height: 300px;
    }
    .hero-frame__placeholder {
        min-height: 300px;
        height: 300px;
    }
    .hero-frame__image {
        inset: 0.85rem;
        width: calc(100% - 1.7rem);
        height: calc(100% - 1.7rem);
    }
    .hero-frame::after {
        inset: 0.85rem;
    }
    .section-shell { padding: 4.5rem 0; }

    .home-highlights,
    .event-grid,
    .gallery-grid,
    .members-grid,
    .timeline__item,
    .site-footer__inner { grid-template-columns: 1fr; }

    .button { width: 100%; }
    .callout-band__inner { align-items: stretch; }
    .page-hero { padding-top: 9rem; }
}
