/* ==========================================================================
   Base — design tokens, reset, typography, and shared controls.
   Loaded first, before layout.css and home.css.
   ========================================================================== */

/* Design tokens ----------------------------------------------------------- */

:root {
  color-scheme: light;
  scroll-behavior: smooth;

  --cream: #faf7f2;
  --sand: #f1ebe1;
  --paper: #fff;
  --ink: #2a2a2a;
  --body: #4a4640;
  --line: #e4dccf;

  /* The one grey for secondary text. Clears 4.5:1 on cream, sand and white
     (WCAG 1.4.3); the original #7a7469 fell to 3.9:1 on sand. */
  --muted: #6e685e;

  /* Brand navy: headings, nav, buttons and the footer. 13:1 on cream. */
  --navy: #1c2a4a;

  /* Gold comes in two strengths:
     --gold is for anything small (eyebrows, prices, labels). 4.6:1 on sand,
     5.2:1 on cream.
     --gold-display is the original, lighter brand gold. It is only about
     3:1, so keep it to rules, frames and other decoration — never text. */
  --gold: #7f643c;
  --gold-display: #b08d57;

  /* Pale text on the navy footer. 8.9:1. */
  --on-dark-muted: #c9cdd8;

  /* Focus rings: navy on light surfaces, cream on the navy footer. Both are
     well above the 3:1 minimum (WCAG 1.4.11). */
  --focus-on-light: var(--navy);
  --focus-on-dark: var(--cream);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;

  /* Height of the sticky header, so in-page jumps land below it. */
  --header-height: 68px;
}

/* Reset ------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

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

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

address {
  font-style: normal;
}

/* The header is sticky, so leave room for it when jumping to a section. */
section[id] {
  scroll-margin-top: var(--header-height);
}

/* Typography -------------------------------------------------------------- */

h1,
h2,
h3 {
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 500;
}

h1 {
  margin: 16px 0 22px;
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  line-height: 1.08;
}

h2 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.15;
}

/* Small uppercase label that sits above a heading. */
.eyebrow {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* Buttons and links ------------------------------------------------------- */

/* Outlined button that fills with navy on hover. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin-top: 28px;
  padding: 12px 30px;
  border: 1px solid currentColor;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 200ms, color 200ms;
}

.button:hover {
  background: var(--navy);
  color: #fff;
}

/* Arrow glyph after a link: ↗ leaves the site, ↓ / ↑ move down or up the
   page. Always aria-hidden in the HTML. */
.arrow {
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1;
}

/* Focus rings ------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-on-light);
  outline-offset: 4px;
}

/* Visible only once it receives focus: lets keyboard and screen-reader users
   jump past the header navigation (WCAG 2.4.1). */
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 12px;
  background: var(--navy);
  color: #fff;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.skip-link:focus-visible {
  outline-color: var(--gold-display);
  outline-offset: 2px;
}

/* Hidden on screen but still read by assistive technology. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion ---------------------------------------------------------- */
/* Each stylesheet neutralises its own transitions, so that the override
   always comes after the rule it is cancelling. */

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
