/* The Red Dirt Runner — mythic West meets Swiss discipline.
   Self-hosted fonts only. Zero external requests. No JavaScript. */

@font-face {
  font-family: "Rye";
  src: url("/fonts/Rye-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Zilla Slab";
  src: url("/fonts/ZillaSlab-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Zilla Slab";
  src: url("/fonts/ZillaSlab-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Zilla Slab";
  src: url("/fonts/ZillaSlab-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* palette: desert dusk, red dirt kept as accent — tuned toward the Cowboy Museum's clay & parchment */
  --night: #14100c;
  --dusk-deep: #241610;
  --dusk: #4a2410;
  --sun: #e8a04c;
  --dirt: #8A3115;
  --dirt-deep: #471C11;
  --ember: #c96a2b;
  --gold: #CDA33C;
  --turquoise: #2f6f6a;
  --turquoise-bright: #3d8a83;
  --sand: #e9d9b8;
  --paper: #FBF6F0;
  --paper-deep: #f1e4cb;
  --ink: #2b1d12;
  --muted: #7d6753;
  --line: #d9c49a;
  /* type */
  --display: "Rye", "Rockwell", Georgia, serif;
  --slab: "Zilla Slab", "Rockwell", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* spacing scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.43 0 0 0 0 0.30 0 0 0 0 0.19 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
}

.wrap { max-width: 740px; margin: 0 auto; padding: 0 22px; }

a { color: var(--dirt); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .18s ease; }
a:hover { color: var(--dirt-deep); }
a:focus-visible { outline: 2px dashed var(--ember); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--sun); color: var(--night); }

/* ============ Masthead: desert dusk ============ */
.site-header {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 44px 0 120px;
  color: var(--sand);
  background:
    radial-gradient(380px 200px at 50% 100%, rgba(232,160,76,.5), rgba(232,160,76,0) 70%),
    linear-gradient(180deg, var(--night) 0%, var(--dusk-deep) 52%, var(--dusk) 82%, #5c2c11 100%);
  border-bottom: 4px double var(--ember);
}
.site-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px; height: 110px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='110' viewBox='0 0 1200 110' preserveAspectRatio='xMidYMax slice'%3E%3Cpath d='M0,110 L0,64 L70,64 L88,38 L176,38 L194,64 L312,64 L334,24 L428,24 L448,64 L596,64 L616,44 L702,44 L722,64 L876,64 L898,32 L992,32 L1012,64 L1200,64 L1200,110 Z' fill='%230d0806'/%3E%3C/svg%3E") bottom center / 1200px 110px repeat-x;
  pointer-events: none;
}
.brand {
  font-family: var(--display);
  font-size: clamp(32px, 6.4vw, 56px);
  color: var(--sand);
  text-decoration: none;
  letter-spacing: .03em;
  line-height: 1.15;  display: inline-block;
  text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 42px rgba(232,160,76,.25);
  transition: color .2s ease, text-shadow .2s ease;
}
.brand:hover { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 60px rgba(232,160,76,.45); }
.brand-logo {
  display: block;
  width: 132px; height: 132px;
  margin: 6px auto 14px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(205,163,60,.65), 0 6px 28px rgba(0,0,0,.55);
}
.est-line {
  font-family: var(--slab); font-weight: 600;
  font-size: 12.5px; letter-spacing: .44em; text-transform: uppercase;
  color: var(--sun); margin: 0 0 12px; text-indent: .44em;
}
.est-line .star { color: var(--ember); }
.tagline { color: #c4ad8d; font-style: italic; margin: 10px 0 0; font-size: 15.5px; }
.site-header nav { margin-top: 20px; position: relative; z-index: 1; }
.site-header nav a {
  color: var(--sand);
  font-family: var(--slab); font-weight: 600; font-size: 13.5px;
  letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  margin: 0 13px; padding-bottom: 6px; border-bottom: 4px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.site-header nav a:hover { color: #fff; border-bottom-color: var(--dirt); }

/* ============ Swiss-western section furniture ============ */
.poster-rule { border: 0; margin: 2.4em auto; max-width: 420px; text-align: center; color: var(--ember); font-size: 15px; }
.poster-rule::before, .poster-rule::after {
  content: ""; display: inline-block; width: 38%; border-top: 1px solid var(--line); vertical-align: middle;
}
.poster-rule::before { margin-right: 14px; } .poster-rule::after { margin-left: 14px; }

h1, h2, h3, h4 { font-family: var(--slab); line-height: 1.22; color: var(--ink); }

/* year stamp */
.year-stamp { text-align: center; margin: 3em 0 1.2em; }
.year-stamp .stamp {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(38px, 7vw, 58px);
  color: var(--dirt-deep);
  border: 3px double var(--ember);
  border-radius: 4px;
  padding: 6px 34px 10px;
  background: var(--paper);
  box-shadow: 3px 4px 0 rgba(110,40,18,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.year-stamp .stamp:hover { transform: translateY(-2px); box-shadow: 5px 7px 0 rgba(110,40,18,.14); }
.year-stamp .stamp a { color: inherit; text-decoration: none; }
.year-stamp .y-star { color: var(--gold); font-size: .5em; vertical-align: middle; padding: 0 6px; }

/* ticket-stub class cards */
.class-block {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 20px 14px 30px;
  margin: 1.5em 0;
  box-shadow: 2px 3px 0 rgba(110,40,18,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.class-block:hover { transform: translateY(-2px); box-shadow: 4px 6px 0 rgba(110,40,18,.10); }
.class-block::before { /* perforation strip */
  content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 8px;
  background-image: radial-gradient(circle, var(--paper) 2.6px, rgba(0,0,0,0) 3px);
  background-size: 8px 13px; background-repeat: repeat-y; background-position: center;
  opacity: .9;
}
.class-label {
  font-family: var(--slab); font-weight: 700;
  font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--dirt); margin: 0 0 8px;
}
.class-label a { text-decoration: none; }
.class-hub-link { font-size: 12.5px; letter-spacing: .08em; font-weight: 600; }

.lane-head {
  font-family: var(--slab); font-weight: 600;
  font-size: 14px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--turquoise); margin: 2em 0 .5em;
  border-bottom: 1px solid var(--line); padding-bottom: 8px;
}

/* post lists with sliding arrows */
.post-list { list-style: none; margin: .4em 0 1.4em; padding: 0; }
.post-list li {
  position: relative; padding: 8px 0 8px 4px;
  border-bottom: 1px dotted var(--line);
  transition: padding-left .18s ease;
}
.post-list li:last-child { border-bottom: 0; }
.post-list li::before {
  content: "→"; position: absolute; left: -4px; top: 8px;
  color: var(--ember); opacity: 0; transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease;
  font-family: var(--slab); font-weight: 700;
}
.post-list li:hover { padding-left: 22px; }
.post-list li:hover::before { opacity: 1; transform: translateX(0); }
.post-list a { font-weight: 600; text-decoration: none; }
.post-list a:hover { text-decoration: underline; color: var(--dirt-deep); }
.post-date { color: var(--muted); font-size: 13px; white-space: nowrap; margin-left: 10px; letter-spacing: .04em; }

.intro { text-align: center; font-size: 18px; color: var(--muted); margin: 2em 0 .5em; font-style: italic; max-width: 560px; margin-left: auto; margin-right: auto; }

/* class hub cross-year nav */
.class-nav {
  display: flex; justify-content: center; gap: 10px 18px; flex-wrap: wrap;
  background: var(--night); border-radius: 3px; padding: 14px 20px; margin: 1.8em 0;
  border-top: 3px double var(--ember); border-bottom: 3px double var(--ember);
}
.class-nav a { color: var(--sun); font-family: var(--slab); font-weight: 600; font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.class-nav a:hover { color: #fff; }
.class-nav .you-are-here { color: var(--sand); font-family: var(--slab); font-weight: 700; letter-spacing: .12em; border-bottom: 2px solid var(--ember); }

/* ============ Post page ============ */
.kicker {
  font-family: var(--slab); font-size: 12.5px; font-weight: 700;
  letter-spacing: .3em; text-transform: uppercase; color: var(--turquoise); margin: 2.2em 0 .5em;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { color: var(--turquoise-bright); }
.post h1 { font-size: clamp(30px, 5.2vw, 42px); font-weight: 700; margin: .1em 0 .35em; letter-spacing: -.01em; }
.byline { color: var(--muted); font-size: 14px; margin: 0 0 1.8em; letter-spacing: .05em; }
.content p { margin: 0 0 1.2em; }
.content > p:first-of-type::first-letter {
  font-family: var(--slab); font-weight: 700; font-size: 3.1em; line-height: .86;
  float: left; padding: 4px 10px 0 0; color: var(--dirt);
}
.content h3 { font-size: 24px; margin: 1.7em 0 .55em; color: var(--dirt-deep); }
.content h4 { font-size: 19px; margin: 1.5em 0 .45em; }
.content ul, .content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.content li { margin-bottom: .4em; }
.content li::marker { color: var(--ember); }
.content blockquote {
  margin: 1.8em 0; padding: 1em 1.4em;
  border-left: 4px solid var(--ember); background: var(--paper-deep);
  font-style: italic; border-radius: 0 3px 3px 0;
}
.content blockquote p { margin: 0; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }

.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 2.6em 0 1em; flex-wrap: wrap; }
.post-nav a { font-family: var(--slab); font-weight: 600; font-size: 15px; text-decoration: none; max-width: 46%; transition: padding .18s ease; }
.post-nav a.prev:hover { padding-left: 6px; }
.post-nav a.next:hover { padding-right: 6px; }

/* ============ Galleries ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
  margin: 1.8em 0;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; height: 215px; object-fit: cover; display: block;
  border-radius: 3px; border: 1px solid var(--line);
  box-shadow: 2px 3px 0 rgba(110,40,18,.10);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gallery img:hover { transform: scale(1.015); box-shadow: 4px 6px 0 rgba(110,40,18,.12); }
.gallery figcaption { font-size: 12.5px; color: var(--muted); padding: 7px 2px 0; line-height: 1.5; }
figure.solo { margin: 1.8em 0; }
figure.solo img {
  width: 100%; border-radius: 3px; border: 1px solid var(--line);
  box-shadow: 2px 3px 0 rgba(110,40,18,.10);
}
figure.solo figcaption { font-size: 13.5px; color: var(--muted); padding-top: 7px; font-style: italic; }

/* ============ Footer ============ */
.site-footer {
  background: var(--night); color: #b3a088; margin-top: 3.5em;
  border-top: 4px double var(--ember); padding: 34px 0 44px; font-size: 14.5px;
}
.site-footer strong { color: var(--sand); font-family: var(--slab); letter-spacing: .08em; }
.site-footer a { color: var(--sun); }
.site-footer .fine { font-size: 13px; color: #84705c; }
.footer-stars { color: var(--ember); letter-spacing: .5em; margin-bottom: 12px; font-size: 13px; }

/* ============ Archive & classes index ============ */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 1.2em 0 2.2em; }
.class-grid a {
  display: block; text-align: center; padding: 16px 8px;
  background: var(--paper-deep); border: 1px solid var(--line);
  border-top: 4px solid var(--dirt);
  border-radius: 3px; font-family: var(--slab); font-weight: 700; letter-spacing: .16em;
  text-decoration: none; font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.class-grid a:hover { transform: translateY(-3px); box-shadow: 3px 5px 0 rgba(110,40,18,.12); }

/* ============ Motion ============ */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.year-block { animation: rise .55s ease both; }
.year-block:nth-of-type(2) { animation-delay: .06s; }
.year-block:nth-of-type(3) { animation-delay: .12s; }
.year-block:nth-of-type(4) { animation-delay: .18s; }
.post { animation: rise .45s ease both; }

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

@media (max-width: 560px) {
  body { font-size: 16px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .gallery img { height: 165px; }
  .post-nav a { max-width: 100%; }
  .site-header nav a { margin: 0 8px; font-size: 12px; }
  .site-header { padding: 34px 0 100px; }
  .content > p:first-of-type::first-letter { font-size: 2.7em; }
}

/* ============ The Split (landing: high school / college) ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 2.6em 0 1em; }
.panel {
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: 4px;
  border-top: 4px solid var(--dirt);
  padding: 26px 28px 20px; box-shadow: 3px 4px 0 rgba(110,40,18,.10);
  animation: rise .55s ease both;
}
.panel-college { border-top-color: var(--turquoise); animation-delay: .08s; }
.panel-head {
  font-family: var(--display); font-size: clamp(30px, 4.4vw, 42px);
  text-align: center; margin: 0; color: var(--dirt-deep); line-height: 1.1;
}
.panel-college .panel-head { color: var(--turquoise); }
.panel-sub { text-align: center; color: var(--muted); font-style: italic; margin: .3em 0 1em; font-size: 15px; }
.panel .lane-head { margin-top: 1.1em; }
.panel-foot { margin: 1.3em 0 .2em; font-family: var(--slab); font-weight: 600; font-size: 14.5px; letter-spacing: .03em; }
.panel-foot a { text-decoration: none; }
.panel-foot a:hover { text-decoration: underline; }
.coming-soon {
  color: var(--muted); font-style: italic; font-size: 15.5px;
  border: 1px dashed var(--line); border-radius: 3px;
  padding: 16px 18px; background: var(--paper); margin: 1em 0;
}

/* ============ Middle school sprinkle ============ */
.ms-strip {
  margin: 1.4em 0 1em; padding: 20px 24px 18px;
  border: 2px dashed var(--line); border-radius: 4px; background: var(--paper);
  text-align: center; animation: rise .55s ease both; animation-delay: .14s;
}
.ms-badge { font-family: var(--display); font-size: 23px; color: var(--gold); letter-spacing: .05em; }
.ms-strip > p { color: var(--muted); font-style: italic; margin: .7em 0 .3em; font-size: 15.5px; }
.ms-strip .post-list { text-align: left; max-width: 660px; margin: .9em auto .3em; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
}
.ms-badge a { color: inherit; text-decoration: none; }
.ms-badge a:hover { text-decoration: underline; }

/* ============ Hero (museum-style full-bleed photographic band) ============ */
.hero {
  width: 100vw; position: relative; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
  background: url("/img/hero-bronze-runner.webp") center 38% / cover no-repeat, var(--night);
  text-align: center; color: #fff;
  padding: clamp(72px, 13vh, 132px) 20px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,12,8,.45) 0%, rgba(20,12,8,.16) 42%, rgba(20,12,8,.80) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; animation: rise .6s ease both; }
.kicker-rule {
  font-family: var(--display); text-transform: uppercase;
  letter-spacing: .34em; text-indent: .34em; font-size: 15px;
  color: var(--gold); margin: 0 0 16px;
}
.kicker-rule::before, .kicker-rule::after {
  content: ""; display: inline-block; width: 64px;
  border-top: 2px solid var(--gold); vertical-align: middle; opacity: .85;
}
.kicker-rule::before { margin-right: 18px; } .kicker-rule::after { margin-left: 18px; }
.hero-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(44px, 8vw, 84px); color: #fff;
  margin: 0 0 12px; line-height: 1.05;
  text-shadow: 0 3px 18px rgba(0,0,0,.55);
}
.hero-sub {
  font-size: clamp(16px, 2.4vw, 20px); color: #f3e9d2; font-style: italic;
  margin: 0 0 28px; text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: var(--slab); font-weight: 700; font-size: 13.5px;
  letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  padding: 14px 30px 12px; border: 4px solid #fff; border-radius: 3px;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-ghost { color: #fff; background: rgba(20,12,8,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.btn-solid { background: #fff; color: var(--dirt); border-color: #fff; }
.btn-solid:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: translateY(-2px); }
