/* ==========================================================================
   SAEDE — BASE: reset, typography, layout primitives, accessibility
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--plum);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Powdery finish over the whole page. Purely decorative, never blocks input. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999;
  background-image: var(--grain); background-size: 160px 160px;
  opacity: .5; mix-blend-mode: multiply; pointer-events: none;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: var(--lh-head);
  letter-spacing: -.018em;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -.008em; }

p { text-wrap: pretty; }
p + p { margin-top: var(--s-4); }

a { color: var(--cta); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--cta-deep); }

strong { font-weight: 700; color: var(--plum); }

::selection { background: var(--blush); color: var(--plum); }

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

/* --- Layout primitives ---------------------------------------------------- */
.wrap   { width: 100%; max-width: var(--wide);   margin-inline: auto; padding-inline: var(--gutter); }
.narrow { width: 100%; max-width: var(--narrow); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--tint { background: none; }   /* see textures.css: one continuous ground */
.section--pearl { background: none; }
.measure { max-width: var(--measure); }
.center  { text-align: center; }
.center .measure { margin-inline: auto; }

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

/* --- Shared type helpers -------------------------------------------------- */
.eyebrow {
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--plum-mute);
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: var(--s-4);
}
.center .eyebrow { justify-content: center; }
.eyebrow::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--nacre-pearl);
  box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 1px 5px rgba(138,110,123,.28);
  flex: none;
}

.lead { font-size: var(--t-lead); line-height: 1.62; color: var(--plum-soft); }
.muted { color: var(--plum-mute); }
.small { font-size: var(--t-small); }

/* A quiet, emphasised statement line — used for the brand's core beliefs. */
.statement {
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 1.02rem + 1.15vw, 1.95rem);
  line-height: 1.34;
  letter-spacing: -.012em;
  color: var(--plum);
  text-wrap: balance;
}

/* --- Accessibility -------------------------------------------------------- */
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 10000;
  background: var(--plum); color: var(--ivory);
  padding: .7rem 1.1rem; border-radius: var(--r-sm); text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--s-4); color: var(--ivory); }

.visually-hidden {
  position: absolute !important; 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;
}

/* --- Reveal on scroll (progressive enhancement) ---------------------------
   Without JS everything is simply visible. JS adds .reveal-ready.           */
.reveal-ready .reveal { opacity: 0; transform: translateY(14px); }
.reveal-ready .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
}
