/* ==========================================================================
   BASE: colours, fonts, reset and small helpers
   ========================================================================== */

:root {
  /* Brand colours */
  --burgundy: #752a1c;
  --olive: #837845;
  --blue: #637bac;
  --offwhite: #faf9f6;
  --dark: #2e2c2d;
  --gray: #d9d4d1;

  /* Font stacks: licensed font names come first, free fonts are the fallback */
  --font-serif: "PEC Garamond", "EB Garamond", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --font-grotesk: "CyGrotesk", "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5.2vw, 84px);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--offwhite);
  color: var(--dark);
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.25vw, 20px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p, ul, figure, blockquote {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* Text helpers */
.grotesk {
  font-family: var(--font-grotesk);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.08;
  letter-spacing: 0.004em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--offwhite);
  color: var(--dark);
  font-family: var(--font-ui);
  font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}

/* Textured backgrounds (the colour is a fallback while the texture loads) */
.bg-burgundy {
  background: var(--burgundy) url("../assets/images/textures/texture-burgundy.jpg") center / cover;
  color: #fff;
}
.bg-dark {
  background: var(--dark) url("../assets/images/textures/texture-dark.jpg") center / cover;
  color: #fff;
}
.bg-olive {
  background: var(--olive) url("../assets/images/textures/texture-olive.jpg") center / cover;
  color: #fff;
}
.bg-blue {
  background: var(--blue) url("../assets/images/textures/texture-blue.jpg") center / cover;
  color: #fff;
}

/* Scroll reveal: only active when JavaScript is running */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
