/* ==========================================================================
   Sparrow Ritual — Colors & Type
   ==========================================================================
   "Inner beauty — made visible." Born in Finland.

   Warm, organic, editorial wellness. Earth, clay, sand. No cold, no synthetic.
   No pure white, no pure black. Every surface is warmed.

   FONTS
   -----
   Cormorant Garamond is bundled as variable TTFs in /fonts/ and loaded via
   the @font-face rules below. Jost is loaded from Google Fonts — add this to
   your <head>:

     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400&display=swap" rel="stylesheet">

   This stylesheet expects /fonts/ to live alongside it (or one level up).
   Adjust the url() paths below if your folder layout differs.
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype-variations"),
       url("fonts/CormorantGaramond-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Italic-VariableFont_wght.ttf") format("truetype-variations"),
       url("fonts/CormorantGaramond-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---------- BRAND PALETTE ----------
     Named after a sparrow's plumage — light belly to dark crown.
     Use ONLY these colours. Do not introduce new ones. */

  --belly:     #faf6f0;  /* Primary background — warm cream */
  --cheek:     #e8d4b8;  /* Secondary background, section fills */
  --wing:      #d4b896;  /* Borders, dividers, subtle fills */
  --warm:      #c4956a;  /* Accents, price numbers, dots */
  --rust:      #8b4a2a;  /* Primary brand colour — eyebrows, labels, CTAs, active states, dark backgrounds */
  --chestnut:  #6b3018;  /* Hover states, secondary dark */
  --deep:      #8b4a2a;  /* Dark section backgrounds (truth bands, product boxes) — lightened from #5c2e14 per brand direction */
  --crown:     #2a1e14;  /* Body text, headings, nav logo — small surfaces only */
  --grey:      #8a8070;  /* Secondary text, nav links, captions */
  --body-text: #5c3e28;  /* Body copy */

  /* ---------- SEMANTIC SURFACES ---------- */
  --bg:           var(--belly);
  --bg-alt:       var(--cheek);
  --bg-dark:      var(--rust);   /* default dark surface */
  --bg-deep:      var(--chestnut); /* lighter dark — truth bands, product boxes */
  --surface-card: var(--belly);
  --surface-card-on-dark: rgba(250, 246, 240, 0.04);

  /* ---------- SEMANTIC TEXT ---------- */
  --fg-1:        var(--crown);     /* Primary text, headings */
  --fg-2:        var(--body-text); /* Body */
  --fg-3:        var(--grey);      /* Secondary / labels / captions */
  --fg-on-dark:  var(--belly);
  --fg-on-dark-2: rgba(250, 246, 240, 0.65);
  --fg-on-dark-3: rgba(250, 246, 240, 0.40);  /* eyebrows on dark */

  /* ---------- BORDERS / DIVIDERS ----------
     All borders are 0.5px. Never 1px (except structural grid gaps). */
  --border:         var(--cheek);
  --border-soft:    var(--wing);
  --border-on-dark: rgba(250, 246, 240, 0.12);
  --rule:           0.5px solid var(--cheek);
  --hairline:       0.5px;

  /* ---------- ACCENT ---------- */
  --accent:        var(--rust);
  --accent-hover:  var(--chestnut);
  --accent-soft:   var(--warm);

  /* ---------- TYPOGRAPHY FAMILIES ---------- */
  --font-serif:  "Cormorant Garamond", "Garamond", Georgia, "Times New Roman", serif;
  --font-sans:   "Jost", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* ---------- TYPE SCALE ----------
     Editorial. Generous. Built around the sizes specified in the brand spec. */

  /* Display / hero */
  --fs-hero:      clamp(3.5rem, 5.5vw, 4.5rem);   /* 56–72px — hero H1 */
  --fs-h1:        clamp(2.5rem, 4vw, 3.875rem);   /* 40–62px */
  --fs-h2:        clamp(2rem, 3vw, 2.625rem);     /* 32–42px — section H2 */
  --fs-h3:        clamp(1.375rem, 2vw, 2rem);     /* 22–32px — card title */

  /* Quote & ornament */
  --fs-quote:     clamp(1.75rem, 2.4vw, 2.25rem); /* 28–36px — pull quote */
  --fs-ornament:  clamp(3rem, 5vw, 4.5rem);       /* 48–72px — large numerals */
  --fs-price:     clamp(4rem, 6vw, 4.5rem);       /* 64–72px — price */

  /* Body / UI */
  --fs-body:      0.875rem;   /* 14px — body copy (13–15px range) */
  --fs-body-lg:   0.9375rem;  /* 15px — slightly larger body */
  --fs-tag:       0.875rem;   /* 14px — tagline, italic */
  --fs-small:     0.8125rem;  /* 13px — small notes */
  --fs-button:    0.625rem;   /* 10px — UPPERCASE buttons */
  --fs-nav:       0.625rem;   /* 10px — UPPERCASE nav links */
  --fs-eyebrow:   0.5625rem;  /* 9px  — UPPERCASE section labels */
  --fs-wordmark:  1.125rem;   /* 18px — nav wordmark */

  /* ---------- LINE HEIGHTS ---------- */
  --lh-tight:     1.1;
  --lh-snug:      1.2;
  --lh-normal:    1.5;
  --lh-relaxed:   1.7;

  /* ---------- LETTER SPACING ----------
     Wide tracking is a brand signature. */
  --tr-eyebrow:   0.36em;     /* section labels (0.35–0.38em range) */
  --tr-button:    0.26em;     /* buttons */
  --tr-wordmark:  0.28em;     /* SPARROW wordmark + closing-sub */
  --tr-nav:       0.22em;     /* nav links */
  --tr-attr:      0.28em;     /* quote attribution */
  --tr-body:      0.02em;     /* body copy */

  /* ---------- SPACING SCALE ---------- */
  --sp-1:  0.25rem;   /* 4 */
  --sp-2:  0.5rem;    /* 8 */
  --sp-3:  0.75rem;   /* 12 */
  --sp-4:  1rem;      /* 16 */
  --sp-5:  1.5rem;    /* 24 */
  --sp-6:  2rem;      /* 32 */
  --sp-7:  3rem;      /* 48 */
  --sp-8:  4rem;      /* 64 */
  --sp-9:  5rem;      /* 80  — full section padding */
  --sp-10: 6rem;      /* 96  — closing section padding */
  --sp-11: 8rem;      /* 128 — hero padding */

  /* ---------- RADII ----------
     Borders are nearly square. Never SaaS-rounded. */
  --radius-sharp: 1px;        /* default — buttons, cards, inputs */
  /* DEPRECATED tokens kept for migration; do not use in new work.
     --radius-sm, --radius-md, --radius-lg, --radius-pill */

  /* ---------- SHADOWS ----------
     DEPRECATED — Sparrow Ritual does not use box-shadows.
     Depth comes from 0.5px borders, color shifts, and whitespace. */
  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: none;
  --shadow-card: none;

  /* ---------- MOTION ----------
     Slow, gentle. Nothing bouncy. */
  --ease:        cubic-bezier(0.32, 0.04, 0.33, 1);
  --ease-out:    cubic-bezier(0.16, 0.84, 0.44, 1);
  --dur-fast:    180ms;
  --dur:         200ms;       /* default button transition */
  --dur-slow:    600ms;

  /* ---------- LAYOUT ---------- */
  --container:        1100px;
  --container-narrow: 720px;
  --section-pad-y:    var(--sp-9);   /* 80px */
  --section-pad-x:    var(--sp-8);   /* 64px */
  --section-pad-mobile: var(--sp-7) var(--sp-5); /* 56px / 24px */
  --feather-h:        5px;
  --nav-top:          5px;            /* nav sits below feather */
}

/* ==========================================================================
   BASE TYPE
   ========================================================================== */

html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  letter-spacing: var(--tr-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- HEADINGS — serif, light, generous leading ---------- */
h1, h2, h3, h4, h5, .display, .h1, .h2, .h3, .h4 {
  font-family: var(--font-serif);
  color: var(--fg-1);
  font-weight: 300;
  letter-spacing: 0;
  line-height: var(--lh-snug);
  margin: 0;
  text-wrap: balance;
}

.hero, .display { font-size: var(--fs-hero); font-weight: 300; line-height: 1.08; }
h1, .h1 { font-size: var(--fs-h1); font-weight: 300; line-height: 1.1; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 300; line-height: 1.2; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 300; line-height: 1.25; }

/* Italic accent inside headings — the brand's signature warmth move */
h1 em, h2 em, h3 em,
.h1 em, .h2 em, .h3 em,
.hero em, .display em {
  font-style: italic;
  font-weight: 300;
  color: var(--rust);
}

/* Italic serif — taglines and pull quotes */
.serif-italic, em.tagline, .tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--fg-3);
  font-size: var(--fs-tag);
}

/* ---------- BODY ---------- */
p, .body {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  margin: 0;
  text-wrap: pretty;
  letter-spacing: var(--tr-body);
}
.body-lg { font-size: var(--fs-body-lg); }
.small   { font-size: var(--fs-small); }
.caption { font-size: var(--fs-small); color: var(--fg-3); }

/* ---------- LABELS / EYEBROWS — UPPERCASE, very wide tracking ---------- */
.eyebrow, .section-label {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tr-eyebrow);
  color: var(--rust);
  line-height: 1;
  margin: 0 0 1.2rem;
}

/* Section heading following an eyebrow */
.section-h {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 300;
  line-height: 1.2;
  color: var(--fg-1);
  margin: 0;
}
.section-h em { font-style: italic; color: var(--rust); }

/* ---------- WORDMARK ---------- */
.wordmark {
  font-family: var(--font-serif);
  font-size: var(--fs-wordmark);
  font-weight: 400;
  letter-spacing: var(--tr-wordmark);
  text-transform: uppercase;
  color: var(--crown);
}

/* ---------- LINKS ---------- */
a { color: inherit; text-decoration: none; transition: opacity var(--dur-fast) var(--ease), color var(--dur) var(--ease); }
a:hover { opacity: 0.7; }

a.underline {
  text-decoration: underline;
  text-decoration-color: var(--warm);
  text-underline-offset: 4px;
  text-decoration-thickness: 0.5px;
  color: var(--rust);
}
a.underline:hover { text-decoration-color: var(--rust); opacity: 1; }

/* ---------- DIVIDERS / RULES ---------- */
hr, hr.rule {
  border: 0;
  border-top: 0.5px solid var(--cheek);
  margin: var(--sp-7) 0;
}

/* ---------- FEATHER STRIP ----------
   Sticky, 5px tall. Light to dark, left to right. Top of every page. */
.feather-strip {
  display: flex;
  height: var(--feather-h);
  position: sticky;
  top: 0;
  z-index: 100;
}
.feather-strip span { display: block; }

/* ==========================================================================
   BUTTONS
   All buttons: border-radius:1px. No shadows. transition: 0.2s.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--fs-button);
  font-weight: 400;
  letter-spacing: var(--tr-button);
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sharp);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn-primary {
  background: var(--rust);
  color: var(--belly);
  padding: 15px 44px;
}
.btn-primary:hover { background: var(--chestnut); opacity: 1; }

.btn-crown {
  background: var(--belly);
  color: var(--crown);
  padding: 16px 52px;
}
.btn-crown:hover { background: var(--cheek); opacity: 1; }

.btn-ghost {
  background: none;
  color: var(--grey);
  font-size: var(--fs-button);
  letter-spacing: var(--tr-nav);
  text-transform: uppercase;
  border: none;
  border-bottom: 0.5px solid var(--wing);
  border-radius: 0;
  padding: 0 0 2px 0;
}
.btn-ghost:hover { color: var(--rust); border-bottom-color: var(--rust); opacity: 1; }

.btn-outline {
  background: none;
  color: var(--cheek);
  padding: 13px 32px;
  border: 0.5px solid rgba(232, 212, 184, 0.3);
}
.btn-outline:hover { border-color: var(--cheek); color: var(--belly); opacity: 1; }

/* ==========================================================================
   SECTIONS / LAYOUT PATTERNS
   ========================================================================== */

.section {
  padding: var(--section-pad-y) var(--section-pad-x);
  background: var(--belly);
}
.section-cheek { background: var(--cheek); }
.section-dark  { background: var(--rust); color: var(--fg-on-dark); }
.section-deep  { background: var(--chestnut); color: var(--fg-on-dark); }

/* Dark-section text overrides */
.section-dark .eyebrow, .section-deep .eyebrow,
.section-dark .section-label, .section-deep .section-label { color: var(--fg-on-dark-3); }
.section-dark h1, .section-dark h2, .section-dark h3,
.section-deep h1, .section-deep h2, .section-deep h3 { color: var(--belly); }
.section-dark h1 em, .section-dark h2 em, .section-dark h3 em,
.section-deep h1 em, .section-deep h2 em, .section-deep h3 em { color: var(--cheek); }
.section-dark p, .section-deep p { color: var(--fg-on-dark-2); }

/* ---------- QUOTE BAND ----------
   Full-width gradient with semi-transparent overlay. Centered italic. */
.full-quote {
  position: relative;
  min-height: 380px;
  height: 400px;
  overflow: hidden;
  background: linear-gradient(135deg,
    var(--cheek)  0%,
    var(--wing)   40%,
    var(--warm)   75%,
    var(--rust)  100%);
}
.full-quote-overlay {
  position: absolute;
  inset: 0;
  background: rgba(250, 246, 240, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-8) var(--sp-5);
}
.quote-line {
  width: 40px;
  height: 0.5px;
  background: var(--rust);
  margin: 0 auto var(--sp-6);
}
.quote-text {
  font-family: var(--font-serif);
  font-size: var(--fs-quote);
  font-weight: 300;
  font-style: italic;
  color: var(--crown);
  line-height: 1.4;
  max-width: 560px;
  margin: 0 0 var(--sp-5);
  text-wrap: balance;
}
.quote-attr {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tr-attr);
  text-transform: uppercase;
  color: var(--rust);
  margin: 0;
}

/* ---------- CLOSING SECTION ----------
   Italic line + sub. Born in Finland. */
.closing {
  padding: var(--sp-10) var(--section-pad-x);
  text-align: center;
  background: var(--belly);
}
.closing-text {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.2vw, 1.75rem); /* 24–28px */
  font-weight: 300;
  font-style: italic;
  color: var(--crown);
  line-height: 1.5;
  max-width: 500px;
  margin: 0 auto var(--sp-4);
  text-wrap: balance;
}
.closing-sub {
  font-family: var(--font-sans);
  font-size: 0.625rem;       /* 10px */
  letter-spacing: var(--tr-wordmark);
  text-transform: uppercase;
  color: var(--rust);
  margin: 0;
}

/* ---------- NAV ---------- */
nav.sparrow-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 4rem;
  background: var(--belly);
  border-bottom: 0.5px solid var(--cheek);
  position: sticky;
  top: var(--nav-top);
  z-index: 99;
}
nav.sparrow-nav .nav-links {
  display: flex;
  gap: var(--sp-7);
  align-items: center;
}
nav.sparrow-nav .nav-link {
  font-family: var(--font-sans);
  font-size: var(--fs-nav);
  font-weight: 300;
  letter-spacing: var(--tr-nav);
  text-transform: uppercase;
  color: var(--grey);
}
nav.sparrow-nav .nav-link:hover { color: var(--rust); opacity: 1; }
nav.sparrow-nav .nav-cta {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: var(--warm);
  text-decoration-thickness: 0.5px;
  text-underline-offset: 4px;
}

/* ---------- FOOTER ---------- */
footer.sparrow-footer {
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-5);
  border-top: 0.5px solid var(--cheek);
  background: var(--belly);
  flex-wrap: wrap;
}
.footer-wordmark {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--crown);
}
.footer-tag {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--warm);
}
.footer-links {
  display: flex;
  gap: var(--sp-5);
  font-family: var(--font-sans);
  font-size: var(--fs-nav);
  letter-spacing: var(--tr-nav);
  text-transform: uppercase;
  color: var(--grey);
}
.footer-links a:hover { color: var(--rust); opacity: 1; }

/* ---------- GRID HELPERS ---------- */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--cheek); }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--cheek); }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--cheek); }
.grid-2 > *, .grid-3 > *, .grid-4 > * { background: var(--belly); padding: 2.5rem 1.8rem; }

.container        { max-width: var(--container);        margin: 0 auto; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .section { padding: var(--section-pad-mobile); }
  nav.sparrow-nav { padding: 1.1rem 1.5rem; }
  nav.sparrow-nav .nav-links { gap: var(--sp-4); }
  footer.sparrow-footer { padding: 1.5rem; flex-direction: column; align-items: flex-start; }
  .split-2, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- SELECTION ---------- */
::selection { background: var(--cheek); color: var(--crown); }
