/* ==========================================================================
   Warlander Jousting — core stylesheet
   ========================================================================== */

@font-face {
  font-family: "Knights Quest";
  src: url("../fonts/KnightsQuest.ttf") format("truetype");
  font-display: swap;
}

:root {
  --maroon:        #5E0000;
  --maroon-dark:   #380000;
  --maroon-light:  #7A0A0A;
  --cream:         #F3EBDB;
  --cream-deep:    #E9DEC7;
  --parchment:     #DFD2B6;
  --ink:           #2C2118;
  --ink-soft:      #5B4B3A;
  --gold:          #A8823C;
  --gold-light:    #D8B871;

  --display: "Knights Quest", "Cinzel", "Trajan Pro", Georgia, serif;
  --serif:   "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:    "Inter", "Helvetica Neue", Arial, sans-serif;

  --shell: 1440px;
  --gutter: clamp(20px, 4vw, 68px);
  --header-h: 92px;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ------------------------------------------------------------ typography */
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.06; }
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .015em;
  line-height: .98;
}
.eyebrow {
  font-family: var(--sans);
  font-size: clamp(11px, .84vw, 13px);
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--maroon);
}
.lede { font-size: clamp(17px, 1.25vw, 20px); color: var(--ink-soft); }

/* ---------------------------------------------------------- page texture */
.paper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'>\
<filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/>\
<feColorMatrix type='saturate' values='0'/></filter>\
<rect width='300' height='300' filter='url(%23n)' opacity='0.42'/></svg>");
}
.paper::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 18% 0%,  rgba(255,252,244,.85), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(150,120,80,.20), transparent 62%);
}

/* =========================================================== HEADER / NAV */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(243,235,219,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(94,0,0,.14);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.is-stuck { box-shadow: 0 14px 40px -26px rgba(44,33,24,.65); background: rgba(243,235,219,.96); }

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  min-height: var(--header-h);
  display: flex; align-items: stretch; gap: clamp(16px, 2.4vw, 44px);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 46px; width: auto; }

/* nav */
.nav { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.nav > ul {
  display: flex; align-items: center; gap: clamp(6px, 1.1vw, 22px);
  list-style: none; margin: 0; padding: 0;
}
.nav a, .nav .navlink {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 4px;
  font-family: var(--sans);
  font-size: clamp(11.5px, .82vw, 13.5px);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  white-space: nowrap;
  transition: color .22s ease;
}
.nav a::after, .nav .navlink::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 4px;
  height: 1px; background: var(--maroon);
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav li:hover > a, .nav li:hover > .navlink, .nav a[aria-current="page"] { color: var(--maroon); }
.nav li:hover > a::after, .nav li:hover > .navlink::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.caret { width: 8px; height: 8px; flex: none; transition: transform .3s ease; }
.nav li.has-menu:hover .caret { transform: rotate(180deg); }

/* dropdown */
.nav li.has-menu { position: relative; }
.submenu {
  position: absolute; top: 100%; left: 50%;
  transform: translate(-50%, 8px);
  min-width: 274px;
  padding: 10px;
  margin: 0;
  list-style: none;
  background: #FBF6EA;
  border: 1px solid rgba(94,0,0,.18);
  box-shadow: 0 34px 60px -34px rgba(44,33,24,.75);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .24s ease, transform .24s ease, visibility .24s;
}
.submenu::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 11px; height: 11px;
  background: #FBF6EA; border-left: 1px solid rgba(94,0,0,.18); border-top: 1px solid rgba(94,0,0,.18);
  transform: translateX(-50%) rotate(45deg);
}
.nav li.has-menu:hover > .submenu,
.nav li.has-menu:focus-within > .submenu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.submenu a {
  display: block; width: 100%;
  padding: 11px 14px;
  font-size: 12px; letter-spacing: .13em;
  border-left: 2px solid transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease, padding-left .2s ease;
}
.submenu a::after { display: none; }
.submenu a:hover { background: rgba(94,0,0,.07); border-left-color: var(--maroon); color: var(--maroon); padding-left: 20px; }
.submenu .muted { opacity: .45; pointer-events: none; }
.submenu .muted small { font-size: 9px; letter-spacing: .14em; margin-left: 6px; }

/* join button */
.join-btn {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px;
  min-width: 150px; padding: 0 26px;
  background: var(--maroon); color: var(--cream);
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .19em; text-transform: uppercase;
  transition: background .25s ease;
}
.join-btn:hover { background: var(--maroon-dark); }
.join-btn svg { width: 26px; height: 20px; }

/* burger */
.burger { display: none; padding: 0 var(--gutter) 0 0; align-items: center; }
.burger span { display: block; width: 26px; height: 2px; background: var(--ink); position: relative; transition: background .2s; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 26px; height: 2px; background: var(--ink);
  transition: transform .3s ease;
}
.burger span::before { top: -8px; } .burger span::after { top: 8px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span::after  { transform: translateY(-8px) rotate(-45deg); }

/* ==================================================================== HERO */
.hero {
  position: relative;
  z-index: 1;
  min-height: min(716px, calc(100vh - var(--header-h)));
  display: flex; align-items: center;
  overflow: hidden;
  /* opaque so the multiply-blended castle drawing has something to blend into */
  background: var(--cream);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
/* the castle drawing is an opaque parchment raster — it is multiplied into the
   page and vignetted so its rectangular edges never show */
.castle-art {
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 56%, #000 30%, rgba(0,0,0,.55) 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 58% 60% at 50% 56%, #000 30%, rgba(0,0,0,.55) 62%, transparent 100%);
}
/* on dark panels the drawing is flipped to light-on-dark and screened back in */
.castle-art-light {
  mix-blend-mode: screen;
  /* invert, then crush the paper to black so only the pencil lines screen through */
  filter: invert(1) grayscale(1) brightness(2.1) contrast(2.6) sepia(.9) saturate(1.5);
}
.hero-bg .castle {
  position: absolute; bottom: -24%; right: 2%;
  /* sized off the hero's height, not its width: the -24% offset scales with
     height, so a width cap would let the drawing slide out of the bottom on
     wide screens. This keeps the crop identical and just scales the drawing. */
  height: 127%; width: auto;
  opacity: .9;
  filter: contrast(1.45) brightness(1.02);
}
.hero-bg .wax {
  position: absolute; top: 19%; left: 47%;
  width: clamp(58px, 5.4vw, 96px); opacity: .85;
  transform: rotate(-9deg);
}

.hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--shell);
  margin: 0 auto; padding: clamp(48px, 6vw, 96px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(24px, 4vw, 60px); align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-copy .eyebrow { display: block; margin-bottom: clamp(18px, 2vw, 30px); }

.hero-title { font-size: clamp(44px, 5.6vw, 98px); color: var(--ink); }
.hero-title .line-2 { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 26px); }
.hero-title .small {
  font-size: clamp(24px, 2.9vw, 50px);
  color: var(--maroon);
}
.rule-arrow { flex: 1 1 auto; min-width: 40px; color: var(--ink); opacity: .55; }

.hero-sub {
  margin: clamp(22px, 2.6vw, 34px) 0 0;
  font-family: var(--sans);
  font-size: clamp(12px, .95vw, 14.5px);
  font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-text { margin: 20px 0 0; max-width: 470px; font-size: clamp(17px, 1.2vw, 19.5px); color: var(--ink-soft); }

.hero-meta {
  margin-top: clamp(34px, 4vw, 54px);
  display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 46px);
  padding-top: 26px; border-top: 1px solid rgba(44,33,24,.18);
}
.hero-meta .item { display: flex; gap: 13px; align-items: flex-start; }
.hero-meta svg { width: 21px; height: 21px; color: var(--maroon); flex: none; margin-top: 3px; }
.hero-meta strong, .hero-meta span {
  display: block; font-family: var(--sans); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
}
.hero-meta strong { font-weight: 600; }
.hero-meta span { color: var(--ink-soft); font-weight: 400; letter-spacing: .1em; }

/* knight */
.hero-figure {
  /* the image is positioned against .hero so it can touch the header and bleed right */
  position: static;
  align-self: stretch;
}
.hero::after {
  content: "";
  position: absolute; right: 4%; top: 46%;
  width: min(760px, 52vw); aspect-ratio: 1;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(94,0,0,.14), rgba(94,0,0,.04) 62%, transparent 72%);
  pointer-events: none; z-index: 1;
}
.hero-figure img {
  position: absolute;
  /* top-anchored so the knight starts flush with the bottom of the header;
     width-driven sizing keeps the box equal to the image so the fade mask
     lands on the artwork instead of on empty letterbox space */
  top: 0; right: 0;
  width: min(56vw, 880px); height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: top right;
  filter: drop-shadow(-24px 20px 44px rgba(60,40,20,.30)) saturate(.82) contrast(1.03);
  -webkit-mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 84%, transparent 100%);
  animation: rise 1.3s cubic-bezier(.16,.84,.3,1) both;
}
/* the tournaments hero cut-out is landscape, not portrait like the knight, so
   it needs an explicit height to carry the same weight in the composition */
/* desktop only — below 1025px the stacked hero rules size the cut-out instead */
@media (min-width: 1025px) {
  .hero-tournaments .hero-figure img {
    /* explicit size: the inherited percentages resolve against .hero-inner,
       which is shorter than the hero itself and shrinks the cut-out too far */
    height: clamp(300px, 34vw, 520px);
    width: auto; max-width: none; max-height: none;
    object-position: top right;
  }
}

@keyframes rise { from { opacity: 0; transform: translateY(38px) scale(.98); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  padding: 19px 34px;
  background: var(--maroon); color: var(--cream);
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  position: relative; overflow: hidden;
  transition: color .3s ease;
}
.btn > * { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--maroon-dark);
  transform: scaleX(0); transform-origin: right; transition: transform .38s cubic-bezier(.65,0,.35,1);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn svg { width: 40px; height: 9px; }
.btn-ghost {
  background: transparent; color: var(--maroon);
  border: 1px solid rgba(94,0,0,.4);
}
.btn-ghost::before { background: var(--maroon); }
.btn-ghost:hover { color: var(--cream); }
.hero .btn { margin-top: clamp(30px, 3.4vw, 44px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase; color: var(--maroon);
}
.link-arrow svg { width: 30px; height: 8px; transition: transform .3s ease; }
.link-arrow:hover svg { transform: translateX(7px); }

/* ================================================================ SECTIONS */
.section { position: relative; z-index: 1; padding: clamp(76px, 8vw, 132px) 0; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 4.4vw, 66px); }
.section-head .eyebrow { display: block; margin-bottom: 16px; }
.section-title { font-size: clamp(38px, 4.6vw, 72px); }
.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0 0; color: var(--maroon); opacity: .7;
}
.divider::before, .divider::after { content: ""; height: 1px; background: currentColor; flex: 0 0 60px; }
.divider::after { flex: 1 1 auto; opacity: .35; }
.divider svg { width: 15px; height: 15px; flex: none; }

/* pillars */
/* the mounted knight sits behind the pillars as a pencil watermark — the art
   is transparent line work, so multiply drops its white fills into the cream */
#who-is-it-for { overflow: hidden; }
#who-is-it-for .shell { position: relative; z-index: 1; }
.knight-bg {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, 74%);
  opacity: .13;
  mix-blend-mode: multiply;
  pointer-events: none; user-select: none;
}

.pillars {
  display: grid; gap: clamp(28px, 3vw, 46px);
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.pillar {
  position: relative;
  padding: clamp(34px, 3vw, 46px) clamp(28px, 2.4vw, 40px);
  background: linear-gradient(160deg, rgba(255,252,245,.85), rgba(233,222,199,.55));
  border: 1px solid rgba(94,0,0,.16);
  display: flex; flex-direction: column;
  transition: transform .45s cubic-bezier(.2,.8,.3,1), box-shadow .45s ease, border-color .45s ease;
}
.pillar::after {
  content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 0;
  background: var(--maroon); transition: height .5s cubic-bezier(.2,.8,.3,1);
}
.pillar:hover { transform: translateY(-8px); box-shadow: 0 40px 60px -44px rgba(44,33,24,.7); border-color: rgba(94,0,0,.3); }
.pillar:hover::after { height: 100%; }
.pillar .icon { width: 54px; height: 54px; color: var(--maroon); margin-bottom: 26px; }
.pillar h3 { font-family: var(--display); font-size: clamp(28px, 2.5vw, 40px); margin-bottom: 16px; }
.pillar p { margin: 0 0 14px; color: var(--ink-soft); font-size: 17px; }
.pillar .link-arrow { margin-top: auto; padding-top: 22px; }
.pillar ul { margin: 4px 0 16px; padding-left: 20px; color: var(--ink-soft); }
.pillar ul li { margin-bottom: 4px; }

/* mission band */
.band {
  position: relative;
  background: var(--maroon);
  color: var(--cream);
  overflow: hidden;
}
.band .castle-band {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -34%; width: min(1560px, 112%);
  opacity: .3;
}
.band .shell { position: relative; z-index: 1; }
.band .eyebrow { color: var(--gold-light); }
.band .section-title { color: var(--cream); }
.band p { color: rgba(243,235,219,.82); }
.band .divider { color: var(--gold-light); }
.band-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(30px, 5vw, 80px); align-items: start; }
.band .btn { background: var(--cream); color: var(--maroon); }
.band .btn::before { background: var(--gold-light); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: clamp(44px, 5vw, 68px); background: rgba(255,233,200,.18); }
.stat { background: var(--maroon); padding: 26px 22px; }
.stat b { display: block; font-family: var(--display); font-size: clamp(38px, 3.6vw, 56px); color: var(--gold-light); line-height: 1; }
.stat span { font-family: var(--sans); font-size: 11.5px; letter-spacing: .17em; text-transform: uppercase; color: rgba(243,235,219,.72); }

/* events */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: clamp(28px, 3vw, 44px); }
.event {
  display: flex; flex-direction: column;
  border: 1px solid rgba(94,0,0,.2);
  background: linear-gradient(150deg, rgba(255,252,245,.92), rgba(223,210,182,.5));
  transition: transform .45s cubic-bezier(.2,.8,.3,1), box-shadow .45s ease;
}
.event:hover { transform: translateY(-8px); box-shadow: 0 44px 64px -46px rgba(44,33,24,.7); }
.event-top {
  position: relative; overflow: hidden;
  padding: clamp(26px, 2.4vw, 34px);
  background: var(--parchment);
  border-bottom: 1px solid rgba(94,0,0,.2);
  min-height: 168px; display: flex; flex-direction: column; justify-content: flex-end;
}
.event-top .castle-mini { position: absolute; right: -8%; bottom: -66%; width: 88%; opacity: .62; }
.event-tag {
  align-self: flex-start;
  display: inline-block; margin-bottom: 14px;
  padding: 7px 14px; background: var(--maroon); color: var(--cream);
  font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.event-date { position: relative; font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--maroon); }
.event-body { padding: clamp(28px, 2.6vw, 40px); display: flex; flex-direction: column; flex: 1; }
.event-body h3 { font-family: var(--display); font-size: clamp(30px, 2.7vw, 44px); margin-bottom: 8px; }
.event-body .kicker { font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--maroon); margin: 0 0 18px; }
.event-body p { margin: 0 0 18px; color: var(--ink-soft); font-size: 17px; }
.event-body ul { margin: 0 0 22px; padding: 0; list-style: none; }
.event-body ul li {
  padding: 9px 0 9px 26px; position: relative;
  border-bottom: 1px dashed rgba(44,33,24,.16);
  font-family: var(--sans); font-size: 13.5px; letter-spacing: .05em;
}
.event-body ul li::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: 9px; height: 9px;
  transform: translateY(-50%) rotate(45deg); border: 1px solid var(--maroon);
}
.event-body .btn, .event-body .btn-ghost { margin-top: auto; align-self: flex-start; }

/* ================================================================== FOOTER */
.site-footer { position: relative; z-index: 1; background: var(--ink); color: rgba(243,235,219,.72); overflow: hidden; }
.site-footer .castle-foot { position: absolute; right: -8%; bottom: -28%; width: min(900px, 70%); opacity: .2; }
.footer-inner { position: relative; z-index: 1; padding-top: clamp(60px, 6vw, 90px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(28px, 3vw, 52px); }
.site-footer img.logo { height: 52px; width: auto; margin-bottom: 22px; }
.site-footer h4 {
  font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold-light); margin-bottom: 20px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 11px; }
.site-footer a { font-family: var(--sans); font-size: 13.5px; letter-spacing: .05em; transition: color .2s ease; }
.site-footer a:hover { color: var(--cream); }
.footer-bottom {
  margin-top: clamp(46px, 5vw, 72px); padding: 26px 0;
  border-top: 1px solid rgba(243,235,219,.14);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-family: var(--sans); font-size: 12px; letter-spacing: .1em;
}

/* ---------------------------------------------------------- scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.3,1); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ================================================================ SUBPAGES */
/* activity pages: a parchment title block, prose columns and photo figures */
.page-hero {
  position: relative; overflow: hidden;
  padding: clamp(52px, 5.5vw, 92px) 0 0;
}
/* the castle starts at the bottom edge of the banner photo — the title block
   has no bottom padding, so the section below begins exactly there */
.castle-page {
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  width: min(1180px, 92%); opacity: .3;
  pointer-events: none;
}
/* line-art rider fills the empty space to the right of the page title */
.rider-bg {
  position: absolute; right: 1%; top: clamp(10px, 2vw, 40px);
  width: min(430px, 34vw);
  opacity: .16;
  pointer-events: none; user-select: none;
}
/* portrait pencil drawing beside the page title; sized by height so it always
   clears the banner photo underneath */
.archer-bg {
  position: absolute; right: 2%; top: clamp(16px, 3vw, 44px);
  height: clamp(240px, 32vw, 440px); width: auto;
  opacity: .16;
  pointer-events: none; user-select: none;
}
/* the HEMA section carries a larger version of the drawing */
/* larger drawing for the HEMA section; max() so it keeps growing on wide
   screens instead of stalling at a fixed pixel width */
#the-school .castle-page { width: max(1720px, 92%); max-width: none; }
/* two jousting knights behind the fencing page title; height-driven so the
   wide drawing always clears the banner photo below it */
.joust-bg {
  position: absolute; right: 2%; top: clamp(16px, 3vw, 44px);
  height: clamp(200px, 29vw, 420px); width: auto;
  opacity: .14;
  pointer-events: none; user-select: none;
}
.page-head { position: relative; z-index: 1; max-width: 900px; }
.page-head .eyebrow { display: block; margin-bottom: 16px; }
.page-title { font-size: clamp(40px, 5.4vw, 88px); }
.page-lead {
  position: relative; z-index: 1;
  margin: clamp(24px, 2.6vw, 36px) 0 0; max-width: 62ch;
  font-size: clamp(19px, 1.35vw, 23px); color: var(--ink-soft);
}

/* photo figures */
.figure { margin: 0; position: relative; }
.figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid rgba(94,0,0,.16);
}
.figure figcaption {
  margin-top: 13px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  letter-spacing: .17em; text-transform: uppercase; color: var(--ink-soft);
}
/* uncropped: the full frame keeps the whole horse and rider in view */
.figure-wide { position: relative; z-index: 1; margin-top: clamp(44px, 4.6vw, 74px); }
/* narrower than the shell, so a photo reads as an inset rather than a banner */
.figure-inset { max-width: 780px; margin-left: auto; margin-right: auto; }

/* sponsor logo row */
.sponsor-row {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(30px, 4vw, 70px);
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: center; justify-items: center;
}
.sponsor-row li { display: flex; align-items: center; justify-content: center; }
.sponsor-row img {
  max-height: 130px; width: auto; max-width: 100%;
  object-fit: contain;
}
.band .figure img { border-color: rgba(243,235,219,.22); }
.band .figure figcaption { color: rgba(243,235,219,.7); }

/* prose */
.prose { max-width: 68ch; }
.prose p { margin: 0 0 clamp(18px, 1.6vw, 26px); color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose a {
  color: var(--maroon);
  text-decoration: underline;
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(94,0,0,.42);
  transition: text-decoration-color .25s ease;
}
.prose a:hover { text-decoration-color: var(--maroon); }
/* .prose sits after .band in the cascade, so the band has to win its colours back */
.band .prose p { color: rgba(243,235,219,.82); }
.band .prose strong { color: var(--cream); }
.band .prose a { color: var(--gold-light); text-decoration-color: rgba(216,184,113,.5); }
.band .prose a:hover { text-decoration-color: var(--gold-light); }
.prose strong { color: var(--ink); }

.castle-bed { overflow: hidden; }
.castle-bed .shell { position: relative; z-index: 1; }

/* text beside a photo */
.split {
  display: grid; gap: clamp(30px, 4vw, 70px);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
}
.split .prose { max-width: none; }
.split .figure img { aspect-ratio: 4 / 3; object-fit: cover; }
/* portrait shots keep their own frame instead of being cropped to landscape */
.split .figure-portrait img { aspect-ratio: auto; object-fit: fill; }
.split + .split { margin-top: clamp(52px, 5.5vw, 90px); }
.split-flip .figure { order: -1; }

/* heading left, copy right — for text sections that carry no photo */
.copy-grid {
  display: grid; gap: clamp(30px, 5vw, 80px);
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: start;
}
.copy-grid + .copy-grid { margin-top: clamp(52px, 5.5vw, 90px); }

/* "what you will learn" checklist */
.learn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.learn-list li { position: relative; padding-left: 30px; }
.learn-list li::before {
  content: ""; position: absolute; left: 2px; top: .58em;
  width: 9px; height: 9px; transform: rotate(45deg);
  border: 1px solid var(--maroon);
}
.band .learn-list li::before { border-color: var(--gold-light); }

/* FAQ grid for the getting-started page */
.faq-grid {
  display: grid; gap: clamp(30px, 3.2vw, 52px);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.faq-item h3 {
  font-family: var(--display); font-size: clamp(22px, 1.8vw, 29px);
  margin-bottom: 14px;
}
.faq-item p { margin: 0 0 12px; color: var(--ink-soft); }
.faq-item p:last-child { margin-bottom: 0; }

/* price list poster — capped so the sheet stays readable rather than huge */
.price-sheet { max-width: 700px; margin: 0 auto; }

/* marked-out slot for content that is still to come */
.placeholder {
  border: 1px dashed rgba(94,0,0,.35);
  padding: clamp(30px, 3.4vw, 52px);
  text-align: center; color: var(--ink-soft);
}
.placeholder p { margin: 0; }

/* closing call to action */
.page-cta { text-align: center; }
#start-riding { overflow: hidden; }
#start-riding .shell { position: relative; z-index: 1; }
/* solid black silhouette, so it has to sit low enough for the text to win */
.cta-bg {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  /* sized off the section height so the rider is never cropped */
  height: 88%; width: auto; max-width: 68%;
  object-fit: contain;
  opacity: .09;
  pointer-events: none; user-select: none;
}
.page-cta .prose { margin: 0 auto; max-width: 56ch; }
.page-cta .cta-row {
  margin-top: clamp(28px, 3vw, 42px);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
}

/* =============================================================== RESPONSIVE */
@media (max-width: 1280px) {
  .hero-bg .wax { display: none; }
}
@media (max-width: 1180px) {
  .nav a, .nav .navlink { letter-spacing: .1em; }
  .nav > ul { gap: 4px; }
}
@media (max-width: 1024px) {
  :root { --header-h: 76px; }
  /* backdrop-filter would make the header a containing block for the fixed nav */
  .site-header { backdrop-filter: none; background: var(--cream); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .burger { display: flex; }
  .join-btn { display: none; }
  .brand img { height: 38px; }
  .header-inner { padding-right: 0; justify-content: space-between; }

  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--cream);
    display: block; overflow-y: auto;
    padding: 12px var(--gutter) 60px;
    transform: translateX(100%); transition: transform .4s cubic-bezier(.65,0,.35,1);
  }
  .nav.is-open { transform: none; }
  .nav > ul { display: block; }
  .nav > ul > li { border-bottom: 1px solid rgba(94,0,0,.14); }
  .nav a, .nav .navlink { display: flex; justify-content: space-between; width: 100%; padding: 18px 2px; font-size: 14px; }
  .nav a::after, .nav .navlink::after { display: none; }
  .submenu {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    min-width: 0; border: 0; box-shadow: none; background: transparent; padding: 0 0 12px 14px;
    display: none;
  }
  .submenu::before { display: none; }
  .nav li.has-menu.is-open > .submenu { display: block; }
  .nav li.has-menu:hover > .submenu { display: none; }
  .nav li.has-menu.is-open:hover > .submenu { display: block; }
  .nav li.has-menu.is-open .caret { transform: rotate(180deg); }
  .submenu a { padding: 12px 10px; font-size: 12.5px; }
  .nav .mobile-cta { display: block; margin-top: 26px; }
  .nav .mobile-cta .btn { width: 100%; }

  .split { grid-template-columns: 1fr; }
  .split-flip .figure { order: 0; }
  .castle-page { display: none; }
  .rider-bg, .archer-bg, .joust-bg { display: none; }

  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-figure { order: -1; margin-bottom: -20px; }
  .hero::after { display: none; }
  .hero-figure { position: relative; display: flex; justify-content: center; }
  .hero-figure img {
    position: static;
    width: min(470px, 86%); height: auto; max-width: 86%;
    -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
  }
  .hero-bg .castle { width: 200%; height: auto; right: -50%; bottom: 2%; opacity: .85; }
  .hero-bg .wax { display: none; }
  .band-grid, .copy-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) { .nav .mobile-cta { display: none; } }
@media (max-width: 640px) {
  body { font-size: 17px; }
  /* stacked cards cover almost the full width, so the watermark has to spill
     past them to stay visible */
  .knight-bg { width: 118%; opacity: .16; }
  /* the crest sits dead-centre in the bar; 58px is the logo's native pixel
     height, so this is as large as it goes before the raster softens */
  .header-inner { position: relative; }
  .brand { position: absolute; left: 50%; top: 0; bottom: 0; width: max-content; transform: translateX(-50%); }
  .brand img {
    height: min(58px, calc(var(--header-h) - 14px));
    /* the burger occupies 46px on the right; the clamp keeps that clearance on
       narrow phones, and object-fit stops the logo squashing when it bites */
    max-width: calc(100vw - 116px);
    object-fit: contain;
  }
  .burger { margin-left: auto; }
  /* on phones the knight leads the page: flush with the header line and bled
     out past the gutter so it spans the screen from edge to edge */
  .hero-inner { padding-top: 0; }
  .hero-figure { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  .hero-figure img { width: 100%; max-width: none; }
  .page-title { font-size: clamp(40px, 12vw, 64px); }
  .page-cta .cta-row .btn { width: 100%; }

  .hero-title { font-size: clamp(46px, 13vw, 74px); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 18px; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
