/* =========================================================
   Skygrove — Colors & Type
   Strategic advisory at the intersection of culture & commerce.
   Editorial. Typography-led. Generous space.
   ========================================================= */

:root {
  /* ---------- Color tokens (raw) ---------- */
  --sg-brown: #2c1f11;        /* Primary brand */
  --sg-light: #fff8f1;        /* Primary background */
  --sg-black: #070909;        /* Body copy */
  --sg-blue:  #002940;        /* Dark accent — sparingly */
  --sg-sky:   #86a7c4;        /* Background wash only */
  --sg-moss:  #6e8c76;        /* Embellishment only */

  /* Tonal tints/shades derived for borders, hover, etc. */
  --sg-brown-90: #3a2a1a;
  --sg-brown-70: #5a4632;
  --sg-brown-40: #b3a496;
  --sg-brown-20: #e6dccf;
  --sg-light-2: #f6efe5;      /* Slightly deeper paper */
  --sg-rule:    #2c1f1133;    /* 20% brown for hairlines */
  --sg-rule-strong: #2c1f1199;

  /* ---------- Semantic surface tokens ---------- */
  --bg:            var(--sg-light);
  --bg-paper:      var(--sg-light-2);
  --bg-wash:       var(--sg-sky);          /* large background wash only */
  --bg-inverse:    var(--sg-brown);
  --bg-night:      var(--sg-blue);

  --fg:            var(--sg-black);        /* body copy */
  --fg-display:    var(--sg-brown);        /* headlines / brand */
  --fg-muted:      var(--sg-brown-70);
  --fg-subtle:     var(--sg-brown-40);
  --fg-inverse:    var(--sg-light);
  --fg-accent:     var(--sg-blue);
  --fg-embellish:  var(--sg-moss);

  --rule:          var(--sg-rule);
  --rule-strong:   var(--sg-rule-strong);

  /* ---------- Typography ---------- */
  --font-display:  "Playfair Display", "EB Garamond", Georgia, "Times New Roman", serif;
  --font-text:     "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-wordmark: "Bentham", "Playfair Display", Georgia, serif;
  --font-mono:     ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* Tracking — Montserrat caps want big tracking; Playfair stays tight */
  --track-tightest: -0.02em;   /* display tight (-10 to 0) */
  --track-tight:    -0.01em;
  --track-normal:   0;
  --track-wide:     0.12em;    /* subhead caps */
  --track-widest:   0.30em;    /* hero kicker / +300 */

  /* Line heights — editorial generous */
  --lh-display:  1.05;
  --lh-heading:  1.15;
  --lh-body:     1.55;
  --lh-tight:    1.25;

  /* Type scale (modular, editorial) */
  --fs-eyebrow: 12px;
  --fs-caption: 13px;
  --fs-body-sm: 14px;
  --fs-body:    16px;
  --fs-body-lg: 18px;
  --fs-lede:    22px;
  --fs-h6:      18px;
  --fs-h5:      22px;
  --fs-h4:      30px;
  --fs-h3:      42px;
  --fs-h2:      60px;
  --fs-h1:      88px;
  --fs-display: 128px;

  /* ---------- Spacing / rhythm ---------- */
  --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;
  --space-10: 128px;
  --space-11: 192px;

  /* Editorial margins — generous */
  --gutter:         24px;
  --gutter-lg:      48px;
  --measure:        62ch;        /* prose max-width */
  --column:         1240px;      /* page max */

  /* ---------- Radii ---------- */
  --radius-0: 0;
  --radius-1: 2px;
  --radius-2: 4px;
  --radius-3: 8px;
  --radius-pill: 999px;

  /* ---------- Lines / shadows ---------- */
  --hairline: 1px solid var(--rule);
  --rule-1:   1px solid var(--sg-brown);

  /* Shadows are sparse — paper, not floating UI */
  --shadow-paper: 0 1px 0 rgba(44, 31, 17, 0.06);
  --shadow-card:  0 18px 40px -28px rgba(44, 31, 17, 0.35);

  /* ---------- Motion ---------- */
  --ease-editorial: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast: 160ms;
  --dur:      280ms;
  --dur-slow: 520ms;
}

/* =========================================================
   Base + semantic element styles
   ========================================================= */

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display — Playfair, tight, no caps unless needed */
.sg-display,
.sg-h1, .sg-h2, .sg-h3, .sg-h4, .sg-h5, .sg-h6,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--fg-display);
  font-weight: 400;
  letter-spacing: var(--track-tightest);
  line-height: var(--lh-display);
  margin: 0;
  text-wrap: balance;
}

.sg-display { font-size: var(--fs-display); line-height: 1.0; }
h1, .sg-h1 { font-size: var(--fs-h1); }
h2, .sg-h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); }
h3, .sg-h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); }
h4, .sg-h4 { font-size: var(--fs-h4); line-height: var(--lh-tight); }
h5, .sg-h5 { font-size: var(--fs-h5); line-height: var(--lh-tight); }
h6, .sg-h6 { font-size: var(--fs-h6); line-height: var(--lh-tight); }

/* Subhead — Montserrat Bold, ALL CAPS, wide tracking. */
.sg-subhead, .sg-eyebrow {
  font-family: var(--font-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  font-size: var(--fs-eyebrow);
  color: var(--fg-display);
  line-height: 1.1;
}

.sg-subhead--lg {
  font-size: var(--fs-body-sm);
  letter-spacing: 0.18em;
}

.sg-kicker {
  font-family: var(--font-text);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--track-widest);
  font-size: var(--fs-eyebrow);
  color: var(--fg-muted);
}

/* Body */
p, .sg-body {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  max-width: var(--measure);
  text-wrap: pretty;
}

.sg-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-lede);
  line-height: 1.4;
  color: var(--fg-display);
}

.sg-caption {
  font-size: var(--fs-caption);
  color: var(--fg-muted);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--dur-fast) var(--ease-editorial);
}
a:hover { opacity: 0.6; }

hr {
  border: 0;
  border-top: var(--hairline);
  margin: var(--space-7) 0;
}

::selection { background: var(--sg-brown); color: var(--sg-light); }

/* Containers */
.sg-page    { max-width: var(--column); margin: 0 auto; padding: 0 var(--gutter-lg); }
.sg-rule    { border-top: var(--hairline); }
.sg-rule--strong { border-top: var(--rule-1); }

/* Inversion utility — for brown / blue surfaces */
.sg-on-dark {
  background: var(--bg-inverse);
  color: var(--fg-inverse);
}
.sg-on-dark h1, .sg-on-dark h2, .sg-on-dark h3,
.sg-on-dark h4, .sg-on-dark h5, .sg-on-dark h6,
.sg-on-dark .sg-subhead, .sg-on-dark .sg-display { color: var(--fg-inverse); }
