/* ==========================================================================
   SMOVF FRAGRANCE — BASE
   Reset, typography, and global primitives.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-md));
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

/* ---------- Headings: editorial serif, generous spacing ------------------ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  color: var(--text-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 {
  font-size: var(--fs-h4);
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  letter-spacing: 0;
}

/* A measure of 68ch keeps prose readable — a line that runs the full width of
   a desktop screen is genuinely hard to track back to the start of.

   It applies to every <p>, which is right for the great majority of them and
   wrong for the few that are interface rather than prose. Those reset it
   themselves, next to whatever else makes them a component; `.announce` is the
   one to look at for the pattern. Reaching for a <p> as a layout element and
   forgetting is easy to do, so tools/visual-check.mjs asserts that anything
   painting a full-bleed background actually spans the viewport. */
p { margin: 0 0 var(--space-sm); max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---------- Links -------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

/* In running copy, links get the gold accent underline */
.prose a,
a.link {
  color: var(--text-heading);
  text-decoration: underline;
  text-decoration-color: var(--smovf-gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.prose a:hover,
a.link:hover { color: var(--accent-text); }

/* ---------- Focus: always visible, always brand -------------------------- */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.on-dark :focus-visible,
.section--dark :focus-visible,
.section--charcoal :focus-visible,
.page-hero--dark :focus-visible,
.hero :focus-visible,
.cta-banner :focus-visible,
.footer :focus-visible { outline-color: var(--smovf-gold); }

/* ---------- Lists -------------------------------------------------------- */
ul, ol { margin: 0 0 var(--space-sm); padding-left: 1.15rem; }
li { margin-bottom: var(--space-3xs); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

/* ---------- Forms -------------------------------------------------------- */
input, select, textarea, button { font: inherit; color: inherit; }

/* ---------- Accessibility helpers --------------------------------------- */
/* `hidden` has to win.
   It is an attribute selector, so any class that sets a display beats it on
   specificity — `.form-grid { display: grid }` quietly un-hides an element
   the scripts have hidden. !important is the correct tool here and one of the
   few places it is: `hidden` is not a style, it is a statement that the
   element is not part of the page. */
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2xs);
  left: var(--space-2xs);
  z-index: var(--z-toast);
  padding: var(--space-2xs) var(--space-sm);
  background: var(--smovf-gold);
  color: var(--black);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

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

/* ==========================================================================
   TYPOGRAPHIC PRIMITIVES
   ========================================================================== */

/* Section label — small uppercase eyebrow in brand gold */
.label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--accent-text);
}

/* Decorative gold rule that precedes the label text */
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--smovf-gold);
  flex: none;
}

.label--center { justify-content: center; }

/* On dark surfaces the label switches to the full-strength brand gold —
   the deeper contrast-safe-on-white variant goes muddy against black. */
.section--dark .label,
.section--charcoal .label,
.page-hero--dark .label,
.hero .label,
.cta-banner .label,
.on-dark .label { color: var(--smovf-gold); }

/* Lead paragraph */
.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 60ch;
}

.section--dark .lead,
.section--charcoal .lead,
.page-hero--dark .lead,
.cta-banner .lead,
.on-dark .lead { color: var(--text-on-dark-muted); }

.text-center { text-align: center; }
.text-center .lead,
.text-center p { margin-left: auto; margin-right: auto; }

/* Important numbers carry the brand gold. On light surfaces they use the
   readable gold — the true brand gold is 1.7:1 on white, which is below even
   the 3:1 large-text minimum and reads as washed out. On dark surfaces the
   full-strength gold is used, where it sings at 12.4:1. */
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.6rem);
  line-height: 1;
  color: var(--accent-text);
  display: block;
  margin-bottom: var(--space-2xs);
}

.section--dark .stat-value,
.section--charcoal .stat-value,
.page-hero--dark .stat-value,
.hero .stat-value,
.cta-banner .stat-value,
.on-dark .stat-value { color: var(--smovf-gold); }

.stat-label {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.section--dark .stat-label,
.on-dark .stat-label { color: var(--text-on-dark-muted); }

/* Decorative gold divider line */
.rule-gold {
  width: 56px;
  height: 2px;
  background: var(--smovf-gold);
  border: 0;
  margin: var(--space-md) 0;
}

.rule-gold--center { margin-left: auto; margin-right: auto; }
