:root {
    color-scheme: dark;
    --fondo: #0e172b;
    --fondo-profundo: #0a1325;
    --panel: #17243d;
    --panel-claro: #1a2944;
    --texto: #f3f4f6;
    --texto-suave: #9aa6ba;
    --oro: #ffb000;
    --coral: #ff4e50;
    --borde: rgba(172, 188, 214, 0.15);
    --fuente-titulos: "DM Serif Display", Georgia, serif;
    --fuente-funcional: "DM Sans", Arial, sans-serif;
    --fuente-texto: "DM Sans", Arial, sans-serif;

    /* Compatibility aliases used by the article and event templates. */
    --azul-marino: var(--fondo);
    --azul-marino-2: var(--panel);
    --azul-electrico: var(--oro);
    --naranja: var(--oro);
    --naranja-2: #ffd064;
    --gris-oscuro: var(--texto);
    --gris-claro: var(--borde);
    --blanco: var(--texto);
    --rojo: #ef4444;
    --verde: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    min-width: 320px;
    background: var(--fondo);
    color: var(--texto);
    font-family: var(--fuente-texto);
    font-size: 0.9rem;
    line-height: 1.65;
}

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

a:hover {
    color: var(--oro);
}

a:focus-visible {
    outline: 2px solid var(--oro);
    outline-offset: 4px;
}

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

h1,
h2,
h3 {
    color: var(--texto);
    font-family: var(--fuente-titulos);
    font-weight: 400;
    line-height: 1.08;
}

p {
    color: var(--texto-suave);
}

.contenedor {
    width: min(100% - 3rem, 1200px);
    margin: 0 auto;
}

/* Header */
header {
    position: relative;
    z-index: 2;
    background: var(--fondo);
    border-bottom: 1px solid var(--borde);
}

header .barra {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    color: var(--texto);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
}

.logo img {
    width: 34px;
    height: 42px;
    object-fit: contain;
    border-radius: 3px;
}

.logo small {
    display: block;
    color: var(--oro);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

header nav,
header .acciones {
    display: flex;
    align-items: center;
}

header nav {
    gap: 1.55rem;
}

header nav a,
.login-link {
    color: #c1c8d4;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}

header nav a:hover,
.login-link:hover {
    color: var(--texto);
}

header nav .nav-pill {
    color: var(--oro);
    background: rgba(255, 176, 0, 0.09);
    padding: 0.22rem 0.55rem;
    border-radius: 3px;
}

header .acciones {
    gap: 1.1rem;
}

.boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: var(--fuente-funcional);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.boton:hover {
    transform: translateY(-1px);
}

.boton-header {
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    border-color: var(--borde);
    color: var(--texto);
    font-size: 0.7rem;
}

.boton-header:hover,
.boton-outline:hover {
    border-color: var(--oro);
    color: var(--oro);
}

.boton-acento {
    background: var(--coral);
    color: #fff;
}

.boton-acento:hover {
    background: #ff6667;
    color: #fff;
}

.boton-outline {
    border-color: var(--borde);
    color: var(--texto);
}

/* Hero */
.hero {
    background: var(--fondo);
    border-bottom: 1px solid var(--borde);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 6rem);
    min-height: 510px;
    padding-top: 3.5rem;
    padding-bottom: 1.2rem;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.eyebrow {
    color: var(--oro);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.5;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0.75rem 0 1.1rem;
    font-size: clamp(2.8rem, 5vw, 4.3rem);
    letter-spacing: -0.025em;
}

.hero h1 span {
    color: var(--oro);
}

.hero-description {
    max-width: 31rem;
    margin-bottom: 1.35rem;
    font-size: 0.88rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hero-promises {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1rem;
    color: var(--texto-suave);
    font-size: 0.65rem;
    list-style: none;
}

.hero-promises li::before {
    content: "✓";
    margin-right: 0.42rem;
    color: var(--oro);
    font-weight: 700;
}

.hero-footnote {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin-top: auto;
    padding-top: 2.5rem;
    color: var(--texto-suave);
    font-size: 0.58rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.hero-footnote a {
    color: #c0cad9;
    text-align: right;
    text-transform: none;
}

.hero-footnote a span {
    margin-left: 0.45rem;
    color: var(--oro);
}

.hero-visual {
    position: relative;
    min-height: 405px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background: var(--panel);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

.hero-visual::after {
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(180deg, transparent 0%, rgba(8, 16, 31, 0.88) 100%);
    content: "";
    pointer-events: none;
}

.hero-visual > img {
    width: 100%;
    height: 405px;
    object-fit: cover;
    object-position: center 48%;
}

.hero-badge {
    position: absolute;
    z-index: 1;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2rem;
    background: rgba(8, 16, 31, 0.88);
    color: var(--texto);
    font-size: 0.6rem;
}

.hero-badge span {
    color: var(--oro);
}

.hero-visual figcaption {
    position: absolute;
    z-index: 1;
    right: 1.3rem;
    bottom: 1.25rem;
    left: 1.3rem;
    display: grid;
    gap: 0.28rem;
    color: #fff;
    font-family: var(--fuente-titulos);
    font-size: 1.6rem;
    line-height: 1.12;
}

.hero-visual figcaption small {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--fuente-texto);
    font-size: 0.62rem;
}

/* Values */
.values {
    padding: 1.55rem 0;
    border-bottom: 1px solid var(--borde);
    background: var(--panel);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.value .line-icon {
    display: inline-flex;
    height: 1.5rem;
    align-items: center;
    color: var(--oro);
    font-size: 1.2rem;
}

.value h2 {
    margin: 0.45rem 0 0.25rem;
    font-family: var(--fuente-funcional);
    font-size: 0.95rem;
    font-weight: 600;
}

.value p {
    max-width: 15rem;
    font-size: 0.65rem;
    line-height: 1.55;
}

/* How it works */
.how-it-works {
    padding: 4.2rem 0 4rem;
}

.section-intro,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.section-intro h2,
.section-heading h2,
.testimonials h2 {
    margin-top: 0.55rem;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.section-intro > p {
    max-width: 27rem;
    padding-bottom: 0.25rem;
    font-size: 0.74rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2.2rem;
}

.step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--borde);
    color: var(--oro);
    font-size: 1.45rem;
}

.step-top span:first-child {
    font-family: var(--fuente-funcional);
    font-size: 1.55rem;
    font-weight: 500;
}

.step h3 {
    margin: 0.7rem 0 0.45rem;
    font-size: 1.2rem;
}

.step p {
    max-width: 22rem;
    font-size: 0.68rem;
}

/* Service categories */
.categories {
    padding: 3.4rem 0;
    background: var(--panel);
}

.section-heading h2 {
    margin-bottom: 0;
}

.text-link {
    color: var(--oro);
    font-size: 0.68rem;
    font-weight: 600;
}

.text-link span {
    margin-left: 0.35rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.category-card {
    position: relative;
    display: flex;
    min-height: 118px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 1rem;
    border: 1px solid var(--borde);
    border-radius: 5px;
    background: rgba(10, 19, 37, 0.62);
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 176, 0, 0.6);
    background: var(--fondo);
    color: var(--texto);
}

.category-icon {
    margin-bottom: auto;
    color: var(--oro);
    font-size: 1.1rem;
    font-weight: 600;
}

.category-arrow {
    position: absolute;
    top: 0.65rem;
    right: 0.7rem;
    color: var(--texto-suave);
    font-size: 0.75rem;
}

.category-card h3 {
    margin-top: 0.8rem;
    font-size: 1.05rem;
}

.category-card p {
    margin-top: 0.2rem;
    font-size: 0.57rem;
}

.category-note {
    margin-top: 1.2rem;
    font-size: 0.59rem;
}

/* Community stories */
.community {
    padding: 4rem 0 4.2rem;
}

.section-note {
    padding-bottom: 0.35rem;
    color: var(--texto-suave);
    font-size: 0.55rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.story-image {
    display: block;
    height: clamp(190px, 24vw, 270px);
    overflow: hidden;
    border-radius: 4px;
    background: var(--panel);
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease;
}

.story-card:hover .story-image img {
    transform: scale(1.025);
}

.story-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #32415a, #18243a 70%);
}

.story-placeholder span {
    color: rgba(255, 176, 0, 0.75);
    font-family: var(--fuente-titulos);
    font-size: 3rem;
}

.story-placeholder-alt {
    background: linear-gradient(135deg, #31453d, #182b30 70%);
}

.story-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    margin: 0.65rem 0 0.35rem;
    color: var(--texto-suave);
    font-size: 0.54rem;
}

.story-meta span:first-child {
    color: var(--oro);
    font-weight: 700;
    text-transform: uppercase;
}

.story-card h3 {
    max-width: 32rem;
    margin-bottom: 0.4rem;
    font-size: 1.45rem;
}

.story-card h3 a {
    color: inherit;
}

.story-card > p {
    max-width: 36rem;
    margin-bottom: 0.55rem;
    font-size: 0.68rem;
}

.story-empty {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    border: 1px solid var(--borde);
    border-radius: 4px;
    background: var(--panel);
}

.story-empty h3 {
    margin-top: 0.7rem;
}

/* Testimonials */
.testimonials {
    padding: 3.6rem 0 3.8rem;
    background: var(--panel);
}

.testimonials h2 {
    max-width: 39rem;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1.3rem;
}

.testimonial {
    min-height: 205px;
    padding: 1.15rem;
    border: 1px solid rgba(8, 16, 31, 0.25);
    border-radius: 5px;
    background: var(--fondo);
}

.quote-mark {
    color: var(--oro);
    font-family: var(--fuente-titulos);
    font-size: 1.5rem;
    line-height: 1;
}

.testimonial > p {
    min-height: 95px;
    margin: 0.3rem 0 0.8rem;
    color: #e0e4eb;
    font-family: var(--fuente-titulos);
    font-size: 1.08rem;
    line-height: 1.28;
}

.testimonial footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--borde);
}

.avatar {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--borde);
    border-radius: 50%;
    background: var(--panel);
    color: var(--oro);
    font-size: 0.55rem;
    font-weight: 700;
}

.testimonial footer strong,
.testimonial footer small {
    display: block;
}

.testimonial footer strong {
    color: var(--texto);
    font-size: 0.6rem;
}

.testimonial footer small {
    color: var(--texto-suave);
    font-size: 0.52rem;
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.55rem;
}

/* Final call to action and footer */
.final-cta {
    padding: 4.2rem 0;
    border-bottom: 1px solid var(--borde);
}

.final-cta-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 3rem;
}

.final-cta h2 {
    max-width: 42rem;
    margin: 0.6rem 0 0.75rem;
    font-size: clamp(2.2rem, 4vw, 3.35rem);
}

.final-cta-grid > div:first-child > p:last-child {
    max-width: 35rem;
    font-size: 0.7rem;
}

.final-cta-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

.final-cta-actions .boton {
    min-width: 210px;
}

.final-cta-actions small {
    color: var(--texto-suave);
    font-size: 0.58rem;
}

footer {
    background: var(--fondo);
    color: var(--texto);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(230px, 1.8fr) repeat(3, 1fr);
    gap: 3rem;
    padding-top: 2.8rem;
    padding-bottom: 2rem;
}

footer .slogan {
    max-width: 18rem;
    margin-top: 0.8rem;
    font-size: 0.64rem;
}

footer h4 {
    margin-bottom: 0.65rem;
    color: var(--texto);
    font-size: 0.67rem;
}

footer .footer-grid > div:not(.footer-brand) a {
    display: block;
    margin-top: 0.34rem;
    color: var(--texto-suave);
    font-size: 0.62rem;
}

footer .footer-grid > div:not(.footer-brand) a:hover,
footer .legal a:hover {
    color: var(--oro);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.social-links a {
    color: var(--texto-suave);
    font-size: 0.7rem;
    font-weight: 700;
}

footer .legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.9rem;
    padding-bottom: 1rem;
    border-top: 1px solid var(--borde);
    color: var(--texto-suave);
    font-size: 0.57rem;
}

footer .legal div {
    display: flex;
    gap: 1.2rem;
}

/* Article and event pages share the same visual system. */
body > section,
main > section:not(.hero):not(.values):not(.how-it-works):not(.categories):not(.community):not(.testimonials):not(.final-cta) {
    background: var(--fondo);
}

body > section {
    min-height: 45vh;
    padding: 4rem 0;
}

body > section h1,
body > section h2 {
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.tarjetas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.tarjeta {
    overflow: hidden;
    border: 1px solid var(--borde);
    border-radius: 5px;
    background: var(--panel);
}

.tarjeta img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.tarjeta .cuerpo {
    padding: 1.15rem;
}

.tarjeta h3 {
    margin: 0.45rem 0;
    font-size: 1.35rem;
}

.tarjeta .fecha {
    color: var(--oro);
    font-size: 0.7rem;
}

.tarjeta p {
    margin: 0.5rem 0;
}

.tarjeta a {
    color: var(--oro);
    font-weight: 600;
}

.news-category-list,
.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.news-category-list {
    margin: -0.5rem 0 1.4rem;
}

.news-category-list a,
.news-tags a {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--borde);
    border-radius: 2rem;
    color: var(--texto-suave);
    font-size: 0.6rem;
    line-height: 1.2;
    padding: 0.32rem 0.65rem;
}

.news-category-list a:hover,
.news-tags a:hover,
.news-category-list a.is-active {
    border-color: var(--oro);
    background: rgba(255, 176, 0, 0.08);
    color: var(--oro);
}

.news-tags {
    margin: 0.4rem 0;
}

.story-card .news-tags {
    margin: 0.4rem 0;
}

@media (max-width: 900px) {
    header .barra {
        gap: 1rem;
    }

    header nav {
        gap: 0.9rem;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(310px, 0.9fr);
        gap: 2rem;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 5.5vw, 3.6rem);
    }

    .values-grid {
        gap: 1.1rem;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        gap: 2rem;
    }
}

@media (max-width: 680px) {
    .contenedor {
        width: min(100% - 2rem, 1200px);
    }

    header .barra {
        min-height: auto;
        flex-wrap: wrap;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    header nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
        overflow-x: auto;
    }

    header nav a {
        font-size: 0.65rem;
    }

    header .acciones {
        gap: 0.75rem;
    }

    .login-link {
        font-size: 0.65rem;
    }

    .boton-header {
        min-height: 32px;
        padding: 0.4rem 0.6rem;
        font-size: 0.62rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 3rem;
        padding-bottom: 1rem;
    }

    .hero h1 {
        font-size: clamp(2.75rem, 11vw, 4rem);
    }

    .hero-footnote {
        padding-top: 1.8rem;
    }

    .hero-visual,
    .hero-visual > img {
        min-height: 300px;
        height: 72vw;
        max-height: 430px;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 1.5rem;
    }

    .section-intro,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.8rem;
    }

    .section-intro > p {
        max-width: 35rem;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .step p {
        max-width: 36rem;
    }

    .stories-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .testimonial {
        min-height: 0;
    }

    .testimonial > p {
        min-height: 0;
    }

    .final-cta-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.7rem 1rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    footer .legal {
        align-items: flex-start;
        flex-direction: column;
    }

    .tarjetas {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .boton {
        width: 100%;
    }

    .hero-footnote {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-footnote a {
        text-align: left;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 105px;
    }
}

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