/* ============================================================
   Rosemary — Colors & Type
   The foundational tokens. Use these vars everywhere.
   ============================================================ */

/* Pacifico — logo wordmark + rare one-word emphasis only. Never headlines, paragraphs, or UI. */
@font-face { font-family: 'Pacifico'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Pacifico-Regular.ttf') format('truetype'); }

/* Montserrat — loaded from project-local TTFs in fonts/ */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100; font-display: swap; src: url('fonts/Montserrat-Thin.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 100; font-display: swap; src: url('fonts/Montserrat-ThinItalic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 200; font-display: swap; src: url('fonts/Montserrat-ExtraLight.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 200; font-display: swap; src: url('fonts/Montserrat-ExtraLightItalic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 300; font-display: swap; src: url('fonts/Montserrat-Light.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 300; font-display: swap; src: url('fonts/Montserrat-LightItalic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/Montserrat-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/Montserrat-Italic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/Montserrat-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/Montserrat-MediumItalic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/Montserrat-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 600; font-display: swap; src: url('fonts/Montserrat-SemiBoldItalic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/Montserrat-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 700; font-display: swap; src: url('fonts/Montserrat-BoldItalic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/Montserrat-ExtraBold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 800; font-display: swap; src: url('fonts/Montserrat-ExtraBoldItalic.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/Montserrat-Black.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: italic; font-weight: 900; font-display: swap; src: url('fonts/Montserrat-BlackItalic.ttf') format('truetype'); }

:root {
  /* ---------- Core brand palette (4) ---------- */
  --rosemary-burgundy: #76303f;   /* PRIMARY. Logo, headings, CTAs, accent bars */
  --rosemary-tan:      #d8ba98;   /* Secondary accent, decorative warmth */
  --rosemary-blue:     #96c0ce;   /* Supporting, subtitle text on dark bg */
  --rosemary-teal:     #0f414a;   /* Dark surfaces, body text on light bg */

  /* ---------- Extended palette (3) ---------- */
  --rosemary-cream:    #f0e8e0;   /* Preferred page / card background */
  --rosemary-white:    #ffffff;   /* Clean surfaces */
  --rosemary-black:    #1a1a1a;   /* Near-black body copy */

  /* ---------- Functional colors (data / status only) ----------
     Chosen to sit in hue zones the brand palette doesn't occupy:
     Burgundy/Tan own red→orange, Teal/Blue own cyan.
     Forest pulls green; Brick pulls pure red; Amber pulls gold.
     Never use these for decorative work. */
  --rosemary-success:  #3d7a68;
  --rosemary-fail:     #9a3d3d;
  --rosemary-warning:  #c48a1f;
  --rosemary-gray:     #e8e4e0;

  /* ---------- Semantic aliases ---------- */
  --bg:          var(--rosemary-cream);
  --surface:     var(--rosemary-white);
  --surface-alt: var(--rosemary-cream);
  --surface-dark:var(--rosemary-teal);
  --surface-accent: var(--rosemary-burgundy);

  --fg:          var(--rosemary-black);      /* body on light */
  --fg-strong:   var(--rosemary-teal);       /* headings on light */
  --fg-brand:    var(--rosemary-burgundy);   /* primary heading / link */
  --fg-muted:    rgba(26, 26, 26, 0.64);
  --fg-on-dark:  var(--rosemary-white);
  --fg-subtitle-on-dark: var(--rosemary-blue);
  --fg-footer-on-dark:   var(--rosemary-tan);

  --border:         rgba(15, 65, 74, 0.12);
  --border-strong:  rgba(15, 65, 74, 0.22);
  --divider:        var(--rosemary-gray);

  /* ---------- Type ---------- */
  --font-sans:    'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  --font-accent:  'Pacifico', 'Brush Script MT', cursive;   /* one-word emphasis only */

  /* Scale — built for hero web + deck use */
  --fs-hero:    clamp(48px, 7vw, 88px);
  --fs-h1:      clamp(36px, 4.2vw, 56px);
  --fs-h2:      clamp(28px, 3vw, 40px);
  --fs-h3:      22px;
  --fs-h4:      18px;
  --fs-body:    16px;
  --fs-body-lg: 18px;
  --fs-small:   14px;
  --fs-caption: 12px;

  --lh-tight:  1.1;
  --lh-snug:   1.25;
  --lh-normal: 1.5;
  --lh-relaxed:1.65;

  --ls-display:  -0.01em;
  --ls-heading:  -0.005em;
  --ls-eyebrow:  0.14em;   /* UPPERCASE eyebrows ala the one-pager */

  /* ---------- Spacing scale (4px base) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* ---------- Radii ---------- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* ---------- Shadows (soft, warm) ---------- */
  --shadow-sm: 0 1px 2px rgba(15,65,74,0.06), 0 1px 1px rgba(15,65,74,0.04);
  --shadow-md: 0 4px 14px rgba(15,65,74,0.08), 0 2px 4px rgba(15,65,74,0.05);
  --shadow-lg: 0 18px 40px rgba(15,65,74,0.12), 0 4px 10px rgba(15,65,74,0.06);

  /* Sticker shadow — used on hand-drawn illustrations */
  --shadow-sticker: 0 6px 0 rgba(15,65,74,0.08);

  /* ---------- Motion ---------- */
  --ease-out:   cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out:cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   360ms;
}

/* ---------- Base element styles ---------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--fg);
  background: var(--bg);
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--fg-strong);
  font-weight: 700;
  letter-spacing: var(--ls-heading);
  line-height: var(--lh-tight);
  margin: 0;
  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-weight: 600; }

p  { margin: 0 0 var(--space-4); line-height: var(--lh-relaxed); }

a  { color: var(--fg-brand); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--rosemary-teal); text-decoration: underline; text-underline-offset: 3px; }

small { font-size: var(--fs-small); color: var(--fg-muted); }

code, pre { font-family: var(--font-mono); font-size: 0.9em; }

::selection { background: var(--rosemary-tan); color: var(--rosemary-teal); }

/* ---------- Utility classes ---------- */

/* Script accent — for a SINGLE emphasis word inside a larger headline. Never full titles. */
.script-accent {
  font-family: var(--font-accent);
  font-weight: 400;
  color: var(--fg-brand);
  font-style: normal;
}

/* Eyebrow — the wide-tracked uppercase label used in the brand collateral */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--fg-brand);
}

.eyebrow--teal { color: var(--rosemary-teal); }

/* Body variants */
.body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-relaxed); }
.body-sm { font-size: var(--fs-small); }
.muted   { color: var(--fg-muted); }

/* Dark surface helper — apply for teal or burgundy sections */
.on-dark             { color: var(--fg-on-dark); }
.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4         { color: var(--fg-on-dark); }
.on-dark .subtitle   { color: var(--fg-subtitle-on-dark); }
.on-dark .footer     { color: var(--fg-footer-on-dark); }
.on-dark a           { color: var(--rosemary-tan); }
.on-dark a:hover     { color: var(--rosemary-white); }
