/* ============================================================
   Doremi 2000 — Base: reset, typography, atmosphere, utilities
   ============================================================ */

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

* { margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  position: relative;
}

/* --- Atmospheric backdrop: spotlight wash + film grain --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--spotlight), var(--spotlight-side);
  pointer-events: none;
  z-index: var(--z-bg);
}

.grain {
  position: fixed;
  inset: -200%;
  width: 500%;
  height: 500%;
  pointer-events: none;
  z-index: var(--z-grain);
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, 4%); }
  80% { transform: translate(3%, 1%); }
}

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

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

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

input, select, textarea { font: inherit; color: inherit; }

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

::selection { background: var(--gold); color: var(--on-gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Headings --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--ivory);
  letter-spacing: -0.01em;
}
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 600; }

p { color: var(--muted); }

strong { color: var(--text); font-weight: 600; }

/* --- Reusable text accents --- */
.text-gold {
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Restore solid text for gradient clip-text in forced-colors / High Contrast mode */
@media (forced-colors: active) {
  .text-gold, .hero .text-gold, .stat__num, .price-card__range, .cta-band__phone a {
    -webkit-text-fill-color: CanvasText;
    color: CanvasText;
    background: none;
  }
}

.serif-italic { font-family: var(--font-display); font-style: italic; }

/* --- Eyebrow / kicker label --- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--grad-gold);
}
.eyebrow--center::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--grad-gold);
}

/* --- Layout containers --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-section); position: relative; z-index: var(--z-base); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 0.8rem; }
.section-head p { margin-top: 1.1rem; font-size: var(--fs-lead); }

/* --- Hairline divider --- */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

/* --- Utilities --- */
.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;
}
.no-scroll { overflow: hidden; }
.muted { color: var(--muted); }

/* --- Skip link (keyboard accessibility) --- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  font-size: var(--fs-sm);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); outline: none; }

/* --- Scroll progress bar --- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px; width: 0;
  z-index: 210;
  background: var(--grad-gold);
  box-shadow: 0 0 10px rgba(201, 162, 75, 0.55);
  transition: width 0.08s linear;
  pointer-events: none;
}
.center { text-align: center; }
