/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-green: #2F3A33;
    --sage: #A9B8A6;
    --cream: #F6F4EF;
    --grey-warm: #CDC6BA;
    --brown-muted: #715549;
    --white: #FFFFFF;
    --editorial-bg:
        radial-gradient(circle at top right, rgba(169, 184, 166, 0.14), transparent 36%),
        linear-gradient(180deg, rgba(246, 244, 239, 0.98), #f2efe8 100%);
    --hero-video-overhang: 64px;
    --topbar-height: 40px;
    --header-height: 148px;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--cream);
    background-image: var(--editorial-bg);
    color: var(--dark-green);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--topbar-height);
}

h1,
h2,
h3 {
    font-family: 'Cormorant SC', serif;
}

.shiny-text {
    display: inline-block;
    color: var(--white);
    background-image: linear-gradient(
        var(--shiny-spread, 112deg),
        var(--shiny-color, rgba(255, 255, 255, 0.72)) 0%,
        var(--shiny-color, rgba(255, 255, 255, 0.72)) 42%,
        rgba(255, 255, 255, 0.94) 48%,
        var(--shiny-shine, #ffffff) 50%,
        rgba(255, 255, 255, 0.94) 52%,
        var(--shiny-color, rgba(255, 255, 255, 0.72)) 58%,
        var(--shiny-color, rgba(255, 255, 255, 0.72)) 100%
    );
    background-size: 240% auto;
    background-position: var(--shiny-position, 150%) center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 100%;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--white);
    color: #111111;
    text-align: center;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    border-bottom: 0.3px solid rgba(17, 17, 17, 0.06);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.top-bar:hover {
    background: #f7f4ee;
}

/* Header */
header {
    background: var(--dark-green);
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo {
    display: block;
    width: auto;
    height: 142px;
}

.btn-nav {
    background: var(--sage);
    color: var(--dark-green);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.btn-nav-label {
    display: inline-block;
    line-height: 1.15;
    padding-bottom: 0.08em;
}

/* Hero */
.hero {
    background: var(--dark-green);
    color: var(--white);
    text-align: center;
    height: calc(100vh - var(--header-height) - var(--topbar-height));
    overflow: visible;
    position: relative;
    z-index: 2;
}

.hero-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    padding: 24px 0 0;
}

.hero h1 {
    max-width: 20ch;
    font-size: clamp(2.8rem, 5vw, 5.1rem);
    line-height: 1.05;
    margin: 0;
}

.hero-subtitle {
    max-width: 760px;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    margin: 0;
}

.video-container {
    position: relative;
    margin: auto auto 0;
    width: 100%;
    max-width: 420px;
    transform: translateY(var(--hero-video-overhang));
}

.hero-video {
    width: 100%;
    aspect-ratio: 9 / 16;
    display: block;
    border-radius: 28px;
    object-fit: cover;
    background: #0d110f;
    box-shadow: 0 24px 60px rgba(8, 11, 9, 0.28);
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 108px;
    height: 108px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(47, 58, 51, 0.94);
    box-shadow: 0 18px 40px rgba(9, 12, 10, 0.32);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.video-play-button:hover {
    transform: translate(-50%, -50%) scale(1.04);
    background: rgba(35, 44, 38, 0.98);
}

.video-play-icon {
    width: 0;
    height: 0;
    margin-left: 8px;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 34px solid var(--sage);
}

.hero-player.is-playing .video-play-button {
    opacity: 0;
    pointer-events: none;
}

.video-gradual-blur {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--video-gradual-blur-height, 7rem);
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
    opacity: var(--video-gradual-blur-opacity, 1);
    isolation: isolate;
}

.video-gradual-blur-layer {
    position: absolute;
    inset: 0;
}

.video-player-controls {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    z-index: 3;
}

.video-corner-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(47, 58, 51, 0.9);
    flex-shrink: 0;
}

.video-fullscreen-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(47, 58, 51, 0.9);
    flex-shrink: 0;
}

.video-corner-icon {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid var(--white);
}

.hero-player.is-playing .video-corner-icon {
    width: 12px;
    height: 14px;
    margin-left: 0;
    border: 0;
    background:
        linear-gradient(90deg, var(--white) 0 38%, transparent 38% 62%, var(--white) 62% 100%);
}

.video-fullscreen-icon {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
}

.video-progress {
    flex: 1;
}

.video-progress-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.video-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sage), rgba(169, 184, 166, 0.88));
    transition: width 0.55s ease;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sage);
    color: var(--dark-green);
    padding: 18px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    position: relative;
    z-index: 3;
    transform: none;
    transition: transform 0.3s ease;
}

.btn-primary-label {
    display: inline-block;
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.has-scrolled .btn-primary-label {
    opacity: 1;
}

.btn-primary:hover {
    transform: scale(1.05);
}

@media (min-width: 769px) {
    .hero-content {
        gap: 10px;
        padding-top: 12px;
    }

    .hero h1 {
        max-width: 30ch;
        font-size: clamp(2.6rem, 3.7vw, 4.15rem);
    }

    .hero-subtitle {
        max-width: 680px;
        font-size: clamp(1rem, 1.2vw, 1.18rem);
    }

    .video-container {
        max-width: 720px;
        aspect-ratio: 16 / 9;
        border-radius: 28px;
        overflow: hidden;
        background: #060806;
        box-shadow: 0 24px 60px rgba(8, 11, 9, 0.28);
    }

    .hero-video {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
        object-fit: contain;
        background: #000;
        box-shadow: none;
    }

    .video-player-controls {
        right: 22px;
        bottom: 22px;
        left: 22px;
    }

    .hero-cta-row {
        margin-top: calc(var(--hero-video-overhang) + 28px);
    }
}

.hero-cta-row {
    display: flex;
    justify-content: center;
    margin-top: calc(var(--hero-video-overhang) + 18px);
    padding: 0 20px 44px;
    position: relative;
    z-index: 3;
}

/* Cards de problemas */
.problemas {
    padding-top: 28px;
    position: relative;
    z-index: 1;
}

.problemas-marquee {
    width: 100%;
}

.grid-problemas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    border-bottom: 4px solid var(--grey-warm);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--brown-muted);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--brown-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-tag-light {
    color: rgba(255, 255, 255, 0.72);
}

.propuesta-valor {
    padding: 0 0 28px;
    background: transparent;
}

.calendario-section .container {
    padding-bottom: 24px;
}

.section-divider {
    width: min(1100px, 90%);
    height: 1px;
    margin: 0 auto 24px;
    background: rgba(47, 58, 51, 0.12);
}

.propuesta-valor .container {
    padding-top: 0;
}

.propuesta-shell {
    display: grid;
    gap: 34px;
}

.propuesta-intro {
    max-width: 780px;
}

.propuesta-intro h2 {
    color: var(--dark-green);
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 0.98;
    margin-bottom: 18px;
}

.propuesta-intro p {
    max-width: 720px;
    font-size: 1.08rem;
}

.propuesta-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: stretch;
}

.propuesta-card {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(113, 85, 73, 0.12);
    border-radius: 26px;
    padding: 30px;
    box-shadow: 0 20px 45px rgba(47, 58, 51, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.propuesta-card h3 {
    color: var(--dark-green);
    font-size: clamp(1.8rem, 2.2vw, 2.5rem);
    line-height: 0.98;
    margin-bottom: 16px;
}

.propuesta-card p + p {
    margin-top: 14px;
}

.propuesta-index {
    display: inline-block;
    margin-bottom: 18px;
    color: rgba(47, 58, 51, 0.45);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.compromiso-list {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.compromiso-item {
    background: rgba(169, 184, 166, 0.14);
    border-radius: 18px;
    overflow: hidden;
}

.compromiso-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 18px;
    cursor: pointer;
    color: var(--dark-green);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    list-style: none;
}

.compromiso-item summary::-webkit-details-marker {
    display: none;
}

.compromiso-item summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.25s ease;
}

.compromiso-item[open] summary::after {
    transform: rotate(45deg);
}

.compromiso-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.compromiso-body p {
    overflow: hidden;
    padding: 0 18px;
    margin: 0;
}

.compromiso-item[open] .compromiso-body {
    grid-template-rows: 1fr;
}

.compromiso-item[open] .compromiso-body p {
    padding: 0 18px 18px;
}

.propuesta-closing {
    max-width: 760px;
    color: var(--dark-green);
    font-size: 1.04rem;
    font-weight: 700;
}

.metodo-cta {
    position: relative;
    padding: 28px 0 84px;
    background: transparent;
    isolation: isolate;
}

.metodo-cta::before {
    content: "";
    position: absolute;
    inset: 34% 0 0;
    background: var(--dark-green);
    z-index: -1;
}

.metodo-cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    padding: 30px 34px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(169, 184, 166, 0.18), transparent 34%),
        var(--dark-green);
    color: var(--white);
    box-shadow: 0 28px 60px rgba(28, 34, 30, 0.22);
}

.metodo-cta-inner h2 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 3.1vw, 3.1rem);
    line-height: 0.95;
}

.metodo-cta-inner p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.8);
}

.btn-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 210px;
    padding: 18px 28px;
    border-radius: 8px;
    background: var(--sage);
    color: var(--dark-green);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.btn-method:hover {
    transform: translateY(-2px);
    background: #b7c4b3;
}

/* Nosotros */
.flex-nosotros {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.nosotros-img img {
    width: 100%;
    max-width: 450px;
    border-radius: 10px;
}

.nosotros-texto {
    flex: 1;
    min-width: 300px;
}

footer {
    /* background: var(--dark-green); */
    color: 00000;
    padding: 18px 0 20px;
}

footer .container {
    padding-top: 0;
    padding-bottom: 0;
}

footer p {
    margin: 0;
    color: #000;
    font-size: 0.92rem;
    text-align: center;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    :root {
        --topbar-height: 42px;
        --header-height: 108px;
        --hero-video-overhang: 18px;
    }

    .top-bar {
        padding: 6px 12px;
        font-size: 0.72rem;
        letter-spacing: 0.01em;
    }

    header {
        min-height: var(--header-height);
    }

    .nav-container {
        gap: 12px;
    }

    .logo {
        height: 100px;
        margin-left: -20px;
    }

    .btn-nav {
        flex-shrink: 0;
    }

    .hero-content {
        justify-content: start;
        gap: 4px;
        padding-top: 0;
        margin-top: -10px;
    }

    .hero h1 {
        max-width: 20ch;
        font-size: clamp(2.2rem, 9vw, 3.4rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .video-container {
        margin: auto auto 0;
        margin-top: -10px;
        max-width: 240px;
    }

    .hero-video {
        border-radius: 22px;
    }

    .video-play-button {
        width: 68px;
        height: 68px;
    }

    .video-play-icon {
        margin-left: 5px;
        border-top-width: 14px;
        border-bottom-width: 14px;
        border-left-width: 21px;
    }

    .video-player-controls {
        gap: 10px;
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .video-gradual-blur {
        height: 5rem;
    }

    .video-corner-button {
        width: 36px;
        height: 36px;
    }

    .video-fullscreen-button {
        width: 36px;
        height: 36px;
    }

    .video-progress-track {
        height: 8px;
    }

    .btn-primary {
        width: min(100%, 340px);
    }

    .hero-cta-row {
        margin-top: calc(var(--hero-video-overhang) + 64px);
        padding-bottom: 12px;
    }

    .problemas {
        padding-top: 12px;
    }

    .propuesta-valor {
        padding: 0 0 20px;
    }

    .calendario-section .container {
        padding-bottom: 18px;
    }

    .section-divider {
        margin: 0 auto 18px;
        background: rgba(47, 58, 51, 0.1);
    }

    .propuesta-shell {
        gap: 24px;
    }

    .propuesta-intro h2 {
        font-size: clamp(2rem, 10vw, 2.8rem);
        margin-bottom: 14px;
    }

    .propuesta-intro p,
    .propuesta-closing {
        font-size: 1rem;
    }

    .propuesta-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .propuesta-card {
        padding: 24px 22px;
        border-radius: 22px;
    }

    .propuesta-card h3 {
        font-size: clamp(1.7rem, 8vw, 2.2rem);
    }

    .compromiso-list {
        gap: 12px;
        margin-top: 0;
    }

    .compromiso-item summary {
        padding: 16px;
    }

    .compromiso-item[open] .compromiso-body p {
        padding: 0 16px 16px;
    }

    .metodo-cta {
        padding: 20px 0 72px;
        background: transparent;
    }

    .metodo-cta::before {
        inset: 28% 0 0;
    }

    .metodo-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 22px;
        border-radius: 24px;
    }

    .metodo-cta-inner h2 {
        font-size: clamp(1.9rem, 10vw, 2.6rem);
        margin-bottom: 8px;
    }

    .metodo-cta-inner p {
        max-width: none;
    }

    .btn-method {
        width: 100%;
        min-width: 0;
    }

    .problemas-marquee {
        overflow: hidden;
        touch-action: pan-y;
    }

    .grid-problemas {
        display: flex;
        gap: 16px;
        width: max-content;
        max-width: none;
        margin: 0;
        padding: 0 5% 8px;
        will-change: transform;
    }

    .problemas-marquee.is-dragging .grid-problemas {
        will-change: transform;
    }

    .grid-problemas .card {
        flex: 0 0 85vw;
        width: 85vw;
        min-height: 0;
    }

    .btn-primary {
        margin-top: 0;
    }

    .flex-nosotros { text-align: center; }

    footer {
        padding: 14px 0 16px;
    }

    footer p {
        font-size: 0.84rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shiny-text {
        background-image: none;
        -webkit-text-fill-color: currentColor;
    }
}
