/* =========================================================
   GRAPHIKA — STORY (reusable full-bleed template)
   One shared layout for every category's Story page: a
   full-bleed photo with a wooden category badge, a headline
   question, intro copy, a statement, a designer note, and a
   Selected Works link. Per-category accent color and imagery
   are supplied by each page via --story-accent and its own
   background photo / badge asset.
   ========================================================= */

.story-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
    color: var(--story-accent, #7A2B26);
}

.story-page::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 120px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.28),
        rgba(0, 0, 0, 0)
    );
}

.story-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.story-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--story-bg-position, center);
    display: block;
}

/* Vignette scrim so text stays legible over busy photo detail.
   Darkens the top band (badge/headline), the left column
   (intro/statement), and the bottom band (statement/note/CTA) —
   exactly where text sits — while leaving the photo's center
   relatively untouched.

   Direction flips per page: cream text (default, dark photos)
   gets a BLACK wash; dark maroon text ([data-contrast="dark"],
   bright photos) gets a LIGHT wash instead, since darkening a
   bright photo further does nothing for dark-colored text. */
.story-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0) 26%,
            rgba(0, 0, 0, 0) 60%,
            rgba(0, 0, 0, 0.62) 100%
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.42) 0%,
            rgba(0, 0, 0, 0) 42%
        );
}

.story-page[data-contrast="dark"] .story-scrim {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.72) 0%,
            rgba(255, 255, 255, 0) 42%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.72) 100%
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.52) 0%,
            rgba(255, 255, 255, 0) 46%
        );
}

.story-grid {
    position: relative;
    z-index: 1;

    height: 100vh;
    min-height: 100vh;
    box-sizing: border-box;

    padding: 96px max(var(--page-padding), calc((100% - var(--content-max-width)) / 2)) 32px;

    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto 1fr auto auto;
    gap: 12px var(--grid-gutter);
}

/* ---------------------------------------------------------
   BADGE (wooden category logo)
   Its own row — never shares a row with the headline, so the
   two can never overlap regardless of either one's height.
   --------------------------------------------------------- */

.story-badge {
    grid-column: 1 / 5;
    grid-row: 1;
}

.story-badge img {
    display: block;
    width: 220px;
    max-width: 60vw;
    height: auto;
}

/* ---------------------------------------------------------
   HEADLINE
   --------------------------------------------------------- */

.story-headline {
    grid-column: 1 / 9;
    grid-row: 2;
    margin-top: 8px;
}

.story-headline h1 {
    margin: 0;
    font-size: clamp(38px, 5.2vw, 76px);
    line-height: 0.98;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

/* ---------------------------------------------------------
   INTRO COPY
   --------------------------------------------------------- */

.story-intro {
    grid-column: 1 / 5;
    grid-row: 3;
    align-self: start;
}

.story-intro p {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.story-page[data-contrast="dark"] .story-intro p {
    color: rgba(36, 31, 28, 0.85);
}

.story-intro p.story-emphasis {
    font-style: italic;
    font-weight: 600;
}

/* ---------------------------------------------------------
   STATEMENT
   --------------------------------------------------------- */

.story-statement {
    grid-column: 1 / 6;
    grid-row: 4;
    align-self: end;
}

.story-statement p {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------
   DESIGNER NOTE
   --------------------------------------------------------- */

.story-note {
    grid-column: 8 / 13;
    grid-row: 4;
    align-self: start;
    justify-self: end;
    text-align: left;
}

.story-note p {
    margin: 0;
    max-width: 420px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.story-page[data-contrast="dark"] .story-note p {
    color: rgba(36, 31, 28, 0.85);
}

.story-note em {
    font-style: italic;
}

/* ---------------------------------------------------------
   SELECTED WORKS CTA
   --------------------------------------------------------- */

.story-cta {
    grid-column: 8 / 13;
    grid-row: 5;
    justify-self: end;
    margin-top: 0px;
}

.story-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--story-accent, #7A2B26);
    text-decoration: none;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {
    /* Stacked single-column content is routinely taller than one
       screen on mobile — the desktop's fixed 100vh + hidden overflow
       would otherwise clip everything past the first viewport
       (commonly the designer note and the Selected Works link). */
    .story-page {
        overflow: visible;
    }

    .story-grid {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding-top: 100px;
    }

    .story-badge,
    .story-headline,
    .story-intro,
    .story-statement,
    .story-note,
    .story-cta {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        text-align: left;
    }

    .story-headline { margin-top: 24px; }
    .story-intro { margin-top: 48px; }
    .story-statement { margin-top: 40px; }
    .story-note { margin-top: 32px; }
    .story-note p { max-width: none; }
    .story-cta { margin-top: 24px; margin-bottom: 40px; }
}