/* ============================================================
   Home page — section styles.
   Loaded only on the front page (see functions.php enqueue).
   Ported from eapl_home_mockup.html; all values use tokens.
   Depends on tokens.css, base.css, layout.css.
   ============================================================ */


/* --- Shared section helpers ---------------------------------
   .section-kicker and .section-intro recur across every home
   section, but they're home-specific styling (slightly denser
   than the global .kicker from base.css), so they live here. */

.section-kicker {
    font-family: var(--font-body);
    font-size: var(--size-micro);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-text-tertiary);
    margin-bottom: 0.75rem;
}

.section-intro {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 2vw, 1.75rem);
    line-height: 1.3;
    font-weight: 400;
    color: var(--color-text-primary);
    max-width: 42ch;
    margin-bottom: 3.5rem;
}


/* =====================================================================
 * 1. HERO — editorial, typography-only, no imagery
 * ================================================================== */

.hero {
    padding: clamp(5rem, 12vw, 10rem) var(--space-m) clamp(4rem, 9vw, 7rem);
    background: var(--color-bg-primary);
}

.hero-inner {
    max-width: var(--content-default);
    margin: 0 auto;
}

.hero .kicker {
    margin-bottom: 2.5rem;
    max-width: none;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: var(--size-display-xl);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--color-text-primary);
    max-width: 20ch;
    margin-bottom: 2rem;
}

.hero-subhead {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.625rem);
    line-height: 1.45;
    font-weight: 400;
    color: var(--color-text-secondary);
    max-width: 52ch;
    margin-bottom: 3rem;
}

.hero-rule {
    width: 56px;
    height: 2px;
    background: var(--color-accent);
    border: none;
    margin: 0 0 2rem 0;
}

.hero-meta {
    font-family: var(--font-body);
    font-size: var(--size-small);
    color: var(--color-text-secondary);
    max-width: 60ch;
    font-weight: 400;
    line-height: 1.6;
}


/* =====================================================================
 * 2. LOGO WALL — monochrome, alphabetised
 * ================================================================== */

.logo-wall {
    padding: clamp(4rem, 7vw, 6rem) var(--space-m);
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
    background: var(--color-bg-primary);
}

.logo-wall-inner {
    max-width: var(--content-wide);
    margin: 0 auto;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--color-rule);
    border: 1px solid var(--color-rule);
}

.logo-cell {
    background: var(--color-bg-primary);
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 92px;
}

.logo-cell span {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-dark);
    line-height: 1.3;
}


/* =====================================================================
 * 3. NUMBERS STRIP — plain typography, no animated counters
 * ================================================================== */

.numbers {
    padding: clamp(4rem, 7vw, 6rem) var(--space-m);
    background: var(--color-bg-secondary);
}

.numbers-inner {
    max-width: var(--content-wide);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
}

.number-block {
    text-align: left;
    padding-left: 1.5rem;
    border-left: 1px solid var(--color-rule-strong);
}

.number-block .value {
    font-family: var(--font-display);
    font-size: var(--size-number);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    margin-bottom: 0.625rem;
    font-feature-settings: "lnum" 1;
}

.number-block .value .plus {
    color: var(--color-accent);
}

.number-block .label {
    font-family: var(--font-body);
    font-size: var(--size-micro);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* The CTS-D & CTS-I block — text rather than numeral, so scale down. */
.number-block--text .value {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    line-height: 1.15;
    font-weight: 500;
}

.number-block--text .label {
    margin-top: 0.375rem;
}


/* =====================================================================
 * 4. WHY EAPL — three editorial panels
 * ================================================================== */

.why-eapl {
    padding: clamp(5rem, 9vw, 8rem) var(--space-m);
    background: var(--color-bg-primary);
}

.why-eapl-inner {
    max-width: var(--content-wide);
    margin: 0 auto;
}

.panels-header {
    margin-bottom: clamp(3rem, 5vw, 5rem);
    max-width: var(--content-default);
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--color-rule);
}

.panel {
    padding: 3rem 2rem 3rem 0;
    border-right: 1px solid var(--color-rule);
}

.panel:last-child {
    border-right: none;
    padding-right: 0;
}

.panel:not(:first-child) {
    padding-left: 2rem;
}

.panel-number {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-style: italic;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
    font-weight: 400;
    max-width: none;
}

.panel-title {
    font-family: var(--font-display);
    font-size: var(--size-display-m);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--color-text-primary);
    margin-bottom: 1.25rem;
}

.panel-body {
    font-size: var(--size-body);
    line-height: 1.65;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: none;
}

.panel-link {
    font-size: var(--size-small);
    font-weight: 500;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 2px;
    transition: color var(--transition-fast);
    display: inline-block;
}

.panel-link:hover,
.panel-link:focus-visible {
    color: var(--color-accent);
}

.panel-link::after {
    content: ' →';
}


/* =====================================================================
 * 5. FEATURED CASE EVIDENCE — 4-up grid with photo placeholders
 * ================================================================== */

.cases {
    padding: clamp(5rem, 9vw, 8rem) var(--space-m);
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-rule);
    border-bottom: 1px solid var(--color-rule);
}

.cases-inner {
    max-width: var(--content-wide);
    margin: 0 auto;
}

.cases-header {
    margin-bottom: clamp(3rem, 5vw, 5rem);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cases-title {
    max-width: var(--content-default);
}

.cases-title .section-intro {
    margin-bottom: 0;
}

.view-all-link {
    font-size: var(--size-small);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 2px;
    white-space: nowrap;
    font-weight: 500;
}

.view-all-link::after {
    content: ' →';
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem 3rem;
}

.case-card {
    display: flex;
    flex-direction: column;
}

.case-photo {
    aspect-ratio: 4 / 3;
    background: var(--color-bg-placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
}

/* Diagonal hatch texture on the placeholder — signals "image pending"
   without looking broken. Replaced by a real img tag when the Case CPT
   ships with featured images. */
.case-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 18px,
        rgba(184, 174, 156, 0.22) 18px,
        rgba(184, 174, 156, 0.22) 19px
    );
    pointer-events: none;
    opacity: 0.5;
}

.case-photo-placeholder-text {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.8125rem;
    color: var(--color-text-tertiary);
    background: var(--color-bg-placeholder);
    padding: 0.5rem 1rem;
    z-index: 1;
    letter-spacing: 0.02em;
    text-align: center;
    max-width: 80%;
}

.case-meta {
    font-family: var(--font-body);
    font-size: var(--size-micro);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    margin-bottom: 0.875rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    max-width: none;
}

.case-meta .divider {
    color: var(--color-rule-strong);
}

.case-title {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 1.8vw, 1.75rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

.case-excerpt {
    font-size: var(--size-body);
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
    max-width: none;
}

.case-link {
    font-size: var(--size-small);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 2px;
    font-weight: 500;
    align-self: flex-start;
}

.case-link::after {
    content: ' →';
}


/* =====================================================================
 * 6. SOLDIER'S LETTER PREVIEW
 * ================================================================== */

.soldiers-letter {
    padding: clamp(5rem, 10vw, 9rem) var(--space-m);
    background: var(--color-bg-primary);
    text-align: center;
}

.soldiers-letter-inner {
    max-width: var(--content-narrow);
    margin: 0 auto;
}

.letter-mark {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    color: var(--color-accent);
    margin-bottom: 1rem;
    font-weight: 400;
}

.letter-body {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.55;
    color: var(--color-text-primary);
    font-weight: 400;
    font-style: italic;
    margin: 0 auto 2.5rem;
    max-width: 54ch;
    letter-spacing: -0.005em;
}

.letter-signature {
    font-family: var(--font-display);
    font-size: var(--size-body);
    color: var(--color-text-secondary);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: none;
}

.letter-signature .name {
    color: var(--color-text-primary);
    font-weight: 500;
}

.letter-link {
    font-family: var(--font-body);
    font-size: var(--size-small);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 2px;
    font-weight: 500;
}

.letter-link::after {
    content: ' →';
}


/* =====================================================================
 * RESPONSIVE — 1024px and below, 720px and below
 * ================================================================== */

@media (max-width: 1024px) {

    .logo-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .numbers-inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem 2rem;
    }

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

    .panel {
        border-right: none;
        border-bottom: 1px solid var(--color-rule);
        padding: 3rem 0;
    }

    .panel:not(:first-child) {
        padding-left: 0;
    }

    .panel:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .cases-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {

    .hero,
    .logo-wall,
    .numbers,
    .why-eapl,
    .cases,
    .soldiers-letter {
        padding-left: var(--space-s);
        padding-right: var(--space-s);
    }

    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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


/* =====================================================================
 * PRINT — hero and content only, strip photography and colour blocks
 * ================================================================== */

@media print {

    .hero {
        padding: 0;
        background: transparent;
    }

    .hero-headline {
        font-size: 24pt;
        color: #000;
    }

    .hero-subhead {
        font-size: 13pt;
        color: #000;
    }

    .hero-rule {
        background: #000;
    }

    .logo-wall,
    .numbers,
    .why-eapl,
    .cases,
    .soldiers-letter {
        padding: 1cm 0;
        border: none;
        background: transparent;
    }

    .logo-grid {
        background: transparent;
        border: 0.5pt solid #999;
        gap: 0;
    }

    .logo-cell {
        background: transparent;
        border: 0.5pt solid #999;
        min-height: auto;
        padding: 0.5cm 0.3cm;
    }

    .case-photo {
        display: none;
    }

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

    .panel {
        border: none;
        padding: 0.5cm 0;
        page-break-inside: avoid;
    }

    .letter-mark {
        display: none;
    }
}

/* Featured case tile — image-present state */
.case-photo--has-image {
    background: transparent;
}
.case-photo--has-image::before {
    display: none;
}
.case-photo--has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}