/* 248 Anthems — The King & Prince · "Marsh Light"
 * Tidal luminism on the brand grid: golden-warmed bone, graphite ink,
 * marsh gold + tidewater blue-gray as thin bands and tints only.
 * Lime stays the signal; orange appears once per screen (the hero ampersand,
 * the low sun in the diagram). Bands of light, hairlines — no kitsch. */

/* ---------- fonts (relative to css/) ---------- */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Inter Variable';
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bone: #F8F4EA;             /* brand bone, warmed toward coastal light */
  --bone-gold: #F2EAD5;        /* marsh-gold tint band */
  --graphite: #1E1E1E;
  --charcoal: #0D0D0D;
  --ash: #DED8C8;              /* warm hairline */
  --gold: #B08A33;             /* marsh gold — strokes & thin bands only */
  --tide: #6C7F86;             /* tidewater blue-gray — thin bands only */
  --lime: #CCFF00;
  --orange: #FF6A00;
  --ink-dim: rgba(30, 30, 30, .64);
  --ink-faint: rgba(30, 30, 30, .4);
  --hair: var(--ash);
  --hair-dark: rgba(248, 244, 234, .18);
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Inter Variable', 'Helvetica Neue', Arial, sans-serif;
  --monoface: 'Plex Mono', ui-monospace, 'SF Mono', monospace;
  --serifface: 'Instrument Serif', Georgia, serif;
  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --maxw: 1240px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--text);
  font-weight: 420;
  background: var(--bone);
  color: var(--graphite);
  font-size: clamp(.98rem, .93rem + .25vw, 1.08rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--charcoal); color: var(--bone); }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--monoface); font-weight: 500; }
.lead { font-size: 1.06em; line-height: 1.74; max-width: 58ch; }
.serif-it { font-family: var(--serifface); font-style: italic; }
em.tt { font-style: normal; font-weight: 560; }
cite { font-style: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--charcoal); color: var(--bone);
  padding: .8rem 1.2rem; font-family: var(--monoface); text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.4rem var(--gutter) 1.3rem;
  border-bottom: 1px solid var(--hair);
}
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: 1.18rem;
  letter-spacing: .08em; text-decoration: none; white-space: nowrap; color: inherit;
}
.wm-slash { opacity: .45; }
.masthead-nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); flex-wrap: wrap; }
.masthead-nav a {
  font-size: .76rem; font-weight: 560; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-dim);
  border-bottom: 1px solid transparent; padding-bottom: .2em;
  transition: color .18s ease, border-color .18s ease;
}
.masthead-nav a:hover { color: var(--graphite); border-color: var(--graphite); }
.masthead-meta { font-size: .64rem; letter-spacing: .16em; color: var(--ink-faint); }
@media (max-width: 900px) { .masthead-meta { display: none; } }

/* ---------- hero — a slow field of light ---------- */
.hero {
  padding: clamp(4.5rem, 12vh, 8.5rem) 0 0;
  background: linear-gradient(to bottom, var(--bone) 0%, var(--bone) 46%, #F5EFDD 88%, var(--bone-gold) 100%);
}
.hero-kicker {
  font-size: .72rem; letter-spacing: .2em; color: var(--ink-dim);
  margin-bottom: clamp(1.6rem, 4vh, 3rem);
}
.hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(4.6rem, 14.5vw, 12.5rem);
  line-height: .88; letter-spacing: .005em;
  color: var(--charcoal); text-transform: uppercase;
}
.hero-amp { color: var(--orange); font-weight: 600; }
.hero-line {
  margin-top: clamp(1.8rem, 4vh, 3rem);
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  line-height: 1.34; max-width: 24em; color: var(--graphite);
  letter-spacing: .002em;
}
.hero-foot {
  margin-top: clamp(2.6rem, 7vh, 5rem);
  padding: 1.2rem 0 2.8rem;
  border-top: 1px solid var(--hair);
  display: grid; gap: 1.3rem;
}
.hero-data { font-size: .7rem; letter-spacing: .16em; color: var(--ink-dim); line-height: 2; }

/* thin bands of light + water under the hero data */
.horizon { display: grid; gap: 4px; }
.horizon i { display: block; }
.horizon .hz-gold { height: 5px; background: linear-gradient(90deg, rgba(176,138,51,.3), rgba(176,138,51,.62) 72%, rgba(176,138,51,.42)); }
.horizon .hz-tide { height: 2px; background: linear-gradient(90deg, rgba(108,127,134,.28), rgba(108,127,134,.55)); }

/* ---------- ratio stripe (24 graphite + 8 lime) ---------- */
.stripe { display: flex; gap: 3px; height: 12px; }
.stripe i { flex: 1; background: var(--graphite); }
.stripe i.s8 { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(13, 13, 13, .35); }
.stripe-quiet i { opacity: .26; }
.stripe-quiet i.s8 { opacity: 1; }

/* ---------- bands & section heads ---------- */
.band { padding: clamp(4rem, 10vh, 7.5rem) 0; border-top: 1px solid var(--hair); }
.band-gold { background: var(--bone-gold); }
.band-dark {
  background: var(--charcoal); color: var(--bone);
  --hair: var(--hair-dark);
  --ink-dim: rgba(248, 244, 234, .64);
  --ink-faint: rgba(248, 244, 234, .4);
}
.band-dark ::selection { background: var(--bone); color: var(--charcoal); }
.band-dark .h2 { color: var(--bone); }

.sec-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: clamp(2rem, 5vh, 3.4rem); }
.sec-head.sub { margin-top: clamp(3.4rem, 8vh, 5.5rem); }
.sec-num { font-size: .86rem; letter-spacing: .1em; color: var(--ink-dim); }
.sec-rule { flex: 1; height: 1px; background: var(--hair); }
.sec-label { font-size: .68rem; letter-spacing: .22em; color: var(--ink-dim); text-align: right; }

.h2 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  line-height: .94; letter-spacing: .008em; color: var(--charcoal);
  max-width: 18ch;
}

/* ---------- 01 anthem ---------- */
.anthem-grid {
  display: grid; grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
@media (max-width: 940px) { .anthem-grid { grid-template-columns: 1fr; } }
.anthem-copy .lead { margin-top: 1.6rem; color: rgba(248, 244, 234, .88); }
.anthem-meta { margin-top: 2rem; font-size: .66rem; letter-spacing: .16em; color: var(--ink-faint); line-height: 2; }

/* player skin — lantern in the dark: warm hairlines, gold underline, lime signal */
#player { border: 1px solid var(--hair-dark); border-top: 3px solid var(--gold); padding: clamp(1.2rem, 3vw, 2rem); }
#player .ap {
  --ap-accent: var(--lime);
  --ap-accent-fg: var(--charcoal);
  --ap-radius: 0; --ap-row-radius: 0;
  --ap-font: var(--text);
  --ap-line: rgba(248, 244, 234, .2);
  --ap-dim: rgba(248, 244, 234, .62);
}
#player .ap-kicker { font-family: var(--monoface); letter-spacing: .22em; }
#player .ap-title {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: .015em;
}
#player .ap-sub, #player .ap-time, #player .ap-row-num, #player .ap-row-meta,
#player .ap-panel-title, #player .ap-badge, #player .ap-status { font-family: var(--monoface); }
#player .ap-btn { border: 1px solid var(--ap-line); border-radius: 0; }
#player .ap-play { border-color: var(--lime); }
#player .ap-bar::before, #player .ap-bar-buffer, #player .ap-bar-fill { border-radius: 0; }
#player .ap-bar-knob { border-radius: 0; width: 3px; box-shadow: none; }
#player .ap-mini, #player .ap-filter { border-radius: 0; font-family: var(--monoface); font-size: .7rem; letter-spacing: .08em; }
#player .ap-eq i { background: var(--lime); }

.progress-stripe { margin-top: 1.1rem; }
.progress-stripe .stripe { height: 9px; }
.progress-stripe .stripe i { background: rgba(248, 244, 234, .14); box-shadow: none; }
.progress-stripe .stripe i.lit { background: var(--bone); opacity: .85; }
.progress-stripe .stripe i.s8.lit { background: var(--lime); opacity: 1; }
.stripe-note { margin-top: .7rem; font-size: .62rem; letter-spacing: .14em; color: var(--ink-faint); }

/* ---------- 02 system ---------- */
.numbers-strip {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--hair); border-right: 0;
  margin: clamp(2.2rem, 5vh, 3.6rem) 0 0;
  background: var(--bone);
}
.numbers-strip li {
  border-right: 1px solid var(--hair);
  padding: clamp(1.1rem, 2.6vw, 2rem);
  display: grid; gap: .5rem;
}
.numbers-strip strong {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; color: var(--charcoal);
}
.numbers-strip span { font-size: .62rem; letter-spacing: .18em; color: var(--ink-dim); }
@media (max-width: 640px) {
  .numbers-strip { grid-template-columns: 1fr 1fr; border-bottom: 0; }
  .numbers-strip li { border-bottom: 1px solid var(--hair); }
}

/* the tide ribbon: 24 flood bars gather, 8 lime bars release */
.ribbon { display: flex; gap: 10px; margin-top: 1.6rem; }
.frames { display: flex; gap: 3px; }
.frames.back { flex: 24; }
.frames.down { flex: 8; }
.frames span { flex: 1; height: 26px; border: 1px solid var(--ink-faint); transition: background .12s linear; }
.frames.back span.lit { background: var(--tide); border-color: var(--tide); }
.frames.down span { border-color: rgba(30, 30, 30, .55); }
.frames.down span.lit { background: var(--lime); border-color: var(--graphite); }
.ribbon-note { margin-top: .8rem; font-size: .62rem; letter-spacing: .14em; color: var(--ink-faint); line-height: 2; }

.method-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  margin-top: clamp(2.6rem, 6vh, 4.2rem);
}
@media (max-width: 940px) { .method-grid { grid-template-columns: 1fr; max-width: 640px; } }
.method { border-top: 2px solid var(--graphite); padding-top: 1.3rem; }
.method h3 { font-size: .72rem; letter-spacing: .18em; font-weight: 500; color: var(--graphite); }
.method p { margin-top: 1rem; font-size: .96rem; }
.fn {
  margin-top: 1.1rem; font-size: .6rem; line-height: 1.8; letter-spacing: .08em;
  color: var(--ink-faint); max-width: 72ch;
}

/* ---------- 03 use ---------- */
.use-grid {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border: 1px solid var(--hair);
  margin-top: clamp(2.2rem, 5vh, 3.6rem);
  background: var(--bone);
}
.use {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  display: grid; gap: .7rem; align-content: start; min-height: 11rem;
}
.use:nth-child(3n) { border-right: 0; }
.use:nth-child(n+4) { border-bottom: 0; }
.use-num { font-size: .7rem; letter-spacing: .14em; color: var(--ink-faint); }
.use h3 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: 1.35rem; letter-spacing: .02em; line-height: 1.05; color: var(--charcoal);
}
.use p { font-size: .92rem; color: var(--ink-dim); max-width: 32ch; }
@media (max-width: 940px) {
  .use-grid { grid-template-columns: 1fr 1fr; }
  .use { min-height: 0; }
  .use:nth-child(3n) { border-right: 1px solid var(--hair); }
  .use:nth-child(2n) { border-right: 0; }
  .use:nth-child(n+4) { border-bottom: 1px solid var(--hair); }
  .use:nth-child(n+5) { border-bottom: 0; }
}
@media (max-width: 560px) {
  .use-grid { grid-template-columns: 1fr; }
  .use { border-right: 0 !important; border-bottom: 1px solid var(--hair) !important; }
  .use:last-child { border-bottom: 0 !important; }
}

/* ---------- 04 the hammocks ---------- */
.marsh-lead { margin-top: 1.8rem; }
.marsh-fig { margin: clamp(2.4rem, 6vh, 4rem) 0 0; }
.marsh-stage {
  border: 1px solid var(--hair);
  background: var(--bone);
  overflow-x: auto;
}
.marsh-scroll { position: relative; }
.marsh-scroll svg { display: block; width: 100%; height: auto; position: relative; z-index: 1; }
.marsh-water-canvas {
  position: absolute; left: 0; width: 100%;
  top: 53.57%; height: 23.57%;          /* the creek band: y 300–432 of 560 */
  z-index: 0;
}
/* small screens: the diagram keeps a minimum width and scrolls like a chart */
@media (max-width: 760px) {
  .marsh-scroll { min-width: 760px; }
  .mg-label { font-size: 12.5px; }
  .mg-small { font-size: 10.5px; }
}
.marsh-caption {
  margin-top: .9rem; font-size: .62rem; letter-spacing: .14em; line-height: 1.9;
  color: var(--ink-faint); max-width: 76ch;
}

/* svg internals */
.mg-label {
  font-family: var(--monoface); font-weight: 500; font-size: 11px;
  letter-spacing: 1.4px; fill: var(--graphite);
}
.mg-label-dim { fill: var(--ink-dim); }
.mg-small { font-size: 9.5px; letter-spacing: 1.1px; }
.mg-leader { stroke: var(--graphite); stroke-opacity: .5; stroke-width: .8; fill: none; }
.mg-hair { stroke: var(--graphite); stroke-opacity: .28; stroke-width: .8; fill: none; }
.mg-bridge { stroke: var(--graphite); stroke-width: 2; stroke-dasharray: 7 5; fill: none; stroke-opacity: .78; }
.mg-island { fill: #EFE6CD; stroke: var(--graphite); stroke-width: 1.2; }
.mg-titleblock rect { fill: none; stroke: var(--graphite); stroke-opacity: .45; stroke-width: .8; }

/* island-hop sequencer chips */
.mg-chip rect {
  fill: var(--bone); stroke: var(--graphite); stroke-width: 1;
  transition: fill .12s linear;
}
.mg-chip text { fill: var(--graphite); }
.mg-chip.on rect { fill: var(--lime); stroke: var(--charcoal); }
.mg-chip.on text { fill: var(--charcoal); }

/* ---------- course facts ---------- */
.spec { margin: 0; border-top: 2px solid var(--charcoal); }
.spec-row {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 1.5rem; padding: 1.15rem 0;
  border-bottom: 1px solid var(--hair);
}
.spec-row dt { font-size: .68rem; letter-spacing: .18em; color: var(--ink-dim); padding-top: .25em; }
.spec-row dd { margin: 0; max-width: 64ch; }
@media (max-width: 640px) {
  .spec-row { grid-template-columns: 1fr; gap: .4rem; }
}

/* ---------- the next tide (forward-looking, framed) ---------- */
.next-tide {
  margin-top: clamp(2.6rem, 6vh, 4rem);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--gold);
  background: var(--bone-gold);
  padding: clamp(1.4rem, 3.4vw, 2.2rem);
}
.nt-kicker { font-size: .66rem; letter-spacing: .2em; color: var(--ink-dim); }
.nt-body { margin-top: 1rem; max-width: 62ch; }
.nt-body strong { font-weight: 620; }
.nt-note { margin-top: 1.2rem; font-size: .6rem; letter-spacing: .14em; line-height: 2; color: var(--ink-faint); }

/* ---------- 05 related ---------- */
.related-grid {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
  margin-top: clamp(2.2rem, 5vh, 3.6rem);
}
@media (max-width: 860px) { .related-grid { grid-template-columns: 1fr; max-width: 480px; } }
.related-card a {
  display: grid; gap: 2.6rem; align-content: space-between;
  min-height: 12rem; padding: 1.5rem 1.5rem 1.3rem;
  border: 1px solid var(--hair); background: var(--bone);
  text-decoration: none;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}
.rc-loc { font-size: .62rem; letter-spacing: .18em; color: var(--ink-dim); }
.rc-name {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: .98; letter-spacing: .01em;
  color: var(--charcoal);
}
.rc-go { font-size: .64rem; letter-spacing: .18em; color: var(--ink-dim); justify-self: start; }
.related-card a:hover, .related-card a:focus-visible {
  background: var(--charcoal); border-color: var(--charcoal); color: var(--bone);
}
.related-card a:hover .rc-name, .related-card a:focus-visible .rc-name { color: var(--bone); }
.related-card a:hover .rc-loc, .related-card a:focus-visible .rc-loc { color: rgba(248, 244, 234, .6); }
.related-card a:hover .rc-go, .related-card a:focus-visible .rc-go { color: var(--lime); }

/* ---------- footer ---------- */
.site-foot {
  background: var(--charcoal); color: var(--bone);
  padding: clamp(3rem, 8vh, 5rem) 0 clamp(2.4rem, 6vh, 3.6rem);
  --ink-dim: rgba(248, 244, 234, .6);
  --ink-faint: rgba(248, 244, 234, .4);
}
.site-foot .stripe i { background: var(--bone); opacity: .22; }
.site-foot .stripe i.s8 { background: var(--lime); opacity: 1; box-shadow: none; }
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: clamp(2.4rem, 6vh, 3.6rem);
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-line { margin-top: 1.1rem; font-size: .92rem; color: var(--ink-dim); line-height: 1.7; }
.foot-nav { display: grid; gap: .7rem; align-content: start; }
.foot-nav a {
  font-size: .82rem; text-decoration: none; color: var(--ink-dim);
  border-bottom: 1px solid transparent; justify-self: start; padding-bottom: .15em;
  transition: color .18s ease, border-color .18s ease;
}
.foot-nav a:hover { color: var(--bone); border-color: var(--bone); }
.foot-note { font-size: .6rem; letter-spacing: .14em; line-height: 2.1; color: var(--ink-faint); }

/* ---------- motion ---------- */
/* Reveals are transform-only: content is never opacity-hidden, so the page
 * always reads — with or without JS, mid-scroll, or in a capture. */
.reveal { transform: translateY(16px); transition: transform .7s cubic-bezier(.22, .61, .36, 1); }
.reveal.in { transform: none; }

/* load-time intro for the hero — plays once, ends composed */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-kicker { animation: rise .7s cubic-bezier(.22, .61, .36, 1) .05s backwards; }
.hero-title  { animation: rise .8s cubic-bezier(.22, .61, .36, 1) .16s backwards; }
.hero-line   { animation: rise .8s cubic-bezier(.22, .61, .36, 1) .32s backwards; }
.hero-foot   { animation: rise .8s cubic-bezier(.22, .61, .36, 1) .46s backwards; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: none; }
  .hero-kicker, .hero-title, .hero-line, .hero-foot { animation: none; }
  .frames span { transition: none; }
  .mg-chip rect { transition: none; }
}

/* ---------- guide page ---------- */
.guide-hero { padding: clamp(3.5rem, 9vh, 6rem) 0 0;
  background: linear-gradient(to bottom, var(--bone) 0%, var(--bone) 55%, var(--bone-gold) 100%); }
.guide-hero .hero-title { font-size: clamp(3rem, 9vw, 7.5rem); }
.guide-body { padding: clamp(3rem, 8vh, 5rem) 0; }
.guide-sec { margin-bottom: clamp(3rem, 8vh, 5rem); }
.guide-sec .lead { margin-top: 1.4rem; }
.guide-sec p + p { margin-top: 1rem; }
.guide-sec ul { margin: 1.2rem 0 0; padding-left: 1.2rem; max-width: 68ch; }
.guide-sec li { margin-bottom: .55rem; }
.guide-sec li::marker { color: var(--ink-faint); }
.pass { border-top: 1px solid var(--hair); padding: 1.2rem 0; }
.pass h3 { font-size: .72rem; letter-spacing: .18em; font-weight: 500; color: var(--graphite); }
.pass p { margin-top: .6rem; max-width: 68ch; color: var(--ink-dim); font-size: .95rem; }
