/*
 * Page-specific styles. Linked after main.css.
 *
 * Everything reusable lives in main.css; this file only holds compositions
 * that belong to a single page.
 */

/* =========================================================================
   1. Home — hero
   ========================================================================= */

/*
 * The hero is a single full-bleed band: photography on the right, copy on the
 * left, both sitting on one navy gradient.
 *
 * The photo is NOT a CSS background. It is the page's LCP element, so it stays
 * a real <img> the preload scanner can find, with its intrinsic size declared
 * and fetchpriority="high". The scrim above it is what makes the copy legible;
 * the mask on the media is what stops the photograph from cutting a hard
 * vertical edge down the middle of the band.
 */

.home-hero {
    position: relative;
    display: grid;
    /* Tall enough to read as a banner, but never a forced 100vh: content
     * length decides the rest. */
    min-height: clamp(620px, 72vh, 820px);
    padding-block: var(--space-8) var(--space-6);
    background:
        radial-gradient(
            120% 100% at 12% 0%,
            var(--navy-700) 0%,
            var(--navy-900) 52%,
            var(--navy-950) 100%
        );
    color: var(--text-inverse);
    isolation: isolate;
    overflow: hidden;
}

/* Faint federation grid texture. Decorative and deliberately low contrast:
 * it must never compete with the photograph or the headline. */
.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    background-image:
        linear-gradient(var(--white-06) 1px, transparent 1px),
        linear-gradient(90deg, var(--white-06) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.5;
    pointer-events: none;
}

/* --- Hero photography ----------------------------------------------------- */
/*
 * Slides are stacked in one grid cell, so the band is always exactly one slide
 * tall and the height never changes as it rotates. Only opacity animates --
 * transforms would move the photograph behind fixed copy, and a height change
 * would shift the whole page every six seconds.
 *
 * `visibility` rides along with opacity so an inactive slide is not just
 * invisible but also out of the tab order and out of hit testing.
 */

.home-hero__slides {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    /* Belt and braces: whatever a slide's intrinsic ratio is, nothing may
     * paint outside the band. */
    overflow: hidden;
}

.home-hero__slide {
    grid-area: 1 / 1;
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 900ms var(--easing),
        visibility 900ms var(--easing);
}

.home-hero__slide.is-active {
    visibility: visible;
    opacity: 1;
}

/* The slide is the sizing authority: `picture` is a plain wrapper and the
 * image fills it absolutely, so neither can be stretched by its own intrinsic
 * ratio. Without this the tall medalist frame made its <img> box 1168px in a
 * 648px band and overflowed the hero. */
.home-hero__slide {
    position: relative;
    overflow: hidden;
}

.home-hero__slide picture {
    display: block;
    position: absolute;
    inset: 0;
}

.home-hero__slide img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-hero__slide img {
    /* The intrinsic size is declared on the element, so the band reserves its
     * box and no slide load can shift the page. */
    object-fit: cover;
    /* Per-slide focal point from dev_content: each photograph carries its
     * subject in a different part of the frame. */
    object-position: var(--hero-focus, 50% 35%);
}

/* Scrim, in two parts: a horizontal ramp that darkens the copy side, and a
 * bottom fade that seats the scroll cue and photo credit. Kept as its own
 * element so the gradient never lands on the <img> itself. */
.home-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(
            100deg,
            var(--navy-950) 0%,
            rgba(3, 11, 24, 0.94) 28%,
            rgba(3, 11, 24, 0.72) 44%,
            rgba(3, 11, 24, 0.28) 62%,
            rgba(3, 11, 24, 0.12) 100%
        ),
        linear-gradient(
            to bottom,
            rgba(3, 11, 24, 0.55) 0%,
            transparent 26%,
            transparent 62%,
            rgba(3, 11, 24, 0.85) 100%
        );
    pointer-events: none;
}

/* --- Hero copy ------------------------------------------------------------ */

.home-hero__grid {
    position: relative;
    z-index: 4;
    display: grid;
    align-content: center;
    gap: var(--space-7);
}

.home-hero__copy {
    max-width: 34rem;
}

.home-hero__eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding-left: var(--space-4);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-400);
    border-left: 3px solid var(--accent-primary);
    /* The headline has carried a shadow all along; the eyebrow needs one for
     * the same reason. Restoring the lead at tablet widths lifts the copy
     * block by three lines, which puts this line across the brighter upper
     * third of the photograph on some slides. */
    text-shadow: 0 2px 16px rgba(3, 11, 24, 0.75);
}

.home-hero__eyebrow-sep {
    color: var(--white-50);
}

/*
 * Sized to sit WITH the photograph rather than on top of it.
 *
 * At the shared --text-4xl ceiling the name ran to 57.6px and its two lines
 * stood 132px tall, which read as a poster headline laid over the athlete
 * rather than as the federation's mark beside them. A slightly lower ceiling
 * and a tighter leading keep the same weight and presence -- this is still
 * 800-weight and still the largest thing on the page -- while giving the
 * image room to carry its half of the composition. The floor is unchanged,
 * so nothing shrinks on phones.
 */
.home-hero__title {
    margin-bottom: var(--space-4);
    font-size: clamp(2.1rem, 3.1vw + 1.15rem, 3.15rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    /* Armenian and Russian render this name considerably longer than English;
     * balancing the lines keeps it from breaking into one orphaned word. */
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(3, 11, 24, 0.55);
}

/* A tighter measure: 44ch ran the sentence wider than the headline above it,
 * which broke the copy block's left-edge silhouette. */
.home-hero__lead {
    max-width: 38ch;
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    color: var(--text-inverse-muted);
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

/* --- Hero foot: scroll cue and photo credit ------------------------------- */

/*
 * Three fixed tracks, not a flex row.
 *
 * This used to be `justify-content: space-between` over three flex children.
 * The last of them is the caption and photo credit, which is rewritten on
 * every slide -- so the width of that one child decided where the middle
 * child sat, and the indicator cluster slid 74px sideways at 1440 and 264px
 * at 768 every six seconds.
 *
 * With `minmax(0, 1fr) auto minmax(0, 1fr)` the centre track is exactly as
 * wide as the controls and the two outer tracks are equal by definition, so
 * the controls are pinned to the band's centre line whatever the caption
 * says. The `minmax(0, ...)` matters: a plain `1fr` keeps an automatic
 * minimum, which would let a long credit push the track open again.
 */
.home-hero__foot {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3) var(--space-5);
    align-self: end;
    /* Clear of the copy above and of the band's own bottom edge, so the cue
     * never looks clipped by the section boundary. */
    margin-top: var(--space-7);
    /* The cluster used to sit 8px off the band's bottom edge, which read as
     * crowding rather than as a deliberate footer row. */
    padding-block-end: var(--space-6);
}

.home-hero__scroll-cue {
    grid-column: 1;
    justify-self: start;
}

.home-hero__controls {
    grid-column: 2;
    justify-self: center;
}

.home-hero__meta {
    grid-column: 3;
    justify-self: end;
}

/*
 * Tablets: the caption gets the full band width on a row of its own.
 *
 * Between these two existing breakpoints the controls are already at their
 * full width, so each outer track collapses to about 142px -- narrow enough
 * that the one slide carrying a press credit wrapped to three lines while the
 * other two wrapped to two. That changed the foot's height, and because the
 * foot is anchored to the bottom of a fixed-height band it lifted the whole
 * control row by 10px on every rotation. Across the full width the same text
 * is a single line, comfortably inside the two-line reserve.
 */
@media (min-width: 48em) and (max-width: 61.999em) {
    .home-hero__meta {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: end;
    }
}

/* Phones: the scroll cue, the carousel controls and the caption cannot share
 * one row without crushing all three, so they stack and centre. */
@media (max-width: 47.9375em) {
    .home-hero__foot {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
        gap: var(--space-2);
    }

    .home-hero__scroll-cue,
    .home-hero__controls,
    .home-hero__meta {
        grid-column: 1;
        justify-self: center;
    }

    /* Controls first, then the cue, then the attribution: the order of
     * importance once they are stacked rather than spread. */
    .home-hero__controls {
        order: -1;
        justify-content: center;
        width: 100%;
    }

    .home-hero__meta {
        justify-content: center;
        width: 100%;
        text-align: center;
    }
}

/*
 * Quieter than the carousel controls, deliberately.
 *
 * This was a filled, bordered pill sitting on the same row as another filled,
 * bordered pill (Pause) and a row of indicators, so three things of equal
 * weight competed for the same glance. The scroll cue is the least important
 * of the three -- the page scrolls without it -- so it drops its fill and
 * border and reads as a quiet label. The 44px target is untouched.
 */
.home-hero__scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--touch-target);
    padding: var(--space-2) 0;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--white-50);
    background: none;
    border: 0;
    transition: color var(--duration-fast) var(--easing);
}

.home-hero__scroll-cue:hover {
    color: var(--gold-400);
}

/* The glyph animates, not the whole control: a moving hit area is harder to
 * click, and the label must stay still to stay readable. */
.home-hero__scroll-arrow {
    display: inline-block;
    font-size: var(--text-base);
    line-height: 1;
    animation: home-hero-cue 2.4s var(--easing) infinite;
}

@keyframes home-hero-cue {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.65;
    }
    50% {
        transform: translateY(5px);
        opacity: 1;
    }
}

/* Caption and attribution for the slide currently on screen. Real text, never
 * alt text, so both are visible whether or not the image loads. */
/*
 * Two lines are reserved whether or not this slide fills them. Slide 1 is the
 * only press photograph, so it is the only one carrying a credit; without the
 * reserve the row lost a line on slides 2 and 3 and the whole foot changed
 * height (84px -> 52px at 768) as the carousel advanced.
 */
.home-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: var(--space-1) var(--space-3);
    /* Two lines plus the row gap between them: the gap is part of the wrapped
     * height, and leaving it out left a 4px flicker at 320px. */
    min-height: calc(var(--text-xs) * var(--leading-normal) * 2 + var(--space-1));
    margin: 0;
    text-align: right;
}

/* Subordinate to the controls: it labels the photograph, it is not an action.
 * Gold is kept because it is the only thing naming the current slide. */
.home-hero__credit {
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
    color: var(--white-50);
}

/* Empty on the federation's own photographs; the gap collapses with it. */
.home-hero__credit:empty {
    display: none;
}

/* --- Hero carousel controls ------------------------------------------------ */

/*
 * The arrows sit IN the control row, not against the band's edges.
 *
 * Vertically centred side arrows only clear the copy while the container's
 * gutter is wider than the control: at 1024 the gutter is 32px and the prev
 * arrow occupied 16-60px, so it was painted straight over the lead paragraph
 * (measured lead 32-459). The gutter is a function of the viewport, so any
 * breakpoint chosen for this is really a guess about container arithmetic --
 * whereas a control that lives in the flow cannot overlap anything at any
 * width. It also gives phones the single Prev | dots | Next | Pause row they
 * needed, instead of arrows floating over the photograph on their own line.
 */
.home-hero__arrow {
    z-index: 5;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: var(--touch-target);
    height: var(--touch-target);
    padding: 0;
    background: rgba(6, 20, 40, 0.5);
    color: #fff;
    border: 1px solid var(--white-12);
    border-radius: 50%;
    font-size: var(--text-lg);
    cursor: pointer;
    transition:
        background-color var(--duration-fast) var(--easing),
        border-color var(--duration-fast) var(--easing);
}

.home-hero__arrow:hover {
    background: rgba(6, 20, 40, 0.78);
    border-color: var(--gold-500);
    color: var(--gold-400);
}

.home-hero__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.home-hero__dots {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

/* The visible dot is small, but the button around it keeps a full touch
 * target: padding does the work, not the dot's own size. */
.home-hero__dot {
    display: grid;
    place-items: center;
    width: var(--touch-target);
    height: var(--touch-target);
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.home-hero__dot::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--white-50);
    border: 1px solid transparent;
    border-radius: 50%;
    transition:
        background-color var(--duration-fast) var(--easing),
        width var(--duration-base) var(--easing);
}

.home-hero__dot:hover::before {
    background: #fff;
}

/* Active state is width AND colour, so it does not rely on colour alone. */
.home-hero__dot.is-active::before {
    width: 26px;
    border-radius: 999px;
    background: var(--gold-400);
}

/*
 * Reduced motion: the crossfade is removed so slides swap instantly, and the
 * script does not start autoplay at all. Prev/Next and the indicators keep
 * working -- the visitor can still see all three photographs, they just are
 * not moved without asking.
 */
@media (prefers-reduced-motion: reduce) {
    .home-hero__slide {
        transition: none;
    }
}

/* --- Hero responsive ------------------------------------------------------ */

/* Phones: the photograph becomes a backdrop rather than a side panel, so the
 * scrim goes vertical and the copy sits over the whole band. */
@media (max-width: 61.999em) {
    .home-hero {
        min-height: clamp(520px, 78vh, 660px);
    }

    /* Phones crop the band horizontally, not vertically: the portrait frames
     * are taller than the band is wide, so `cover` shows their full height and
     * trims the sides. The mobile focal value therefore steers left/right. */
    .home-hero__slide img {
        object-position: var(--hero-focus-mobile, var(--hero-focus, 50% 30%));
    }

    /*
     * Copy sits at the BOTTOM on phones.
     *
     * Because the crop is horizontal here, every subject stays in the upper
     * part of the band and there is no focal value that can move a face out
     * from behind the headline. Centred copy therefore covered the medalist's
     * face completely. Aligning the copy to the end clears the top third for
     * the photograph and puts the text over the quieter lower half.
     */
    .home-hero__grid {
        align-content: end;
        /* Holds the copy block down near the foot now that the lead is part
         * of it again, rather than letting it ride up over the subject. */
        gap: var(--space-5);
    }

    /* Inverted to match: light over the subject at the top, heavy under the
     * copy at the bottom. */
    .home-hero__scrim {
        background:
            linear-gradient(
                to bottom,
                rgba(3, 11, 24, 0.34) 0%,
                rgba(3, 11, 24, 0.42) 26%,
                rgba(3, 11, 24, 0.78) 52%,
                rgba(3, 11, 24, 0.92) 100%
            );
    }

    .home-hero__title {
        font-size: clamp(2rem, 7vw + 0.5rem, 2.9rem);
    }
}

/* Membership must be reachable without hunting on a small phone, so the two
 * CTAs stack full width rather than shrinking to fit side by side. */
@media (max-width: 30em) {
    .home-hero__actions {
        display: grid;
        gap: var(--space-3);
    }

    .home-hero__actions .btn {
        width: 100%;
    }

    /* Stacked rather than wrapped: at this width the inline separator ended
     * up alone on its own line ahead of "Est. 1988". */
    .home-hero__eyebrow {
        display: block;
    }

    .home-hero__eyebrow-sep {
        display: none;
    }

    /*
     * The lead paragraph is hidden on phones only.
     *
     * It used to disappear at 62em, taking the page's one line of explanation
     * away from every tablet as well -- at 768px the band had 245px of empty
     * photograph below the CTAs and plenty of room to carry it. Below 30em it
     * genuinely cannot stay: at 375px it ran to four lines and, with the
     * headline and two stacked CTAs, the copy filled the whole band, leaving
     * no height at which the athlete's face was not behind text. The <h1> and
     * the two CTAs carry the hero there, and the same sentence is still the
     * page's meta description and opens the About page.
     */
    .home-hero__lead {
        display: none;
    }

    /*
     * One row for the whole carousel control: Prev | dots | Next | Pause.
     *
     * At 320px the four parts measure 44 + 90 + 44 + ~72 plus gaps against
     * roughly 280px of usable width, so the reserves that keep the desktop
     * cluster still have to come off here or the row wraps into the tangle
     * this was meant to replace. The dots lose width but not height, so each
     * indicator keeps a 30x44 target -- above the 24x24 minimum -- and the
     * toggle keeps its full 44px height and its real text label. That
     * label is translated, so the Armenian and Russian catalogues carry
     * short verbs for it -- a ten-character word does not fit this row in
     * any language.
     */
    .home-hero__controls {
        flex-wrap: nowrap;
        /* Left-anchored rather than centred: the toggle is the only part
         * whose width changes with its label, and centring turned that
         * change into a sideways nudge of the dots on every press. */
        justify-content: flex-start;
        gap: var(--space-1);
    }

    .home-hero__dots {
        gap: 0;
    }

    .home-hero__dot {
        width: 30px;
    }

    /* Subordinate to the controls above it, and never wider than the band. */
    .home-hero__meta {
        font-size: var(--text-xs);
    }
}

@media (min-width: 62em) {
    /* The right column is intentionally empty: the photograph is absolutely
     * positioned across the whole band, so this ratio only decides how far
     * the copy may run before the image takes over visually. It has to stay
     * wide enough to hold both hero CTAs on one row -- at a narrower ratio
     * the secondary button wrapped under the membership one. */
    .home-hero__grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }

    /*
     * Below the container's own maximum the copy takes a larger share.
     *
     * The ratio above is tuned for a full 1200px container. Once the viewport
     * drops under that, the same 1.05/0.95 split left the copy 471px against
     * two CTAs measuring 238px and 251px, so the secondary button wrapped
     * underneath the membership one and the hero read as unfinished through
     * the whole 1024-1100px range. The copy's own 34rem cap still stops it
     * running too wide, so this only ever gives back space the image was not
     * using -- the buttons are not shrunk to fit.
     */
    @media (max-width: 74.99em) {
        .home-hero__grid {
            grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.5fr);
            gap: var(--space-5);
        }
    }

    .home-hero__copy {
        grid-column: 1;
    }
}

/* --- Featured events slider ---------------------------------------------- */
/* Slides are stacked in one grid cell, so the strip is always exactly one
 * card tall and only the active card is visible -- and reachable. */

.featured-slider {
    position: relative;
    width: 100%;
}

.featured-slider__viewport {
    display: grid;
    min-width: 0;
}

.featured-slider__viewport > [data-featured-event-slide] {
    grid-area: 1 / 1;
    /* `visibility` keeps inactive slides out of the tab order. */
    visibility: hidden;
    opacity: 0;
    transition:
        opacity var(--duration-base) var(--easing),
        visibility var(--duration-base);
}

.featured-slider__viewport > .is-active {
    visibility: visible;
    opacity: 1;
}

/* Arrows sit on the slider wrapper, outside the card's own box, so they never
 * take part in the card's layout and never push its content around. The card
 * keeps its `overflow: hidden`; only the wrapper has to let them show. */
/* Navy fill rather than the translucent white it used in the hero: the slider
 * now sits on the light competitions section, where a 6%-white circle would be
 * invisible. */
.featured-slider__arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: var(--touch-target);
    height: var(--touch-target);
    padding: 0;
    transform: translateY(-50%);
    background: var(--navy-900);
    color: #fff;
    border: 1px solid var(--navy-700);
    border-radius: 50%;
    font-size: var(--text-lg);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.featured-slider__arrow--prev {
    inset-inline-start: calc(-1 * var(--space-6));
}

.featured-slider__arrow--next {
    inset-inline-end: calc(-1 * var(--space-6));
}

.featured-slider__arrow:hover {
    background: var(--navy-800);
    border-color: var(--gold-500);
    color: var(--gold-400);
}

/* Phones and small tablets: the page padding is too narrow to hold an arrow
 * beside the card, so they move under it, side by side and right-aligned --
 * clear of the title, the countdown and the facts. */
@media (max-width: 47.9375em) {
    .featured-slider {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: var(--space-3) var(--space-2);
    }

    .featured-slider__viewport {
        grid-row: 1;
        grid-column: 1 / -1;
    }

    .featured-slider__arrow {
        position: static;
        transform: none;
        grid-row: 2;
    }

    .featured-slider__arrow--prev {
        grid-column: 2;
    }

    .featured-slider__arrow--next {
        grid-column: 3;
    }
}

/* Glass panel with two cut corners. `overflow: hidden` keeps the oversized
 * watermark inside the clipped shape. */
.featured-event {
    position: relative;
    padding: clamp(1.3rem, 3vw, 2.15rem);
    overflow: hidden;
    /* Opaque, and with its own text colour.
     *
     * Both were free when the card lived inside the dark hero: it inherited
     * light text and the translucent fill blended into navy. On the light
     * competitions section the same values rendered dark text on a washed-out
     * blue panel, so the card now states its own surface outright. */
    color: var(--text-inverse);
    background:
        linear-gradient(
            180deg,
            var(--navy-800) 0%,
            var(--navy-900) 55%,
            var(--navy-950) 100%
        );
    border: 1px solid rgba(119, 166, 255, 0.22);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    clip-path: polygon(
        0 0,
        calc(100% - 22px) 0,
        100% 22px,
        100% 100%,
        22px 100%,
        0 calc(100% - 22px)
    );
}

.featured-event__watermark {
    position: absolute;
    inset-inline-end: -0.04em;
    inset-block-start: -0.2em;
    font-size: clamp(6rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;
    color: rgba(255, 255, 255, 0.025);
    pointer-events: none;
    user-select: none;
}

/* Everything else stays above the watermark layer. */
.featured-event__topline,
.featured-event__identity,
.featured-event__facts,
.featured-event__actions,
.featured-event__note,
.featured-event__title,
.featured-event .countdown {
    position: relative;
    z-index: 1;
}

.featured-event__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.featured-event__topline-end {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.featured-event__year {
    color: var(--gold-500);
    font-weight: 800;
    letter-spacing: 0.12em;
}

/* Pure state indicator: filled = pinned, outline = not pinned. The visible
 * meaning is carried by the visually hidden label beside it. */
.featured-event__pin {
    display: inline-flex;
    align-items: center;
    color: var(--gold-400);
}

.featured-event__pin-icon {
    width: 1.05rem;
    height: 1.05rem;
}

.featured-event__pin-icon--filled {
    fill: currentColor;
}

.featured-event__identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-4);
    margin-block: var(--space-5);
}

.featured-event__logo {
    width: clamp(68px, 7vw, 92px);
    height: clamp(68px, 7vw, 92px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(242, 169, 0, 0.55);
    box-shadow: 0 0 22px rgba(242, 169, 0, 0.22);
}

.featured-event__label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-400);
}

.featured-event__dot {
    width: 9px;
    height: 9px;
    color: var(--accent-primary);
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 18px currentColor;
}

.featured-event__kicker {
    margin: 0;
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--white-50);
}

.featured-event__title {
    /* The identity block owns the spacing below; the title only clears its
     * own kicker. */
    margin: var(--space-1) 0 0;
    font-size: var(--text-2xl);
    text-wrap: pretty;
    /* Stated here as well as in the language rule: an event title is the one
     * string on the page long enough to reach the narrow card's edge, and it
     * must never split a word that would have wrapped. */
    overflow-wrap: break-word;
    hyphens: auto;
}

/*
 * Smallest phones: the title steps down a size so its longest word fits.
 *
 * `break-word` only declines to split a word that CAN sit on a line by
 * itself. Beside the 60px federation mark the title column measures 154px at
 * 320px wide, and "Championship" sets at 157px -- three pixels over, so the
 * break was correct behaviour on a column that was simply too narrow. At this
 * step the same word measures about 130px and wraps whole.
 */
@media (max-width: 30em) {
    .featured-event__title {
        font-size: var(--text-xl);
    }

    /*
     * The mark moves above the title rather than beside it.
     *
     * Side by side, a 68px roundel left the title roughly 154px to wrap in,
     * which pushed it to four short lines and set a small circle against a
     * tall stack of text. Stacked, the title gets the card's full width and
     * runs to two lines. The mark is kept at full size, not shrunk away.
     */
    .featured-event__identity {
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
        gap: var(--space-3);
    }
}

/* Pending state: the title follows the top line directly, with no identity
 * block between them. */
.featured-event__topline + .featured-event__title {
    margin-top: var(--space-5);
}

.featured-event__facts {
    display: grid;
    gap: var(--space-3);
    margin: 0 0 var(--space-5);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
}

.featured-event__facts > div {
    padding: var(--space-3);
    background: var(--white-06);
    border-radius: var(--radius-md);
}

.featured-event__facts dt {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white-50);
}

.featured-event__facts dd {
    margin: var(--space-1) 0 0;
    font-weight: 600;
}

/* --- Event countdown ----------------------------------------------------- */
/* Four equal blocks that never overflow: 1fr columns plus `min-width: 0`
 * keep them shrinking with the panel instead of pushing it wider. */

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
    margin: 0 0 var(--space-5);
}

/* The grid display would otherwise beat the browser's [hidden] rule. */
.countdown[hidden] {
    display: none;
}

.countdown > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
    padding: var(--space-3) var(--space-1);
    background: var(--white-06);
    border: 1px solid var(--border-inverse);
    border-radius: var(--radius-md);
}

.countdown b {
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: 1;
    /* Digits keep the same width, so the blocks do not jitter every second. */
    font-variant-numeric: tabular-nums;
    color: var(--gold-400);
}

.countdown small {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white-50);
}

.featured-event__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.featured-event__note {
    margin: var(--space-3) 0 0;
    font-size: var(--text-sm);
    font-style: italic;
    color: var(--gold-400);
}

/* Phones: a smaller crest keeps the identity block on one row and leaves the
 * title enough width to wrap naturally. */
@media (max-width: 34em) {
    .featured-event__logo {
        width: 56px;
        height: 56px;
    }

    .featured-event__identity {
        gap: var(--space-3);
        margin-block: var(--space-4);
    }

    .featured-event__watermark {
        font-size: 6rem;
    }
}

/* =========================================================================
   2. Home — sections
   ========================================================================= */

.club-image {
    display: block;
    border-radius: var(--radius-lg);
}

/* A logo slide: the white disc of the logo frame needs an edge on white. */
a.club-image {
    background: #fff;
    border: 1px solid var(--border-default);
}

.find-club {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    margin-top: var(--space-7);
    padding: var(--space-6);
    background: var(--navy-900);
    color: var(--text-inverse);
    border-left: 5px solid var(--accent-primary);
    border-radius: var(--radius-lg);
}

.find-club__title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-2xl);
}

.find-club__text {
    margin: 0;
    color: var(--text-inverse-muted);
}

.medalist-card__achievements {
    display: grid;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* --- President's message --------------------------------------------------- */
/* Second section on the page, directly under the hero. Light and calm on
 * purpose: it is the deliberate drop in visual volume after the hero, before
 * the dark credibility band raises it again. */

.president-message {
    background: var(--surface-0);
}

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

.president-message__figure {
    margin: 0;
}

.president-message__media {
    max-width: 24rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Gold rule between the heading and the message. Purely decorative, so it is
 * an empty aria-hidden span rather than a border on the copy. */
.president-message__divider {
    display: block;
    width: 4.5rem;
    height: 3px;
    margin-block: var(--space-4) var(--space-5);
    background: linear-gradient(
        to right,
        var(--gold-500),
        rgba(242, 169, 0, 0)
    );
}

/* Targeted by class, not by tag: a `> p` rule here also caught the eyebrow
 * and the signature, and outranked their own colour rules. */
.president-message__text {
    max-width: 60ch;
    color: var(--text-secondary);
}

/* No approved signature image exists, so the attribution is set in type and
 * held by the federation red rule. */
.president-message__signature {
    margin-block: var(--space-5);
    padding-left: var(--space-4);
    border-left: 3px solid var(--accent-primary);
    line-height: 1.5;
    color: var(--text-primary);
}

@media (min-width: 48em) {
    .president-message__grid {
        /* Portrait ~42%, message ~58%. */
        grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
        gap: var(--space-8);
    }
}

/* --- Federation credibility ------------------------------------------------ */
/* The dark band. Cards are already filtered to approved facts in dev_content;
 * nothing here decides what may be shown. */

.credibility {
    position: relative;
    background:
        radial-gradient(
            100% 120% at 80% 0%,
            var(--navy-800) 0%,
            var(--navy-900) 45%,
            var(--navy-950) 100%
        );
    color: var(--text-inverse);
    --border-default: var(--border-inverse);
    --text-primary: var(--text-inverse);
    --text-secondary: var(--text-inverse-muted);
    --text-muted: var(--white-50);
    --focus-ring: var(--gold-400);
}

.credibility__head {
    max-width: 46rem;
    margin-bottom: var(--space-7);
}

.credibility__title {
    margin-bottom: var(--space-4);
}

.credibility__lead {
    margin: 0;
    max-width: 58ch;
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    /* Evens out the line lengths; without it this wrapped into three
     * increasingly short lines under the headline. */
    text-wrap: pretty;
    color: var(--text-inverse-muted);
}

.credibility__grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.trust-card {
    display: grid;
    align-content: start;
    gap: var(--space-2);
    padding: var(--space-5);
    background: var(--white-06);
    border: 1px solid var(--border-inverse);
    /* Accent edge, the same idea the featured event card uses. */
    border-top: 3px solid var(--gold-500);
    border-radius: var(--radius-md);
}

.trust-card__icon {
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: var(--space-1);
    color: var(--gold-400);
}

/*
 * Two lines are reserved for every title, filled or not.
 *
 * The card is `align-content: start`, so a title that wrapped pushed only its
 * own body down: "World Karate Federation member since 1993" started its
 * paragraph at 121px while the five one-line titles beside it started at 98px.
 * Reserving the taller case puts every body on one line instead.
 */
.trust-card__title {
    margin: 0;
    min-height: calc(var(--text-lg) * var(--leading-snug) * 2);
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
    color: #fff;
}

.trust-card__body {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--text-inverse-muted);
}

/*
 * The national colours repeat across the whole grid, so the band carries the
 * flag without a decorative stripe of its own.
 *
 * These were keyed to two specific cards, which made the sequence depend on
 * which items happened to be approved: with six approved facts it read as one
 * red, one blue and four golds, i.e. as an accident. Keyed to position it is
 * a deliberate red-blue-gold cycle that stays deliberate however many items
 * the approval gate lets through.
 */
.trust-card:nth-child(3n + 1) {
    border-top-color: var(--red-600);
}

.trust-card:nth-child(3n + 2) {
    border-top-color: var(--blue-500);
}

.trust-card:nth-child(3n + 3) {
    border-top-color: var(--gold-500);
}

.credibility__action {
    margin-top: var(--space-6);
}

/* --- Competitions ---------------------------------------------------------- */
/* Featured slider first, then the schedule carousel underneath it. */

.competitions__schedule {
    margin-top: var(--space-8);
}

.competitions__schedule-title {
    margin-block: 0 var(--space-5);
    color: var(--text-secondary);
}

/* The slider needs room for its outboard arrows once they are positioned
 * beside the card rather than under it.
 *
 * `width: auto` matters as much as the margin: `.featured-slider` declares
 * `width: 100%`, which resolves against the container and then adds the
 * margins on top, so the right-hand arrow was pushed a full 32px past the
 * viewport edge and put a horizontal scrollbar on the page at 768px. */
@media (min-width: 48em) {
    .competitions .featured-slider {
        width: auto;
        margin-inline: var(--space-6);
    }
}

/* --- Membership spotlight -------------------------------------------------- */
/* The page's primary conversion section, and the only place besides the hero
 * where the red is allowed to fill a whole band. */

.membership-spotlight {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            120% 130% at 15% 10%,
            #a51230 0%,
            #8d0f28 45%,
            #5d0a1c 100%
        );
    color: var(--text-inverse);
    --border-default: var(--border-inverse);
    --text-primary: var(--text-inverse);
    --text-secondary: var(--text-inverse-muted);
    --text-muted: var(--white-70);
    --focus-ring: var(--gold-400);
}

/* Decorative karate/federation watermark, kept very low contrast so the copy
 * over it always wins. */
.membership-spotlight::before {
    content: "";
    position: absolute;
    inset-block-start: -12%;
    inset-inline-end: -6%;
    width: min(46rem, 70%);
    aspect-ratio: 1;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(255, 255, 255, 0.07) 0%,
        rgba(255, 255, 255, 0) 62%
    );
    pointer-events: none;
}

.membership-spotlight__grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--space-6);
    align-items: center;
}

.membership-spotlight__title {
    margin-bottom: var(--space-4);
}

.membership-spotlight__lead {
    max-width: 44ch;
    margin-bottom: var(--space-6);
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    color: var(--white-95);
}

/* The red band would swallow a red button, so this one goes gold-forward. */
.membership-spotlight .btn--membership {
    background: linear-gradient(180deg, var(--gold-500), #d99700);
    color: var(--navy-950);
    border-color: var(--gold-400);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 12px 30px rgba(0, 0, 0, 0.3);
}

.membership-spotlight .btn--membership:hover {
    background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 16px 36px rgba(0, 0, 0, 0.38);
}

.membership-spotlight__note {
    max-width: 46ch;
    margin-top: var(--space-5);
    margin-bottom: 0;
    font-size: var(--text-sm);
    color: var(--white-70);
}

.membership-spotlight__panel {
    padding: var(--space-6);
    background: rgba(3, 11, 24, 0.34);
    border: 1px solid var(--white-12);
    border-left: 3px solid var(--gold-500);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

@supports not (backdrop-filter: blur(10px)) {
    .membership-spotlight__panel {
        background: rgba(3, 11, 24, 0.55);
    }
}

.membership-spotlight__panel-title {
    margin: 0 0 var(--space-4);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-400);
}

.membership-spotlight__plans {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.membership-plan {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
}

.membership-plan__marker {
    width: 9px;
    height: 9px;
    margin-top: 0.45em;
    background: var(--gold-500);
    border-radius: 50%;
}

.membership-plan__title {
    display: block;
    color: #fff;
}

.membership-plan__description {
    display: block;
    font-size: var(--text-sm);
    line-height: var(--leading-snug);
    color: var(--white-70);
}

.membership-spotlight__process-intro {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--white-95);
}

.membership-spotlight__process {
    display: grid;
    gap: var(--space-1);
    margin: 0;
    padding-left: 1.3rem;
    font-size: var(--text-sm);
    color: var(--white-70);
}

@media (min-width: 62em) {
    .membership-spotlight__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
        gap: var(--space-8);
    }
}

/* --- Clubs band ------------------------------------------------------------ */

/* Two CTAs now sit here, and Membership must not be the one that wraps into a
 * cramped second line. */
.find-club__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

@media (max-width: 30em) {
    .find-club__actions {
        display: grid;
        width: 100%;
    }

    .find-club__actions .btn {
        width: 100%;
    }
}

/* --- Partners and sponsors -------------------------------------------------- */
/* The section holds its position whether or not a record has been approved.
 * With none approved, it renders the pending state below -- never a
 * placeholder logo, and never a fabricated brand name. */

/* --- Individual marks ----------------------------------------------------- */
/*
 * Official marks are never cropped, stretched, masked, recoloured or
 * greyscaled. The box only reserves space and centres; the image keeps its own
 * intrinsic aspect ratio and is bounded by height, so a square emblem and a
 * wide wordmark both read correctly at the same optical weight.
 */

.partner-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

/*
 * A neutral white card, for two reasons.
 *
 * The supplied marks are a mix of transparent PNGs and JPEGs with white
 * backgrounds baked in. Dropped straight onto the section's light-grey
 * surface, the JPEGs read as stray white rectangles while the PNGs float --
 * the strip looks broken rather than deliberate. A consistent card puts every
 * mark on the same ground.
 *
 * They also carry very different amounts of internal padding, so height alone
 * does not give them equal optical weight. A fixed card width sets an even
 * rhythm along the rail while the image inside keeps its own aspect ratio.
 *
 * This is a containing box only: no crop, no stretch, no mask, no filter, no
 * forced aspect ratio on the artwork itself.
 */
.partner-mark__media {
    display: grid;
    place-items: center;
    width: clamp(158px, 15vw, 196px);
    height: 100px;
    padding: var(--space-2) var(--space-3);
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    /* Contains the optical scale below. What it clips is the blank margin
     * inside a supplied file, never the mark itself. */
    overflow: hidden;
}

.partner-mark__media img {
    display: block;
    /* `auto` on both axes plus the two caps: the browser scales the mark down
     * proportionally and never distorts it. */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: var(--partner-mark-cap, 68px);
    /* Uniform scale on one axis pair, so the mark keeps its exact proportions.
     * A transform does not participate in layout, so the tile, the group and
     * the loop arithmetic are all unaffected by it. */
    transform: scale(var(--partner-mark-scale, 1));
}

/*
 * Optical balance, not cropping.
 *
 * The supplied files frame their marks very differently, and a shared height
 * cap sizes the FILE rather than the artwork inside it. Measured as the
 * fraction of each file its ink actually occupies:
 *
 *     WKF        1.00 x 1.00 (the new mark, 2026; the old file was 0.27 x 0.43)
 *     Eldorado   0.76 x 0.62
 *     WKF Europe 1.00 x 1.00
 *     Ministry   1.00 x 1.00
 *     NOC        1.00 x 1.00
 *     RAU        1.00 x 1.00 (a 3.1:1 wordmark)
 *
 * Only marks with a blank margin need a factor. These bring every mark's
 * visible height to roughly the same, except the RAU wordmark, which is set
 * shorter on purpose: a 3.1:1 lockup at roundel height always reads oversized.
 *
 * Nothing here crops, stretches, masks, recolours or edits an official mark.
 * The scale is uniform, so proportions are exact, and the files are untouched.
 */
.partner-mark--eldorado {
    --partner-mark-scale: 1.5;
}

.partner-mark--russian-armenian-university {
    --partner-mark-scale: 0.85;
}

@media (max-width: 47.9375em) {
    .partner-mark__media {
        width: clamp(132px, 40vw, 168px);
        height: 82px;
        padding: var(--space-2) var(--space-3);
    }

    .partner-mark__media img {
        max-height: 50px;
    }
}

/* --- Main sponsor spotlight ------------------------------------------------ */
/* A dark band of its own: the one confirmed commercial relationship, never
 * shown at the same size as a governing body. */

.sponsor-spotlight {
    position: relative;
    display: grid;
    gap: var(--space-6);
    align-items: center;
    margin-bottom: var(--space-8);
    padding: clamp(var(--space-5), 4vw, var(--space-8));
    overflow: hidden;
    color: var(--text-inverse);
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(214, 16, 50, 0.32) 0%, transparent 60%),
        linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    --focus-ring: var(--gold-400);
}

/* A thin gold rule along the top edge, the federation's accent colour. */
.sponsor-spotlight::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-500), var(--gold-400), var(--red-600));
}

.sponsor-spotlight__logo .partner-mark__media {
    width: 100%;
    max-width: 22rem;
    height: clamp(140px, 18vw, 190px);
    margin-inline: auto;
    padding: var(--space-4) var(--space-5);
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.sponsor-spotlight__logo .partner-mark__media img {
    max-height: clamp(90px, 11vw, 130px);
}

.sponsor-spotlight__logo-link {
    display: block;
}

.sponsor-spotlight__logo-link .partner-mark__media {
    transition: transform var(--duration-base) var(--easing),
        box-shadow var(--duration-base) var(--easing);
}

.sponsor-spotlight__logo-link:hover .partner-mark__media {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--gold-400);
}

@media (prefers-reduced-motion: reduce) {
    .sponsor-spotlight__logo-link .partner-mark__media {
        transition: none;
    }

    .sponsor-spotlight__logo-link:hover .partner-mark__media {
        transform: none;
    }
}

.sponsor-spotlight__body {
    display: grid;
    gap: var(--space-3);
    justify-items: start;
}

.sponsor-spotlight__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy-950);
    background: var(--gold-400);
    border-radius: 999px;
}

.sponsor-spotlight__name {
    margin: 0;
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
    color: #fff;
}

.sponsor-spotlight__text {
    max-width: 38rem;
    margin: 0;
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--white-70);
}

.sponsor-spotlight__link {
    margin-top: var(--space-2);
}

@media (min-width: 48em) {
    .sponsor-spotlight {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: var(--space-8);
    }
}

@media (max-width: 47.9375em) {
    .sponsor-spotlight__body {
        justify-items: center;
        text-align: center;
    }

    .sponsor-spotlight__name {
        font-size: var(--text-2xl);
    }
}

/* --- Partner groups ---------------------------------------------------------- */
/* Each kind under its own heading. Groups sit side by side while they fit and
 * wrap as whole groups, so a heading never strays from its cards. */

.partner-groups {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-7) var(--space-8);
}

.partner-group {
    display: grid;
    gap: var(--space-4);
    justify-items: center;
    align-content: start;
    min-width: 0;
}

.partner-group__title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: 0;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.partner-group__title::before,
.partner-group__title::after {
    content: "";
    width: 2rem;
    height: 2px;
    background: var(--gold-500);
    border-radius: 2px;
}

.partner-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
}

.partner-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    width: 12rem;
    height: 100%;
    padding: var(--space-5) var(--space-4) var(--space-4);
    overflow: hidden;
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-base) var(--easing),
        box-shadow var(--duration-base) var(--easing),
        border-color var(--duration-base) var(--easing);
}

/* The accent bar grows in from the left on hover and on keyboard focus. */
.partner-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--red-600), var(--gold-500));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-base) var(--easing);
}

.partner-card--link:hover,
.partner-card--link:focus-visible {
    transform: translateY(-4px);
    border-color: var(--gold-500);
    box-shadow: var(--shadow-md);
}

.partner-card--link:hover::before,
.partner-card--link:focus-visible::before {
    transform: scaleX(1);
}

/* The card is the box now; the mark's own card would be a box inside a box. */
.partner-card .partner-mark__media {
    width: 100%;
    height: 88px;
    padding: 0;
    background: transparent;
    border: 0;
}

.partner-card .partner-mark__media img {
    max-height: 72px;
}

.partner-card__name {
    /* Two lines reserved, so cards in neighbouring groups end level. */
    display: grid;
    place-items: center;
    min-height: 2.6em;
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: var(--leading-snug);
    color: var(--text-primary);
    /* Ministry and university names are long single words in HY and RU. */
    overflow-wrap: anywhere;
}

.partner-card__arrow {
    position: absolute;
    top: var(--space-2);
    right: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: color var(--duration-fast) var(--easing);
}

.partner-card--link:hover .partner-card__arrow,
.partner-card--link:focus-visible .partner-card__arrow {
    color: var(--red-600);
}

/* A partner without an approved logo: an emblem instead of the name twice. */
.partner-mark__media--emblem {
    color: var(--red-600);
}

.partner-mark__initial {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--navy-900);
    background: var(--surface-50);
    border: 2px solid var(--gold-500);
    border-radius: 50%;
}

@media (max-width: 47.9375em) {
    .partner-groups {
        gap: var(--space-6);
    }

    .partner-group {
        width: 100%;
    }

    .partner-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: var(--space-3);
    }

    /* A group of one keeps the card's half width, centred under its heading. */
    .partner-cards:has(> :only-child) {
        grid-template-columns: minmax(0, calc(50% - var(--space-3) / 2));
        justify-content: center;
    }

    .partner-card {
        width: auto;
        padding: var(--space-4) var(--space-3) var(--space-3);
    }

    .partner-card .partner-mark__media {
        height: 72px;
    }

    .partner-card .partner-mark__media img {
        max-height: 56px;
    }
}

/* --- Become a sponsor ------------------------------------------------------- */

.sponsor-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4) var(--space-6);
    margin-top: var(--space-8);
    padding: var(--space-6) clamp(var(--space-5), 3vw, var(--space-7));
    background: #fff;
    border: 1px solid var(--border-default);
    border-inline-start: 4px solid var(--red-600);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.sponsor-cta__copy {
    flex: 1 1 22rem;
    min-width: 0;
}

.sponsor-cta__title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-xl);
    color: var(--text-primary);
}

.sponsor-cta__text {
    margin: 0;
    color: var(--text-secondary);
}

@media (max-width: 30em) {
    .sponsor-cta__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .partner-card,
    .partner-card::before {
        transition: none;
    }

    .partner-card--link:hover,
    .partner-card--link:focus-visible {
        transform: none;
    }
}

.partners__pending {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    max-width: 44rem;
    margin-inline: auto;
    padding: var(--space-6);
    text-align: center;
    background: var(--surface-0);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}

/* Marks the pending state with a shape as well as a colour; the sentence
 * beside it says "pending" in words either way. */
.partners__pending-mark {
    flex: none;
    width: 10px;
    height: 10px;
    background: var(--gold-500);
    border-radius: 50%;
}

.partners__pending-text {
    margin: 0;
    color: var(--text-secondary);
}

/* =========================================================================
   3. Shared page hero
   ========================================================================= */

.page-hero {
    padding-block: var(--space-7);
    background: linear-gradient(
        160deg,
        var(--navy-900) 0%,
        var(--navy-950) 100%
    );
    color: var(--text-inverse);
}

.page-hero__title {
    margin: 0;
    font-size: var(--text-3xl);
    font-weight: 800;
}

/* At 800 weight the longest Armenian title words ("քաղաքականություններ" on
   Documents) are wider than a 320px phone at the 3xl size and would break
   mid-word, so the smallest phones get the next step down. */
@media (max-width: 24em) {
    .page-hero__title {
        font-size: var(--text-2xl);
    }
}

.page-hero__lead {
    margin: var(--space-4) 0 0;
    max-width: 62ch;
    font-size: var(--text-lg);
    color: var(--text-inverse-muted);
}

/* =========================================================================
   4. About
   ========================================================================= */

.about-intro {
    padding-block: var(--section-spacing);
    background: var(--navy-950);
    color: var(--text-inverse);
    --border-default: var(--border-inverse);
    --text-primary: var(--text-inverse);
    --text-secondary: var(--text-inverse-muted);
    --text-muted: var(--white-50);
    --focus-ring: var(--gold-400);
}

.about-intro__grid {
    display: grid;
    gap: var(--space-7);
    align-items: start;
}

.about-intro__badge-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-7) var(--space-5) var(--space-5);
    background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
    border: 1px solid var(--border-inverse);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.about-intro__founded {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: var(--space-3) var(--space-5);
    background: var(--accent-primary);
    color: #fff;
}

.about-intro__founded span {
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.about-intro__founded strong {
    font-size: var(--text-2xl);
    line-height: 1.1;
}

.about-intro__logo {
    width: min(100%, 15rem);
    height: auto;
    border-radius: 50%;
}

.about-intro__caption {
    margin: 0;
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    color: var(--white-70);
}

.about-intro__badge-card .flag-rule {
    width: 8rem;
    border-radius: 2px;
}

.about-pillars {
    margin-top: var(--space-6);
}

.pillar {
    padding: var(--space-4) var(--space-5);
    background: var(--white-06);
    border-left: 4px solid var(--border-inverse);
    border-radius: var(--radius-md);
}

.pillar--red { border-left-color: var(--red-600); }
.pillar--blue { border-left-color: var(--blue-500); }
.pillar--gold { border-left-color: var(--gold-500); }

.pillar__title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-400);
}

.pillar p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-inverse-muted);
}

@media (min-width: 62em) {
    .about-intro__grid {
        grid-template-columns: 0.85fr 1.15fr;
        gap: var(--space-8);
    }
}

.timeline {
    display: grid;
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline__item {
    display: grid;
    gap: var(--space-2);
    padding-left: var(--space-6);
    border-left: 2px solid var(--border-default);
    position: relative;
}

.timeline__item::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    left: -7px;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.timeline__year {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-secondary);
}

.timeline__title {
    margin: 0 0 var(--space-1);
    font-size: var(--text-lg);
}

.timeline__body p {
    margin: 0;
    color: var(--text-secondary);
}

@media (min-width: 48em) {
    .timeline__item {
        grid-template-columns: 8rem 1fr;
        align-items: baseline;
        gap: var(--space-5);
    }
}

.about-pending {
    margin-top: var(--space-7);
    padding: var(--space-5);
    background: var(--bg-subtle);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}

.about-pending__title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-lg);
}

.about-pending__intro {
    color: var(--text-secondary);
}

.about-pending__list {
    display: grid;
    gap: var(--space-3);
}

.about-pending__list li {
    padding-left: var(--space-5);
    position: relative;
    color: var(--text-secondary);
}

.about-pending__list li::before {
    content: "\26A0";
    position: absolute;
    left: 0;
    color: #96591a;
}

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

.story-block__figure {
    margin: 0;
}

.story-block__figure figcaption {
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

@media (min-width: 48em) {
    .story-block {
        grid-template-columns: 1.2fr 1fr;
        gap: var(--space-7);
    }

    .story-block--reversed .story-block__figure {
        order: 2;
    }
}

.cta-band {
    background: var(--navy-900);
    color: var(--text-inverse);
    --text-primary: var(--text-inverse);
    --text-secondary: var(--text-inverse-muted);
    --border-default: var(--border-inverse);
    --focus-ring: var(--gold-400);
}

.cta-band__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}

.cta-band__inner p {
    margin: 0;
    max-width: 52ch;
    color: var(--text-inverse-muted);
}

/* =========================================================================
   5. Leadership
   ========================================================================= */

.leadership-grid {
    align-items: stretch;
    /* `auto-fill` rather than grid--3's `auto-fit`, for every group: auto-fit
     * collapses empty tracks, so a group of one or two leaders stretched its
     * cards across the row and their portraits grew (548x725 for a pair on a
     * desktop against 357x471 in a full row). Keeping the tracks makes a card
     * the same size in every group at a given viewport; on a phone the single
     * track still takes the full width. This replaces the old one-leader-only
     * `--single` modifier. */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.page-leadership .section--subtle {
    background: var(--bg-subtle);
}

/* =========================================================================
   6. Clubs directory
   ========================================================================= */

.directory {
    display: grid;
    gap: var(--space-6);
    align-items: start;
}

.directory__count {
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.address-list {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.address-list__title {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-400);
}

.address-list__value {
    margin: var(--space-1) 0 var(--space-2);
}

/* --- Where to train ---------------------------------------------------------- */

/* The way in, at the top of the clubs directory. */
.venue-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: var(--space-4) var(--space-5);
    color: var(--text-inverse);
    text-decoration: none;
    background:
        radial-gradient(90% 160% at 100% 0%, rgba(214, 16, 50, 0.3) 0%, transparent 60%),
        linear-gradient(135deg, var(--navy-950), var(--navy-800));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--duration-base) var(--easing),
        box-shadow var(--duration-base) var(--easing);
    --focus-ring: var(--gold-400);
}

.venue-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.venue-banner__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--navy-950);
    background: var(--gold-400);
    border-radius: 50%;
}

.venue-banner__copy {
    display: grid;
    gap: var(--space-1);
    min-width: 0;
}

.venue-banner__title {
    font-size: var(--text-xl);
    font-weight: 700;
}

.venue-banner__text {
    font-size: var(--text-sm);
    color: var(--white-70);
}

.venue-banner__arrow {
    margin-left: auto;
    font-size: var(--text-2xl);
    color: var(--gold-400);
    transition: transform var(--duration-base) var(--easing);
}

.venue-banner:hover .venue-banner__arrow {
    transform: translateX(4px);
}

/* Quick jumps to each region, as chips. */
.venue-jump {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.venue-jump__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 40px;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--surface-0);
    border: 1px solid var(--border-default);
    border-radius: 999px;
}

.venue-jump__link:hover {
    border-color: var(--gold-500);
}

.venue-jump__count {
    display: inline-grid;
    place-items: center;
    min-width: 1.6rem;
    padding: 0 var(--space-1);
    font-size: var(--text-xs);
    color: #fff;
    background: var(--navy-800);
    border-radius: 999px;
}

.venue-region {
    margin-bottom: var(--space-8);
    scroll-margin-top: 6rem;
}

.venue-place {
    margin: var(--space-5) 0 var(--space-3);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-secondary);
}

.venue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-4);
}

.venue-grid--club {
    margin-bottom: var(--space-6);
}

.venue-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--surface-0);
    border: 1px solid var(--border-default);
    border-top: 3px solid var(--red-600);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.venue-card__place {
    margin: 0;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-700);
}

.venue-card__address {
    display: flex;
    gap: var(--space-2);
    margin: 0;
    font-size: var(--text-base);
    line-height: var(--leading-snug);
    overflow-wrap: anywhere;
}

.venue-card__pin {
    flex: none;
    margin-top: 2px;
    color: var(--red-600);
}

.venue-card__facts {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    font-size: var(--text-sm);
}

.venue-card__facts dt {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.venue-card__facts dd {
    margin: 0;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.venue-card__hours {
    display: block;
}

.venue-card__hours--ask {
    color: var(--text-muted);
}

/* Pushed to the bottom so the buttons line up across a row of cards. */
.venue-card__map {
    align-self: flex-start;
    margin-top: auto;
}

.venue-contact {
    margin-top: var(--space-4);
}

@media (prefers-reduced-motion: reduce) {
    .venue-banner,
    .venue-banner__arrow {
        transition: none;
    }

    .venue-banner:hover,
    .venue-banner:hover .venue-banner__arrow {
        transform: none;
    }
}

@media (max-width: 30em) {
    .venue-banner__arrow {
        display: none;
    }
}

/* =========================================================================
   7. Detail layouts
   ========================================================================= */

.detail-layout {
    display: grid;
    gap: var(--space-6);
    align-items: start;
    margin-top: var(--space-5);
}

.detail-media {
    margin-bottom: var(--space-5);
}

/* --- Pictures shown whole ------------------------------------------------ */
/*
 * A box of fixed proportions that never crops what it holds: the picture is
 * contained, and the bars left over are filled with a blurred, darkened copy
 * of the same picture (set as --media-fit-bg by the template).
 */
.media-fit::before,
.article-cover::before {
    content: "";
    position: absolute;
    inset: -24px;
    background: var(--media-fit-bg) center / cover no-repeat;
    filter: blur(22px) brightness(0.7);
    transform: scale(1.05);
}

.ratio-16x9.media-fit > img {
    position: relative;
    object-fit: contain;
}

/* The article page: the picture at its own proportions, capped in height so a
 * tall poster does not push the text below the fold. */
.article-cover {
    position: relative;
    display: flex;
    justify-content: center;
    margin-inline: 0;
    overflow: hidden;
    background: var(--navy-800);
    border-radius: var(--radius-md);
}

.article-cover > img {
    position: relative;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(80vh, 900px);
}

/* --- Athlete photographs: the portrait, then the rest, one at a time --- */

.athlete-slider__viewport {
    /* One photograph per view, so no gap and no peeking neighbour. */
    gap: 0;
    padding-bottom: 0;
    border-radius: var(--radius-md);
}

.athlete-slider__slide {
    flex: 0 0 100%;
}

.athlete-slider__open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.athlete-slider__open img {
    object-fit: cover;
}

.athlete-slider__controls {
    align-items: center;
    justify-content: space-between;
}

.athlete-slider__status {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.detail-layout__aside {
    padding: var(--space-5);
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
}

.detail-layout__aside .rule-heading:first-child {
    margin-top: 0;
}

@media (min-width: 62em) {
    .detail-layout {
        grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.9fr);
        gap: var(--space-7);
    }

    .detail-layout--profile {
        grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr);
    }

    .detail-layout--profile .detail-layout__aside {
        padding: 0;
        background: transparent;
    }
}

.event-detail__status {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.pull-quote {
    margin: var(--space-6) 0;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-subtle);
    border-left: 4px solid var(--accent-highlight);
    border-radius: var(--radius-md);
    font-size: var(--text-lg);
    font-style: italic;
}

/* =========================================================================
   8. News
   ========================================================================= */

.news-detail__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.rich-text {
    margin-top: var(--space-6);
}

.rich-text p {
    max-width: 68ch;
}

/* =========================================================================
   9. Documents
   ========================================================================= */

.document-group {
    margin-bottom: var(--space-7);
}

.document-list {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.document-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.document-row--superseded {
    border-style: dashed;
    background: var(--bg-subtle);
}

.document-row__main {
    flex: 1 1 20rem;
    min-width: 0;
}

.document-row__title {
    margin: 0 0 var(--space-3);
    font-size: var(--text-lg);
}

.document-row__meta {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
}

.document-row__meta dt {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.document-row__meta dd {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
}

.document-row__status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    flex: 0 1 auto;
}

.document-row__status .status-pill {
    margin: 0;
}

/* =========================================================================
   10. Membership
   ========================================================================= */

/* The page explains who may apply and links to the external Google Form;
   nothing is collected here. */

.membership-apply {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
    align-items: start;
}

@media (min-width: 62em) {
    .membership-apply {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    }
}

.membership-apply__action {
    margin: var(--space-6) 0 var(--space-3);
}

.membership-apply__note {
    margin: 0 0 var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.membership-apply__aside {
    padding: var(--space-6);
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.membership-apply__aside-title {
    margin: 0 0 var(--space-3);
    font-size: var(--text-base);
}

.membership-apply__aside-title + * {
    margin-bottom: var(--space-6);
}

.membership-apply__plans {
    display: grid;
    gap: var(--space-3);
}

.membership-apply__plans li {
    display: grid;
    gap: 2px;
}

.membership-apply__plans span {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.membership-apply__steps {
    margin: 0;
    padding-left: 1.25em;
    display: grid;
    gap: var(--space-2);
}

.contact-form__intro {
    margin: 0 0 var(--space-5);
    color: var(--text-secondary);
}

/* Honeypot: off-screen for people, aria-hidden for screen readers. Not
   display:none, which some scripts check for before filling a field. */
.form-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-success {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin: 0 0 var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: #e7f5ec;
    border: 1px solid #1b7f3b;
    border-radius: var(--radius-md);
    color: #12512a;
    outline: none;
}

.form-success__icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #1b7f3b;
    color: #fff;
    font-weight: 700;
}

.form-success__text {
    margin: 0;
    font-weight: 600;
}

.field--invalid input,
.field--invalid textarea,
.field--invalid select {
    border-color: #b3261e;
    box-shadow: 0 0 0 1px #b3261e;
}

.contact-form .field input:not([type="checkbox"]),
.contact-form .field textarea,
.contact-form .field select {
    width: 100%;
}

.contact-form {
    position: relative;
    display: grid;
    /* Same reason as .contact-layout: an auto track sizes to the inputs'
       intrinsic width, which is wider than a 320px phone's content box. */
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
}

/* =========================================================================
   11. Gallery
   ========================================================================= */

.gallery-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.gallery-card {
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-card__link {
    display: grid;
    height: 100%;
    text-decoration: none;
}

.gallery-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--navy-800);
}

.gallery-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-card__body {
    display: grid;
    gap: var(--space-2);
    align-content: start;
    padding: var(--space-4) var(--space-5) var(--space-5);
}

.gallery-card__title {
    font-size: var(--text-lg);
    font-weight: 700;
}

.gallery-card__summary {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.gallery-card__link:hover .gallery-card__title {
    text-decoration: underline;
}

.gallery-card .tag {
    justify-self: start;
}

@media (min-width: 62em) {
    .gallery-card--feature {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.lightbox-grid {
    display: grid;
    gap: var(--space-4);
    margin: var(--space-6) 0 0;
    padding: 0;
    list-style: none;
    /* auto-fill so one or two pictures keep their size instead of stretching
       across the row (an album or athlete profile with a single photograph). */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.lightbox-grid__button {
    display: grid;
    gap: var(--space-2);
    width: 100%;
    padding: 0;
    text-align: left;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.lightbox-grid__button .ratio-4x3 {
    display: block;
}

.lightbox-grid__caption {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* =========================================================================
   12. Contact
   ========================================================================= */

.contact-layout {
    display: grid;
    /* minmax(0, 1fr) rather than the implicit auto column: an auto track
       grows to its widest unbreakable content, which pushed the page 3px
       past a 375px phone screen. */
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
    align-items: start;
}

.contact-layout__info .rule-heading:first-child {
    margin-top: 0;
}

.contact-channels {
    display: grid;
    gap: 0;
    margin: 0 0 var(--space-5);
}

.contact-channels__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--border-default);
}

.contact-channels dt {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-channels dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

/* --- Official map link --------------------------------------------------- */

.map-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    text-decoration: none;
    color: var(--accent-secondary);
}

.map-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.map-link__icon {
    flex: none;
    width: 1.15em;
    height: 1.15em;
    fill: currentColor;
}

/* --- Official social media ---------------------------------------------- */
/* Cards wrap into as many columns as fit, one per row on narrow screens. */

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: var(--space-3);
    margin: 0 0 var(--space-5);
    padding: 0;
    list-style: none;
}

.social-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    height: 100%;
    min-height: var(--touch-target);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition:
        border-color var(--duration-fast) var(--easing),
        color var(--duration-fast) var(--easing);
}

.social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* The site-wide :focus-visible outline needs room around the card. */
.social-link:focus-visible {
    outline-offset: var(--focus-offset);
}

.social-link__icon {
    flex: none;
    width: 1.6rem;
    height: 1.6rem;
    fill: currentColor;
}

.social-link__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.social-link__label {
    font-weight: 700;
}

.social-link__handle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.contact-layout__form {
    padding: var(--space-6);
    background: var(--bg-subtle);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.contact-layout__form .rule-heading:first-child {
    margin-top: 0;
}

/* On the smallest phones the card's padding plus the large button's padding
   left too little room for "Ուղարկել հաղորդագրություն", whose longest word
   then pushed the page sideways. */
@media (max-width: 24em) {
    .contact-layout__form {
        padding: var(--space-4);
    }

    .contact-layout__form .btn--large {
        padding-inline: var(--space-4);
    }
}

@media (min-width: 62em) {
    .contact-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* =========================================================================
   13. Component showcase (development only)
   ========================================================================= */

.component-showcase-page .rule-heading {
    margin-top: var(--space-7);
}


/* Partner marks: shared pieces. The main sponsor's spotlight is styled with
 * the showcase above (.sponsor-spotlight). */

/* Text-only fallback: a partner whose approved logo has not arrived.
 *
 * Set as a wordmark rather than left as bare text so that a logo added
 * later does not change the height of the row it sits in. */
.partner-mark__wordmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-inline: var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--text-secondary);
}

.partner-mark--main .partner-mark__wordmark {
    min-height: 64px;
    font-size: var(--text-lg);
    color: var(--text-primary);
}


/* --- Medalists ------------------------------------------------------------------ */

.medalist-list {
    display: grid;
    gap: var(--space-6);
}

.medalist-row {
    display: grid;
    gap: var(--space-5);
    align-items: start;
}

@media (min-width: 48em) {
    .medalist-row {
        grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    }
}

.medalist-row__title {
    margin: 0 0 var(--space-3);
    font-size: var(--text-lg);
}

.medalist-row__list {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding-left: 1.2rem;
}
