/* Lectura rápida y cierre de los casos de estudio */

html { scroll-behavior: smooth; }

.case-overview { padding: 40px 0 20px; }

.case-overview__box {
    padding: 45px 30px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.case-overview__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 36px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(62, 39, 76, 0.18);
}

.case-overview__header > div {
    max-width: 620px;
}

.case-overview__eyebrow,
.project-closing__eyebrow {
    margin: 0 0 6px;
    color: #74608a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.case-overview h2,
.project-closing h2 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    line-height: 1.08;
}

.case-overview h2 {
    color: #3e274c;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700;
    line-height: 1.08;
}

.case-overview__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 520px;
}

.case-overview__nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: #3e274c;
    background-color: #ffffff;
    border: 1px solid #94a38f;
    border-radius: 999px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.14);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.case-overview__nav a:hover,
.case-overview__nav a:focus-visible {
    color: #ffffff;
    background-color: #74608a;
    transform: translateY(-2px);
}

.case-overview__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.case-overview__fact {
    min-width: 0;
    padding: 0 30px;
    border-left: 1px solid rgba(62, 39, 76, 0.18);
}

.case-overview__fact:first-child {
    padding-left: 0;
    border-left: 0;
}

.case-overview__fact:last-child {
    padding-right: 0;
}

.case-overview__fact dt {
    margin-bottom: 16px;
    color: #3e274c;
    font-family: "Fraunces", Georgia, serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.case-overview__fact dd {
    margin: 0;
    color: #4a4a4a;
    font-size: 18px;
    line-height: 28px;
}

.project-closing { padding: 38px 0 96px; }

.project-closing__box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: clamp(28px, 4vw, 52px);
    color: #ffffff;
    background: #3e274c;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(62, 39, 76, 0.2);
}

.project-closing__eyebrow { color: #d9bddf; }

.project-closing h2 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: clamp(30px, 3.2vw, 46px);
}

.project-closing p {
    max-width: 660px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

.project-closing__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
}

.project-closing__button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 18px;
    color: #3e274c;
    background: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.project-closing__button--secondary {
    color: #ffffff;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
}

.project-closing__button:hover,
.project-closing__button:focus-visible { transform: translateX(4px); }

.project-closing__button--secondary:hover,
.project-closing__button--secondary:focus-visible { background: rgba(255, 255, 255, 0.1); }

section[id] { scroll-margin-top: 28px; }

@media (max-width: 899px) {
    .case-overview__header {
        flex-direction: column;
        gap: 24px;
    }
    .case-overview__nav {
        justify-content: flex-start;
        max-width: none;
    }
    .case-overview__facts { grid-template-columns: 1fr; }
    .case-overview__fact,
    .case-overview__fact:first-child,
    .case-overview__fact:last-child {
        padding: 24px 0;
        border-top: 1px solid rgba(62, 39, 76, 0.18);
        border-left: 0;
    }
    .case-overview__fact:first-child {
        padding-top: 0;
        border-top: 0;
    }
    .case-overview__fact:last-child { padding-bottom: 0; }
    .project-closing__box { grid-template-columns: 1fr; }
    .project-closing__actions { width: 100%; min-width: 0; }
}

@media (max-width: 560px) {
    .case-overview__box { padding: 34px 24px; }
    .case-overview__nav a {
        flex: 1 1 calc(50% - 10px);
        padding-right: 12px;
        padding-left: 12px;
    }
    .project-closing { padding-bottom: 64px; }
    .project-closing__box { padding: 30px 22px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .case-overview__nav a,
    .project-closing__button { transition: none; }
}
