/*
 * Our Story Page Styles
 * Premium bakery editorial layout based on the live Eme's Baked Goods site.
 */

:root {
    --story-cream: #f7f3ec;
    --story-paper: #fffaf3;
    --story-ink: #181512;
    --story-charcoal: #4c4842;
    --story-muted: #746d63;
    --story-cocoa: #5a351f;
    --story-blush: #efd4cf;
    --story-gold: #b98548;
}

.our-story-page-main {
    background:
        radial-gradient(circle at 8% 12%, rgba(239, 212, 207, 0.72), transparent 24rem),
        linear-gradient(180deg, var(--story-cream), #fbf8f2 54%, #eee5d8);
    color: var(--story-ink);
    overflow: hidden;
}

.story-eyebrow {
    color: var(--story-cocoa);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 0 0 0.9rem;
    text-transform: uppercase;
}

.story-button {
    align-items: center;
    background: var(--story-ink);
    border-radius: 999px;
    box-shadow: 0 1rem 2rem rgba(24, 21, 18, 0.16);
    color: var(--story-paper);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.1em;
    min-height: 3rem;
    padding: 0.9rem 1.35rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.story-button:hover,
.story-button:focus-visible {
    box-shadow: 0 1.2rem 2.4rem rgba(24, 21, 18, 0.2);
    transform: translateY(-2px);
}

.story-hero,
.story-origin,
.story-signature,
.story-press {
    padding: clamp(3.75rem, 10vw, 7rem) 1.25rem;
}

.story-hero {
    padding-top: clamp(1.25rem, 4vw, 3rem);
}

.story-hero__image {
    border-radius: 0 0 2.5rem 2.5rem;
    box-shadow: 0 1.4rem 3.2rem rgba(64, 48, 35, 0.12);
    margin: 0 auto;
    max-width: 74rem;
    overflow: hidden;
}

.story-hero__image img {
    aspect-ratio: 1 / 0.8;
    display: block;
    height: auto;
    object-fit: cover;
    object-position: 50% 12%;
    width: 100%;
}

.story-hero__panel {
    background: rgba(255, 250, 243, 0.9);
    box-shadow: 0 1.2rem 3rem rgba(64, 48, 35, 0.08);
    margin: -3rem auto 0;
    max-width: 64rem;
    padding: clamp(1.6rem, 6vw, 4rem);
    position: relative;
}

.story-hero h1,
.story-origin h2,
.story-section-heading h2,
.story-cta h2 {
    color: var(--story-charcoal);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 10vw, 6rem);
    font-weight: 500;
    letter-spacing: -0.07em;
    line-height: 0.96;
    margin: 0;
}

.story-hero h1 em {
    font-style: italic;
}

.story-hero p:not(.story-eyebrow),
.story-section-heading p,
.story-card p,
.story-feature p,
.story-cta p {
    color: var(--story-muted);
    font-size: clamp(1rem, 2.5vw, 1.18rem);
    line-height: 1.8;
    margin: 1.15rem 0 0;
}

.story-hero .story-button {
    margin-top: 1.5rem;
}

.story-origin,
.story-signature,
.story-press {
    margin: 0 auto;
    max-width: 78rem;
}

.story-origin__intro,
.story-section-heading {
    margin-bottom: 2rem;
    max-width: 54rem;
}

.story-origin__grid,
.story-products,
.story-feature-grid {
    display: grid;
    gap: 1rem;
}

.story-card,
.story-products article,
.story-feature,
.story-cta {
    background: rgba(255, 250, 243, 0.78);
    border: 1px solid rgba(24, 21, 18, 0.1);
    border-radius: 1.65rem;
    box-shadow: 0 1.2rem 2.4rem rgba(64, 48, 35, 0.08);
    overflow: hidden;
}

.story-card {
    padding: clamp(1.3rem, 4vw, 2.25rem);
}

.story-card span,
.story-product-card span,
.story-feature span {
    color: var(--story-gold);
    display: block;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
}

.story-card h3,
.story-product-card h3,
.story-feature h3 {
    color: var(--story-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.55rem, 5vw, 2.55rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.02;
    margin: 0;
}

.story-card--large {
    background: var(--story-ink);
}

.story-card--large h3,
.story-card--large p {
    color: var(--story-paper);
}

.story-card--large p {
    opacity: 0.72;
}

.story-product-card {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    min-height: 12rem;
}

.story-product-card__media {
    display: block;
    min-height: 100%;
    overflow: hidden;
    position: relative;
}

.story-product-card__media::after {
    background: linear-gradient(180deg, transparent 48%, rgba(24, 21, 18, 0.2));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.story-products img,
.story-feature img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.story-product-card__content {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
}

.story-product-card h3 {
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    margin-top: 0.2rem;
}

.story-product-card p {
    color: var(--story-muted);
    line-height: 1.6;
    margin: 0.55rem 0 1rem;
}

.story-product-card__link {
    align-items: center;
    align-self: flex-start;
    border-bottom: 1px solid currentColor;
    color: var(--story-cocoa);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    margin-top: auto;
    padding-bottom: 0.18rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 180ms ease, transform 180ms ease;
}

.story-product-card__link:hover,
.story-product-card__link:focus-visible {
    color: var(--story-ink);
    transform: translateX(0.2rem);
}

.story-testimonials {
    display: grid;
    gap: 1rem;
    grid-auto-flow: column;
    margin: 1.5rem -1.25rem 0;
    overflow-x: auto;
    padding: 0 1.25rem 1rem;
    scroll-snap-type: x mandatory;
}

.story-testimonials img {
    background: var(--story-paper);
    border: 1px solid rgba(24, 21, 18, 0.1);
    border-radius: 1.3rem;
    box-shadow: 0 1rem 2rem rgba(64, 48, 35, 0.08);
    max-width: 18rem;
    scroll-snap-align: center;
    width: 78vw;
}

.story-feature {
    display: grid;
}

.story-feature img {
    aspect-ratio: 1 / 0.78;
}

.story-feature div {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.story-cta {
    margin-top: 1rem;
    padding: clamp(1.5rem, 6vw, 3.5rem);
    text-align: center;
}

.story-cta .story-button {
    margin-top: 1.4rem;
}

@media (min-width: 820px) {
    .story-origin__grid {
        grid-template-columns: 1.15fr 0.85fr;
    }

    .story-card--large {
        grid-row: span 2;
    }

    .story-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .story-products article {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .story-product-card__media {
        aspect-ratio: 1 / 0.82;
        min-height: 0;
    }

    .story-product-card__content {
        min-height: 13rem;
        padding: 1.3rem;
    }

    .story-testimonials {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
        margin-left: 0;
        margin-right: 0;
        overflow: visible;
        padding: 0;
    }

    .story-testimonials img {
        max-width: none;
        width: 100%;
    }

    .story-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
