:root {
  color-scheme: dark;
  --void: #090b08; --ink: #f6f1df; --soft: #c8c5b1; --dim: #a0a28f;
  --olive: #171c13; --surface: #20271b; --line: rgba(219,210,170,.2);
  --gold: #dbc47e; --gold-dark: #9f894c;
  --mono: ui-monospace,"Cascadia Mono",Consolas,monospace;
  --ui: "Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; --max: 1280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--void); color: var(--ink); font: 16px/1.55 var(--ui); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img, video { display: block; max-width: 100%; }
.shell { width: min(var(--max),calc(100% - 48px)); margin: auto; }
.mono, .eyebrow, .nav a, .number { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.skip { position: fixed; z-index: 100; left: 14px; top: -100px; background: var(--gold); padding: 10px; color: #15170f; }
.skip:focus { top: 14px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* Masthead: retain identity and the gallery link on small screens. */
.mast { position: absolute; z-index: 10; left: 0; right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.mast .shell { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mark { display: inline-flex; align-items: center; gap: 13px; min-height: 44px; flex-shrink: 0; }
.mark .bar { width: 4px; height: 25px; background: var(--gold); box-shadow: 8px 0 0 rgba(219,196,126,.35); }
.mark b { font-size: 17px; letter-spacing: .2em; font-weight: 650; }
.mark span { font: 10px var(--mono); letter-spacing: .16em; color: var(--gold); }
.mark .tagline { font-size: inherit; }
.nav { display: flex; align-items: center; gap: 25px; }
.nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; font-size: 10px; color: var(--soft); transition: color .2s; }
.nav a:hover { color: var(--gold); }
.nav .join-nav { color: #14160e; background: var(--gold); padding: 10px 13px; font-weight: 700; }

/* Background music control: sits with the nav, keeps a 44px target everywhere. */
.music-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 44px; padding: 10px 13px; border: 1px solid var(--line); background: transparent; color: var(--soft); font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.music-toggle:hover { color: var(--gold); border-color: var(--gold); }
.music-toggle[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #14160e; }
.music-note { font-size: 15px; line-height: 1; }
.music-toggle[aria-pressed="true"] .music-note { animation: note-pulse 1.8s ease-in-out infinite; }
@keyframes note-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .4 } }

/* Hero */
.hero { position: relative; min-height: 760px; isolation: isolate; display: flex; align-items: end; padding: 142px 0 110px; overflow: hidden; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg,rgba(7,9,6,.94) 0%,rgba(7,9,6,.73) 34%,rgba(7,9,6,.14) 73%),linear-gradient(0deg,rgba(7,9,6,.96) 0%,transparent 43%,rgba(7,9,6,.24) 100%); }
.hero-copy { max-width: 790px; }
.eyebrow { color: var(--gold); font-size: 11px; margin: 0 0 23px; }
.hero h1 { font-size: clamp(52px,8.3vw,112px); line-height: .91; letter-spacing: -.065em; margin: 0 0 27px; max-width: 8.7ch; font-weight: 760; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .intro { max-width: 590px; font-size: 19px; color: var(--soft); margin: 0 0 34px; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.button { border: 1px solid rgba(255,255,255,.38); min-height: 48px; padding: 15px 18px; font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 12px; transition: transform .18s,background .18s; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--gold); color: #14160e; border-color: var(--gold); }
.button .arrow { font-size: 17px; line-height: 0; }
.hero-stamp { position: absolute; right: max(24px,calc((100% - var(--max))/2)); bottom: 32px; text-align: right; color: var(--soft); font: 10px/1.7 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.hero-stamp b { display: block; color: var(--gold); font-size: 12px; }

/* Shared section framing */
.section { position: relative; padding: 80px 0; border-top: 1px solid var(--line); }
.section-grid { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 34px; }
.rail .number { font-size: 11px; color: var(--gold); display: block; margin-bottom: 15px; }
.rail h2 { font-size: 24px; line-height: 1.04; letter-spacing: -.04em; margin: 0; }
.section-body { min-width: 0; }
.lede-large { font-size: clamp(24px,3.05vw,43px); line-height: 1.16; letter-spacing: -.037em; max-width: 900px; margin: 0; }
.lede-large strong { color: var(--gold); font-weight: 650; }
.body-copy { max-width: 690px; color: var(--soft); font-size: 17px; margin: 26px 0 0; }
.body-copy p { margin: 0 0 17px; }

/* Uncaptioned archive photographs, shared with the gallery dialog. */
.formation { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.featured-photo { display: block; appearance: none; width: 100%; aspect-ratio: 16/9; min-width: 0; border: 1px solid var(--line); padding: 0; background: #11150d; overflow: hidden; cursor: zoom-in; }
.featured-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.featured-photo:hover img { transform: scale(1.025); }
.field-photo { margin-top: 32px; }

/* Schedule / requirements */
.sunday { display: grid; grid-template-columns: 1.1fr .9fr; border: 1px solid var(--line); background: var(--surface); }
.sunday .time { padding: 32px; }
.time .day { font: 11px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.time strong { display: block; font-size: clamp(56px,7vw,92px); line-height: .92; letter-spacing: -.07em; margin: 14px 0 8px; }
.time p { margin: 0; color: var(--soft); }
.sunday .detail { border-left: 1px solid var(--line); padding: 32px; color: var(--soft); display: flex; align-items: center; }
.standards { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.standards li { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 30px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.standards b { font: 11px/1.5 var(--mono); letter-spacing: .13em; color: var(--gold); text-transform: uppercase; }
.standards span { color: var(--soft); }

/* Recruitment: copy and a bounded widget, not a stretched photo. */
.enlist-panel { margin-top: 32px; display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.enlist-copy { min-width: 0; }
.enlist-copy h3 { font-size: 30px; letter-spacing: -.045em; line-height: 1.04; margin: 0 0 18px; }
.enlist-copy p { color: var(--soft); margin: 0 0 26px; }
.steps { list-style: none; padding: 0; margin: 24px 0; }
.steps li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.steps .step-no { font: 11px var(--mono); color: var(--gold); }
.steps b { display: block; font-size: 14px; }
.steps span { color: var(--dim); font-size: 14px; }
.invite { border: 1px solid var(--gold-dark); background: #15190f; padding: 15px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.invite code { font: 12px var(--mono); color: var(--gold); flex: 1 1 100%; overflow-wrap: anywhere; }
.copy { min-height: 44px; min-width: 44px; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 10px 12px; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.copy:hover { border-color: var(--gold); color: var(--gold); }
.copied { min-height: 1em; font: 11px var(--mono); color: #b9d57f; margin-top: 9px; }
.discord-live { min-width: 0; border: 1px solid var(--line); background: #11150d; padding: 8px; }
.discord-live iframe { width: 100%; height: 500px; border: 0; display: block; }

/* Horizontal gallery */
.gallery-zone { border-top: 1px solid var(--line); background: #0b0e09; padding: 40px 0 16px; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.gallery-head h2 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.archive-context { margin: 7px 0 0; color: var(--soft); font-size: 14px; }
.gallery-controls { display: flex; gap: 8px; flex-shrink: 0; }
.gallery-controls button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px; cursor: pointer; }
.gallery-controls button:hover { border-color: var(--gold); color: var(--gold); }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(42vw,600px); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-color: var(--gold-dark) #11150d; scrollbar-width: thin; padding: 0 max(24px,calc((100vw - var(--max))/2)) 20px; scroll-padding-inline: max(24px,calc((100vw - var(--max))/2)); }
.gallery-item { appearance: none; border: 0; padding: 0; min-width: 0; aspect-ratio: 16/9; overflow: hidden; position: relative; background: #111; cursor: zoom-in; scroll-snap-align: start; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.025); }
.gallery-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -5px; z-index: 1; }
.lightbox { width: min(1600px,calc(100% - 28px)); max-width: none; max-height: calc(100dvh - 28px); margin: auto; padding: 0; border: 1px solid var(--line); background: #080a07; color: var(--ink); }
.lightbox::backdrop { background: rgba(0,0,0,.9); }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 30px); width: auto; height: auto; margin: auto; object-fit: contain; }
.lightbox button { position: absolute; z-index: 1; right: 10px; top: 10px; width: 44px; height: 44px; border: 1px solid var(--line); background: rgba(8,10,7,.9); color: var(--ink); font-size: 25px; line-height: 1; cursor: pointer; }
.lightbox button:hover { border-color: var(--gold); }
body:has(.lightbox[open]) { overflow: hidden; }
footer { padding: 40px 0; background: #070906; color: var(--dim); }
.foot { display: flex; gap: 40px; justify-content: space-between; align-items: end; }
.foot .mark b { color: var(--ink); }
.foot p { max-width: 490px; margin: 0; font-size: 13px; }
.foot a { color: var(--gold); }

@media (max-width: 1100px) {
  .mark .tagline { display: none; }
  .nav { gap: 18px; }
  .enlist-panel { grid-template-columns: minmax(0,1fr) 300px; }
}
@media (max-width: 900px) {
  .enlist-panel { grid-template-columns: 1fr; }
  .discord-live { width: 100%; max-width: 380px; }
}
@media (max-width: 760px) {
  .shell { width: min(calc(100% - 32px),var(--max)); }
  .mast .shell { min-height: 66px; gap: 10px; }
  .mark { gap: 10px; }
  .mark b { font-size: 13px; letter-spacing: .12em; }
  .nav { gap: 8px; }
  .nav a { font-size: 9px; letter-spacing: .07em; }
  .nav a:not(.join-nav):not([href="#gallery"]) { display: none; }
  .nav .join-nav { padding: 10px; }
  .music-toggle { padding: 10px; }
  .music-text { display: none; }
  .hero { min-height: 700px; padding: 114px 0 110px; }
  .hero::after { background: linear-gradient(90deg,rgba(7,9,6,.88),rgba(7,9,6,.3)),linear-gradient(0deg,rgba(7,9,6,.95),transparent 60%); }
  .hero h1 { font-size: clamp(48px,14vw,70px); }
  .hero .intro { font-size: 16px; }
  .hero-stamp { left: 16px; right: 16px; bottom: 28px; text-align: left; font-size: 9px; }
  .section { padding: 52px 0; }
  .section-grid { grid-template-columns: 1fr; gap: 22px; }
  .rail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 13px; }
  .rail .number { margin: 0; }
  .rail h2 { font-size: 22px; }
  .formation { grid-template-columns: 1fr; margin-top: 26px; }
  .sunday { grid-template-columns: 1fr; }
  .sunday .time, .sunday .detail { padding: 26px; }
  .sunday .detail { border-left: 0; border-top: 1px solid var(--line); }
  .standards li { grid-template-columns: 1fr; gap: 7px; }
  .gallery-zone { padding-top: 32px; }
  .gallery-head { align-items: start; gap: 14px; }
  .gallery { grid-auto-columns: 82vw; padding-left: 16px; padding-right: 16px; scroll-padding-inline: 16px; }
  .foot { display: block; }
  .foot p { margin-top: 24px; }
  .button { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
