/* ===========================================================================
   Core Values page foundation and browser surfaces
   ========================================================================== */

/* The page inherits the established Andean editorial palette. */
.core-values-page {
    --values-red: #f10100;
    --values-red-deep: #b90201;
    --values-ink: #171717;
    --values-copy: #5d5d5d;
    --values-muted: #818181;
    --values-white: #ffffff;
    --values-soft: #f7f7f5;
    --values-warm: #fffaf5;
    --values-line: #e8e8e4;
    --values-radius: 7px;
    overflow: clip;
    background: var(--values-white);
    color: var(--values-copy);
}

/* The body remains continuous with the shared dark footer. */
body.core-values-body {
    background: #050505;
}

/* Selection uses the brand's deeper red for dependable contrast. */
.core-values-page ::selection {
    background: var(--values-red-deep);
    color: var(--values-white);
}

/* Keyboard focus stays visible on every interactive page control. */
.core-values-page :where(a, button):focus-visible,
.core-values-body .csp-site-header :where(a, button):focus-visible {
    border-radius: var(--values-radius);
    outline: 3px solid var(--values-red);
    outline-offset: 3px;
}

/* ===========================================================================
   Shared hero and chapter navigation
   ========================================================================== */

/* The shared hero opens with an immersive but bounded first viewport. */
.core-values-page .tour-category-hero {
    min-height: 650px;
    height: clamp(650px, calc(100svh - 69px), 820px);
}

/* The page title forms a compact editorial statement over the source image. */
.core-values-page .tour-category-hero-title {
    max-width: 13ch;
    font-size: clamp(3rem, 6vw, 5.8rem);
    letter-spacing: -0.03em;
    line-height: 0.92;
    text-wrap: balance;
}

/* The sticky chapter navigation keeps the short page easy to scan. */
.core-values-nav {
    position: sticky;
    top: 0;
    z-index: 25;
    border-bottom: 1px solid var(--values-line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 28px rgba(9, 16, 21, 0.08);
}

/* Navigation items share one horizontal reading line on wide screens. */
.core-values-nav-list {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: clamp(1.25rem, 4vw, 4rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Navigation links use compact system labels and generous touch targets. */
.core-values-nav-link {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    color: var(--values-ink);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: border-color 180ms ease, color 180ms ease;
}

/* Active and hover states use the single red wayfinding signal. */
.core-values-nav-link:hover,
.core-values-nav-link.is-active {
    border-bottom-color: var(--values-red);
    color: var(--values-red-deep);
}

/* ===========================================================================
   Foundation statement
   ========================================================================== */

/* The opening statement pairs a strong heading with the literal source copy. */
.core-values-foundation {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: var(--values-white);
}

/* The foundation uses an asymmetric editorial split. */
.core-values-foundation-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
    align-items: start;
    gap: clamp(3rem, 9vw, 9rem);
}

/* Major section headings use the established Metromedium display voice. */
.core-values-section-heading h2,
.core-values-list-heading h2,
.core-values-cta h2 {
    margin: 0;
    color: var(--values-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2.5rem, 5.5vw, 5.4rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 0.96;
    text-wrap: balance;
}

/* The source paragraph remains one uninterrupted, readable statement. */
.core-values-source-copy {
    max-width: 72ch;
    padding-top: 0.25rem;
}

.core-values-source-copy p {
    margin: 0;
    color: var(--values-copy);
    font-size: clamp(1.08rem, 1.45vw, 1.3rem);
    line-height: 1.82;
}

/* ===========================================================================
   Mission and vision manifesto
   ========================================================================== */

/* A dark interval gives the company statement a decisive reading moment. */
.core-values-manifesto {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: var(--values-ink);
    color: var(--values-white);
}

/* The manifesto heading and statement maintain clear reading roles. */
.core-values-manifesto-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
    align-items: start;
    gap: clamp(3rem, 9vw, 9rem);
}

/* The dark-section title stays compact beside the oversized motto. */
.core-values-manifesto h2 {
    margin: 0;
    color: var(--values-white);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(2.2rem, 4vw, 4rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 0.98;
}

/* Mission and vision copy is grouped without decorative side rails. */
.core-values-manifesto-content {
    max-width: 880px;
}

/* The named people act as the human entry point to the statement. */
.core-values-people {
    max-width: 62ch;
    margin: 0 0 2.5rem;
    color: #d9d9d4;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
}

/* The original motto receives scale and space rather than a border treatment. */
.core-values-manifesto blockquote {
    margin: 0 0 2.5rem;
    padding: 0;
}

.core-values-manifesto blockquote p {
    max-width: 16ch;
    margin: 0;
    color: var(--values-white);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 0.9;
    text-wrap: balance;
}

/* The goal statement closes the manifesto in a comfortable measure. */
.core-values-manifesto-content > p:last-child {
    max-width: 70ch;
    margin: 0;
    color: #f2f2ee;
    font-size: 1.08rem;
    line-height: 1.82;
}

/* ===========================================================================
   Core value cards
   ========================================================================== */

/* The values section uses warm paper to distinguish reference content. */
.core-values-list-section {
    padding: clamp(5rem, 10vw, 9rem) 0;
    background: var(--values-warm);
}

/* The section introduction balances a large title and concise context. */
.core-values-list-heading {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    align-items: end;
    gap: clamp(2rem, 7vw, 7rem);
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* Added wayfinding copy is visibly secondary to the original values. */
.core-values-list-heading p {
    max-width: 60ch;
    margin: 0;
    color: var(--values-copy);
    font-size: 1rem;
    line-height: 1.75;
}

/* A twelve-column field creates varied but orderly card proportions. */
.core-values-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.25rem;
}

/* Cards align icon and literal source copy in one contained reading unit. */
.core-value-card {
    grid-column: span 6;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: clamp(1.6rem, 4vw, 3rem);
    border: 1px solid var(--values-line);
    border-radius: var(--values-radius);
    background: var(--values-white);
}

/* Alternating widths keep the values from reading as a generic card matrix. */
.core-value-card:nth-child(1),
.core-value-card:nth-child(4),
.core-value-card:nth-child(5) {
    grid-column: span 7;
}

.core-value-card:nth-child(2),
.core-value-card:nth-child(3),
.core-value-card:nth-child(6) {
    grid-column: span 5;
}

/* Two anchor cards introduce decisive ink moments across the sequence. */
.core-value-card:nth-child(1),
.core-value-card:nth-child(4) {
    border-color: var(--values-ink);
    background: var(--values-ink);
    color: var(--values-white);
}

/* Original source icons sit in a restrained neutral field. */
.core-value-card-icon {
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--values-radius);
    background: var(--values-soft);
}

.core-value-card-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* Dark anchor cards reverse their icon field and source artwork. */
.core-value-card:nth-child(1) .core-value-card-icon,
.core-value-card:nth-child(4) .core-value-card-icon {
    background: rgba(255, 255, 255, 0.1);
}

.core-value-card:nth-child(1) .core-value-card-icon img,
.core-value-card:nth-child(4) .core-value-card-icon img {
    filter: brightness(0) invert(1);
}

/* Value names use the same title voice as other reusable cards. */
.core-value-card h3 {
    margin: 0 0 0.85rem;
    color: var(--values-ink);
    font-family: "Metromedium", "Roboto", sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Original descriptions retain their quote marks and natural line wraps. */
.core-value-card p {
    max-width: 54ch;
    margin: 0;
    color: var(--values-copy);
    font-size: 1rem;
    line-height: 1.7;
}

/* Dark cards reverse both title and supporting source copy. */
.core-value-card:nth-child(1) h3,
.core-value-card:nth-child(4) h3,
.core-value-card:nth-child(1) p,
.core-value-card:nth-child(4) p {
    color: var(--values-white);
}

/* ===========================================================================
   Planning call to action
   ========================================================================== */

/* The final planning prompt converts understanding into a clear next step. */
.core-values-cta {
    padding: clamp(4rem, 8vw, 7rem) 0;
    background: var(--values-red-deep);
    color: var(--values-white);
}

/* CTA copy and actions occupy distinct but balanced columns. */
.core-values-cta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    align-items: end;
    gap: clamp(2.5rem, 8vw, 8rem);
}

/* The CTA reverses the shared heading color for the deep-red surface. */
.core-values-cta h2 {
    max-width: 14ch;
    color: var(--values-white);
}

/* Planning context stays readable without inventing additional claims. */
.core-values-cta p {
    max-width: 62ch;
    margin: 1.5rem 0 0;
    color: #fff3f3;
    font-size: 1rem;
    line-height: 1.72;
}

/* CTA actions remain compact and use stable 48px touch heights. */
.core-values-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.core-values-primary-action,
.core-values-secondary-action {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 12px 24px;
    border: 1px solid var(--values-white);
    border-radius: var(--values-radius);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease, color 180ms ease;
}

/* Primary action uses the white field for maximum contrast. */
.core-values-primary-action {
    background: var(--values-white);
    color: var(--values-red-deep) !important;
}

/* Secondary action preserves the red surface and white outline. */
.core-values-secondary-action {
    background: transparent;
    color: var(--values-white);
}

/* CTA hover states reverse cleanly and use restrained motion. */
.core-values-primary-action:hover,
.core-values-secondary-action:hover {
    transform: translateY(-2px);
    background: var(--values-ink);
    color: var(--values-white) !important;
}

/* ===========================================================================
   Responsive behavior
   ========================================================================== */

/* Tablet layouts stack reading sections and normalize card proportions. */
@media (max-width: 991.98px) {
    .core-values-foundation-grid,
    .core-values-manifesto-grid,
    .core-values-list-heading,
    .core-values-cta-grid {
        grid-template-columns: 1fr;
    }

    .core-values-section-heading h2,
    .core-values-list-heading h2 {
        max-width: 14ch;
    }

    .core-value-card,
    .core-value-card:nth-child(n) {
        grid-column: span 6;
    }

    .core-values-cta-actions {
        justify-content: flex-start;
    }
}

/* Mobile navigation scrolls horizontally without wrapping or page overflow. */
@media (max-width: 767.98px) {
    .core-values-page .tour-category-hero {
        min-height: 520px;
        height: 68svh;
        max-height: 680px;
    }

    .core-values-page .tour-category-hero-title {
        max-width: 11ch;
        font-size: clamp(2.5rem, 12vw, 4.2rem);
    }

    .core-values-nav .container {
        max-width: none;
        padding: 0;
    }

    .core-values-nav-list {
        justify-content: flex-start;
        gap: 1.5rem;
        overflow-x: auto;
        padding: 0 1rem;
        scrollbar-width: none;
    }

    .core-values-nav-list::-webkit-scrollbar {
        display: none;
    }

    .core-values-nav-link {
        white-space: nowrap;
    }

    .core-values-foundation,
    .core-values-manifesto,
    .core-values-list-section {
        padding: 4.5rem 0;
    }

    .core-values-grid {
        grid-template-columns: 1fr;
    }

    .core-value-card,
    .core-value-card:nth-child(n) {
        grid-column: auto;
        min-height: 260px;
    }

    .core-values-cta-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Small phones retain practical card padding and full-width actions. */
@media (max-width: 420px) {
    .core-value-card {
        padding: 1.4rem;
    }

    .core-values-primary-action,
    .core-values-secondary-action {
        width: 100%;
    }
}

/* Reduced-motion preferences remove decorative movement while preserving state. */
@media (prefers-reduced-motion: reduce) {
    .core-values-primary-action,
    .core-values-secondary-action,
    .core-values-nav-link {
        transition: none;
    }

    .core-values-primary-action:hover,
    .core-values-secondary-action:hover {
        transform: none;
    }
}
