/* Neil Bartholomew portal (neil-bartholomew.pages.dev). Design system paf (PAF Editorial), sibling of
   platinum-k9-training.pages.dev. Shared tokens, reset and components for the chooser page and design options
   A, B ("Night ops" dark theme) and C (light "Hangar" theme, class .theme-hangar on <html>).
   Parallax: js/parallax.js sets --p on [data-parallax] (0 at viewport centre, +1 one screen below, -1 one
   screen above) and --scroll on <html>; layers move with translate3d only. Moving layers are never clipped by
   their own box: only the page edge (html, body overflow-x: clip) and full-width bands clip. Mobile first. */

:root {
  color-scheme: dark;
  /* paf colour tokens, Night ops */
  --hangar: #12161c;
  --hangar-raised: #1c222b;
  --ink: #eceef1;
  --muted: #a3adb8;
  --gold: #e8b931;
  --ink-on-gold: #14181f;
  --gunmetal: #3a4756;
  --steel: #8392a3;
  --signal-red: #ce1126;
  --on-fill: #ffffff;
  --line: rgb(131 146 163 / .28);
  --veil: rgb(18 22 28 / .88);
  /* paf type */
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: Barlow, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --stencil: "Stardos Stencil", "Barlow Condensed", serif;
  --pixel: Silkscreen, ui-monospace, monospace;
  /* paf spacing, radius, motif */
  --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%);
  --rim: drop-shadow(0 0 1px rgb(236 238 241 / .4)) drop-shadow(0 16px 20px rgb(0 0 0 / .6));
}

/* paf light "Hangar" theme (option C) */
.theme-hangar {
  color-scheme: light;
  --hangar: #e6e7e9;
  --hangar-raised: #f6f6f7;
  --ink: #14181f;
  --muted: #4f5a66;
  --gold: #c9971c;
  --ink-on-gold: #14181f;
  --gunmetal: #2e3946;
  --steel: #5b6b7c;
  --line: rgb(91 107 124 / .32);
  --veil: rgb(230 231 233 / .9);
  --rim: drop-shadow(0 14px 16px rgb(20 24 31 / .26));
}

*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: hidden;
  overflow-x: clip; /* only the page edge clips moving layers */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -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 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.theme-hangar :focus-visible { outline-color: var(--ink); }
.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: -48px; padding: 8px 12px;
  background: var(--gold); color: var(--ink-on-gold); font: 700 14px/1 var(--display); text-transform: uppercase;
}
.skip:focus { top: 8px; }

/* ---------- Type ---------- */
.kicker {
  margin: 0 0 6px; color: var(--gold);
  font: 700 13px/16px var(--display); letter-spacing: .14em; text-transform: uppercase;
}
.theme-hangar .kicker { color: var(--gunmetal); }
.theme-hangar .kicker::before {
  content: ""; display: inline-block; width: 12px; height: 9px; margin-right: 8px; vertical-align: 1px;
  background: var(--gold); clip-path: var(--chevron); transform: rotate(90deg);
}
.h2 {
  margin: 0; font: 700 clamp(32px, 9vw, 56px)/.98 var(--display); letter-spacing: .01em; text-transform: uppercase;
}
.sub { margin: 10px 0 0; color: var(--muted); max-width: 40rem; }
.data { font: 500 13px/18px var(--mono); }

/* ---------- Header (A and B; C restyles it) ---------- */
.topbar {
  position: fixed; z-index: 50; inset: 0 0 auto;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--veil);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.mark {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--gold); color: var(--ink-on-gold); font: 700 19px/1 var(--display); letter-spacing: .02em;
}
.brand-name { font: 700 19px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.menu { display: flex; gap: 16px; }
.menu a {
  position: relative; padding: 12px 0;
  font: 700 16px/1 var(--stencil); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
}
.menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.menu a:hover::after { transform: scaleX(1); }
@media (max-width: 459px) { .brand-name { display: none; } }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border-radius: var(--radius-sm); background: var(--gold); color: var(--ink-on-gold); text-decoration: none;
  font: 700 18px/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn::after { /* chevron pointing right */
  content: ""; flex: none; width: 11px; height: 8px; background: currentColor; clip-path: var(--chevron); transform: rotate(90deg);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgb(0 0 0 / .35); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--steel); }
.btn.ghost::after { background: var(--gold); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 16px; }

.soc { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font: 500 13px/18px var(--mono); }
.soc a { display: inline-block; padding: 6px 0; color: var(--gold); text-underline-offset: 3px; }
.theme-hangar .soc a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* ---------- Credentials data panel ---------- */
.creds {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0;
  background: var(--line); border: 1px solid var(--line);
}
.creds div { padding: 11px 12px; background: var(--hangar-raised); }
.creds dt { font: 500 11px/14px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.creds dd { margin: 4px 0 0; font: 500 14px/19px var(--mono); color: var(--ink); }
.creds .key { border-top: 3px solid var(--gold); }

/* ---------- Social accounts, grouped by business ---------- */
.soc-groups { display: grid; gap: 14px; margin-top: 24px; }
.soc-group { background: var(--hangar-raised); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 16px; }
.soc-group h3 { margin: 0 0 8px; font: 600 22px/26px var(--display); text-transform: uppercase; }
.soc-list { list-style: none; margin: 0; padding: 0; }
.soc-list li { display: grid; gap: 1px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.soc-list li:last-child { border-bottom: 0; }
.soc-list .net { font: 500 11px/18px var(--mono); text-transform: uppercase; color: var(--muted); }
.soc-list a { justify-self: start; font: 500 14px/20px var(--mono); color: var(--gold); overflow-wrap: break-word; text-underline-offset: 3px; }
.theme-hangar .soc-list a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.soc-list small { font-size: 13px; line-height: 18px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 14px; margin-top: 24px; }
.contact-card { background: var(--hangar-raised); border: 1px solid var(--line); padding: 18px; }
.contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.contact-actions .btn { width: 100%; padding: 0 10px; }
.contact-list { margin: 14px 0 0; }
.contact-list div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { font: 500 11px/24px var(--mono); text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-list a { color: var(--gold); text-underline-offset: 3px; }
.theme-hangar .contact-list a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.contact-list .data { font-size: 15px; }

/* ---------- Footer ---------- */
.footer {
  padding: 40px var(--gutter) calc(72px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  text-align: center; color: var(--muted); font-size: 14px;
}
.footer p { margin: 4px 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; margin: 4px 0 16px; }
.footer-links a {
  padding-bottom: 3px; border-bottom: 2px solid var(--gold); color: var(--ink); text-decoration: none;
  font: 700 17px/1.3 var(--stencil); letter-spacing: .06em; text-transform: uppercase;
}
.fine { font: 500 12px/18px var(--mono); }
.credit { margin-top: 10px !important; font: 400 8px/16px var(--pixel); letter-spacing: .04em; text-transform: uppercase; -webkit-font-smoothing: none; }
.credit a { color: var(--muted); }

/* ---------- Placeholder (prints its size) ---------- */
.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; text-transform: uppercase; }
.ph-size { font-size: 10px; line-height: 10px; color: var(--ink); }
.ph-label { font-size: 8px; line-height: 8px; color: var(--muted); }

/* ---------- Design-option switcher (fixed, bottom right) ---------- */
.switcher {
  position: fixed; z-index: 60;
  right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 2px; padding: 3px 4px 3px 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--veil); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 500 11px/16px var(--mono); color: var(--muted);
}
.switcher a { padding: 4px 6px; color: var(--ink); text-decoration: none; border-radius: var(--radius-sm); }
.switcher a:hover { text-decoration: underline; text-underline-offset: 3px; }
.switcher a.home { padding-left: 0; color: var(--muted); }
.switcher a[aria-current="page"] { background: var(--gold); color: var(--ink-on-gold); }
.switcher .dot { color: var(--steel); }

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

/* ---------- Tablet and desktop ---------- */
@media (min-width: 700px) {
  .soc-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 64px; }
  .menu { gap: 30px; }
  .menu a { font-size: 18px; }
  .soc-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .switcher { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-parallax] { --p: 0 !important; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
