/* ==========================================================================
   Bangladesh Fencing Federation
   Dark, layered theme. Change the colours below to re-skin the whole site.
   ========================================================================== */

:root {
    --bg: #06140d;
    --bg-raised: #0a1f14;
    --band-from: #0a6233;
    --band-to: #0d8a45;

    --green: #25c26e;
    --red: #e5263d;
    --red-dark: #c41c31;
    --amber: #f5b301;

    --heading: #ffffff;
    --text: #c5d3ca;
    --muted: #8da397;

    --panel: rgba(255, 255, 255, 0.05);
    --panel-strong: rgba(3, 16, 10, 0.55);
    --line: rgba(255, 255, 255, 0.12);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    --radius: 12px;
    --radius-lg: 20px;
    --container: 1240px;
    --header-space: 140px;

    /* Redesigned pages */
    --ink: #174d40;
    --ink-soft: #3d5f55;
    --forest: #184f42;
    --forest-deep: #0f3a2f;
    --mint: #dff3e2;
    --emerald: #087a52;
    --leaf: #17693f;
    --chip: #22a05b;
    --paper: #f7f7f7;
}

/* Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3 {
    margin: 0 0 0.5em;
    color: var(--heading);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-wrap: balance;
}

p {
    margin: 0 0 1em;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--green);
    text-underline-offset: 0.18em;
}

a:hover {
    color: #fff;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -80px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--bg);
    font-weight: 600;
}

.skip-link:focus {
    top: 12px;
    color: var(--bg);
}

/* Buttons, tags, small type
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    padding: 0.7em 1.35em;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn--primary {
    background: #fff;
    color: var(--bg);
}

.btn--primary:hover {
    background: var(--green);
    color: var(--bg);
}

/* Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    padding-block: 30px 14px;
    transition: padding 0.2s, background-color 0.2s, box-shadow 0.2s;
}

/* Once the page has scrolled, the bar tightens up and turns solid so the
   content passing underneath does not show through. */
.site-header.is-scrolled {
    padding-block: 10px;
    background: rgba(0, 0, 0, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Keep in-page targets clear of the fixed bar. */
:target,
#main {
    scroll-margin-top: 110px;
}

.site-header__container {
    max-width: 1160px;
}

.navbar {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3.5vw, 50px);
}

.brand {
    flex: none;
}

.brand img {
    width: 64px;
    transition: width 0.2s;
}

.is-scrolled .brand img {
    width: 48px;
}

.site-nav {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-width: 0;
}

.site-nav__list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    max-width: 764px;
    padding: 6px clamp(14px, 3vw, 36px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.site-nav__cta {
    flex: none;
}

.site-nav__item {
    position: relative;
}

.site-nav__link {
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 10px 6px;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s;
}

.site-nav__link:hover {
    color: var(--green);
}

.site-nav__link[aria-current="page"],
.site-nav__link.is-active {
    color: var(--green);
}

.site-nav__trigger::after {
    content: "";
    width: 0.38em;
    height: 0.38em;
    margin-top: -0.2em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.site-nav__menu {
    position: absolute;
    top: 100%;
    left: -12px;
    display: none;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #07130d;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.site-nav__item--has-menu:hover .site-nav__menu,
.site-nav__item--has-menu:focus-within .site-nav__menu,
.site-nav__item--has-menu.is-open .site-nav__menu {
    display: block;
}

.site-nav__menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
}

.site-nav__menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.site-nav__menu a[aria-current="page"] {
    color: var(--green);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 20px;
    height: 2px;
    margin-inline: auto;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.2s, background-color 0.2s;
}

.nav-toggle__bars {
    position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle__bars::before {
    top: -6px;
}

.nav-toggle__bars::after {
    top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1179px) {
    .site-header {
        padding-block: 16px;
    }

    .brand img {
        width: 52px;
    }

    .navbar {
        flex-wrap: wrap;
        gap: 0 12px;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        flex: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
        margin-top: 12px;
        padding: 12px 16px 16px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(4, 12, 8, 0.97);
        /* The bar is fixed, so a long open menu scrolls inside itself. */
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }

    /* Only collapse the menu when the script that can reopen it has loaded. */
    .js .site-nav {
        display: none;
    }

    .js .site-nav.is-open {
        display: flex;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
        padding: 0;
        border: 0;
        background: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .site-nav__link {
        width: 100%;
        padding: 12px 4px;
        font-size: 1rem;
    }

    /* The dropdowns are always expanded inside the mobile menu. */
    .site-nav__trigger {
        color: var(--muted);
        cursor: default;
        pointer-events: none;
    }

    .site-nav__trigger::after {
        display: none;
    }

    .site-nav__menu {
        position: static;
        display: block;
        padding: 0 0 6px 14px;
        border: 0;
        background: none;
        box-shadow: none;
    }

    .site-nav__cta {
        align-self: flex-start;
    }
}

/* Page header
   ========================================================================== */

/* The photo sits in the middle of a black band and fades into it at the edges. */
.page-header {
    position: relative;
    padding-top: var(--header-space);
    background-color: #000;
    background-repeat: no-repeat;
    background-size: min(900px, 100%) auto;
    background-position: center 65%;
    text-align: center;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 45% 85% at 50% 60%, rgba(0, 0, 0, 0.55), #000 100%);
}

.page-header .container {
    position: relative;
    padding-block: clamp(28px, 4vw, 56px) clamp(56px, 7vw, 96px);
}

.page-header__title {
    margin-bottom: 0.35em;
    color: var(--mint);
    font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.page-header__lead {
    max-width: 40ch;
    margin-inline: auto;
    color: #fff;
    font-size: 0.98rem;
}

/* Contact
   ========================================================================== */

/* The redesigned Contact page sits on a light section with a deep green form card. */
.contact {
    display: grid;
    grid-template-columns: 1fr minmax(0, 480px);
    align-items: start;
    gap: clamp(32px, 6vw, 64px);
}

@media (max-width: 899px) {
    .contact {
        grid-template-columns: 1fr;
    }
}

.contact-section .kicker {
    margin-bottom: 1rem;
    color: var(--ink);
}

.contact__title {
    margin-bottom: 0;
    padding-bottom: 0.8em;
    border-bottom: 1px solid var(--ink);
    color: var(--ink);
    font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.5rem);
    line-height: 1.2;
}

.contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 40px;
    margin: 36px 0 0;
}

@media (max-width: 479px) {
    .contact-list {
        grid-template-columns: 1fr;
    }
}

.contact-list dt {
    color: var(--ink);
    font-size: 0.85rem;
    font-weight: 600;
}

.contact-list dd {
    margin: 14px 0 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.contact__form {
    padding: clamp(22px, 4vw, 32px) clamp(18px, 3vw, 24px);
    border-radius: 10px;
    background: var(--forest);
    scroll-margin-top: 100px;
}

.contact__form-title {
    margin-bottom: 0.9em;
    color: #fff;
    font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.65rem);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.form {
    display: grid;
    gap: 10px;
}

.form__trap {
    position: absolute;
    left: -9999px;
}

.field {
    width: 100%;
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    padding: 0.75em 1em;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.92rem;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #9aa8a2;
}

.field textarea {
    min-height: 80px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: 3px solid rgba(37, 194, 110, 0.55);
    outline-offset: 0;
}

.field [aria-invalid="true"] {
    border-color: #ff7a8a;
}

.field__error {
    margin: 6px 0 0;
    color: #ffc4cb;
    font-size: 0.88rem;
}

.contact__submit {
    justify-self: center;
    min-width: min(100%, 170px);
    margin-top: 14px;
    border-color: #d5ddd9;
    color: var(--ink);
}

.contact__submit:hover {
    border-color: var(--green);
}

.alert {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-weight: 500;
}

.alert--success {
    border: 1px solid rgba(37, 194, 110, 0.5);
    background: rgba(37, 194, 110, 0.14);
    color: #c9f5dc;
}

.alert--error {
    border: 1px solid rgba(255, 122, 138, 0.5);
    background: rgba(229, 38, 61, 0.14);
    color: #ffc4cb;
}

.contact-map {
    line-height: 0;
    background: #e8ece9;
}

.contact-map iframe {
    width: 100%;
    height: clamp(300px, 42vw, 460px);
    border: 0;
}

/* Coming soon and error pages
   ========================================================================== */

.soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 760px;
    text-align: center;
}

.soon__emblem {
    width: 96px;
    margin-bottom: 28px;
}

.soon__lead {
    margin: 1.2rem 0 0.6rem;
    color: var(--ink);
    font-size: 1.15rem;
}

.soon__note {
    color: var(--ink-soft);
}

.soon__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

/* Redesigned pages: shared pieces
   ========================================================================== */

.section-light {
    padding-block: clamp(64px, 8vw, 120px);
    background: #fff;
    color: var(--ink-soft);
}

.section-light--grey {
    background: var(--paper);
}

.section-green {
    padding-block: clamp(64px, 8vw, 110px);
    background: var(--forest);
    color: #e6f2ea;
}

.kicker {
    margin: 0 0 0.6rem;
    color: var(--ink);
    font-size: clamp(0.85rem, 0.78rem + 0.3vw, 1.05rem);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-green .kicker {
    color: #fff;
}

.heading {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: 0;
    text-transform: none;
}

.heading--light {
    color: var(--mint);
}

.section-heading {
    margin-bottom: clamp(36px, 5vw, 60px);
    text-align: center;
}

.section-heading--split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-align: left;
}

.section-heading__lead {
    max-width: 46ch;
    margin: 1.2rem auto 0;
    color: var(--ink);
    font-size: 1.05rem;
}

.bullet-title {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin: 0 0 1rem;
    color: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
}

.bullet-title::before {
    content: "";
    flex: none;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

.section-light .bullet-title {
    color: var(--ink);
}

.center-action {
    margin-top: clamp(40px, 5vw, 64px);
    text-align: center;
}

.empty-note {
    padding: 40px 20px;
    border: 1px dashed #c9d6cf;
    border-radius: 16px;
    color: var(--ink-soft);
    text-align: center;
}

.btn--light {
    padding: 0.85em 1.8em;
    border: 1px solid #cfe3d6;
    background: #fff;
    color: var(--ink);
    font-weight: 500;
}

.btn--light:hover {
    background: var(--mint);
    color: var(--ink);
}

.btn--dark {
    padding: 0.85em 2em;
    background: var(--forest);
    color: #fff;
    font-weight: 500;
}

.btn--dark:hover {
    background: var(--leaf);
    color: #fff;
}

.btn--green {
    padding: 0.9em 1.7em;
    background: var(--leaf);
    color: #fff;
    font-weight: 500;
}

.btn--green:hover,
.btn--green[aria-current="page"] {
    background: #0f5531;
    color: #fff;
}

/* Hero slider (home)
   ========================================================================== */

.hero-slider {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: min(100vh, 880px);
    overflow: hidden;
    background: #000;
    color: #fff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s, visibility 0.8s;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent 45%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.35) 75%);
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    padding-top: var(--header-space);
    padding-bottom: 170px;
}

.hero-slide__eyebrow {
    margin-bottom: 1rem;
    font-size: clamp(0.78rem, 0.7rem + 0.4vw, 1.05rem);
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero-slide__title {
    margin: 0 0 2rem;
    color: #fff;
    font-size: clamp(2.8rem, 1.2rem + 5.6vw, 5.9rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    text-transform: none;
}

.hero-slider__controls {
    position: relative;
    z-index: 1;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    padding-bottom: 44px;
}

.hero-slider__tab {
    position: relative;
    padding: 32px 24px 0 0;
    border: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    background: none;
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.hero-slider__tab::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green);
}

.hero-slider__tab.is-active::before {
    width: 100%;
}

.hero-slider.is-playing .hero-slider__tab.is-active::before {
    animation: slide-progress var(--slide-delay, 6000ms) linear;
}

@keyframes slide-progress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@media (max-width: 599px) {
    .hero-slide__inner {
        padding-bottom: 150px;
    }

    .hero-slider__tab {
        padding-right: 12px;
        font-size: 0.78rem;
    }
}

/* Affiliation logos strip
   ========================================================================== */

.affiliated {
    padding-block: clamp(40px, 5vw, 64px);
    background: #fff;
    text-align: center;
}

.affiliated__title {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    margin: 0 0 36px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.affiliated__title::before,
.affiliated__title::after {
    content: "";
    width: 16px;
    height: 1px;
    background: currentColor;
}

.affiliated__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px clamp(32px, 6vw, 80px);
}

.affiliated__list img {
    width: auto;
    max-width: 250px;
    height: clamp(52px, 4vw + 30px, 72px);
    object-fit: contain;
}

/* About section (home)
   ========================================================================== */

.intro-split {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: end;
    gap: 24px clamp(40px, 6vw, 80px);
    margin-bottom: clamp(36px, 5vw, 56px);
}

.intro-split > p {
    max-width: 46ch;
    font-size: 1.05rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.about-card {
    position: relative;
    padding: clamp(24px, 3vw, 32px);
    overflow: hidden;
    border-radius: 12px;
}

.about-card > * {
    position: relative;
}

.about-card__title {
    margin-bottom: 1em;
    color: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
}

.about-card--story {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    grid-row: span 2;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.about-card--story::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.2) 65%);
}

.about-card--vision {
    background: var(--mint);
    color: var(--leaf);
}

.about-card--mission {
    background: var(--emerald);
    color: #fff;
}

@media (max-width: 899px) {
    .intro-split,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card--story {
        grid-row: auto;
        min-height: 360px;
    }
}

/* Course for any ages (home)
   ========================================================================== */

/* The photo sits behind the middle of the grid, with the six points in two
   columns either side of it. */
.courses__layout {
    display: grid;
    grid-template-columns: minmax(0, 370px) 1fr minmax(0, 370px);
    grid-template-rows: repeat(3, 1fr);
    row-gap: 32px;
}

.courses__photo {
    grid-column: 1 / -1;
    grid-row: 1 / span 3;
    justify-self: center;
    width: min(760px, 62%);
    margin-left: 6%;
}

.courses__item {
    position: relative;
    grid-column: 1;
    grid-row: var(--row);
    align-self: start;
    padding-top: clamp(0px, 4vw, 56px);
    color: var(--forest);
}

.courses__item--end {
    grid-column: 3;
    text-align: right;
}

.courses__title {
    margin-bottom: 0.6em;
    color: var(--forest);
    font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.courses__item p {
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 999px) {
    .courses__layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        gap: 32px 40px;
    }

    .courses__photo {
        grid-row: auto;
        width: min(420px, 100%);
        margin: 0 auto 8px;
    }

    .courses__item,
    .courses__item--end {
        grid-column: auto;
        grid-row: auto;
        padding-top: 0;
        text-align: left;
    }
}

@media (max-width: 599px) {
    .courses__layout {
        grid-template-columns: 1fr;
    }
}

/* Competitions
   ========================================================================== */

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 32px;
}

@media (max-width: 1023px) {
    .event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .event-grid {
        grid-template-columns: 1fr;
    }
}

.event-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e3e8e5;
    border-radius: 18px;
    background: var(--forest);
    color: #fff;
}

.event-card__media {
    aspect-ratio: 373 / 215;
    background: #fff;
}

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

.event-card__body {
    display: flex;
    flex: 1;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 20px;
}

.event-card__info {
    min-width: 0;
}

.event-card__dates {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin: 0 0 14px;
    padding: 0.45em 0.9em;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.event-card__location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 0.72rem;
}

.event-card__location img {
    width: 18px;
}

.event-card__title {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
}

.event-card__category {
    margin: 0;
    color: #d7e6dd;
    font-size: 0.68rem;
}

.event-card__tags {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.event-card__tags li {
    display: flex;
    gap: 4px;
}

.event-card__tags span {
    min-width: 30px;
    padding: 0.3em 0.55em;
    border-radius: 3px;
    background: var(--chip);
    font-size: 0.55rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
}

.event-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    max-width: 1064px;
    margin: 0 auto clamp(40px, 6vw, 88px);
}

.event-filters select {
    width: 100%;
    padding: 0.8em 2.6em 0.8em 1.2em;
    border: 1px solid #e1e5e3;
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23555' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 1.1em center / 10px;
    color: #4f5d57;
    font: inherit;
    font-size: 0.95rem;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.event-filters select:focus {
    border-color: var(--leaf);
    outline: 3px solid rgba(23, 105, 63, 0.25);
    outline-offset: 0;
}

.event-filters noscript {
    grid-column: 1 / -1;
    text-align: center;
}

.event-filters__summary {
    margin: 0 0 28px;
    color: var(--ink-soft);
    text-align: center;
}

.event-filters__summary a {
    color: var(--leaf);
    font-weight: 600;
}

.event-filters__summary a:hover {
    color: var(--ink);
}

@media (max-width: 899px) {
    .event-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 599px) {
    .event-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Members directory
   ========================================================================== */

.member-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 16px;
}

.member-grid--lead {
    grid-template-columns: repeat(3, minmax(0, 290px));
    justify-content: center;
    margin-bottom: 26px;
}

.member-card {
    position: relative;
    aspect-ratio: 290 / 298;
    overflow: hidden;
    border-radius: 14px;
    background: var(--forest);
}

.member-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.member-card__label {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 16px;
    margin: 0;
    padding: 14px 8px;
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: center;
}

.member-card__label strong {
    font-weight: 600;
}

@media (max-width: 1023px) {
    .member-grid,
    .member-grid--lead {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 699px) {
    .member-grid,
    .member-grid--lead {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 479px) {
    .member-grid,
    .member-grid--lead {
        grid-template-columns: 1fr;
    }
}

/* About page
   ========================================================================== */

.president {
    display: grid;
    grid-template-columns: minmax(0, 432px) 1fr;
    align-items: center;
    gap: 40px;
}

.president__photo img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 24px;
    object-fit: cover;
}

.president__message .heading {
    margin-bottom: 1.2rem;
}

.president__message > p {
    color: #666;
    font-size: 0.95rem;
}

.president__quote {
    margin: 0 0 1.6rem;
}

.president__quote p {
    color: #555;
    font-size: 1.05rem;
    font-weight: 600;
}

.president__message > .president__sign {
    width: fit-content;
    margin-left: auto;
    padding-left: 12px;
    border-left: 3px solid var(--ink);
    color: var(--ink);
    font-size: 1.15rem;
    line-height: 1.2;
}

.president__sign strong {
    font-size: 1.6rem;
    font-weight: 600;
}

@media (max-width: 899px) {
    .president {
        grid-template-columns: 1fr;
    }

    .president__photo {
        max-width: 420px;
    }
}

.story__inner {
    display: grid;
    grid-template-columns: 1fr 2.4fr;
    gap: 32px 60px;
}

.story__aside p {
    max-width: 28ch;
    font-size: 0.92rem;
}

.story__body {
    padding-top: 32px;
}

.story__lead {
    margin-bottom: 1.6rem;
    color: var(--mint);
    font-size: clamp(1.2rem, 1rem + 0.8vw, 1.55rem);
    font-weight: 600;
    line-height: 1.3;
}

.story__body > p:not(.story__lead) {
    color: #d8e6de;
    font-size: 0.9rem;
    line-height: 1.9;
}

.story__quote {
    margin: 2.2rem 0 0;
    padding: 18px 0 18px 28px;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
}

.story__quote p {
    margin-bottom: 0.8rem;
    color: var(--mint);
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
    font-style: italic;
    font-weight: 600;
}

.story__quote footer {
    color: #b9cfc3;
    font-size: 1.1rem;
}

@media (max-width: 899px) {
    .story__inner {
        grid-template-columns: 1fr;
    }

    .story__body {
        padding-top: 0;
    }
}

.purpose {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px clamp(40px, 10vw, 200px);
}

.purpose__item--end {
    text-align: right;
}

.purpose__item--end .bullet-title {
    justify-content: flex-end;
}

.purpose__subtitle {
    margin-bottom: 1.6rem;
    color: var(--ink);
    font-size: 0.92rem;
}

.purpose__text {
    color: var(--ink);
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
    font-weight: 500;
    line-height: 1.6;
}

@media (max-width: 799px) {
    .purpose {
        grid-template-columns: 1fr;
    }

    .purpose__item--end {
        text-align: left;
    }

    .purpose__item--end .bullet-title {
        justify-content: flex-start;
    }
}

/* Join band (call to action)
   ========================================================================== */

.join {
    position: relative;
    overflow: hidden;
    background: var(--forest-deep);
    color: #e6f2ea;
}

/* The photo fills the right-hand side, cut on a diagonal. */
.join::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 53%;
    background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)), var(--join-photo) center / cover no-repeat;
    clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%);
}

.join .container {
    position: relative;
    z-index: 1;
    padding-block: clamp(56px, 7vw, 90px);
}

.join__content {
    max-width: 600px;
}

.join__title {
    margin-bottom: 1.4rem;
    color: var(--mint);
    font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.9rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
}

.join p {
    margin-bottom: 2rem;
    font-size: 1.02rem;
}

@media (max-width: 899px) {
    .join::after {
        width: 100%;
        clip-path: none;
        opacity: 0.25;
    }
}

/* Footer
   ========================================================================== */

.site-footer {
    border-bottom: 6px solid var(--red-dark);
    background: #031208;
    color: #e6efe9;
    font-size: 0.92rem;
}

.site-footer__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: clamp(40px, 6vw, 56px);
    text-align: center;
}

.site-footer__logo {
    display: inline-block;
    margin-bottom: 20px;
}

.site-footer__logo img {
    width: 64px;
}

.site-footer__title {
    max-width: 24ch;
    margin: 0;
    color: #e6f5ea;
    font-size: clamp(1.4rem, 1.05rem + 1.4vw, 1.9rem);
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    text-wrap: balance;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.7fr;
    gap: 32px clamp(32px, 6vw, 80px);
    padding-block: clamp(36px, 5vw, 48px);
}

@media (max-width: 767px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}

.site-footer__heading {
    margin-bottom: 16px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.site-footer__grid p {
    max-width: 36ch;
}

.site-footer__links {
    display: grid;
    gap: 2px;
    overflow-wrap: anywhere;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--green);
}

.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 18px;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.site-footer__bottom p {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
