/* ==========================================================================
   base.css — shared stylesheet for all sites in this repository.

   This file is IDENTICAL in every site. Do not edit it inside a site folder;
   edit shared/assets/css/base.css and run scripts/sync-shared.sh.
   Per-site colours, fonts and small tweaks belong in assets/css/theme.css.
   ========================================================================== */

/* ---------- Design tokens (defaults; override in theme.css) ---------- */
:root {
  --color-primary: #1f5f8b;
  --color-primary-dark: #154666;
  --color-accent: #1f5f8b;
  --color-text: #1f2933;
  --color-muted: #52606d;
  --color-bg: #ffffff;
  --color-surface: #f4f6f8;
  --color-border: #dde3e9;
  --color-footer-bg: #1f2933;
  --color-footer-text: #cbd2d9;
  --color-footer-heading: #ffffff;
  --hero-overlay: linear-gradient(180deg, rgba(10, 20, 30, .35) 0%, rgba(10, 20, 30, .65) 100%);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-sans);

  --max-width: 1140px;
  --max-width-narrow: 780px;
  --radius: 8px;
  --header-height: 72px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-underline-offset: .15em; }
a:hover { color: var(--color-primary-dark); }
a[href^="tel:"] { white-space: nowrap; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; margin: 0 0 .6em; color: var(--color-text); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.15rem); }
h3 { font-size: 1.3rem; }
p, ul, ol, dl, figure, table { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: .35em; }
strong, b { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 1000;
  background: var(--color-primary); color: #fff; padding: .6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: var(--max-width-narrow); }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--alt { background: var(--color-surface); }
.section--tight { padding: 2.5rem 0; }
.section__header { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section__header p { color: var(--color-muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--color-accent); margin-bottom: .5rem;
}
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.center { text-align: center; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: saturate(180%) blur(6px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-height);
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--color-text); }
.brand img { height: 52px; width: auto; }
.brand__name { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }

.nav-toggle {
  display: none; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: .5rem .75rem; font: inherit; font-size: .95rem; color: var(--color-text); cursor: pointer;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s;
}
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .15rem; }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: block; padding: .5rem .7rem; border-radius: var(--radius); white-space: nowrap;
  color: var(--color-text); text-decoration: none; font-weight: 550; font-size: .95rem;
}
.site-nav a:hover { background: var(--color-surface); color: var(--color-primary); }
.site-nav a[aria-current="page"] { color: var(--color-primary); box-shadow: inset 0 -2px 0 var(--color-primary); border-radius: 0; }
.site-nav .nav-cta {
  background: var(--color-primary); color: #fff; border-radius: var(--radius); box-shadow: none;
}
.site-nav .nav-cta:hover { background: var(--color-primary-dark); color: #fff; }
.external-icon { display: inline-block; width: .75em; height: .75em; margin-left: .3em; vertical-align: baseline; }

@media (max-width: 900px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow);
  }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: .5rem 1.25rem 1rem; }
  .site-nav a { padding: .75rem .5rem; border-bottom: 1px solid var(--color-border); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--color-primary); padding-left: .9rem; }
  .site-nav .nav-cta { margin-top: .75rem; text-align: center; border-radius: var(--radius); border: 0; }
  .brand img { height: 44px; }
  /* Without JavaScript the menu simply wraps below the logo. */
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-bottom: .5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; display: flex; align-items: center;
  min-height: 300px; padding: 4rem 0; color: #fff;
  background-color: var(--color-primary-dark);
  background-size: cover; background-position: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.hero > .container { position: relative; }
.hero h1, .hero h2 { color: #fff; margin-bottom: .4em; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.hero p { font-size: 1.15rem; max-width: 640px; color: rgba(255, 255, 255, .92); }
.hero--home { min-height: min(78vh, 680px); }
.hero--page { min-height: 240px; padding: 3rem 0; }
.hero--page h1 { font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem); margin: 0; }
.hero__logo { width: auto; max-height: 120px; margin-bottom: 1.5rem; border-radius: var(--radius); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: var(--radius); border: 2px solid transparent;
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--outline { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--light { background: #fff; color: var(--color-primary-dark); }
.btn--light:hover { background: rgba(255, 255, 255, .88); color: var(--color-primary-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .85); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- Content (long-form text) ---------- */
.prose { max-width: var(--max-width-narrow); }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose > :first-child { margin-top: 0; }
.prose img { border-radius: var(--radius); }
.prose figure img { margin: 0 auto; }
.prose figcaption { font-size: .9rem; color: var(--color-muted); text-align: center; margin-top: .5rem; }
.prose .lead { font-size: 1.2rem; color: var(--color-muted); }
.prose blockquote { margin: 1.5rem 0; padding: .5rem 1.25rem; border-left: 4px solid var(--color-primary); color: var(--color-muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.signature { margin-top: 2rem; font-weight: 600; }
.signature span { display: block; font-weight: 400; color: var(--color-muted); }

/* Text with an image beside it (stacks on small screens) */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse > :first-child { order: 2; }
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }

.portrait { float: right; width: 180px; margin: .25rem 0 1rem 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 560px) { .portrait { float: none; margin: 0 0 1.25rem; width: 160px; } }

/* ---------- Cards ---------- */
.card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); color: inherit; text-decoration: none; height: 100%;
}
a.card { transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0, 0, 0, .12); color: inherit; }
.card__img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.card__visual {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff;
}
.card__visual svg { width: 64px; height: 64px; stroke-width: 1.5; }
.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: .4rem; }
.card__body p { color: var(--color-muted); margin-bottom: 1rem; }
.card__more { margin-top: auto; font-weight: 650; color: var(--color-primary); }

/* Icon + text feature blocks */
.feature { text-align: center; padding: 1.5rem 1.25rem; }
.feature__icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--color-primary); color: #fff;
}
.feature__icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.1rem; letter-spacing: .03em; }
.feature p { color: var(--color-muted); margin: 0; }
a.feature { display: block; color: inherit; text-decoration: none; border-radius: var(--radius); transition: background-color .15s; }
a.feature:hover { background: var(--color-surface); color: inherit; }

/* ---------- Contact details ---------- */
.contact-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; padding: .75rem 0; border-bottom: 1px solid var(--color-border); margin: 0; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { flex: none; width: 22px; height: 22px; margin-top: .2rem; color: var(--color-primary); }
.contact-list strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); font-weight: 650; }

/* ---------- Call-to-action band ---------- */
.cta-band { background: var(--color-primary); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .9); max-width: 640px; margin-left: auto; margin-right: auto; }
.image-band {
  position: relative; background-size: cover; background-position: center; color: #fff;
  padding: clamp(4rem, 10vw, 7rem) 0;
}
.image-band::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.image-band > .container { position: relative; }

/* Fixed background: the image stays still while the page scrolls over it
   (as on the original Silver Valley site). Add class "bg-fixed" to a .hero or
   .image-band. Desktop with a mouse only: phones and tablets ignore or badly
   zoom fixed backgrounds, so there the image simply scrolls with the page. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .bg-fixed { background-attachment: fixed; }
}
.image-band h2, .image-band h3 { color: #fff; }
.image-band .eyebrow, .hero .eyebrow { color: rgba(255, 255, 255, .9); }

/* ---------- Social links ---------- */
.social-links { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 0; }
.social-links li + li { margin: 0; }
.social-links a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid currentColor; color: inherit; transition: background-color .15s, color .15s;
}
.social-links a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.social-links svg { width: 20px; height: 20px; }

/* ---------- FAQ (native <details>, no JavaScript) ---------- */
.faq details { border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 650; list-style-position: inside; }
.faq summary:hover { color: var(--color-primary); }
.faq details[open] summary { border-bottom: 1px solid var(--color-border); }
.faq details > div { padding: 1rem 1.25rem .25rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-footer-bg); color: var(--color-footer-text); font-size: .95rem; }
.site-footer a { color: var(--color-footer-text); }
.site-footer a:hover { color: #fff; }
.site-footer h2 {
  font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-footer-heading); margin-bottom: 1rem;
}
.footer-grid { display: grid; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.footer-grid p { margin-bottom: .6rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: .45rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.disclaimer { font-size: .78rem; line-height: 1.6; letter-spacing: .01em; opacity: .85; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.25rem; padding-bottom: 1.25rem; font-size: .85rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
}
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; }
.footer-bottom li + li { margin: 0; }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 6rem 0; }
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--color-primary); line-height: 1; margin-bottom: .5rem; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .hero__actions, .skip-link { display: none !important; }
  .hero { color: #000; min-height: 0; padding: 1rem 0; background: none !important; }
  .hero::before { display: none; }
  .hero h1, .hero p { color: #000; text-shadow: none; }
  a { color: #000; }
}

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