/*
 * The About menu's pages: pages/content and the sections in sections/content.
 * Which sections show, and their words, come from each brand's page files in
 * config/brands/{brand}/. See docs/brands.md.
 */

/* Two neighbours with the same background share one gap, not two. */
.content-page .section:not(.section--surface, .section--dark) + .section:not(.section--surface, .section--dark),
.content-page .section--surface + .section--surface,
.content-page .section--dark + .section--dark {
    padding-top: 0;
}

/* A section a button links to, by its id, clears the sticky header. */
.content-page > section[id] {
    scroll-margin-top: var(--header-height);
}

/* A word marked *like this* in a heading or quote takes the accent colour. */
.content-page :is(h1, h2, h3, blockquote) em {
    color: var(--color-accent-text);
    font-style: normal;
}

.content-page :is(.page-hero, .home-hero, .content-photo) em {
    color: var(--color-footer-accent);
}


/* Title band
   ========================================================================== */

/* With a film. A phone never loads it, so there the band holds only its text and needn't be tall. */
.content-hero {
    min-height: clamp(320px, 60svh, 760px);
}

@media (min-width: 768px) {
    .content-hero {
        min-height: clamp(480px, calc(100svh - var(--header-height)), 760px);
    }
}

.content-hero h1 {
    max-width: 18ch;
}

/* On the seam under the band, as under every other title band. */
.content-hero > .page-hero__divider {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    translate: 0 50%;
}

/* Facts in a row along the foot of the band. */
.content-stats.content-facts {
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: var(--space-4);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-hero-line);
}

@media (min-width: 640px) {
    .content-stats.content-facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.content-facts .content-stats__item {
    padding-top: 0;
    border-top: 0;
}

.content-stats.content-facts dd {
    font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
}

.content-stats.content-facts dt {
    color: inherit;
    opacity: 0.75;
}


/* Big numbers: components/content/stats
   ========================================================================== */

.content-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: var(--space-5);
    width: 100%;
    margin: 0;
}

/* The number shows above its label. */
.content-stats__item {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: var(--space-2);
    padding-top: var(--space-4);
    border-top: 3px solid var(--content-line, var(--color-primary));
}

.content-stats dd {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--heading-weight);
    line-height: 1;
    letter-spacing: var(--heading-tracking);
    overflow-wrap: anywhere;
}

.content-stats dt {
    color: var(--color-text-muted);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}


/* Story: a heading and its text, with a photo or without
   ========================================================================== */

.content-story__grid {
    display: grid;
    gap: var(--space-6);
}

.content-story__text {
    display: grid;
    align-content: start;
    gap: var(--space-5);
}

.content-story__head {
    display: grid;
    align-content: start;
    gap: var(--space-3);
    max-width: 40rem;
}

.content-story__lead {
    color: var(--color-text-muted);
    font-size: var(--text-lg);
}

.content-story__body {
    display: grid;
    justify-items: start;
    gap: var(--space-6);
}

.content-copy {
    display: grid;
    gap: var(--space-4);
    max-width: 68ch;
    line-height: 1.7;
}

/* Shown whole in its own shape: old photos come wide or tall, and some carry words. */
.content-story__media {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--color-surface-raised);
}

.content-story__media img {
    width: 100%;
}

@media (min-width: 900px) {
    /* No photo: the heading on the left stays in view beside a long text. */
    .content-story:not(.content-story--media) .content-story__text {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: var(--space-8);
    }

    .content-story:not(.content-story--media) .content-story__head {
        position: sticky;
        top: calc(var(--header-height) + var(--space-6));
    }

    .content-story--media .content-story__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: var(--space-8);
    }

    .content-story--media-right .content-story__media {
        order: 1;
    }
}

/* The text in a box in the brand's colour. */
.content-panel {
    --color-text: var(--color-on-primary);
    --color-text-muted: var(--color-on-primary);
    --color-accent-text: var(--color-on-primary);
    --color-border: color-mix(in srgb, var(--color-on-primary) 30%, transparent);
    --content-line: var(--color-on-primary);

    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-card);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

@media (min-width: 640px) {
    .content-panel {
        padding: var(--space-7);
    }
}

/* Numbers under a story's text sit in a narrower column, so they are smaller to stay in one row. */
.content-story__body .content-stats {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
}

.content-story__body .content-stats dd {
    font-size: var(--text-2xl);
}

.content-panel .content-stats__item {
    border-top-width: 1px;
}

/* Names, each with a line about it. */
.content-list {
    display: grid;
    gap: var(--space-5);
    max-width: 68ch;
    margin: 0;
    padding: 0;
    list-style: none;
}

.content-list li {
    display: grid;
    gap: var(--space-1);
    padding-inline-start: var(--space-4);
    border-inline-start: 3px solid var(--color-primary);
}

.content-list__name {
    font-size: var(--text-lg);
}

/* A warning under the text. */
.content-note {
    max-width: 68ch;
    padding: var(--space-3) var(--space-4);
    border-inline-start: 3px solid var(--color-warning);
    border-radius: var(--radius-field);
    background: var(--color-surface-raised);
}

/* The tick list from sections.css; the text's own gap spaces it here. */
.content-points {
    margin-top: 0;
}

/* Labels and values, one pair a row. */
.content-deflist {
    width: 100%;
    max-width: 68ch;
    margin: 0;
    border-top: 1px solid var(--color-border);
}

.content-deflist div {
    display: grid;
    gap: var(--space-1);
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.content-deflist dt {
    color: var(--color-text-muted);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.content-deflist dd {
    margin: 0;
}

@media (min-width: 640px) {
    .content-deflist div {
        grid-template-columns: 11rem minmax(0, 1fr);
        gap: var(--space-4);
    }
}


/* Timeline
   ========================================================================== */

.content-timeline {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* A line down the left with a mark at each year. */
.content-timeline__item {
    position: relative;
    display: grid;
    gap: var(--space-3);
    padding: 0 0 var(--space-7) var(--space-6);
    border-inline-start: 2px solid var(--color-border);
}

.content-timeline__item:last-child {
    padding-bottom: 0;
}

.content-timeline__item::before {
    content: "";
    position: absolute;
    top: 0.3rem;
    left: -8px;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-badge);
    background: var(--color-primary);
}

.content-timeline__when {
    display: grid;
    align-content: start;
    gap: var(--space-1);
}

.content-timeline__year {
    color: var(--color-accent-text);
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--heading-weight);
    line-height: 1;
}

.content-timeline__label {
    color: var(--color-text-muted);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.content-timeline__body {
    display: grid;
    gap: var(--space-3);
    max-width: 68ch;
}

.content-timeline__body > p {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.content-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-1) 0 0;
    padding: 0;
    list-style: none;
}

.content-tags .badge {
    font-size: 0.8125rem;
}

@media (min-width: 768px) {
    .content-timeline__item {
        grid-template-columns: 11rem minmax(0, 1fr);
        gap: var(--space-6);
    }
}

/* Results, in cards under the timeline. */
.content-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: var(--space-5);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
}

.content-result {
    display: grid;
    align-content: start;
    gap: var(--space-2);
    padding: var(--space-5);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius-card);
    background: var(--color-surface);
}

.content-result h3 {
    font-size: var(--text-lg);
}

.content-result__year {
    color: var(--color-accent-text);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--eyebrow-tracking);
}

.content-result ul {
    display: grid;
    gap: var(--space-1);
    margin: 0;
    padding-inline-start: 1.1em;
    color: var(--color-text-muted);
}


/* Quote
   ========================================================================== */

.content-quote__inner {
    display: grid;
    justify-items: center;
    gap: var(--space-4);
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
}

/* A short rule in the brand's colour above it. */
.content-quote__inner::before {
    content: "";
    width: 56px;
    height: 3px;
    background: var(--color-primary);
}

.content-quote blockquote {
    margin: 0;
}

.content-quote blockquote p {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--heading-weight);
    line-height: var(--heading-line);
    letter-spacing: var(--heading-tracking);
    text-transform: var(--heading-transform);
}

.content-quote figcaption {
    color: var(--color-text-muted);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}


/* Closing block
   ========================================================================== */

.content-cta__inner {
    display: grid;
    justify-items: center;
    gap: var(--space-4);
    max-width: 46rem;
    text-align: center;
}

.content-cta__logo {
    width: auto;
    max-width: 220px;
    max-height: 56px;
    margin-bottom: var(--space-2);
}

.content-cta .button-row {
    justify-content: center;
    margin-top: var(--space-2);
}


/* Words beside a number to call: sections/content/call
   ========================================================================== */

.content-call__grid {
    display: grid;
    align-items: center;
    gap: var(--space-6);
}

@media (min-width: 900px) {
    .content-call__grid {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: var(--space-8);
    }
}

.content-call__text {
    display: grid;
    justify-items: start;
    gap: var(--space-4);
    max-width: 44rem;
}

.content-call__lead {
    font-family: var(--font-heading);
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
    font-weight: 600;
    line-height: 1.35;
}

/* Someone else's words, with their name above them. */
.content-call__source {
    display: grid;
    gap: var(--space-3);
    margin: var(--space-2) 0 0;
    padding: var(--space-5);
    border-inline-start: 3px solid var(--color-primary);
    border-radius: var(--radius-card);
    background: color-mix(in srgb, var(--color-text) 5%, transparent);
}

.content-call__source figcaption {
    color: var(--color-accent-text);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.content-call__source blockquote {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-lg);
}

/* The number, in a dark box on a light band and in the brand's colour on a dark one. */
.content-call__panel {
    --color-text: var(--color-footer-text);
    --color-text-muted: var(--color-footer-muted);
    --color-focus: var(--color-footer-focus);
    --call-glow: color-mix(in srgb, var(--color-primary) 40%, transparent);

    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    justify-items: start;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-card);
    background: var(--color-footer-bg);
    color: var(--color-text);
}

.section--dark .content-call__panel {
    --color-text: var(--color-on-primary);
    --color-text-muted: color-mix(in srgb, var(--color-on-primary) 82%, transparent);
    --call-glow: rgb(255 255 255 / 0.18);

    background: var(--color-primary);
}

@media (min-width: 640px) {
    .content-call__panel {
        padding: var(--space-7);
    }
}

/* A soft glow in the corner. */
.content-call__panel::before {
    content: "";
    position: absolute;
    top: -45%;
    right: -25%;
    z-index: -1;
    width: 75%;
    aspect-ratio: 1;
    background: radial-gradient(closest-side, var(--call-glow), transparent);
}

.content-call__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: var(--space-2);
    border: 1px solid currentColor;
    border-radius: var(--radius-card);
}

.content-call__label {
    color: var(--color-text-muted);
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}

.content-call__number {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
    font-weight: var(--heading-1-weight);
    line-height: 1;
    letter-spacing: var(--heading-1-tracking);
    text-decoration: none;
    white-space: nowrap;
}

.content-call__number:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
}

.content-call__note {
    justify-self: stretch;
    margin-top: var(--space-2);
    padding-top: var(--space-4);
    border-top: 1px solid color-mix(in srgb, var(--color-text) 22%, transparent);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}


/* Small print: sections/content/notice
   ========================================================================== */

.section.content-notice {
    padding-block: var(--space-6) var(--space-8);
}

.content-notice__box {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-5);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.content-notice__title {
    font-family: var(--font-label);
    font-size: var(--text-md);
    letter-spacing: var(--eyebrow-tracking);
    text-transform: uppercase;
}


/* Photo across the page
   ========================================================================== */

.content-photo {
    position: relative;
    margin: 0;
    background: var(--color-footer-bg);
}

.content-photo img {
    width: 100%;
    height: clamp(280px, 55vh, 640px);
    object-fit: cover;
}

/* The heading sits on a shade at the foot of the photo. */
.content-photo__caption {
    position: absolute;
    inset: auto 0 0;
    padding-block: var(--space-8) var(--space-6);
    background: linear-gradient(to bottom, transparent, rgb(0 0 0 / 0.72));
}

.content-photo__caption h2 {
    color: var(--color-hero-text);
    text-shadow: var(--hero-text-shadow);
}


/* Gallery
   ========================================================================== */

.content-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.content-gallery a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--color-surface-raised);
}

.content-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.content-gallery a:hover img {
    transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
    .content-gallery img {
        transition: none;
    }
}
