/* ============================================================================
   Beyond the Line — shared stylesheet
   ----------------------------------------------------------------------------
   Layout and structure for the whole site, plus the colour tokens in :root.

   The look on top of it lives in assets/css/theme.css, which loads AFTER this
   file and wins on ties. Keep the split: structure here, personality there.

   CONTENTS — in the order the page reads
     1. theme variables      7.  programme (steps)
     2. base + helpers       8.  how your church can join
     3. header               9.  faq
     4. buttons             10.  closing + marquee
     5. hero                11.  footer, small screens, keyframes
     6. why / expect / info 12.  decal lab (currently hidden)
   ========================================================================== */

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

/* `clip` rather than `hidden`: it does not create a scroll container, so
   position:sticky keeps working anywhere on the page. */
html { overflow-x: clip; }

/* ---------- 1. theme variables ---------- */
:root {
  --bg: #fffff0;
  --fg: #1c1c1b;
  --muted: #6b6b6c;
  --line: #1c1c1b;
  --lw: 2px;
  --accent: #e42312;
  --accent2: #9d0000;
  --on-accent: #fffff0;
  --ink-bg: #1c1c1b;
  --ink-fg: #fffff0;
  --ink-muted: #adaca4;
  --panel: #111110;
  --panel-line: #404041;
  --field: #111110;
  --r: 0px;
  --r-lg: 0px;
  --hero-image: none;
  --glow: none;
}

/* ---------- 2. base + helpers ---------- */
/* Type: Plus Jakarta Sans carries the English/Latin text, Noto Sans JP picks up
   every Japanese glyph automatically. Both come from Google Fonts — the <link>
   is in each HTML file. Plus Jakarta Sans tops out at weight 800, so a
   font-weight of 900 renders at 800 in English and a true 900 in Japanese. */
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Plus Jakarta Sans", "Noto Sans JP", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, li { font-family: inherit; text-wrap: pretty; margin: 0; }
a { color: var(--accent); }
img, svg { max-width: 100%; }
button, input { font: inherit; }

/* Hidden by a feature flag in assets/js/config.js — see site.js applyFeatures. */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; }

.wrap { padding: clamp(40px, 5vw, 84px) clamp(16px, 4vw, 64px); }
.rule { border-bottom: var(--lw) solid var(--line); }

.kicker {
  font: 700 clamp(13px, 1.1vw, 16px)/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
/* Section headlines are set in Dela Gothic One, a single-weight display face,
   so the weight is 400 and the tracking is left alone. */
.h2 {
  font-family: "Dela Gothic One", "Noto Sans JP", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: 0;
}
.h3 { font-weight: 900; font-size: clamp(24px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -.03em; }

/* Kicker + heading block that opens a section. */
.section-head { margin-bottom: clamp(24px, 3vw, 44px); }

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 3. header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink-bg);
  color: var(--ink-fg);
  border-bottom: var(--lw) solid var(--line);
}
.progress-track { height: 4px; background: rgba(255, 255, 255, .16); }
.progress-bar {
  height: 4px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--accent);
}
.header-row { display: flex; align-items: stretch; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 clamp(14px, 3vw, 26px); }
.brand-logo { width: clamp(22px, 2.2vw, 28px); height: auto; flex: 0 0 auto; }
.brand-mark {
  font-weight: 900; font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; white-space: nowrap;
}
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); color: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
.header-actions { display: flex; align-items: stretch; }
.lang-btn {
  border: 0; border-left: var(--lw) solid var(--panel-line);
  cursor: pointer; padding: 12px 13px;
  font: 900 11px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .1em;
  background: transparent; color: var(--ink-fg);
  transition: background .18s ease, color .18s ease;
}
.lang-btn.is-on { background: var(--ink-fg); color: var(--ink-bg); }
.header-cta {
  display: inline-flex; align-items: center;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  font: 900 12px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  padding: 0 clamp(14px, 2.5vw, 24px);
  transition: background .18s ease, transform .18s cubic-bezier(.2, .7, .2, 1);
}
.header-cta:hover { background: var(--accent2); color: var(--on-accent); }

/* ---------- 4. buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 900; font-size: 15px;
  padding: 17px 24px; border: 0; cursor: pointer; border-radius: var(--r);
  transition: transform .18s cubic-bezier(.2, .7, .2, 1), background .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--accent2); color: var(--on-accent); }
.btn-ghost { border: var(--lw) solid currentColor; background: transparent; color: inherit; padding: 15px 22px; }
/* This direction nudges diagonally rather than straight up — it reads as a
   printed thing lifting off the page. */
.btn:hover { transform: translate(-2px, -2px); }

/* ---------- 5. hero ---------- */
/* Static, one screen tall. The artwork sits centred with the pitch and the
   register button; the date / time / venue board runs across the foot. No
   pinning and no scroll hand-over, so nothing in this hero depends on
   JavaScript.

   The longer description is not in the hero at all — it opens the "Why we're
   racing" section as its lede (.why-lede). */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - var(--header-h, 44px));
  min-height: calc(100svh - var(--header-h, 44px));
  display: flex; flex-direction: column;
  background: var(--ink-bg); color: var(--ink-fg);
  border-bottom: var(--lw) solid var(--line);
}
.hero-bg { position: absolute; inset: -6% 0; will-change: transform; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; }

.hero-inner {
  position: relative; flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(10px, 1.5vw, 18px);
  padding: clamp(20px, 2.8vw, 40px) clamp(16px, 4vw, 60px) clamp(18px, 2.2vw, 30px);
  text-align: center;
}

/* ---- the board across the foot of the hero ---- */
/* Three panels, like a pit board. Side by side from 620px, stacked below it. */
.hero-board {
  position: relative; z-index: 2;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr;
}
@media (min-width: 620px) { .hero-board { grid-template-columns: repeat(3, 1fr); } }

.hero-board-item {
  position: relative;
  display: grid; gap: 10px; align-content: center; justify-items: center;
  padding: clamp(22px, 3vw, 42px) clamp(12px, 2vw, 24px);
}
@media (min-width: 620px) {
  .hero-board-item + .hero-board-item { border-left: var(--lw) solid rgba(255, 255, 240, .26); }
}
@media (max-width: 619px) {
  .hero-board-item + .hero-board-item { border-top: var(--lw) solid rgba(255, 255, 240, .18); }
  /* On phones the three panels stack, so each becomes a compact row: label on
     the left, value on the right. */
  .hero-board-item {
    grid-template-columns: auto 1fr; align-items: center; justify-items: start;
    gap: 14px; padding: 11px 16px;
  }
  .hero-board-item::before { height: 2px; }
  .hero-board-value { font-size: 16px; justify-self: end; text-align: right; }
  .hero-board-label { font-size: 10px; }
}
.hero-board-label {
  font: 700 clamp(11px, .95vw, 13px)/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .26em; text-transform: uppercase;
}
.hero-board-value {
  font-family: "Dela Gothic One", "Noto Sans JP", sans-serif; font-weight: 400;
  font-size: clamp(20px, 2.2vw, 32px); line-height: 1.25;
  letter-spacing: .01em; text-wrap: balance;
  /* Japanese wraps anywhere by default, which split the venue name mid-word. */
  word-break: keep-all; overflow-wrap: anywhere;
}

/* The hero headline is artwork, not live text: assets/img/logo-<lang>.png.
   Swap that file to change it; the size is controlled here. */
.hero-title {
  /* The artwork carries a soft glow below the letters; pull the strip up into
     it so the two sit close. */
  margin: 0 0 calc(-1 * clamp(4px, 1vw, 14px));
  animation: rise .75s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-logo {
  /* Wide as the viewport allows, but never so tall that the pit board at the
     foot of the hero drops below the fold on a short laptop screen. */
  display: block; width: clamp(270px, min(75.4vw, (100svh - 560px) * 3.12), 1066px);
  max-width: 100%; height: auto;
}


.hero-body { font-size: clamp(14.5px, 1.25vw, 18px); line-height: 1.65; max-width: 44rem; opacity: .9; }
/* Three short beats in one row, a dot between each, sitting tight under the
   tagline so the two read as one block. Stacks on narrow phones. */
.hero-beats {
  list-style: none; margin: calc(-1 * clamp(2px, .5vw, 8px)) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  column-gap: clamp(12px, 1.5vw, 24px); row-gap: 6px;
  font-weight: 800; font-size: clamp(12.5px, 1.05vw, 15px); line-height: 1.4;
  letter-spacing: .08em;
}
.hero-beats li { display: flex; align-items: center; column-gap: inherit; }
.hero-beats li + li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent);
}
@media (max-width: 560px) {
  .hero-beats { flex-direction: column; row-gap: 5px; letter-spacing: .06em; }
  .hero-beats li + li::before { display: none; }
}

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(6px, 1vw, 14px); }
.btn-hero { padding: 18px 34px; font-size: 16px; letter-spacing: .04em; }
.btn-ghost.btn-hero { padding: 16px 32px; }
@media (max-width: 560px) {
  .btn-hero { padding: 14px 24px; font-size: 14px; }
  .btn-ghost.btn-hero { padding: 12px 22px; }
  .hero-cta { gap: 10px; margin-top: 6px; }
  /* Phones: the logo takes nearly the full width and the stack spreads out so
     the hero fills the screen instead of bunching in the middle. */
  .hero-logo { width: clamp(300px, 94vw, 820px); }
  .hero-inner { gap: clamp(18px, 4.5vh, 34px); padding-top: clamp(24px, 5vh, 48px); padding-bottom: clamp(24px, 5vh, 48px); }
  .hero-beats { font-size: 13.5px; row-gap: 8px; margin-top: 4px; }
}

/* ---------- 6. why we're racing ---------- */
.why-grid {
  display: grid; gap: clamp(26px, 4vw, 64px); align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) { .why-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
/* The hero's description opens this section. */
.why-lede {
  margin-top: clamp(16px, 2vw, 26px); max-width: 34em;
  font-weight: 900; font-size: clamp(18px, 2.1vw, 30px);
  line-height: 1.38; letter-spacing: -.02em;
}
.why-prose { display: grid; gap: clamp(14px, 1.6vw, 22px); max-width: 40em; }
.why-prose p { font-size: clamp(15px, 1.35vw, 20px); line-height: 1.7; }

/* The oversized 5,000. Switch it off with features.visionFigure in config.js. */
.why-figure { justify-self: start; }
.why-figure-n {
  font-weight: 900; font-size: clamp(68px, 11vw, 180px); line-height: .82;
  letter-spacing: -.06em; color: var(--accent); font-variant-numeric: tabular-nums;
  /* line-height .82 makes the box shorter than the digits, so the label below
     needs the difference back as padding — in em, so it scales with the type. */
  padding-bottom: .18em;
}
.why-figure-label {
  margin-top: 14px; max-width: 16em;
  font: 700 11px/1.5 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .17em; text-transform: uppercase; color: var(--muted);
}

/* ---------- 6. what to expect ---------- */
/* One-pixel gaps show the section background through, so the cards read as a
   printed grid rather than floating boxes. */
.expect-grid {
  display: grid; gap: var(--lw);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  background: var(--line); border: var(--lw) solid var(--line);
}
.expect-card { background: var(--bg); padding: clamp(22px, 2.6vw, 36px); display: block; }
.expect-n {
  font: 900 11px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .18em; color: var(--accent); margin-bottom: 15px;
  font-variant-numeric: tabular-nums;
}
.expect-title {
  font-weight: 900; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.2;
  letter-spacing: -.02em; margin-bottom: 10px;
}
.expect-body { font-size: 14.5px; line-height: 1.7; color: var(--muted); }

/* ---------- 6. event information ---------- */
.info-grid {
  display: grid; gap: clamp(26px, 4vw, 56px); align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}
/* Details take the wider share, roughly 55 / 45, so the rows read as lines. */
@media (min-width: 900px) { .info-grid { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); } }

.info-table { margin: 0; display: grid; }
.info-row { display: grid; gap: 4px; padding: clamp(9px, 1vw, 13px) 0; border-top: var(--lw) solid var(--line); }
/* The venue row carries the street address under the name, and the map link
   sits beside them on the right. */
.info-row--venue .info-value { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.info-sub { display: block; font-weight: 600; font-size: clamp(12px, .95vw, 13.5px); line-height: 1.5; color: var(--muted); margin-top: 2px; }
.info-link {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 9px 14px; border-radius: var(--r); border: var(--lw) solid currentColor;
  font: 900 12px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .06em;
  text-decoration: none; color: inherit; white-space: nowrap;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.info-link:hover { transform: translateY(-2px); }
.info-row:last-child { border-bottom: var(--lw) solid var(--line); }
.info-label {
  font: 700 10px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.info-value { margin: 0; font-weight: 900; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.35; }

/* The circuit graphic, presented as the venue map. Each option file adds its
   own frame treatment on top of this. */
/* On a laptop the map takes exactly the height of the table beside it: the
   image is absolutely placed inside the frame so it never sets the row height. */
.venue-map {
  position: relative; margin: 0;
  border: var(--lw) solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3.2vw, 48px) clamp(12px, 1.4vw, 20px);
}
.venue-map-img { display: block; width: 100%; height: auto; }
/* The traced copy is hidden until the script switches it on; then it sits in
   exactly the PNG's box (same aspect, same insets) and the PNG steps back. On
   phones it is shown already drawn, with only the kart dot moving. */
.course-trace { display: none; position: absolute; inset: clamp(20px, 3.2vw, 48px) clamp(12px, 1.4vw, 20px); }
.venue-map.is-traced .course-trace { display: block; }
.venue-map.is-traced .venue-map-img { visibility: hidden; }
@media (min-width: 900px) {
  .venue-map { min-height: 0; }
  .venue-map-img, .course-trace {
    position: absolute; inset: clamp(18px, 2.6vw, 36px) clamp(12px, 1.4vw, 20px);
    width: auto; height: auto; max-width: calc(100% - 2 * clamp(12px, 1.4vw, 20px));
    max-height: calc(100% - 2 * clamp(18px, 2.6vw, 36px));
    margin: auto; object-fit: contain;
  }
  .course-trace { width: calc(100% - 2 * clamp(12px, 1.4vw, 20px)); height: calc(100% - 2 * clamp(18px, 2.6vw, 36px)); }
}
.course-trace path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.course-glow { stroke-width: 30; opacity: .55; }
.course-band { stroke-width: 24; }
.course-core { stroke-width: 9; }
.course-kart { stroke-width: 5; }
.venue-map-cap {
  position: absolute; top: 0; left: clamp(18px, 3vw, 40px);
  transform: translateY(-50%);
  background: var(--accent); color: var(--on-accent);
  padding: 7px 12px; border-radius: var(--r);
  font: 900 10px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  letter-spacing: .2em; text-transform: uppercase;
}

/* ---- inverted section ----
   Flips a whole section onto the dark ground. Add `section--invert` to any
   <section> and everything inside picks up the ink-* tokens. Currently used by
   Event information, to break up the run of paper-coloured sections. */
.section--invert { background: var(--ink-bg); color: var(--ink-fg); }
.section--invert .info-row { border-color: rgba(255, 255, 240, .22); }
.section--invert .info-label { color: var(--ink-muted); }

/* ---------- 7. programme (steps) ---------- */
.rail { position: relative; padding-left: clamp(46px, 7vw, 92px); }
.rail-line { position: absolute; left: clamp(18px, 3.2vw, 42px); top: 0; bottom: 0; width: 2px; }
.rail-line { background: repeating-linear-gradient(180deg, var(--line) 0 14px, transparent 14px 26px); }
.rail-kart {
  position: absolute; left: clamp(4px, 2vw, 26px); top: 0;
  width: 28px; height: 28px; background: var(--accent);
  transition: top .12s linear; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r); box-shadow: var(--glow);
}
.rail-kart::after { content: ""; width: 10px; height: 2px; background: var(--on-accent); }
.step {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 10px 24px; align-items: start;
  padding: clamp(18px, 2.4vw, 30px) 0;
  border-bottom: var(--lw) solid var(--line);
}
.step-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 9px; }
.step-n {
  font: 700 11px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .18em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
/* Audience tag — only on the steps that carry a fifth entry in copy.js; the
   sixth entry there picks the tone (see .step-tag--everyone in theme.css). */
.step-tag {
  font: 700 10px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent2);
  border: var(--lw) solid var(--line); border-radius: 999px; padding: 5px 9px;
}
.step-title { font-weight: 900; font-size: clamp(19px, 2.4vw, 33px); line-height: 1.14; letter-spacing: -.02em; }
.step-body { margin-top: 9px; font-size: 14.5px; line-height: 1.7; color: var(--muted); max-width: 44em; }
.step-time {
  font-weight: 900; font-size: clamp(13.5px, 1.15vw, 16px); letter-spacing: .03em;
  font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap;
  padding-top: 22px;
}

/* ---------- 8. how your church can join ---------- */
/* Four compact cards, sized so the whole section lands in one screen on a
   laptop and on a phone: two across by default, four across from 900px.

   The whole card is the link — no separate button per card, which is most of
   the height saving over the full-width rows this replaced. */
.join-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(9px, 1.1vw, 14px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Three across on a laptop. On phones the grid is two across, and the first
   card — registration — takes the full row so it reads as the primary action
   and the other two pair up beneath it. */
@media (min-width: 900px) { .join-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .join-grid > li:first-child { grid-column: span 2; } }

/* The whole section is centred: the heading above, and inside each card the
   arrow disc, the title and the line beneath it. The card is the link. */
#register .section-head { text-align: center; }
/* Cards tilt a few degrees toward the cursor (site.js sets the transform). */
.join-grid > li { perspective: 900px; }
.join-card {
  transform-style: preserve-3d; will-change: transform;
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;
  padding: clamp(24px, 2.8vw, 40px) clamp(18px, 2vw, 30px);
  text-align: center;
  border: 2px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: inherit;
  transition: transform .18s cubic-bezier(.2, .7, .2, 1), background .18s ease,
              color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.join-card-head {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: clamp(12px, 1.4vw, 18px);
}
/* The arrow sits in a disc so each card reads as a button, not a note. */
.join-arrow {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 50%; font-weight: 900; font-size: 22px; line-height: 1;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), background .18s ease, color .18s ease;
}
.join-card:hover .join-arrow { transform: translateY(-4px); }
/* The title reads like a headline: the display face, large, upper-case in English. */
.join-card-title {
  font-family: "Dela Gothic One", "Noto Sans JP", sans-serif; font-weight: 400;
  font-size: clamp(22px, 2.3vw, 34px); line-height: 1.1;
  letter-spacing: .01em; text-transform: uppercase; margin-bottom: 10px;
  text-wrap: balance;
  /* Japanese wraps anywhere by default, which split a label mid-word. */
  word-break: keep-all; overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .join-card { padding: 22px 14px; }
  .join-card-title { font-size: 19px; }
}
.join-card-body { font-size: clamp(12.5px, 1vw, 15px); line-height: 1.6; color: var(--muted); max-width: 26em; }

/* ---------- 9. faq ---------- */
.faq-title { margin-bottom: 26px; }
.faq-list { border-top: var(--lw) solid var(--line); max-width: 1000px; }
.faq-item { border-bottom: var(--lw) solid var(--line); }
.faq-item summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 19px 2px; font-weight: 900; font-size: 17px; line-height: 1.4;
  list-style: none; cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-mark { position: relative; width: 16px; height: 16px; flex: 0 0 auto; color: var(--accent); }
.faq-mark::before, .faq-mark::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), opacity .25s ease;
}
.faq-mark::before { left: 0; top: 7px; width: 16px; height: 2px; }
.faq-mark::after { left: 7px; top: 0; width: 2px; height: 16px; }
.faq-item[open] .faq-mark::after { transform: rotate(90deg); opacity: 0; }
.faq-body { padding: 0 2px 22px; max-width: 48em; display: grid; gap: 11px; }
.faq-a { font-size: 15px; line-height: 1.8; color: var(--muted); }
.faq-a a { font-weight: 700; word-break: break-word; }

/* ---------- 10. marquee + closing ---------- */
.marquee { position: relative; overflow: hidden; border-bottom: var(--lw) solid var(--line); }
.marquee-track { display: flex; width: max-content; animation: mq 26s linear infinite; padding: 15px 0; }
.marquee-group {
  display: flex; gap: 30px; padding: 0 15px;
  font: 900 clamp(22px, 3.4vw, 54px)/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  /* Plus Jakarta Sans sets a narrow word space; open it up so the uppercase
     marquee doesn't read as one long word. */
  letter-spacing: -.01em; word-spacing: .14em;
  text-transform: uppercase; white-space: nowrap;
}
.closing {
  text-align: center;
  padding: clamp(44px, 6vw, 96px) clamp(16px, 4vw, 62px);
  border-bottom: var(--lw) solid var(--line);
}
.closing-inner { display: grid; justify-items: center; gap: clamp(14px, 1.8vw, 22px); max-width: 52rem; margin: 0 auto; }
.closing-title {
  font-family: "Dela Gothic One", "Noto Sans JP", sans-serif;
  font-weight: 400; font-size: clamp(28px, 4.6vw, 68px); line-height: 1.06; letter-spacing: 0;
}
.closing-body { font-size: clamp(15px, 1.35vw, 19px); line-height: 1.7; max-width: 40em; }
.closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(10px, 1.4vw, 18px); }

/* ---------- 11. footer ---------- */
.site-footer {
  background: var(--ink-bg); color: var(--ink-fg);
  padding: clamp(24px, 3.4vw, 50px) clamp(16px, 4vw, 62px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px; align-items: end;
}
/* Alpha's mark sits beside the Alpha Japan wordmark; Beyond the Line sits
   under it as the event line. */
.footer-brand { display: flex; align-items: center; gap: clamp(12px, 1.5vw, 18px); }
.footer-logo { width: clamp(42px, 4.4vw, 58px); height: auto; flex: 0 0 auto; }
.footer-name { margin-bottom: 5px; }
.footer-meta { font-size: 12.5px; color: var(--ink-muted); display: grid; gap: 6px; }
.footer-meta a { text-decoration: none; font-weight: 700; }

/* ---------- 12. decal lab (hidden unless BTL_CONFIG.features.decalLab) ---------- */
.lab { background: var(--ink-bg); color: var(--ink-fg); border-bottom: var(--lw) solid var(--line); }
.lab .kicker { color: var(--accent); }
.lab .kicker { color: #facbc7; }
.lab-intro { margin-top: 16px; max-width: 42em; font-size: 15px; line-height: 1.7; color: var(--ink-muted); }
.lab-grid {
  display: grid; gap: clamp(18px, 2.6vw, 36px); align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) { .lab-grid { grid-template-columns: minmax(320px, .82fr) minmax(0, 1fr); } }

.lab-stage {
  position: relative;
  border: var(--lw) solid var(--panel-line);
  border-radius: var(--r-lg);
  background: var(--panel);
  padding: clamp(14px, 2vw, 26px);
  perspective: 1100px;
}
.lab-stage-label {
  position: absolute; top: 0; left: clamp(14px, 2vw, 26px);
  transform: translateY(-50%);
  background: var(--ink-bg); padding: 0 8px;
  font: 700 10px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-muted);
}
.kart-holder {
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
.kart-holder.pop { animation: pop .38s cubic-bezier(.2, .7, .2, 1); }
.kart {
  display: block; margin: 0 auto; max-height: min(62vh, 540px); width: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .5));
}
.kart-body path, .kart-body rect, .kart-pattern rect, .kart-pattern polygon {
  transition: fill .3s ease;
}

.lab-controls { display: grid; gap: clamp(18px, 2.2vw, 28px); align-content: start; }
.field-label {
  font: 700 10px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 12px;
}
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  position: relative; width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: var(--sw); color: var(--sw-on);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--r);
  transition: transform .16s cubic-bezier(.2, .7, .2, 1), box-shadow .16s ease;
}
.swatch:hover { transform: translateY(-3px) scale(1.04); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--ink-bg), 0 0 0 4px var(--ink-fg); }
.swatch-tick { position: absolute; inset: 22%; opacity: 0; transition: opacity .16s ease, transform .16s ease; transform: scale(.6); }
.swatch.is-on .swatch-tick { opacity: 1; transform: scale(1); }

.pat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 10px; }
.pat {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; cursor: pointer; text-align: left;
  background: transparent; color: var(--ink-fg);
  border: var(--lw) solid var(--panel-line); border-radius: var(--r);
  font: 900 12px/1.2 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .04em;
  transition: transform .16s cubic-bezier(.2, .7, .2, 1), background .18s ease, color .18s ease, border-color .18s ease;
}
.pat:hover { transform: translateY(-2px); border-color: var(--accent); }
.pat.is-on { background: var(--ink-fg); color: var(--ink-bg); border-color: var(--ink-fg); }
.pat-thumb { width: 24px; height: 34px; flex: 0 0 auto; display: block; }

.photo-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.photo-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 17px; cursor: pointer;
  border: var(--lw) dashed var(--panel-line); border-radius: var(--r);
  background: var(--field); color: var(--ink-fg);
  font: 900 13px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .04em;
  transition: border-color .18s ease, transform .18s cubic-bezier(.2, .7, .2, 1), color .18s ease;
}
.photo-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.photo-btn:focus-within { outline: 3px solid var(--accent2); outline-offset: 3px; }
.photo-clear {
  border: 0; background: transparent; cursor: pointer; padding: 6px 2px;
  color: var(--ink-muted); font: 700 12.5px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  text-decoration: underline; text-underline-offset: 3px;
}
.photo-clear:hover { color: var(--accent); }
.photo-hint { margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--ink-muted); }

.lab-inputs { display: grid; grid-template-columns: minmax(0, 112px) minmax(0, 1fr); gap: 12px; }
.input {
  width: 100%; height: 48px; padding: 0 13px;
  background: var(--field); color: var(--ink-fg);
  border: var(--lw) solid var(--panel-line); border-radius: var(--r);
  font: 900 17px/1 "Plus Jakarta Sans", "Noto Sans JP", sans-serif; letter-spacing: .06em;
}
.input::placeholder { color: var(--ink-muted); opacity: .7; font-weight: 700; letter-spacing: .04em; }
.input:focus { border-color: var(--accent); }
.lab-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lab-actions .btn { padding: 0; height: 54px; font-size: 14px; }
.lab-note { font-size: 12.5px; line-height: 1.7; color: var(--ink-muted); }

/* ---------- small screens ---------- */
.lang-btn { white-space: nowrap; }
@media (max-width: 720px) {
  .lang-btn { padding: 12px 10px; }
  .header-cta { display: none; }
  .brand-mark { font-size: 12px; letter-spacing: .12em; }
  .lab-inputs { grid-template-columns: minmax(0, 96px) minmax(0, 1fr); }
}

/* ---------- animation keyframes ---------- */
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes mq { to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes flag { to { background-position: 64px 0; } }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.985); } 60% { transform: scale(1.012); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
