/* ==========================================================================
   Germán Font · Lista E1102 — hoja de estilos
   Orden: tokens → base → header → hero → secciones → componentes → redes
          → footer → animación → responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
    /* Ritmo de fondos entre secciones, sin dos iguales consecutivas:
       hero (surface) → quiénes somos (background) → biografía (surface)
       → propuestas (tinted) → noticias (surface) → redes (band). */
    --color-background: #f9f9f9;
    --color-surface: #ffffff;
    --color-surface-tinted: #fbf8f1;
    --color-surface-alt: #eeeeee;

    --color-primary: #7a0e12;
    --color-secondary: #e3c18a;

    --color-outline: #dfbfbc;
    /* #8c716e daba 4.47:1 sobre blanco (bajo el 4.5:1 de WCAG AA) y se usa
       justo en el texto más chico de la página. */
    --color-outline-strong: #7a605d;

    --color-text: #1a1c1c;
    --color-text-muted: #58413f;
    --color-text-strong: #2b2b2b;

    --shadow-soft: 0 10px 30px rgba(26, 28, 28, 0.08);
    --shadow-medium: 0 18px 50px rgba(26, 28, 28, 0.14);
    --shadow-strong: 0 24px 70px rgba(26, 28, 28, 0.18);

    --radius-md: 0.875rem;
    --radius-lg: 1.25rem;

    --page-width: 1180px;
    --page-gutter: clamp(1rem, 4vw, 4rem);
    --section-gap: clamp(4rem, 8vw, 6.5rem);
    --header-height: 76px;

    --transition-base: 180ms ease;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Sin esto, el header sticky tapa el título de la sección de destino. */
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--color-primary);
    color: white;
    font-weight: 700;
}

.skip-link:focus-visible {
    top: 0;
}

/* Sprite SVG: presente en el DOM para que <use> lo resuelva, sin ocupar
   espacio ni recibir foco. */
.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.page-shell {
    width: min(var(--page-width), calc(100% - (var(--page-gutter) * 2)));
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(223, 191, 188, 0.75);
    box-shadow: 0 1px 0 rgba(26, 28, 28, 0.03);
}

.topbar {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.topbar__brand {
    display: inline-flex;
    flex: 0 0 auto;
}

.topbar__logo {
    width: 150px;
    height: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a,
.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color var(--transition-base);
}

.nav-links a:hover,
.footer-links a:hover {
    color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero,
.section {
    position: relative;
    overflow: clip;
    padding: var(--section-gap) 0;
}

.hero {
    background: var(--color-surface);
}

.hero__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle at 2px 2px,
        rgba(223, 191, 188, 0.95) 1px,
        transparent 0
    );
    background-size: 24px 24px;
    opacity: 0.2;
    pointer-events: none;
}

.hero__grid,
.two-column {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    position: relative;
    z-index: 1;
}

.hero__content {
    max-width: 42rem;
}

.eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    background: rgba(227, 193, 138, 0.25);
    color: #271900;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: 0 0 0 5px rgba(122, 14, 18, 0.08);
    flex: 0 0 auto;
}

.hero h1,
.section-copy h2,
.section-heading h2,
.site-footer .footer-brand {
    margin: 0;
    letter-spacing: -0.03em;
}

.hero h1 {
    margin-top: 1.25rem;
    font-size: clamp(2.7rem, 6vw, 4.25rem);
    font-weight: 800;
    line-height: 0.98;
    text-transform: uppercase;
    color: var(--color-primary);
}

.hero__title-sub {
    display: block;
    margin-top: 0.9rem;
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-text-muted);
}

/* Reutiliza el lenguaje visual de .section-divider (barra dorada de acento).
   El dorado no se usa como color de texto: da 1.71:1 sobre blanco. */
.hero__slogan {
    display: inline-block;
    margin: 2rem 0 0;
    padding-bottom: 0.6rem;
    border-bottom: 4px solid var(--color-secondary);
    font-size: clamp(1.5rem, 3.6vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text-strong);
}

.hero__media {
    position: relative;
}

.hero__orb {
    position: absolute;
    top: -2rem;
    right: -1.5rem;
    width: 16rem;
    height: 16rem;
    border-radius: 999px;
    background: rgba(227, 193, 138, 0.42);
    filter: blur(58px);
    opacity: 0.95;
}

.hero__photo-frame {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 8px solid white;
    box-shadow: var(--shadow-strong);
    transform: rotate(2deg);
    background: white;
}

/* aspect-ratio en vez de alturas fijas en rem (31.25rem / 37.5rem): escala
   solo, mantiene el encuadre y evita el salto de layout durante la carga. */
.hero__photo-frame img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Secciones — fondos, encabezados y texto
   -------------------------------------------------------------------------- */

.section--surface {
    background: var(--color-surface);
}

.section--tinted {
    background: var(--color-surface-tinted);
}

.section--band {
    background: var(--color-background);
    border-top: 1px solid rgba(223, 191, 188, 0.85);
    border-bottom: 1px solid rgba(223, 191, 188, 0.85);
}

.section-copy h2,
.section-heading h2 {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.05;
    color: var(--color-primary);
}

.section-divider {
    width: 5rem;
    height: 4px;
    border-radius: 999px;
    background: var(--color-secondary);
    margin: 1rem 0 1.5rem;
}

.section-divider--center {
    margin-left: auto;
    margin-right: auto;
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading--center {
    text-align: center;
}

.section-heading p {
    margin: 0;
    max-width: 42rem;
}

.section-heading--center p {
    margin-inline: auto;
}

.body-copy,
.section-heading p,
.news-card__body p,
.site-footer p {
    color: var(--color-text-muted);
}

/* Un único punto de control para el texto justificado del sitio. */
.body-copy p,
.statement p {
    text-align: justify;
    hyphens: auto;
}

.body-copy p {
    margin: 0 0 1rem;
}

.body-copy p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Componentes
   -------------------------------------------------------------------------- */

.feature-media__frame {
    position: relative;
    margin: 0;
    border-radius: 1.35rem;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    background: var(--color-surface);
}

.feature-media__frame img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.feature-media__tag {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 0.95rem;
    background: var(--color-secondary);
    color: #271900;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.statement {
    max-width: 52rem;
    margin: 0 auto;
    padding: clamp(1.75rem, 4vw, 3rem);
    background: var(--color-surface);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.statement p {
    margin: 0 0 1.25rem;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.statement__lead {
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    font-weight: 600;
    color: var(--color-text-strong);
}

.statement__closing {
    margin: 2rem 0 0;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-secondary);
    color: var(--color-primary);
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    text-align: center;
}

.card-grid {
    display: grid;
    gap: 1.25rem;
}

.card-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card {
    background: var(--color-surface);
    border: 1px solid rgba(223, 191, 188, 0.62);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.news-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-card__body {
    padding: 1.1rem 1.1rem 1.25rem;
}

.news-card__body h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.25rem;
    line-height: 1.25;
}

.news-card__body p {
    margin: 0.7rem 0 0.9rem;
}

.news-card__body time {
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--color-outline-strong);
}

.eyebrow-text {
    display: inline-block;
    margin: 0 0 0.6rem;
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Redes
   -------------------------------------------------------------------------- */

.social-band__inner {
    text-align: center;
}

.social-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
    text-align: left;
}

.social-group {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid var(--color-outline);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.social-group--org {
    background: var(--color-surface-tinted);
    border-color: rgba(227, 193, 138, 0.75);
}

.social-group__head {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(223, 191, 188, 0.6);
}

.social-group__eyebrow {
    display: inline-block;
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-outline-strong);
}

.social-group__head h3 {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-primary);
}

.social-list {
    display: grid;
    gap: 0.75rem;
}

.social-chip {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-outline);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition-base),
        box-shadow var(--transition-base), transform var(--transition-base);
}

/* Antes: `border-color: currentColor`, que acá resuelve a --color-text (casi
   negro), no al color de la red. */
.social-chip:hover {
    transform: translateY(-2px);
    border-color: var(--social-color, var(--color-primary));
    box-shadow: var(--shadow-soft);
}

.social-chip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--social-soft, var(--color-surface-alt));
    color: var(--social-color, var(--color-primary));
    transition: background-color var(--transition-base), color var(--transition-base);
}

.social-chip:hover .social-chip__icon {
    background: var(--social-color, var(--color-primary));
    color: white;
}

.social-chip__icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

.social-chip__text {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.social-chip__network {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-strong);
}

.social-chip__handle {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-chip__arrow {
    flex-shrink: 0;
    margin-left: auto;
    width: 1.1rem;
    height: 1.1rem;
    fill: var(--color-outline-strong);
    transition: fill var(--transition-base), transform var(--transition-base);
}

.social-chip:hover .social-chip__arrow {
    fill: var(--social-color, var(--color-primary));
    transform: translate(2px, -2px);
}

.social-chip--instagram {
    --social-color: #e1306c;
    --social-soft: rgba(225, 48, 108, 0.12);
}

.social-chip--facebook {
    --social-color: #1877f2;
    --social-soft: rgba(24, 119, 242, 0.12);
}

.social-chip--x {
    --social-color: #000000;
    --social-soft: rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--color-surface-alt);
    border-top: 1px solid rgba(223, 191, 188, 0.75);
    padding: 2.25rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.site-footer p {
    margin: 0.35rem 0 0;
}

.footer-note {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-outline-strong);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem;
}

.footer-email {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-email:hover {
    color: var(--color-primary);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 2.6rem;
    height: 2.6rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(223, 191, 188, 0.95);
    background: white;
    color: var(--color-primary);
    box-shadow: var(--shadow-soft);
    transition: background-color var(--transition-base), color var(--transition-base),
        transform var(--transition-base);
}

.footer-social a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

.footer-social a svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

/* --------------------------------------------------------------------------
   Animación de entrada
   -------------------------------------------------------------------------- */

/* El hero no lleva .section-reveal a propósito: está sobre el pliegue y
   animarlo produce un parpadeo en la carga. */
.section-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms ease, transform 800ms ease;
}

.section-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Red de seguridad: si el JS falla o está bloqueado, el contenido igual se ve.
   script.js quita la clase .no-js del <html> apenas arranca. */
.no-js .section-reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .section-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .topbar {
        flex-wrap: wrap;
        justify-content: center;
        padding-block: 1rem;
    }

    .hero__grid,
    .two-column,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero__media {
        order: -1;
        margin-bottom: 1rem;
    }

    /* La foto vertical a ancho completo taparía toda la pantalla y empujaría
       el título fuera del pliegue. */
    .hero__photo-frame {
        max-width: 26rem;
        margin-inline: auto;
    }

    .card-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        text-align: center;
    }

    .footer-links,
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(var(--page-width), calc(100% - 2rem));
    }

    .nav-links {
        gap: 0.9rem 1.25rem;
    }

    .hero,
    .section {
        padding: 3.75rem 0;
    }

    .hero h1 {
        font-size: clamp(2.3rem, 12vw, 3.2rem);
    }

    .card-grid--three {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        justify-items: center;
    }
}
