/* =========================================================
   TDV Police Garage - site stylesheet
   Palette: Met Police navy/steel, chrome silver, "jam sandwich" orange accent
   Plain ASCII punctuation only throughout - Dreamweaver-safe.
   ========================================================= */

:root {
  --ink-navy: #0F1F3D;
  --steel-blue: #1C3F66;
  --chrome-silver: #B9C0C7;
  --panel-grey: #EEF1F4;
  --panel-white: #FFFFFF;
  --text-ink: #171C22;
  --text-muted: #4C5763;
  --accent-orange: #DD6B12;
  --accent-orange-dark: #B9560D;

  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Serif 4", "Georgia", serif;

  --max-content: 760px;
  --max-wide: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--panel-grey);
  color: var(--text-ink);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.65;
}

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

a { color: var(--accent-orange-dark); text-decoration-thickness: 1px; }
a:hover, a:focus { color: var(--accent-orange); }
a:focus-visible { outline: 3px solid var(--accent-orange); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink-navy);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h2 { font-size: 1.9rem; border-bottom: 2px solid var(--chrome-silver); padding-bottom: 0.3em; }
h3 { font-size: 1.3rem; color: var(--steel-blue); }
h4 { font-size: 1.05rem; color: var(--ink-navy); margin: 1.4em 0 0.4em 0; }

p { margin: 0 0 1.1em 0; }

.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: var(--max-content);
  margin: 0 auto;
}

.gallery-prose {
  max-width: var(--max-wide);
  margin: 0 auto;
}

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

.site-header {
  background: var(--ink-navy);
  color: #fff;
  padding: 0.9rem 0;
}

.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.site-title {
  font-family: var(--font-head);
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0;
}

.site-title span { color: var(--accent-orange); }

.site-tagline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--chrome-silver);
  margin: 0;
}

.site-nav {
  background: var(--steel-blue);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.3rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
}

.site-nav a {
  color: #E7ECF1;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.site-nav a:hover, .site-nav a:focus { color: var(--accent-orange); }

.site-nav a[aria-current="page"] {
  color: var(--accent-orange);
  font-weight: 600;
}

/* ---------- Sillitoe check divider ---------- */

.check-band {
  height: 18px;
  background-image: repeating-linear-gradient(
    90deg,
    #0F1F3D 0 18px,
    #FFFFFF 18px 36px
  );
  background-size: 36px 36px;
}

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

.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
}

.hero picture, .hero img {
  width: 100%;
  aspect-ratio: 1300 / 400;
  height: auto;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,31,61,0.35) 0%, rgba(15,31,61,0.88) 100%);
  display: flex;
  align-items: flex-end;
}

.hero-text {
  padding: 2rem 1.5rem 2.2rem;
  max-width: var(--max-wide);
  margin: 0 auto;
  width: 100%;
}

.hero-text h1 {
  color: #fff;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0 0 0.2rem 0;
}

.hero-text p {
  color: var(--chrome-silver);
  font-family: var(--font-body);
  font-size: 1.15rem;
  margin: 0;
  max-width: 46em;
}

/* ---------- Plain page header (for article pages with no photo) ---------- */

.page-header {
  background: var(--ink-navy);
  color: #fff;
  padding: 2.6rem 0 2.2rem;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 0.3rem 0;
}

.page-header p {
  color: var(--chrome-silver);
  font-family: var(--font-body);
  font-size: 1.05rem;
  margin: 0;
}

/* ---------- Back links ---------- */

.back-link {
  font-family: var(--font-head);
  font-size: 0.95rem;
  display: inline-block;
  margin: 1.2rem 0;
}

.back-link.top-link { color: var(--chrome-silver); }
.back-link.top-link:hover, .back-link.top-link:focus { color: #fff; }


/* ---------- Sections ---------- */

section { padding: 3rem 0; }

section.alt { background: var(--panel-white); }

.byline {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: -0.6em 0 1.2em 0;
  letter-spacing: 0.02em;
}

.byline-sign {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--steel-blue);
  text-align: right;
  letter-spacing: 0.02em;
  margin-top: -0.5em;
}

.joke-list {
  margin: 0 0 1.6em 0;
  padding-left: 1.3rem;
}

.joke-list li {
  margin-bottom: 0.5em;
}

.inline-figure {
  margin: 1.6rem 0;
}

.inline-figure img {
  width: 100%;
  border: 1px solid var(--chrome-silver);
}

.inline-figure figcaption {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.inline-figure figcaption p {
  margin: 0 0 0.5em 0;
}

.inline-figure figcaption p:last-child {
  margin-bottom: 0;
}

.fleet-list {
  margin: 1rem 0 1.4rem 0;
  padding-left: 1.3rem;
}

.fleet-list li { margin-bottom: 0.3em; }

.sign-off {
  font-family: var(--font-head);
  font-style: normal;
  color: var(--ink-navy);
  margin-top: 1.6em;
}

/* ---------- Gallery cards ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-wide);
  margin: 2rem auto 0;
}

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.gallery-card {
  background: var(--panel-white);
  border: 1px solid var(--chrome-silver);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.gallery-card:hover, .gallery-card:focus-visible {
  box-shadow: 0 6px 18px rgba(15,31,61,0.18);
  transform: translateY(-2px);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

.gallery-card-label {
  padding: 0.8rem 1rem;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--ink-navy);
  letter-spacing: 0.01em;
  text-align: center;
}

/* ---------- Off-site links table ---------- */

.links-table {
  width: 100%;
  max-width: var(--max-wide);
  margin: 1.5rem auto 0;
  border-collapse: collapse;
  background: var(--panel-white);
}

.links-table caption { text-align: left; margin-bottom: 0.6rem; color: var(--text-muted); font-family: var(--font-head); }

.links-table th, .links-table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--chrome-silver);
  font-size: 0.98rem;
}

.links-table th {
  background: var(--panel-grey);
  font-family: var(--font-head);
  color: var(--ink-navy);
  letter-spacing: 0.02em;
}

.links-table tbody tr:nth-child(even) { background: var(--panel-grey); }

.links-table .group-row th {
  text-align: center;
  background: var(--steel-blue);
  color: #fff;
  font-size: 1rem;
  padding: 0.6rem 1rem;
}

.links-table .descriptor {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

.db-note {
  background: var(--panel-white);
  border-left: 4px solid var(--accent-orange);
  padding: 1rem 1.3rem;
  margin: 1.4rem 0;
}

.db-note p { margin: 0 0 0.6em 0; }
.db-note p:last-child { margin-bottom: 0; }

.mascot-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
}

.memorial-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  columns: 3;
  column-gap: 2rem;
  max-width: var(--max-wide);
}

.memorial-list li {
  break-inside: avoid;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--chrome-silver);
  font-family: var(--font-head);
  color: var(--ink-navy);
}

@media (max-width: 700px) {
  .memorial-list { columns: 2; }
}

@media (max-width: 420px) {
  .memorial-list { columns: 1; }
}

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

.site-footer {
  background: var(--ink-navy);
  color: var(--chrome-silver);
  padding: 1.6rem 0;
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.95rem;
}

.site-footer a { color: #fff; }

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .hero picture, .hero img { aspect-ratio: 3 / 2; }
  section { padding: 2rem 0; }
  .site-nav ul { gap: 0.2rem 0.9rem; padding: 0.6rem 1rem; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-card { transition: none; }
}
