/* Solstice V6 — Colour & Type Tokens
 * Use these everywhere. Don't hand-pick hex values in components. */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  /* ---------- Colour — raw palette ---------- */
  --solstice-night: #4A1828;
  --burgundy:       #7A2E3A;
  --rosewood:       #A8505A;
  --sand:           #C8A882;
  --chalk:          #E8DFD0;
  --bone:           #F7F2EA;
  --sage:           #6B8C7A;

  /* ---------- Colour — semantic ---------- */
  --bg:              var(--bone);           /* page background */
  --bg-surface:      var(--chalk);          /* card / panel */
  --bg-inverse:      var(--solstice-night); /* dark panels */

  --fg-1:            var(--solstice-night); /* primary text */
  --fg-2:            #6B4550;               /* secondary text (night + 30% mix) */
  --fg-3:            #9C7A82;               /* tertiary text / captions */
  --fg-on-dark-1:    var(--bone);
  --fg-on-dark-2:    var(--sand);
  --fg-on-dark-3:    #A89084;

  --accent:          var(--burgundy);       /* primary CTA, links */
  --accent-hover:    var(--rosewood);
  --accent-soft:     rgba(122, 46, 58, 0.08);
  --positive:        var(--sage);           /* ONLY for health data positive */

  --line:            rgba(74, 24, 40, 0.10);
  --line-strong:     rgba(74, 24, 40, 0.20);
  --line-on-dark:    rgba(232, 223, 208, 0.14);

  /* ---------- Type ---------- */
  --font-display: 'EB Garamond', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sizes bumped for promotional material — audience 35+, readability-first */
  --fs-display: clamp(56px, 6.4vw, 84px); /* @kind font */
  --fs-h1:      clamp(32px, 3vw, 40px); /* @kind font */
  --fs-h2:      clamp(20px, 1.6vw, 24px); /* @kind font */
  --fs-body:    17px;
  --fs-caption: 13px;
  --fs-label:   11px;

  --lh-tight: 1.1; /* @kind font */
  --lh-snug:  1.25; /* @kind font */
  --lh-body:  1.5; /* @kind font */

  --tr-display: 0.02em;
  --tr-caption: 0.08em;
  --tr-label:   0.2em;

  /* ---------- Spacing ---------- */
  --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;

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

  /* ---------- Elevation ---------- */
  --shadow-1: 0 1px 2px rgba(74, 24, 40, 0.06);
  --shadow-2: 0 4px 14px rgba(74, 24, 40, 0.08);
  --shadow-3: 0 18px 48px -20px rgba(74, 24, 40, 0.25);
  --ring:     0 0 0 2px rgba(168, 80, 90, 0.35);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1); /* @kind other */
  --dur-1: 120ms; /* @kind other */
  --dur-2: 220ms; /* @kind other */
  --dur-3: 420ms; /* @kind other */
}

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

h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: var(--lh-snug);
  letter-spacing: 0;
  color: var(--fg-1);
  margin: 0;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin: 0;
}
.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-display);
  color: var(--fg-1);
}
p, .body { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--fg-1); margin: 0; }
.caption { font-size: var(--fs-caption); letter-spacing: var(--tr-caption); color: var(--fg-3); }
.label   { font-size: var(--fs-label); letter-spacing: var(--tr-label); text-transform: uppercase; font-weight: 500; color: var(--fg-3); }

code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--fg-2); background: var(--accent-soft); padding: 2px 6px; border-radius: 4px; }

a { color: var(--accent); text-decoration: none; transition: color var(--dur-1) var(--ease-std); }
a:hover { color: var(--accent-hover); }

*:focus-visible { outline: 2px solid var(--rosewood); outline-offset: 2px; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  min-height: 44px; padding: 0 22px;
  border-radius: var(--r-md); border: 1px solid transparent;
  cursor: pointer; transition: all var(--dur-1) var(--ease-std);
  letter-spacing: 0.01em;
}
.btn-primary   { background: var(--burgundy); color: var(--bone); }
.btn-primary:hover   { background: var(--rosewood); box-shadow: var(--shadow-2); }
.btn-primary:active  { transform: scale(0.98); background: #6A2632; }

.btn-secondary { background: transparent; color: var(--fg-1); border-color: var(--solstice-night); }
.btn-secondary:hover { background: var(--chalk); }

.btn-tertiary  { background: transparent; color: var(--accent); min-height: unset; padding: 0; font-weight: 500; }
.btn-tertiary:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: var(--space-5);
}
.card-chalk { background: var(--chalk); }
.card-night { background: var(--solstice-night); color: var(--bone); border-color: var(--line-on-dark); }
.card-night .caption, .card-night .label { color: var(--sand); }

/* ---------- Inputs ---------- */
.input {
  font-family: var(--font-body); font-size: 15px;
  height: 44px; padding: 0 14px;
  background: var(--bone); color: var(--fg-1);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: all var(--dur-1) var(--ease-std);
  width: 100%;
}
.input::placeholder { color: var(--fg-3); }
.input:focus { outline: none; box-shadow: var(--ring); border-color: var(--rosewood); }
