/* Platinum K9 Training. Design system: PAF Editorial (`paf`), "Night ops" dark theme: colour, type,
   spacing and radius tokens from its tokens.json; chevron motif in gold. The menu face (Stardos Stencil)
   is the owner's request. Mobile first; desktop from 900px. */

:root {
  color-scheme: dark;
  /* paf colour tokens, dark theme */
  --hangar: #12161c;
  --hangar-raised: #1c222b;
  --ink: #eceef1;
  --ink-on-gold: #14181f;
  --muted: #a3adb8;
  --gold: #e8b931;
  --gunmetal: #3a4756;
  --steel: #8392a3;
  --line: rgb(131 146 163 / .28);
  /* paf type families + the owner's stencil menu face + Silkscreen for placeholder sizes */
  --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 and radius */
  --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));
}

*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: hidden;
  overflow-x: clip; /* moving dogs may pass the page edge; only the page clips them */
  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; }
:focus-visible { outline: 2px solid 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: -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; }

/* ---------- Header and stencil menu ---------- */
.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;
  background: rgb(18 22 28 / .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font: 700 19px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.menu { display: flex; gap: 18px; }
.menu a {
  position: relative; padding: 12px 0;
  font: 700 17px/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, .menu a[aria-current="true"]::after { transform: scaleX(1); }
@media (max-width: 419px) { .brand-name { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 20px) var(--gutter) 0;
}
.hero-head { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; }
.hero-badge { width: 76px; height: 76px; filter: drop-shadow(0 6px 16px rgb(0 0 0 / .6)); }
.kicker {
  margin: 0 0 6px; color: var(--gold);
  font: 700 13px/16px var(--display); letter-spacing: .14em; text-transform: uppercase;
}
h1 { margin: 0; font: 700 clamp(40px, 12.2vw, 104px)/.9 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.lede { margin: 18px 0 0; max-width: 42ch; font-size: 17px; line-height: 25px; }

.lineup-fig { --lh: clamp(220px, 60vw, 400px); position: relative; margin: 20px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter); }
.lineup-fig::before {
  content: ""; position: absolute; inset: 0 0 24px; pointer-events: none;
  background: radial-gradient(62% 72% at 50% 88%, rgb(131 146 163 / .26), rgb(131 146 163 / 0) 70%);
}
.lineup {
  position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 760px;
  height: calc(var(--lh) + 34px); display: flex; align-items: flex-end; justify-content: center;
}
.lineup li {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; margin: 0 -5px;
  transform: translate3d(0, calc(var(--p, 0) * var(--d) * 1px), 0); will-change: transform;
}
.lineup img { height: calc(var(--lh) * var(--h) / 100); width: auto; max-width: none; filter: var(--rim); }
.lineup span {
  margin-top: 8px; padding-top: 7px; min-width: 54px; text-align: center; border-top: 2px solid var(--gold);
  font: 500 12px/1 var(--mono); text-transform: uppercase; color: var(--gold);
}

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 22px 0 0;
  background: var(--line); border: 1px solid var(--line);
}
.stats div { padding: 10px 12px; background: var(--hangar-raised); }
.stats dt { font: 500 11px/14px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 700 24px/1 var(--display); text-transform: uppercase; }

.scroll-cue { /* the start of the centre line, with a chevron pointing down into the timeline */
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 44px; margin: 22px auto 0; padding-top: 4px;
}
.scroll-cue::before { content: ""; width: 14px; height: 10px; background: var(--gold); clip-path: var(--chevron); transform: rotate(180deg); }
.scroll-cue::after { content: ""; width: 2px; height: 56px; background: linear-gradient(var(--gold), var(--line)); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding: 18px var(--gutter) 72px; }
.section-head { position: relative; z-index: 2; max-width: 36rem; margin: 0 auto 28px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
h2 { margin: 0; font: 700 clamp(30px, 8.6vw, 56px)/.98 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.section-sub { margin: 10px 0 0; color: var(--muted); }

.stages-wrap { position: relative; max-width: 1080px; margin: 0 auto; }
.track { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--line); }
.track-fill {
  position: absolute; top: 0; left: 0; width: 100%; height: calc(var(--progress, 0) * 100%);
  background: linear-gradient(180deg, var(--gold), #f6d97c);
}
.track-fill::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px;
  background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 14px 2px rgb(232 185 49 / .55);
}
.stages { list-style: none; margin: 0; padding: 0; }

.stage { /* odd stages: dog left of the line, pinned to its right edge; even stages mirror this */
  --side: -1; --anchor: 100%; --shift: -100%; --gap: 34px; --art-h: clamp(250px, 74vw, 470px);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--gap); align-items: center; padding: 64px 0 28px;
}
.stage:nth-child(even) { --side: 1; --anchor: 0%; --shift: 0%; }
.stage-node { position: absolute; z-index: 4; top: 18px; left: 50%; transform: translateX(-50%); }
.stage-node span {
  display: block; padding: 5px 7px 4px; border-radius: var(--radius-sm); background: var(--gold); color: var(--ink-on-gold);
  font: 500 12px/1 var(--mono); box-shadow: 0 0 0 4px var(--hangar);
}
.stage-art { position: relative; grid-row: 1; grid-column: 1; height: var(--art-h); margin-right: calc(var(--gap) / -2 - 18px); }
.stage:nth-child(even) .stage-art { grid-column: 2; margin-right: 0; margin-left: calc(var(--gap) / -2 - 18px); }
.stage-art::before { /* spotlight, slower than the dog */
  content: ""; position: absolute; z-index: 0; inset: 6% -8% -6%;
  background: radial-gradient(closest-side, rgb(131 146 163 / .34), rgb(131 146 163 / .1) 55%, rgb(131 146 163 / 0));
  transform: translate3d(0, calc(var(--p, 0) * 30px), 0);
}
.stage-num { /* outlined stage number, slowest layer */
  position: absolute; z-index: 0; left: 50%; top: 0; pointer-events: none; user-select: none;
  font: 700 clamp(130px, 44vw, 320px)/.8 var(--display); letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1.5px rgb(131 146 163 / .34);
  transform: translate3d(-50%, calc(var(--p, 0) * 90px), 0);
}
.stage-dog { /* fastest layer; slides in from its own side and fades in on entry */
  position: absolute; z-index: 2; left: var(--anchor); bottom: 0; width: auto; height: auto; max-width: 100%; max-height: 100%;
  transform: translate3d(calc(var(--shift) + clamp(0, var(--p, 0), 1) * var(--side) * 44px), calc(var(--p, 0) * -54px), 0);
  opacity: calc(1 - clamp(0, (var(--p, 0) - .3) * 2.5, 1));
  filter: var(--rim); will-change: transform, opacity;
}
.stage-text {
  position: relative; z-index: 3; grid-row: 1; grid-column: 2; min-width: 0;
  transform: translate3d(0, calc(var(--p, 0) * 14px), 0);
  opacity: calc(1 - clamp(0, (var(--p, 0) - .35) * 2.5, 1));
}
.stage:nth-child(even) .stage-text { grid-column: 1; text-align: right; }
.stage-age { margin: 0; font: 500 13px/18px var(--mono); letter-spacing: .02em; text-transform: uppercase; color: var(--gold); }
.chev { display: flex; gap: 3px; margin: 8px 0 12px; }
.stage:nth-child(even) .chev { justify-content: flex-end; }
.chev i { width: 11px; height: 8px; background: rgb(131 146 163 / .4); clip-path: var(--chevron); }
.chev i.on { background: var(--gold); }
.stage h3 { margin: 0 0 8px; font: 700 clamp(23px, 6.6vw, 40px)/1 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.desc { margin: 0 0 10px; font-size: 15px; line-height: 22px; }
.skills { list-style: none; margin: 0; padding: 0; font: 500 12px/19px var(--mono); color: var(--muted); }
.skills li::before { content: "› "; color: var(--gold); }
.stage:nth-child(even) .skills li::before { content: none; }
.stage:nth-child(even) .skills li::after { content: " ‹"; color: var(--gold); }
.note { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--muted); }

/* ---------- Sponsors ---------- */
.sponsors {
  position: relative; padding: 92px var(--gutter) 56px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--hangar), var(--hangar-raised) 55%, var(--hangar));
}
.pack { /* five Malinois run right to left across the band as the page scrolls */
  position: absolute; z-index: 1; top: -58px; left: 50%; width: min(118vw, 980px); max-width: none; pointer-events: none;
  transform: translate3d(calc(-50% + var(--p, 0) * 60vw), 0, 0); filter: var(--rim); will-change: transform;
}
.logo-wall {
  position: relative; z-index: 2; list-style: none; margin: 0 auto; padding: 0; max-width: 980px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.logo-wall li { display: flex; flex-direction: column; gap: 8px; }
.logo-wall li > span { font: 500 12px/16px var(--mono); color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.logo-tile { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line); transition: transform .2s ease; }
.logo-tile.light { background: #fff; }
.logo-tile.dark { background: #0b0b0c; }
.logo-tile img { width: 86%; height: 86%; object-fit: contain; }
a.logo-tile:hover { transform: translateY(-3px); }
.logo-tile.slot {
  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 / .07) 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; color: var(--ink); }
.ph-label { font-size: 8px; line-height: 8px; color: var(--muted); }

/* ---------- Gear and feeds ---------- */
.brand-section { position: relative; max-width: 1200px; margin: 0 auto; padding: 72px var(--gutter) 40px; }
.brand-section .section-head { max-width: 62%; }
.stencil-tag { margin: 0 0 6px; font: 700 clamp(46px, 14vw, 92px)/.9 var(--stencil); letter-spacing: .04em; text-transform: uppercase; color: var(--gold); }
.section-dog {
  position: absolute; z-index: 0; right: 6px; top: 40px; width: auto; height: clamp(200px, 54vw, 400px); max-width: 40%;
  object-fit: contain; object-position: right bottom; pointer-events: none;
  transform: translate3d(0, calc(var(--p, 0) * -64px), 0); filter: var(--rim); will-change: transform;
}
.card-grid { position: relative; z-index: 1; display: grid; gap: 14px; margin-top: 30px; }
.brand-card { background: var(--hangar-raised); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 18px; }
.card-logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 12px; }
.card-logo.light { background: #fff; padding: 4px; }
.card-logo.wide { width: 92px; }
.brand-card h3, .services h3 { margin: 0 0 6px; font: 600 24px/28px var(--display); text-transform: uppercase; }
.brand-card p { margin: 0 0 12px; }
.code { font: 500 13px/20px var(--mono); color: var(--muted); }
.code b { padding: 2px 6px; border-radius: var(--radius-sm); background: var(--gold); color: var(--ink-on-gold); font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 8px 16px; font: 500 13px/18px var(--mono); }
.brand-card .links { margin: 0; }
.links a, .contact-list a { color: var(--gold); text-underline-offset: 3px; }

.feed-table-wrap { background: var(--hangar-raised); border: 1px solid var(--line); padding: 18px; }
.feed-table { width: 100%; border-collapse: collapse; font: 500 14px/20px var(--mono); }
.feed-table caption {
  padding-bottom: 10px; text-align: left; color: var(--gold);
  font: 700 13px/16px var(--display); letter-spacing: .14em; text-transform: uppercase;
}
.feed-table th { padding: 6px 0; text-align: left; border-bottom: 1px solid var(--line); font: 500 11px/14px var(--mono); text-transform: uppercase; color: var(--muted); }
.feed-table td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.feed-table th:last-child, .feed-table td:last-child { text-align: right; }
.table-note { margin: 12px 0 0; font-size: 13px; line-height: 18px; color: var(--muted); }

/* ---------- Contact and footer ---------- */
.contact { position: relative; max-width: 1200px; margin: 0 auto; padding: 72px var(--gutter) 64px; }
.contact-grid { display: grid; gap: 14px; margin-top: 24px; }
.contact-card, .services { background: var(--hangar-raised); border: 1px solid var(--line); padding: 18px; }
.btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  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;
}
.contact-list { margin: 16px 0 0; }
.contact-list div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font: 500 12px/24px var(--mono); text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-list .todo { color: var(--muted); font-style: italic; }
.services ul { list-style: none; margin: 0; padding: 0; }
.services li { position: relative; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--line); }
.services li::before { content: ""; position: absolute; left: 0; top: 17px; width: 11px; height: 8px; background: var(--gold); clip-path: var(--chevron); }

.footer { padding: 40px var(--gutter) calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 14px; }
.footer-marks { display: flex; justify-content: center; gap: 16px; margin-bottom: 14px; }
.footer-marks img { width: 72px; height: 72px; }
.footer p { margin: 4px 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 8px 0 12px; }
.footer-links a {
  padding-bottom: 3px; border-bottom: 2px solid var(--gold); color: var(--ink); text-decoration: none;
  font: 700 19px/1.2 var(--stencil); letter-spacing: .08em; text-transform: uppercase;
}
.fine { font: 500 12px/18px var(--mono); }
.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); }

/* ---------- Tablet and desktop ---------- */
@media (min-width: 700px) {
  .logo-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-section .section-head { max-width: 36rem; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 64px; }
  .brand img { width: 44px; height: 44px; }
  .menu { gap: 34px; }
  .menu a { font-size: 20px; }
  .hero {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 40px; align-items: end;
    grid-template-areas: "head fig" "lede fig" "stats fig" "cue cue";
    padding-top: calc(var(--header-h) + 56px);
  }
  .hero-head { grid-area: head; grid-template-columns: 112px 1fr; gap: 20px; }
  .hero-badge { width: 112px; height: 112px; }
  h1 { font-size: clamp(56px, 6.2vw, 104px); }
  .lede { grid-area: lede; font-size: 19px; line-height: 28px; }
  .stats { grid-area: stats; }
  .lineup-fig { --lh: min(34vw, 440px); grid-area: fig; margin: 0; }
  .scroll-cue { grid-area: cue; margin-top: 40px; }
  .stage { --gap: 120px; --art-h: 470px; padding: 110px 0 40px; }
  .stage-node { top: 44px; }
  .stage-art { margin-right: calc(var(--gap) / -2 - 30px); }
  .stage:nth-child(even) .stage-art { margin-left: calc(var(--gap) / -2 - 30px); }
  .stage-text { max-width: 420px; }
  .stage:nth-child(even) .stage-text { justify-self: end; }
  .desc { font-size: 17px; line-height: 26px; }
  .skills { font-size: 13px; line-height: 21px; }
  .chev i { width: 14px; height: 10px; }
  .sponsors { padding-top: 150px; }
  .pack { top: -96px; }
  .section-dog { right: var(--gutter); top: 30px; }
}

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