/* ============================================================
   WILLIAMS DEFENDERS (a Williams Motors company) — stylesheet
   Palette: British racing green / cream / brass
   Type: Fraunces (display serif) + Inter (sans)
   ============================================================ */

:root {
  --green-950: #071c14;
  --green-900: #0b2a1f;
  --green-800: #123a2a;
  --green-700: #1a4a35;
  --cream: #f7f2e4;
  --cream-deep: #efe6cf;
  --paper: #fbf8ee;
  --ink: #1d1810;
  --ink-soft: #4c4536;
  --muted: #7a7160;
  --brass: #b98f4e;
  --brass-deep: #96702f;
  --brass-soft: #e3cda0;
  --line: rgba(29, 24, 16, 0.16);
  --line-light: rgba(247, 242, 228, 0.18);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1180px;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 28, 20, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-light);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--cream);
}

.brand-mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-soft);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.site-nav a:hover { opacity: 1; color: var(--brass-soft); }

.site-nav .btn { opacity: 1; }

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

section { padding: clamp(4rem, 8vw, 7rem) 0; }

.section-head {
  max-width: var(--measure);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head-tight { margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }

.eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.eyebrow::after {
  content: "";
  height: 1px;
  width: 3.5rem;
  background: var(--brass);
  opacity: 0.7;
}

.on-dark .eyebrow { color: var(--brass-soft); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0 0 1.1rem;
}

.section-title { font-size: clamp(2rem, 4.4vw, 3.1rem); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0;
}

.on-dark .lede { color: rgba(247, 242, 228, 0.82); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-brass {
  background: var(--brass);
  color: var(--green-950);
  border-color: var(--brass);
}

.btn-brass:hover { background: var(--brass-soft); border-color: var(--brass-soft); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247, 242, 228, 0.45);
}

.btn-ghost:hover { border-color: var(--cream); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

.btn-row-center { justify-content: center; }

/* ---------- Persistent Field Notes tab ---------- */

.notes-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  background: var(--brass);
  color: var(--green-950);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.2rem 0.65rem;
  border-radius: 0 999px 999px 0;
  box-shadow: 4px 0 18px rgba(29, 24, 16, 0.25);
  transition: background 0.2s ease, padding 0.2s ease;
}

.notes-tab:hover {
  background: var(--brass-soft);
  padding-left: 0.95rem;
}

.notes-tab svg {
  width: 1.1rem;
  height: 1.1rem;
  transform: rotate(90deg);
}

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

.hero {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(185, 143, 78, 0.16), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(26, 74, 53, 0.9), transparent 60%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-950) 70%);
  color: var(--cream);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.8rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    transparent 0 46px,
    rgba(247, 242, 228, 0.022) 46px 47px
  );
  pointer-events: none;
}

.hero .wrap { position: relative; }

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brass-soft);
  margin: 0 0 1.4rem;
}

.hero h1 {
  font-size: clamp(2.9rem, 7.4vw, 5.4rem);
  font-weight: 500;
  margin: 0 auto 0.6rem;
}

.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  color: var(--brass-soft);
  margin: 0 auto 2rem;
  max-width: 34ch;
}

.hero .btn-row { justify-content: center; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: clamp(2.2rem, 4vw, 3rem) auto 0;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line-light);
  max-width: 880px;
}

.stat { min-width: 0; }

.stat svg {
  width: 1.7rem;
  height: 1.7rem;
  margin: 0 auto 0.6rem;
  color: var(--brass);
}

.stat-value {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--cream);
  line-height: 1.1;
}

.stat-value em {
  font-style: normal;
  color: var(--brass-soft);
}

.stat-label {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 242, 228, 0.6);
  margin-top: 0.45rem;
}

/* ---------- Register grid ---------- */

.register-footnote {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: var(--measure);
}

.notes-band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(29, 24, 16, 0.35);
}

/* ---------- Photos ---------- */

.card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0;
  background: var(--cream-deep);
  border-bottom: 1px solid var(--line);
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.55rem 1rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  background: linear-gradient(to top, rgba(20, 16, 10, 0.72), transparent);
}

.post-card-photo {
  margin: -2rem -1.8rem 1.5rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.post-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-photo img { transform: scale(1.03); }

.card-body {
  padding: 1.7rem 1.7rem 1.9rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-deep);
  border: 1px solid var(--brass);
  border-radius: 999px;
  padding: 0.32rem 0.9rem;
  margin-bottom: 1.1rem;
  background: rgba(185, 143, 78, 0.08);
}

.card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.9rem;
}

.card-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1rem;
  margin: 0 0 1.1rem;
  padding: 0;
}

.card-specs div { min-width: 0; }

.spec-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec-value {
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--ink);
}

.spec-value.price { color: var(--brass-deep); font-weight: 600; }

.card-note {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  flex: 1;
}

.card-source {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.card-link {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-800);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: color 0.18s ease;
}

.card-link:hover { color: var(--brass-deep); }

/* ---------- How it works ---------- */

.how { background: var(--green-950); color: var(--cream); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.step {
  background: var(--green-950);
  padding: 2.4rem 2rem;
  transition: background 0.2s ease;
}

.step:hover { background: var(--green-900); }

.step svg {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--brass);
  margin-bottom: 1.1rem;
}

.step h3 {
  font-size: 1.28rem;
  color: var(--cream);
  margin-bottom: 0.7rem;
}

.step p {
  font-size: 0.95rem;
  color: rgba(247, 242, 228, 0.72);
  margin: 0;
}

/* ---------- Field notes ---------- */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  border-radius: 3px;
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(29, 24, 16, 0.3);
}

.post-date {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 0.9rem;
}

.post-card h3 {
  font-size: 1.42rem;
  margin-bottom: 0.8rem;
}

.post-card p {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
  flex: 1;
}

.read-more {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-800);
}

.section-cta { margin-top: 2.6rem; }

/* ---------- About ---------- */

.about { background: var(--cream-deep); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about-portrait {
  aspect-ratio: 4 / 5;
  background: linear-gradient(150deg, var(--green-800), var(--green-950));
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass-soft);
  text-align: center;
  padding: 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
}

.about-copy p { margin: 0 0 1.3rem; color: var(--ink-soft); }

.about-copy p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.2em;
  float: left;
  line-height: 0.85;
  padding-right: 0.12em;
  color: var(--green-900);
}

.signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
  margin-top: 1.8rem;
}

/* ---------- Enquire ---------- */

.enquire-panel {
  background:
    radial-gradient(800px 400px at 90% 0%, rgba(185, 143, 78, 0.14), transparent 60%),
    linear-gradient(150deg, var(--green-900), var(--green-950));
  color: var(--cream);
  border-radius: 4px;
  padding: clamp(2.8rem, 6vw, 4.5rem);
  text-align: center;
}

.enquire-panel h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  color: var(--cream);
}

.enquire-panel .lede {
  margin: 0 auto;
  max-width: 56ch;
}

.email-placeholder {
  display: inline-block;
  margin-top: 2rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--brass-soft);
  border: 1px dashed rgba(227, 205, 160, 0.55);
  border-radius: 3px;
  padding: 0.9rem 1.6rem;
  background: rgba(7, 28, 20, 0.5);
}

.email-note {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  color: rgba(247, 242, 228, 0.55);
}

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

.site-footer {
  background: var(--green-950);
  color: rgba(247, 242, 228, 0.65);
  padding: 3rem 0 2.4rem;
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--serif);
  color: var(--cream);
  font-size: 1.05rem;
}

.footer-inner nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

.footer-inner nav a {
  color: rgba(247, 242, 228, 0.65);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-inner nav a:hover { color: var(--brass-soft); }

.footer-fine {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-light);
  font-size: 0.78rem;
  color: rgba(247, 242, 228, 0.4);
}

/* ---------- Notes (journal) pages ---------- */

.notes-hero {
  background: linear-gradient(160deg, var(--green-900), var(--green-950));
  color: var(--cream);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.notes-hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); }

.archive-list { display: flex; flex-direction: column; }

.archive-item {
  display: grid;
  grid-template-columns: 150px 170px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.18s ease;
}

.archive-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.archive-item:hover .archive-title { color: var(--brass-deep); }

.archive-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.archive-title {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 0 0 0.5rem;
  transition: color 0.18s ease;
}

.archive-excerpt { color: var(--ink-soft); font-size: 0.97rem; margin: 0; }

.archive-arrow {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--brass-deep);
}

.article {
  max-width: 44rem;
  margin: 0 auto;
}

.article-hero { margin: 0 0 2.4rem; }

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.article .post-date { margin-bottom: 1rem; }

.article h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 2.2rem;
}

.article p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
}

.article p:first-of-type {
  font-size: 1.22rem;
  color: var(--ink);
}

.back-link {
  display: inline-block;
  margin-bottom: 2.5rem;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-800);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}

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

@media (max-width: 960px) {
  .notes-tab { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .about-portrait { aspect-ratio: 16 / 9; max-width: 480px; }
  .archive-item { grid-template-columns: 1fr auto; }
  .archive-date { grid-column: 1 / -1; }
  .archive-thumb { grid-column: 1 / -1; max-width: 420px; }
}

@media (max-width: 700px) {
  .site-nav a:not(.btn) { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .vehicle-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
