/* ============================================================
   SARIVALE — Base Stylesheet
   Heritage precision manufacturing. Editorial, generous, calm.
   ============================================================ */

:root {
  /* Brand colours */
  --green:        #22492d;
  --green-dark:   #1a3722;
  --green-deep:   #0f2214;
  --cream:        #f0e4d0;
  --cream-soft:   #f6eeda;
  --cream-warm:   #ebdfc4;
  --gold:         #b8963e;
  --gold-light:   #c9a94f;
  --gold-dark:    #9a7c2f;
  --text:         #1a1a18;
  --text-soft:    #4a4a44;
  --white:        #ffffff;

  /* Typography */
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Source Sans 3', Arial, sans-serif;

  /* Layout — matching Bowood gutter */
  --max-width:    1360px;
  --max-narrow:   1180px;
  --gutter:       clamp(1rem, 5vw, 4.375rem);
  --page-pad:     clamp(1rem, 5vw, 4.375rem);
  --edge:         var(--page-pad);
  --section-gap:  clamp(4.5rem, 10vw, 9rem);

  /* Header heights — Bowood matches: 150px, 100px scrolled */
  --header-h:        9.375rem;
  --header-h-scroll: 6.25rem;

  /* Motion — Bowood standard */
  --ease-bowood:   cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100vw;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.1;
  color: var(--green);
  letter-spacing: -0.005em;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--green);
  color: var(--cream);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-fade], [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   KEYBOARD FOCUS — visible gold ring for :focus-visible only.
   Mouse users keep the existing colour/underline treatments;
   keyboard users get an additional 2px gold-light outline so
   focus location is unambiguous. WCAG 2.4.7 compliance.
   Uses !important to override per-page inline style blocks
   that declare `outline: none` on hover/focus-visible.
   ============================================================ */

html body a:focus-visible,
html body button:focus-visible,
html body [role="button"]:focus-visible,
html body summary:focus-visible {
  outline: 2px solid #c9a94f !important;
  outline-offset: 3px !important;
  border-radius: 2px;
}

html body input:focus-visible,
html body textarea:focus-visible,
html body select:focus-visible {
  outline: 2px solid #c9a94f !important;
  outline-offset: 2px !important;
  border-bottom-color: #b8963e !important;
  background: rgba(184, 150, 62, 0.05);
}

/* Dropdown items — use inset outline to stay within container */
html body .nav__dropdown a:focus-visible {
  outline: 2px solid #c9a94f !important;
  outline-offset: -2px !important;
}

/* Skip link — override transition with reasonable visibility */
html body .skip-link:focus,
html body .skip-link:focus-visible {
  outline: 2px solid #c9a94f !important;
  outline-offset: 2px !important;
}

/* ============================================================
   DROPDOWN NAV — shared structure
   Per-page colour tokens are set in each page's inline <style>.
   ============================================================ */

.nav__menu .has-dropdown { position: relative; }

.nav__caret {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.78em;
  line-height: 1;
  transition: transform 0.3s var(--ease-bowood);
}

.has-dropdown:hover .nav__caret,
.has-dropdown:focus-within .nav__caret { transform: translateY(2px); }

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -8px);
  list-style: none;
  margin: 0;
  padding: 0.55rem 0;
  min-width: 17rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  z-index: 200;
}

.has-dropdown:hover .nav__dropdown,
.has-dropdown:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav__dropdown li { display: block; }

.nav__dropdown a {
  display: block;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  border-left: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

/* Kill the underline rule from .nav__menu a::after on dropdown items */
.nav__dropdown a::after { display: none !important; content: none !important; }

/* Mobile: dropdown collapses to inline list inside the open nav drawer */
@media (max-width: 820px) {
  .nav__dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }
  .nav__caret { display: none; }
  .nav__dropdown a {
    padding-left: calc(var(--page-pad) + 1.5rem);
    font-size: 0.78rem;
    border-left: 0;
  }
}

/* ============================================================
   SITE FOOTER — shared three-column structure
   Per-page colour tokens are set in each page's inline <style>.
   ============================================================ */

.footer__columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.footer__brand-logo {
  height: 64px;
  width: auto;
  margin-bottom: 1.4rem;
}

.footer__col-heading {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__nav li { margin-bottom: 0.6rem; }

.footer__nav a {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  line-height: 1.5;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(1.8rem, 3.5vw, 2.4rem);
}

.footer__copyright {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  line-height: 1.7;
}

.footer__socials { min-height: 1px; }

@media (max-width: 820px) {
  .footer__columns { grid-template-columns: 1fr; gap: 2.75rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* --- Mobile responsiveness fixes (2026-04-23 audit) --- */
@media (max-width: 768px) {
  nav a,
  header a,
  .nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-block: 6px;
  }
  footer a {
    min-height: 24px;
    padding-block: 10px;
    display: inline-block;
  }
  button,
  .btn,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  body {
    font-size: max(14px, 1rem);
  }
  .container,
  .wrap {
    padding-inline: 1rem;
  }
}

/* -----------------------------------------------------------------------
   Article hero image (full-bleed, height-capped, cropped)
----------------------------------------------------------------------- */
.article-hero {
  margin: 0;
  padding: 0;
  overflow: hidden;
  line-height: 0;
  max-height: clamp(280px, 38vw, 520px);
  background: #122a1f;
}
.article-hero img {
  width: 100%;
  height: clamp(280px, 38vw, 520px);
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

