/* ==========================================================================
   Flower & Foliage — base.css
   Design tokens, reset, typography, layout primitives, utilities.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette — muted rosewood, bone, sage */
  --c-ink:            #241d1b;
  --c-ink-soft:       #4a403c;
  --c-muted:          #6b605c;
  --c-muted-light:    #948781;

  --c-rosewood:       #7a4f49;
  --c-rosewood-deep:  #573531;
  --c-rosewood-tint:  #a8807a;

  --c-blush:          #ebd9d3;
  --c-blush-light:    #f6ebe7;

  --c-bone:           #fbf8f5;
  --c-cream:          #f3ede6;
  --c-sand:           #e8dfd6;

  --c-sage:           #7e8a72;
  --c-sage-light:     #dfe3d9;
  --c-gold:           #b08d57;

  --c-white:          #ffffff;
  --c-line:           #e4dad3;
  --c-line-strong:    #cfc1b8;
  --c-error:          #a8443c;
  --c-success:        #5c7a52;

  /* Typography */
  --f-display: "Cormorant Garamond", "Didot", "Big Caslon", "Times New Roman", serif;
  --f-body:    "Jost", "Futura", "Century Gothic", "Segoe UI", system-ui, sans-serif;

  --fs-xs:   0.6875rem;  /* 11px — eyebrow / meta */
  --fs-sm:   0.8125rem;  /* 13px */
  --fs-base: 0.9375rem;  /* 15px */
  --fs-md:   1.0625rem;  /* 17px */
  --fs-lg:   1.375rem;   /* 22px */
  --fs-xl:   1.875rem;   /* 30px */
  --fs-2xl:  2.5rem;     /* 40px */
  --fs-3xl:  3.25rem;    /* 52px */
  --fs-4xl:  4.5rem;     /* 72px */

  --lh-tight: 1.1;
  --lh-snug:  1.3;
  --lh-base:  1.65;

  --ls-wide:   0.14em;
  --ls-wider:  0.22em;
  --ls-normal: 0.01em;

  /* Spacing scale */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-5:  1.5rem;
  --s-6:  2rem;
  --s-7:  2.75rem;
  --s-8:  4rem;
  --s-9:  6rem;
  --s-10: 8rem;

  /* Layout */
  --page-max:    1400px;
  --page-narrow: 880px;
  --gutter:      clamp(1.25rem, 4vw, 4rem);
  --header-h:    76px;
  --announce-h:  38px;

  /* Effects */
  --radius-sm: 2px;
  --radius:    3px;
  --radius-lg: 6px;
  --shadow-sm: 0 1px 2px rgba(36, 29, 27, 0.05);
  --shadow:    0 8px 30px rgba(36, 29, 27, 0.08);
  --shadow-lg: 0 20px 60px rgba(36, 29, 27, 0.14);
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:       0.35s;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: var(--lh-base);
  letter-spacing: var(--ls-normal);
  color: var(--c-ink);
  background: var(--c-bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

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

table { border-collapse: collapse; width: 100%; }

/* Focus ring — visible only for keyboard users */
:focus-visible {
  outline: 2px solid var(--c-rosewood);
  outline-offset: 3px;
}

::selection {
  background: var(--c-blush);
  color: var(--c-rosewood-deep);
}

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 300;
  line-height: var(--lh-tight);
  letter-spacing: 0.005em;
  color: var(--c-ink);
}

h1 { font-size: clamp(2.15rem, 6vw, var(--fs-4xl)); }
h2 { font-size: clamp(1.75rem, 4.4vw, var(--fs-3xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--fs-2xl)); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }

p { line-height: var(--lh-base); }

/* Small caps eyebrow used above most section headings */
.eyebrow {
  font-family: var(--f-body);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--c-rosewood);
  display: block;
  margin-bottom: var(--s-4);
}

.eyebrow--muted { color: var(--c-muted-light); }

.lede {
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--c-muted);
  font-weight: 300;
}

.text-muted   { color: var(--c-muted); }
.text-display { font-family: var(--f-display); }
.text-center  { text-align: center; }

/* Underline that draws on hover — used for inline text links */
.link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  color: var(--c-rosewood);
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform var(--dur) var(--ease);
}

.link:hover::after {
  transform-origin: left;
  transform: scaleX(0);
}

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

.container--narrow { max-width: var(--page-narrow); }
.container--wide   { max-width: 1680px; }

.section {
  padding-block: clamp(3.5rem, 8vw, var(--s-9));
}

.section--tight { padding-block: clamp(2.5rem, 5vw, var(--s-7)); }
.section--flush-top { padding-top: 0; }

.section--cream { background: var(--c-cream); }
.section--blush { background: var(--c-blush-light); }
.section--ink   { background: var(--c-rosewood-deep); color: var(--c-blush-light); }
.section--ink h2,
.section--ink h3 { color: var(--c-white); }
.section--ink .eyebrow { color: var(--c-blush); }

/* Section heading block: eyebrow + title + optional link, responsive row */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
}

.section-head__title { max-width: 34ch; }
.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.section-head--center .section-head__title { max-width: 42ch; }

@media (max-width: 700px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Generic responsive grid */
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
}

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

/* Media aspect boxes */
.ratio { position: relative; overflow: hidden; background: var(--c-sand); }
.ratio::before { content: ""; display: block; }
.ratio--square::before   { padding-top: 100%; }
.ratio--portrait::before { padding-top: 125%; }
.ratio--tall::before     { padding-top: 140%; }
.ratio--wide::before     { padding-top: 62%; }
.ratio > img,
.ratio > .ratio__fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   5. Utilities
   -------------------------------------------------------------------------- */
.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;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  z-index: 999;
  background: var(--c-rosewood-deep);
  color: var(--c-white);
  padding: var(--s-3) var(--s-5);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: var(--s-4); }

.divider {
  height: 1px;
  background: var(--c-line);
  border: 0;
  margin-block: var(--s-6);
}

.hide-mobile { }
.hide-desktop { display: none; }

@media (max-width: 860px) {
  .hide-mobile  { display: none !important; }
  .hide-desktop { display: revert; }
}

/* Reveal-on-scroll — .is-visible is added by site.js via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }
.reveal[data-delay="3"] { transition-delay: 0.27s; }
.reveal[data-delay="4"] { transition-delay: 0.36s; }
.reveal[data-delay="5"] { transition-delay: 0.45s; }

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