/* Dorset Precision Shooting Club — hand-written, no frameworks.
   Palette and type follow the homepage design spec. */

:root {
  --cream: #f8f5f0;
  --cream-2: #f2ede4;
  --gold: #c4a35a;
  --gold-dark: #b08e4a;
  --ink: #2a2a2a;
  --ink-soft: #5a5a5a;
  --ink-faint: #8b8578;
  --line: #e5e0d8;
  --white: #ffffff;
  --serif: "Playfair Display", "Libre Baskerville", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1280px;
  --pad-y: clamp(4rem, 7vw, 7rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

::selection { background: var(--gold); color: var(--white); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-dark); }

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

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(var(--max), calc(100% - 3rem)); margin-inline: auto; }

[id] { scroll-margin-top: 110px; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 94%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 92px;
}

.brand { display: flex; align-items: center; gap: 0.85rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 58px; height: auto; }
.brand-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-text small {
  display: block;
  margin-top: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--gold);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.site-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links { display: flex; align-items: center; gap: 2.1rem; list-style: none; }
.nav-links a {
  position: relative;
  display: block;
  padding: 0.4rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 1.1rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.nav-cta svg { width: 17px; height: 17px; color: var(--gold); flex: none; }
.nav-cta:hover {
  color: var(--ink);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.5);
}
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

@media (max-width: 1080px) {
  .nav { min-height: 76px; }
  .nav-toggle { display: grid; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform: none;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.5rem 1.5rem;
    box-shadow: 0 24px 34px -26px rgba(0, 0, 0, 0.35);
  }
  .site-nav.open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links li { width: 100%; }
  .nav-links a { padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-links a.nav-cta {
    display: inline-flex;
    width: auto;
    padding: 0.7rem 1.1rem;
    border-bottom: none;
    color: var(--ink);
  }
  [id] { scroll-margin-top: 90px; }
  .nav-cta-mobile { display: block; margin-top: 1.2rem; }
  .nav-cta-desktop { display: none; }
  .brand img { width: 46px; }
  .brand-text strong { font-size: 1.22rem; }
  .brand-text small { font-size: 0.54rem; letter-spacing: 0.18em; }
}

/* ---------- hero ---------- */

.hero { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3.5rem, 6vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.eyebrow {
  display: block;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  background: var(--gold);
  margin-top: 0.9rem;
}

.hero h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.9rem, 5.6vw, 4.8rem);
  line-height: 0.98;
}
.hero h1 .hero-accent { display: block; color: #948d7e; font-weight: 400; }

.hero-sub {
  margin-top: 1.6rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.75;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 26px 50px -32px rgba(0, 0, 0, 0.5);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--gold-dark); color: var(--white); }

.btn-outline, .btn-ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-outline:hover, .btn-ghost:hover { border-color: var(--gold); color: var(--ink); }

/* ---------- values + feature cards ---------- */

.values { padding: 0 0 clamp(4rem, 7vw, 6.5rem); }

.values-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) 2.6fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.values-copy h2 {
  max-width: 17rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.65;
}
.values-copy h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  background: var(--gold);
  margin-top: 1.2rem;
}
.values-copy p { margin-top: 1.4rem; max-width: 18rem; color: var(--ink-soft); font-size: 0.95rem; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem; }

.feature-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 3.7;
  overflow: hidden;
  border-radius: 12px;
  background: #d9d4ca;
  isolation: isolate;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.66) 100%);
  transition: background 0.35s;
}
.feature-title {
  position: absolute;
  left: 1rem;
  bottom: 1.05rem;
  z-index: 2;
  max-width: 76%;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}
.feature-plus {
  position: absolute;
  right: 0.85rem;
  bottom: 0.75rem;
  z-index: 2;
  color: var(--gold);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 32px -24px rgba(0, 0, 0, 0.55); }
.feature-card:hover img { transform: scale(1.055); }
.feature-card:hover::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 28%, rgba(0, 0, 0, 0.75) 100%); }

/* ---------- bottom feature bar ---------- */

.home-features { border-top: 1px solid var(--line); padding: 2.4rem 0 2.6rem; }
.home-features .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.home-feature { display: flex; align-items: center; gap: 1rem; }
.home-feature svg { width: 30px; height: 30px; color: var(--gold); flex: none; }
.home-feature h3 {
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.home-feature p { color: var(--ink-soft); font-size: 0.86rem; }

/* ---------- generic sections ---------- */

section.pad { padding: var(--pad-y) 0; }
section.pad-tight { padding: 3rem 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section-head p { max-width: 36rem; color: var(--ink-soft); }

.kicker {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.accent { color: var(--gold); }

/* text cards (inner pages) */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.6rem 1.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: color-mix(in srgb, var(--gold) 60%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 18px 30px -26px rgba(0, 0, 0, 0.4);
}
.card .num {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.card h3 { margin: 0.6rem 0; font-family: var(--sans); font-size: 1.02rem; font-weight: 700; }
.card p { color: var(--ink-soft); font-size: 0.93rem; }
.card a.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stat { padding: 1.6rem 1.4rem; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold-dark);
  letter-spacing: -0.02em;
}
.stat span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* page hero (inner pages) */
.page-hero {
  background: var(--cream-2);
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0 3.5rem;
}
.page-hero h1 { margin-top: 0.4rem; font-size: clamp(2.3rem, 4.5vw, 3.4rem); }
.page-hero .lede { margin-top: 1.2rem; max-width: 42rem; color: var(--ink-soft); font-size: 1.05rem; }

/* two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.two-col .sticky { position: sticky; top: 7rem; }

.prose { max-width: 42rem; }
.prose p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.prose p strong { color: var(--ink); }
.prose h2 { margin: 2.2rem 0 1rem; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1.2rem 1.2rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--gold); }

/* timeline */
.timeline { list-style: none; margin-top: 0.5rem; }
.timeline li { position: relative; padding: 0 0 1.6rem 1.8rem; border-left: 1px solid var(--line); }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
}
.timeline li:last-child { border-left-color: transparent; }
.timeline strong { display: block; color: var(--ink); }
.timeline span { color: var(--ink-soft); font-size: 0.93rem; }

/* range rows */
.range-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.range-row:first-of-type { border-top: 1px solid var(--line); }
.range-row .dist {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--gold-dark);
}
.range-row h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.range-row p { color: var(--ink-soft); font-size: 0.92rem; }

/* affiliations */
.affil-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.affil { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem; }
.affil h3 { font-family: var(--sans); font-size: 0.98rem; font-weight: 700; }
.affil p { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.88rem; }

/* steps */
.steps { counter-reset: step; list-style: none; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-dark);
  font-size: 1.1rem;
  font-weight: 700;
}
.steps h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; }
.steps p { margin-top: 0.3rem; color: var(--ink-soft); font-size: 0.93rem; }

/* callout */
.callout {
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 8%, var(--white));
  padding: 1.3rem 1.4rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.callout strong { color: var(--ink); }
.callout a { color: var(--gold-dark); font-weight: 600; }

/* contact form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
input, select, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { min-height: 140px; resize: vertical; }

.contact-side { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.8rem; }
.contact-side dl div { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.contact-side dl div:last-child { border-bottom: none; }
.contact-side dt {
  margin-bottom: 0.25rem;
  color: var(--ink-faint);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.contact-side dd { color: var(--ink); font-size: 0.95rem; }

/* legal pages */
.legal h2 { margin: 2rem 0 0.7rem; font-size: 1.2rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { margin: 0 0 1rem 1.2rem; }
.legal li { margin-bottom: 0.4rem; }

/* ---------- gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-grid figure { overflow: hidden; border-radius: 12px; background: var(--cream-2); }
.gallery-grid img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.5s ease; }
.gallery-grid figure:hover img { transform: scale(1.04); }
.gallery-grid .tall img { aspect-ratio: 3 / 4; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--cream-2); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2.5rem;
}
.footer-grid h4 {
  margin-bottom: 0.9rem;
  color: var(--ink-faint);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.55rem; }
.footer-grid a { color: var(--ink-soft); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--gold-dark); }
.footer-about p { margin-top: 0.9rem; max-width: 30rem; color: var(--ink-soft); font-size: 0.92rem; }
.footer-about .brand img { width: 46px; }
.footer-about .brand-text strong { font-size: 1.1rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.8rem;
}
.footer-bottom .legal-links { display: flex; gap: 1.4rem; }
.footer-bottom .legal-links a { color: var(--ink-faint); }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: 2; }
  .values-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .values-copy h2, .values-copy p { max-width: 30rem; }
}

@media (max-width: 860px) {
  .card-grid, .card-grid.two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .two-col { grid-template-columns: 1fr; }
  .two-col .sticky { position: static; }
  .affil-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .home-features .wrap { grid-template-columns: 1fr; gap: 1.4rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .feature-grid { grid-template-columns: 1fr; }
  .range-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .steps li { grid-template-columns: 1fr; gap: 0.6rem; }
  .steps li::before { width: 44px; height: 44px; font-size: 0.95rem; }
  .form-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.4rem, 10vw, 3.2rem); }
  .pad, section.pad { padding: 3.5rem 0; }
}

/* progressive-enhancement reveal, applied by main.js */
.reveal { opacity: 0; transition: opacity 0.55s ease; }
.reveal.in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
