/* ============================================================
   ONDREA — base.css
   Design tokens, reset, typography, layout primitives.
   Palette is locked to the brand brief. Do not add colors.
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Brand palette — from brief, do not extend */
  --charcoal:   #1F1F1D;   /* primary text, dark grounds */
  --cream:      #EFE6D3;   /* primary background */
  --forest:     #1F4033;   /* accent */
  --stone:      #D8CBB0;   /* secondary neutral */
  --rust:       #B5613C;   /* accent, sparing */
  --ink-navy:   #1B2A3A;   /* secondary accent, sparing */

  /* Derived neutrals. Every one is an alpha or a blend of the six brand colors
     above, so the theme never introduces a seventh hex. */
  --cream-2:    color-mix(in srgb, var(--cream) 68%, var(--stone)); /* panels */
  --stone-line: rgba(31, 31, 29, 0.14); /* hairline rules */
  --stone-line-soft: rgba(31, 31, 29, 0.08);
  --charcoal-70: rgba(31, 31, 29, 0.70);
  --charcoal-55: rgba(31, 31, 29, 0.55);
  --charcoal-40: rgba(31, 31, 29, 0.40);
  --cream-70: rgba(239, 230, 211, 0.70);

  /* Type families */
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Type scale — editorial, generous */
  --fs-hero: clamp(2.75rem, 7vw, 6.5rem);
  --fs-display: clamp(2.25rem, 5vw, 4.25rem);
  --fs-h1: clamp(2rem, 4vw, 3.25rem);
  --fs-h2: clamp(1.6rem, 3vw, 2.4rem);
  --fs-h3: clamp(1.3rem, 2vw, 1.7rem);
  --fs-body: clamp(1rem, 1.05vw, 1.125rem);
  --fs-small: 0.875rem;
  --fs-label: 0.72rem;   /* all-caps utility labels */

  /* Spacing scale */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2rem;
  --sp-5: 3rem;
  --sp-6: 4.5rem;
  --sp-7: 6.5rem;
  --sp-8: 9rem;
  --sp-9: 12rem;

  /* Layout */
  --maxw: 1440px;
  --maxw-narrow: 820px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);

  /* Motion — subtle only */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 240ms;
  --dur: 500ms;
  --dur-slow: 900ms;

  --header-h: 76px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* [hidden] must beat the layout `display` on classes we toggle it against
   (.cart-layout, .product-grid). Without this the UA rule loses and empty
   states render alongside the layout they replace. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 300;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.01em;
}
.serif { font-family: var(--serif); font-weight: 300; }

p { max-width: 68ch; }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 400;
  color: var(--charcoal-55);
}

.label {
  font-family: var(--sans);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 400;
}

.text-muted { color: var(--charcoal-55); }

/* ---- Layout primitives ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow {
  width: 100%;
  max-width: var(--maxw-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--sp-8); }
.section-sm { padding-block: var(--sp-6); }
@media (max-width: 720px) {
  .section { padding-block: var(--sp-6); }
  .section-sm { padding-block: var(--sp-5); }
}

.divider {
  height: 1px;
  background: var(--stone-line);
  border: 0;
  width: 100%;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-size: var(--fs-small);
  letter-spacing: 0.1em;
}
.skip-link:focus { left: var(--gutter); top: 0.75rem; }

.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;
}

/* ---- Reveal on scroll (subtle fade + lift) ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] { transition-delay: 90ms; }
.reveal[data-delay="2"] { transition-delay: 180ms; }
.reveal[data-delay="3"] { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
