/* Primal SVG: shared styles
   Black background, with the logo's weathered cream and nose-art red */
:root {
  --bg: #000000;
  --raised: #0C0C0C;       /* form fields, slightly lifted from the black */
  --seam: #262626;         /* panel seams and borders */
  --rivet: #6E706F;        /* bare aluminum */
  --cream: #ECDDC2;        /* main text */
  --cream-dim: #A79D8B;    /* secondary text */
  --red: #B3190F;          /* nose-art red, the only accent */
  --red-hot: #CC2416;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.9rem, 3.4vw, 2.5rem);
  --step-hero: clamp(3rem, 7.5vw, 5.4rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Panel seam: two hairlines with a rivet row between them */
.seam {
  height: 14px;
  border-top: 1px solid var(--seam);
  border-bottom: 1px solid var(--seam);
  background-image: radial-gradient(circle at 50% 50%, var(--rivet) 0 1.5px, rgba(0,0,0,.6) 2.1px, transparent 2.7px);
  background-size: 26px 14px;
  background-position: 13px 0;
  opacity: 0.7;
}

/* Header */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.wordmark img { width: 40px; height: 40px; }

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--cream-dim);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--cream); }
.site-nav a[aria-current="page"],
.site-nav .in-section {
  color: var(--cream);
  border-bottom-color: var(--red);
}

/* Mods dropdown: the word goes to the list of all mods, the arrow opens the menu */
.site-nav { align-items: center; }

.nav-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-drop-toggle {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin-right: -0.4rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--cream-dim);
  cursor: pointer;
}

.nav-drop-toggle:hover { color: var(--cream); }

.nav-drop-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.nav-drop.open .nav-drop-toggle svg { transform: rotate(180deg); }

.nav-menu {
  position: absolute;
  top: 100%;
  right: -0.4rem;
  z-index: 50;
  min-width: 268px;
  padding: 0.6rem 0 0;          /* the gap is part of the menu, so hover doesn't drop out crossing it */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

.nav-menu-inner {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  background: #0A0A0A;
  border: 1px solid var(--seam);
  border-top: 2px solid var(--red);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.nav-drop.open .nav-menu {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

@media (hover: hover) and (pointer: fine) {
  .nav-drop:hover .nav-menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .nav-drop:hover .nav-drop-toggle svg { transform: rotate(180deg); }
}

.site-nav .nav-menu a {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.6rem;
  border: 0;
  border-radius: 4px;
  color: var(--cream);
  font-weight: 500;
  line-height: 1.25;
}

.site-nav .nav-menu a:hover,
.site-nav .nav-menu a:focus-visible { background: #161616; }
.site-nav .nav-menu a[aria-current="page"] { background: #161616; box-shadow: inset 2px 0 0 var(--red); }

.nav-menu .thumb {
  width: 48px;
  height: 30px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--seam);
  display: grid;
  place-items: center;
}

.nav-menu .thumb img { width: 100%; height: 100%; object-fit: cover; }
.nav-menu .thumb-kestrel { background: #06100A; }
.nav-menu .thumb-kestrel img { width: 22px; height: 22px; object-fit: contain; }

.nav-menu small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--cream-dim);
}

.site-nav .nav-menu .nav-all {
  display: block;
  margin-top: 0.3rem;
  padding: 0.6rem 0.6rem 0.45rem;
  border-top: 1px solid var(--seam);
  border-radius: 0 0 4px 4px;
  font-size: 0.9rem;
  color: var(--cream-dim);
}
.site-nav .nav-menu .nav-all:hover { color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  .nav-menu, .nav-drop-toggle svg { transition: none; }
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-red {
  background: var(--red);
  color: var(--cream);
  border-color: var(--red);
}
.btn-red:hover { background: var(--red-hot); border-color: var(--red-hot); }
.btn-red:disabled { opacity: 0.6; cursor: progress; }

.btn-line {
  background: transparent;
  border-color: var(--seam);
  color: var(--cream);
}
.btn-line:hover { border-color: var(--cream-dim); }

/* Shared page headings */
.page {
  padding-top: clamp(2.5rem, 7vw, 5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.page h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-hero);
  line-height: 0.98;
  margin: 0 0 1.25rem;
}

.page .lede {
  font-size: var(--step-1);
  color: var(--cream-dim);
  max-width: 44ch;
  margin: 0 0 2.5rem;
}

/* Footer */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
  padding-bottom: 2.25rem;
  font-size: 0.92rem;
  color: var(--cream-dim);
}

.site-foot a { color: var(--cream); }
.site-foot .fine { max-width: 62ch; }

@media (max-width: 440px) {
  .wordmark span { display: none; }
}
