/* Auctaine — style.css
   Navy Sky v1.1, verbatim from out/brand/colors/NAVY-SKY-v1.1.md (WEBSITE-SPEC-v2 §5).
   System font stack only — no web font is loaded (the wordmark ships as SVG outlines). */

:root{
  --primary:#13315C; --deep:#0B2545;
  --secondary:#4F7CAC; --secondary-text:#466D97;
  --accent:#B3432B;
  --tint:#E4ECF5; --neutral:#5F6B7A; --ink:#1B2430; --paper:#FFFFFF;
  --good:#1E7F4F; --warning:#B7791F; --serious:#C2410C; --critical:#B42318;
  --chart-1:#2F6FB8; --chart-2:#D39A2E; --chart-3:#8A5FC8;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 46rem;
  --header-height: 4rem;
  --radius: 0.375rem;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

img, svg { max-width: 100%; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--primary);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--deep);
  color: var(--paper);
}
.header-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  min-height: var(--header-height);
}
.logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.logo-link svg, .logo-link img {
  height: 44px;
  width: auto;
}
@media (max-width: 46rem) {
  .logo-link svg, .logo-link img { height: 32px; }
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  border-bottom-color: var(--secondary);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--paper);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-weight: 600;
}

@media (max-width: 40rem) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-nav.is-open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 0.75rem;
  }
  .site-nav a { display: block; padding: 0.65rem 0.25rem; }
}

/* ---------- Main ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1, h2, h3 { color: var(--primary); line-height: 1.25; }
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.4rem; margin-top: 2.25rem; }
h3 { font-size: 1.1rem; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

p { margin: 0 0 1rem; }

.lede {
  font-size: 1.15rem;
  color: var(--primary);
}

/* Large-text-only blue, per §5: --secondary carries only >=24px (or >=19px bold) or decoration */
.eyebrow {
  color: var(--secondary);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.meta, small, .fine-print {
  color: var(--secondary-text);
  font-size: 0.9rem;
}

.card {
  border: 1px solid var(--tint);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--paper);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
.book-card {
  border: 1px solid var(--tint);
  border-radius: var(--radius);
  padding: 1rem;
}
.book-card picture,
.book-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 768;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  object-fit: cover;
}
.book-card h3 { margin: 0.25rem 0; font-size: 1rem; }
.book-card .book-subtitle {
  color: var(--secondary-text);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.book-card .store-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
}

.kit-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 1.5rem 0 2rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #97371f; }
.btn:visited { color: var(--paper); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--tint); }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; color: var(--primary); }
input[type="text"] {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--neutral);
  border-radius: var(--radius);
  width: 100%;
  max-width: 22rem;
}
input[type="text"]:invalid[aria-invalid="true"] { border-color: var(--critical); }
.error-text {
  color: var(--critical);
  font-size: 0.9rem;
  margin-top: 0.35rem;
  display: none;
}
.error-text.is-visible { display: block; }
.form-note { font-size: 0.9rem; color: var(--secondary-text); margin-top: 0.5rem; }
.form-status[role="status"], .form-status[role="alert"] {
  margin-top: 0.75rem;
  font-weight: 600;
}
.form-status.ok { color: var(--good); }
.form-status.bad { color: var(--critical); }

/* ---------- Table ---------- */
table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--tint);
  overflow-wrap: anywhere;
  word-break: break-word;
}
th { color: var(--primary); }

/* ---------- Preformatted text (the licence, verbatim) ---------- */
pre {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.licence-text {
  white-space: pre-wrap;
  font-family: inherit;
  border: 1px solid var(--tint);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--tint);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--tint);
  border-top: 1px solid var(--tint);
  padding: 2rem 1.25rem;
}
.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 0;
}
.footer-nav a { color: var(--primary); }
.footer-logo img, .footer-logo svg { height: 28px; width: auto; }
.legal-line {
  width: 100%;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--secondary-text);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-nav, .nav-toggle, .skip-link, .btn { display: none !important; }
  .site-header { background: none !important; color: var(--ink) !important; }
  .header-inner .logo-onlight { display: inline-flex !important; }
  .header-inner .logo-ondark { display: none !important; }
  a { color: var(--ink); text-decoration: underline; }
  main { max-width: 100%; padding: 0; }
}

.logo-onlight { display: none; }
@media print { .logo-onlight { display: inline-flex; } }
