/* Arundel Tackle — static skeleton
   One stylesheet, no external dependencies, no fonts to load. */

:root {
  --ink:    #0f1b2b;
  --paper:  #ffffff;
  --mist:   #f3f5f8;
  --accent: #eb4f47;
  --slate:  #5a6673;
  --line:   #dce1e8;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 60rem;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0 1.25rem;
  text-align: center;
}

.brand {
  display: inline-block;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand .mark { color: var(--accent); }

.site-nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
}

.site-nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* ---------- Typography ---------- */

main { padding: 3.5rem 0 4rem; }

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h2 {
  margin: 3rem 0 1rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h3 {
  margin: 2rem 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

p { margin: 0 0 1.25rem; max-width: 42em; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--slate);
  max-width: 38em;
}

.rule {
  width: 3rem;
  height: 3px;
  background: var(--accent);
  border: 0;
  margin: 0 0 2rem;
}

/* ---------- Panels & links ---------- */

.panel {
  background: var(--mist);
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  margin: 2.5rem 0;
}
.panel p:last-child { margin-bottom: 0; }
.panel h3 { margin-top: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
  padding: 0;
  list-style: none;
}

.card {
  border: 1px solid var(--line);
  padding: 1.375rem;
}
.card a {
  font-weight: 700;
  text-decoration: none;
  font-size: 1.0625rem;
}
.card p {
  margin: 0.4rem 0 0;
  font-size: 0.9375rem;
  color: var(--slate);
}

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

/* ---------- Spec tables ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0 2.5rem;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 34rem;
}

thead th {
  background: var(--ink);
  color: var(--paper);
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
  white-space: nowrap;
}

tbody td { padding: 0.65rem 0.9rem; border-top: 1px solid var(--line); }
tbody tr:nth-child(even) { background: var(--mist); }

td.model {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}
td.model .note {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  font-size: 0.875rem;
  color: var(--slate);
}
.site-foot p { margin: 0 0 0.5rem; max-width: none; }
.site-foot a { color: var(--slate); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   Images
   Every <img> carries an onerror that removes its <figure>.
   A missing file collapses cleanly instead of showing a broken
   icon, and the :has() rules below reflow the layout around it.
   ============================================================ */

.brand { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }

.brand img { height: 64px; width: auto; display: block; }

@media (max-width: 30em) { .brand img { height: 52px; } }

/* If the logo image is present, hide the text wordmark.
   If it fails to load and removes itself, the text returns. */
.brand img + .brand-text { display: none; }

figure { margin: 0; }

figure img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--mist);
}

figcaption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--slate);
  letter-spacing: 0.02em;
}

/* ---------- Hero ---------- */

.hero { display: grid; gap: 2rem; align-items: center; margin-bottom: 1rem; }

@media (min-width: 48em) {
  .hero:has(.hero-media) { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
}

.hero-media img { border: 1px solid var(--line); }

.hero h1 { margin-bottom: 1.25rem; }

/* ---------- Feature band ---------- */

.band {
  background: var(--ink);
  color: var(--paper);
  margin: 4rem 0;
  padding: 2.5rem 0;
}
.band h2 { margin-top: 0; color: var(--paper); }
.band p { color: #c4ccd6; }
.band a { color: var(--paper); text-decoration-color: var(--accent); }
.band a:hover { color: var(--accent); }

.band-inner { display: grid; gap: 2rem; align-items: center; }

@media (min-width: 48em) {
  .band-inner:has(figure) { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ---------- Image rows ---------- */

.figure-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
}

.figure-wide { margin: 2rem 0 2.5rem; }

.figure-inset {
  margin: 1.5rem 0 2.5rem;
  max-width: 26rem;
}

.figure-inset img,
.figure-row img,
.figure-wide img { border: 1px solid var(--line); }

/* Tighten spacing when a spec section's image was removed */
.spec-block { margin-bottom: 2.5rem; }
.spec-block h3 { margin-top: 0; }
