/* PKILLA site. Black, white and grey with one red accent. */

/* Archivo variable font (SIL Open Font License), self-hosted so the page does not
   wait on Google Fonts. Latin is preloaded in index.php; latin-ext loads only if needed. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --black: #000000;
  --white: #ffffff;
  --grey: #ededed;
  --line: #d4d4d4;
  --mute: #595959;
  --red: #d0121b;          /* on light backgrounds */
  --red-bright: #ff3340;   /* text and rules on black */
  --red-button: #e11d2a;   /* solid buttons on black */
  --wrap: 1120px;
  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(4rem + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--black); font: 400 1.0625rem/1.6 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 850;
  font-stretch: 75%;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
}
h3 { font-size: 1.125rem; font-weight: 700; margin: 1.5rem 0 .6rem; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.tone-dark :focus-visible { outline-color: var(--red-bright); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--white); color: var(--black); padding: .6rem 1rem; font-weight: 700; }
.skip:focus { top: calc(.75rem + env(safe-area-inset-top, 0px)); }
.muted { color: var(--mute); }

/* Section tones */
main > section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.tone-light { background: var(--white); color: var(--black); }
.tone-grey  { background: var(--grey);  color: var(--black); }
.tone-dark  { background: var(--black); color: var(--white); }
.tone-dark .muted { color: #a8a8a8; }
.lede { max-width: 60ch; font-size: 1.125rem; margin-bottom: 1.5rem; }
.tone-light .lede, .tone-grey .lede { color: #333; }
.tone-dark .lede { color: #d0d0d0; }
.prose { max-width: 65ch; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; min-height: 3rem;
  padding: .7rem 1.35rem; border: 2px solid; border-radius: 4px;
  font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.2;
}
.btn-solid { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-solid:hover { background: #a90e16; border-color: #a90e16; }
.btn-outline { border-color: currentColor; background: transparent; }
.btn-outline:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.tone-dark .btn-solid { background: var(--red-button); border-color: var(--red-button); }
/* Black text on the brighter hover red keeps contrast above 4.5:1 */
.tone-dark .btn-solid:hover { background: var(--red-bright); border-color: var(--red-bright); color: var(--black); }
.tone-dark .btn-outline:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--black); color: var(--white);
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid #262626;
}
.topbar-in { display: flex; align-items: center; gap: 1.25rem; min-height: 3.75rem; }
.mark { margin-right: auto; font-weight: 900; font-stretch: 62%; font-size: 1.6rem; letter-spacing: .01em; text-decoration: none; line-height: 1; }
.topbar nav { overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.25rem; white-space: nowrap; }
.topbar nav a { text-decoration: none; font-weight: 600; font-size: .95rem; color: #d6d6d6; display: inline-flex; align-items: center; min-height: 2.75rem; }
.topbar nav a:hover { color: var(--white); box-shadow: inset 0 -2px 0 var(--red-bright); }
.ig-icon { color: var(--white); display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; margin: 0 -.75rem 0 -.75rem; }
.ig-icon:hover { color: var(--red-bright); }

/* Hamburger (shown on phones once site.js has wired it up) */
.menu-toggle {
  display: none; position: relative; width: 2.75rem; height: 2.75rem; margin-right: -.5rem;
  border: 0; border-radius: 4px; background: transparent; color: var(--white); cursor: pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  position: absolute; left: .7rem; width: 1.35rem; height: 2px; background: currentColor; transition: transform .2s, opacity .2s;
}
.menu-toggle span { top: calc(50% - 1px); }
.menu-toggle span::before, .menu-toggle span::after { content: ""; left: 0; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); background: var(--white); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); background: var(--white); }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0 !important; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2rem; align-items: end; }
.hero-copy { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.nick {
  margin: 0 0 .25rem;
  font-weight: 900; font-stretch: 62%;
  font-size: clamp(5rem, 17vw, 12.5rem);
  line-height: .78; letter-spacing: -.015em;
  color: var(--white);
}
.hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 700; font-stretch: 100%; color: #cfcfcf; margin-bottom: 1rem; }
.tagline { color: #a8a8a8; font-size: 1.05rem; }
.next { font-size: 1.125rem; margin-top: 1.25rem; }
.next strong { color: var(--red-bright); margin-right: .35rem; }
.countdown { margin-top: 1.25rem; }
.count-units { display: flex; gap: .6rem; }
.count-units div { border: 2px solid var(--red-bright); border-radius: 4px; padding: .5rem .8rem .45rem; min-width: 4.6rem; text-align: center; }
.count-units b { display: block; font-size: 2rem; font-weight: 850; font-stretch: 75%; line-height: 1; color: var(--red-bright); font-variant-numeric: tabular-nums; }
.count-units span { font-size: .8rem; color: #a8a8a8; }
.count-label { margin: .5rem 0 0; font-size: .9rem; color: #a8a8a8; }
.hero-photo { margin: 0; justify-self: center; align-self: end; }
.hero-photo img { width: 100%; max-width: 440px; }

/* Road to Nationals: a real sequence, so the steps are numbered */
.road { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); counter-reset: step; }
.road li { position: relative; counter-increment: step; padding: 3.25rem .75rem 0 0; }
.road li::before {
  content: counter(step); position: absolute; top: 0; left: 0; z-index: 1;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .95rem;
  background: var(--white); border: 2px solid var(--line); color: var(--mute);
}
.road li::after { content: ""; position: absolute; top: 1.05rem; left: 2.25rem; right: 0; height: 3px; background: var(--line); }
.road li:last-child::after { display: none; }
.road li.is-done::before { background: var(--black); border-color: var(--black); color: var(--white); }
.road li.is-done::after { background: var(--black); }
.road li.is-current::before { background: var(--red); border-color: var(--red); color: var(--white); box-shadow: 0 0 0 5px rgba(208, 18, 27, .18); }
.road-title { display: block; font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.road-detail { display: block; color: var(--mute); font-size: .95rem; margin-top: .2rem; }
.road li.is-upcoming .road-title { color: #444; }
.road-now { display: inline-block; margin-top: .5rem; background: var(--red); color: var(--white); font-weight: 700; font-size: .8rem; padding: .15rem .55rem; border-radius: 3px; }

/* Story */
.story { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.story.no-photo { grid-template-columns: minmax(0, 1fr); }
.story-photo { margin: 0; }
.story-photo img { width: 100%; border-radius: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; margin: 1.5rem 0 0; }
.facts dt { font-size: .85rem; color: var(--mute); }
.facts dd { margin: 0; font-weight: 700; }

/* Profile */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.tape { margin: 0; border-top: 3px solid var(--black); }
.tape div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.tape dt { color: var(--mute); }
.tape dd { margin: 0; font-weight: 700; text-align: right; }
.profile h3 { margin-top: 0; }
.milestones { margin: 0; padding: 0; list-style: none; }
.milestones li { padding: .7rem 0 .7rem 1.4rem; border-bottom: 1px solid var(--line); position: relative; }
.milestones li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: .6rem; height: .6rem; background: var(--red); }

/* Sponsor */
.sponsor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
.price { font-size: clamp(3.5rem, 9vw, 5.5rem); font-weight: 900; font-stretch: 75%; line-height: .9; color: var(--red-bright); margin-bottom: .5rem; }
.price span { font-size: 1.1rem; font-weight: 600; font-stretch: 100%; color: #a8a8a8; }
.perks { list-style: none; margin: 0; padding: 0; }
.perks li { padding: .45rem 0 .45rem 1.9rem; position: relative; }
.perks li::before {
  content: ""; position: absolute; left: 0; top: .72rem; width: 1.05rem; height: 1.05rem;
  border-radius: 2px; background: var(--red-button) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat;
}
.sponsor h3:first-child { margin-top: 0; }
.meter { height: 1.1rem; border: 2px solid var(--white); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--red-bright); }
.meter-text { margin-top: .6rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { border: 1px solid #4a4a4a; border-radius: 999px; padding: .3rem .85rem; font-size: .95rem; }

/* Sponsor wall */
.logos { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.logos li > a, .logos li > div {
  display: grid; place-items: center; aspect-ratio: 3 / 2; padding: 1.25rem;
  background: var(--grey); border-radius: 4px; text-decoration: none; text-align: center;
  font-weight: 800; font-size: 1.1rem;
}
.logos img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.logos li > a:hover { outline: 2px solid var(--black); }
.logo-open > a, .logo-open > div { background: transparent !important; border: 2px dashed var(--red); color: var(--red); }

/* Inside the camp */
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; margin-top: 1rem; }
.video { display: flex; justify-content: center; min-width: 0; }
.video .instagram-media, .video iframe { margin: 0 auto !important; max-width: 540px !important; width: 100% !important; min-width: 0 !important; }
.video blockquote.instagram-media {
  display: grid; place-items: center; min-height: 420px; padding: 1rem;
  background: #1a1a1a; border: 1px solid #333; border-radius: 6px;
}
.ig-fallback { font-weight: 700; color: var(--white); }
.photos { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.photos figcaption { font-size: .9rem; color: #a8a8a8; margin-top: .45rem; }

/* Updates */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem 2.5rem; margin-top: 1rem; }
.post { border-top: 3px solid var(--black); padding-top: 1rem; }
.post time { font-size: .9rem; color: var(--mute); }
.post h3 { margin: .3rem 0 .6rem; font-size: 1.3rem; line-height: 1.2; }

/* Footer */
.site-footer { padding: 3rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #262626; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand { font-weight: 900; font-stretch: 62%; font-size: 2.4rem; line-height: 1; margin-bottom: .5rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--red-bright); text-underline-offset: 4px; }
.footer-credit p { margin-bottom: .75rem; }

/* Responsive */
@media (max-width: 900px) {
  .road { grid-auto-flow: row; grid-auto-columns: auto; }
  .road li { padding: 0 0 1.75rem 3.25rem; }
  .road li::after { top: 2.25rem; bottom: 0; left: 1.05rem; right: auto; width: 3px; height: auto; }
  .road-now { margin-top: .35rem; }
}
@media (max-width: 760px) {
  /* Phones: the links fold into a dropdown behind the hamburger */
  .topbar.has-menu .menu-toggle { display: inline-block; }
  .topbar.has-menu nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black); border-bottom: 1px solid #262626;
    padding: .25rem clamp(1.1rem, 4vw, 2rem) 1rem; max-height: calc(100dvh - 4rem); overflow-y: auto;
  }
  .topbar.has-menu nav.is-open { display: block; }
  .topbar.has-menu ul { flex-direction: column; align-items: stretch; gap: 0; white-space: normal; }
  .topbar.has-menu nav li + li { border-top: 1px solid #262626; }
  .topbar.has-menu nav a { display: flex; min-height: 3rem; font-size: 1.1rem; }
  .topbar.has-menu nav a:hover { box-shadow: none; color: var(--red-bright); }
  /* Without JavaScript the menu scrolls sideways; fade its edge so the cut-off links read as "more" */
  .topbar:not(.has-menu) nav {
    padding-right: 1.5rem;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.25rem), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 2.25rem), transparent);
  }
  .hero-grid, .story, .profile, .sponsor, .footer-grid, .videos { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 0; }
  .hero-photo img { max-width: 320px; }
  .count-units div { min-width: 0; flex: 1; }
}

/* Sponsor request modal */
.modal {
  width: min(100% - 2rem, 40rem); max-height: calc(100dvh - 2rem); padding: 0;
  border: 0; border-radius: 6px; background: var(--white); color: var(--black);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.modal::backdrop { background: rgba(0, 0, 0, .78); }
.modal-in { position: relative; padding: clamp(1.5rem, 4vw, 2.25rem); }
.modal h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin: 0 2.5rem .6rem 0; }
.modal-intro { color: #333; margin-bottom: 1.25rem; }
.modal-close {
  position: absolute; top: .75rem; right: .75rem; width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%; background: transparent; font-size: 1.9rem; line-height: 1; cursor: pointer; color: var(--black);
}
.modal-close:hover { background: var(--grey); }
.sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sf-field { display: grid; gap: .3rem; min-width: 0; align-content: start; }
.sf-wide { grid-column: 1 / -1; }
.sf-field span { font-weight: 700; font-size: .95rem; }
.sf-field em { font-style: normal; font-weight: 400; color: var(--mute); font-size: .85rem; margin-left: .25rem; }
.sf-field input, .sf-field textarea {
  width: 100%; min-height: 3rem; padding: .65rem .8rem; font: inherit; color: inherit;
  border: 2px solid #b5b5b5; border-radius: 4px; background: var(--white);
}
.sf-field textarea { min-height: 5.5rem; resize: vertical; }
.sf-field input:focus, .sf-field textarea:focus { border-color: var(--black); outline: none; box-shadow: 0 0 0 3px rgba(208, 18, 27, .25); }
.sf-field [aria-invalid="true"] { border-color: var(--red); }
.sf-error { color: var(--red); font-size: .9rem; font-weight: 600; }
.sf-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sf-status { color: var(--red); font-weight: 600; min-height: 1.5rem; margin: 1rem 0 0; }
.sf-status:empty { min-height: 0; margin: 0; }
.sf-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.sf-actions .btn-outline:hover { background: var(--black); color: var(--white); }
.sf-done:focus { outline: none; }
@media (max-width: 560px) {
  .sf-grid { grid-template-columns: minmax(0, 1fr); }
  .sf-actions .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}