/* New Cross Martial Arts: shared base for the chooser and both design options.
   Design system paf (PAF Editorial). Type families, spacing, shapes and the signal-red accent are shared;
   each option sets its own colour theme (option-a.css: Night ops, option-b.css: Hangar light).
   Parallax: js/parallax.js sets --p on [data-parallax], --scroll and --page on <html>, class "motion" on
   <html> when animation is allowed. Only transform: translate3d() is animated. */

:root {
  --signal-red: #ce1126;      /* red fill, white text on it (5.6:1); never red text on dark */
  --on-fill: #ffffff;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: Barlow, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pixel: Silkscreen, ui-monospace, monospace;
  --jp: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif CJK JP", "Noto Serif JP", serif;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-10: 40px;
  --radius-sm: 2px;
  --gutter: 16px;
  --header-h: 56px;
  --chevron: polygon(0 62%, 50% 0, 100% 62%, 100% 100%, 50% 38%, 0 100%);
}
@media (min-width: 900px) { :root { --gutter: 40px; --header-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: hidden;
  overflow-x: clip; /* moving layers may pass the page edge; only the page clips them */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--hangar);
  color: var(--ink);
  font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--focus, var(--gold)); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; z-index: 100; left: 8px; top: -60px; padding: 10px 14px;
  background: var(--signal-red); color: var(--on-fill); text-decoration: none;
  font: 700 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
}
.skip:focus { top: 8px; }

/* Type roles */
.kicker {
  font: 700 13px/16px var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--kicker, var(--gold));
}
.mono { font-family: var(--mono); }
.caption { font: 500 13px/18px var(--sans); color: var(--muted); }

/* Buttons: red fill with white text, outline, plain link */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 2px solid transparent; text-decoration: none; white-space: nowrap;
  font: 700 17px/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-red { background: var(--signal-red); color: var(--on-fill); }
.btn-red:hover { background: #a90e1f; }
.btn-line { border-color: currentColor; }
.btn-chev::after {
  content: ""; width: 11px; height: 8px; background: currentColor; clip-path: var(--chevron); transform: rotate(90deg);
}

/* Placeholder boxes print their size in Silkscreen (owner's rule) */
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1px dashed var(--steel);
  background: repeating-linear-gradient(45deg, rgb(131 146 163 / .08) 0 10px, rgb(131 146 163 / 0) 10px 20px);
}
.ph-size, .ph-label { font-family: var(--pixel); -webkit-font-smoothing: none; font-smooth: never; text-transform: uppercase; }
.ph-size { font-size: 16px; line-height: 16px; }
.ph-label { font-size: 8px; line-height: 8px; color: var(--muted); }

/* Design options switcher (fixed, small) */
.optswitch {
  position: fixed; z-index: 60; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 10px;
  background: var(--switch-bg, rgb(18 22 28 / .92)); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgb(0 0 0 / .25);
}
.optswitch a { display: inline-flex; align-items: center; min-height: 28px; padding: 0 7px; text-decoration: none; border-radius: var(--radius-sm); }
.optswitch a:first-child { padding-left: 0; }
.optswitch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.optswitch a[aria-current="page"] { background: var(--signal-red); color: var(--on-fill); }
.optswitch .dot { opacity: .6; }

/* Reveal on entry (only when motion is allowed) */
.motion [data-reveal] { transition: opacity .45s ease, transform .45s ease; }
.motion [data-reveal]:not(.is-in) { opacity: 0; transform: translate3d(0, 22px, 0); }

/* Footer credit (as on the K9 site) */
.credit { font: 400 8px/16px var(--pixel); letter-spacing: .04em; text-transform: uppercase; -webkit-font-smoothing: none; font-smooth: never; }
.credit a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-parallax] { --p: 0 !important; }
  .btn { transition: none; }
}
