/* ============================================================
   gathered.cam — Color & Type Foundations
   ------------------------------------------------------------
   Locked palette. Fonts: DM Serif Display (display), Cormorant Garamond
   (editorial), DM Sans (UI/body). All OFL.
   ============================================================ */

/* Local font declarations — latin subset woff2 files in fonts/ */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSerifDisplay-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/DMSans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/DMSans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/CormorantGaramond-300italic.woff2') format('woff2');
}

:root {
  /* ---------- Brand palette (locked) ---------- */
  --gc-dark:      #1A1C1E;   /* primary text, dark surface       */
  --gc-sage:      #3D5A4F;   /* primary brand color, mark, UI    */
  --gc-gold:      #C9A96E;   /* accent — the "." separator       */
  --gc-mid-sage:  #8A9E97;   /* secondary text on dark, muted    */
  --gc-cream:     #F5F2EC;   /* light surface, primary canvas    */

  /* Tonal extensions (derived, used sparingly) */
  --gc-cream-deep:    #ECE7DC;   /* recessed cream, dividers on cream */
  --gc-cream-edge:    #E2DCCD;   /* hairline borders on cream         */
  --gc-sage-deep:     #2C443B;   /* hover/press on sage               */
  --gc-sage-tint:     #E8EDEB;   /* faint sage wash on cream          */
  --gc-dark-soft:     #2A2D30;   /* card surface on dark              */
  --gc-dark-edge:     #34373A;   /* hairline on dark                  */
  --gc-gold-soft:     #E0CDA3;   /* gold on light tint                */

  /* ---------- Semantic — light surface ---------- */
  --bg:           var(--gc-cream);
  --surface:      #FFFFFF;
  --surface-sunk: var(--gc-cream-deep);
  --border:       var(--gc-cream-edge);
  --border-strong:#CDC4B1;

  --fg:           var(--gc-dark);
  --fg-muted:     #5A6361;
  --fg-subtle:    #7C857F;

  --brand:        var(--gc-sage);
  --brand-hover:  var(--gc-sage-deep);
  --accent:       var(--gc-gold);

  --focus-ring:   color-mix(in oklab, var(--gc-sage) 40%, transparent);

  /* ---------- Type families ---------- */
  --font-display:   'DM Serif Display', 'Georgia', serif;
  --font-editorial: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-sans:      'DM Sans', system-ui, -apple-system, sans-serif;

  /* ---------- Type scale (fluid-friendly) ---------- */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  36px;
  --fs-3xl:  48px;
  --fs-4xl:  64px;
  --fs-5xl:  88px;

  --lh-tight:  1.05;
  --lh-snug:   1.2;
  --lh-normal: 1.45;
  --lh-loose:  1.6;

  /* Letter spacing — DM Serif Display looks best with slight negative
     tracking at display sizes. DM Sans is neutral. */
  --tracking-tight:   -0.02em;
  --tracking-normal:  0;
  --tracking-wide:     0.04em;
  --tracking-widest:   0.18em;

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

  /* ---------- Radius ---------- */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  28px;
  --r-pill: 999px;

  /* ---------- Shadows (warm, low-contrast) ---------- */
  --sh-1: 0 1px 2px rgba(26, 28, 30, 0.04), 0 1px 1px rgba(26, 28, 30, 0.03);
  --sh-2: 0 2px 6px rgba(26, 28, 30, 0.05), 0 4px 14px rgba(26, 28, 30, 0.04);
  --sh-3: 0 6px 18px rgba(26, 28, 30, 0.08), 0 18px 40px rgba(26, 28, 30, 0.06);
  --sh-inner-cream: inset 0 1px 0 rgba(255,255,255,0.6);

  /* ---------- Motion ---------- */
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in:   cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --dur-fast:  140ms;
  --dur-base:  220ms;
  --dur-slow:  360ms;
}

/* ---------- Dark surface override ---------- */
.gc-dark-surface,
[data-surface="dark"] {
  --bg:           var(--gc-dark);
  --surface:      var(--gc-dark-soft);
  --surface-sunk: #1F2123;
  --border:       var(--gc-dark-edge);
  --border-strong:#41464A;

  --fg:           var(--gc-cream);
  --fg-muted:     var(--gc-mid-sage);
  --fg-subtle:    #6A746F;

  --brand:        #6E8C81;       /* lifted sage for contrast on dark */
  --brand-hover:  #84A398;
}

/* ============================================================
   Base element styles — semantic defaults
   ============================================================ */

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
  margin: 0;
  line-height: var(--lh-tight);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl);  line-height: var(--lh-snug); }
h5 { font-size: var(--fs-lg);  line-height: var(--lh-snug); }
h6 {
  font-size: var(--fs-xs);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--fg-muted);
}

p {
  margin: 0 0 var(--sp-4) 0;
  line-height: var(--lh-normal);
  text-wrap: pretty;
}

.gc-editorial,
em.gc-editorial {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0;
}

.gc-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--fg-muted);
}

.gc-wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.gc-wordmark .dot { color: var(--gc-gold); }

a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--brand) 40%, transparent);
  transition: color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft);
}
a:hover { color: var(--brand-hover); border-bottom-color: var(--brand-hover); }

::selection { background: var(--gc-gold); color: var(--gc-dark); }
