/* ============================================================
   Karunguru Gated Community — Design Tokens
   Ported from the design handoff's colors_and_type.css.
   The Google Fonts @import is intentionally omitted — fonts are
   self-hosted via assets/fonts/fonts.css (loaded before this file).
   ============================================================ */

:root {
  /* ====================================================
     COLOR SYSTEM
     Rooted in the estate — coffee leaf, brass, bone,
     dark roast, soft loam. Warm, earthy, tranquil.
     ==================================================== */

  /* --- Estate Greens (primary nature axis) --- */
  --kgc-green-950: oklch(28% 0.035 150);
  --kgc-green-900: oklch(34% 0.04  148);
  --kgc-green-800: oklch(42% 0.05  148);
  --kgc-green-700: oklch(52% 0.06  145);
  --kgc-green-500: oklch(64% 0.07  142);
  --kgc-green-300: oklch(82% 0.04  140);
  --kgc-green-100: oklch(94% 0.018 135);

  /* --- Brass / Gold (heritage accent — sparingly) --- */
  --kgc-brass-900: oklch(45% 0.08 75);
  --kgc-brass-700: oklch(60% 0.11 78);
  --kgc-brass-500: oklch(72% 0.12 80);
  --kgc-brass-300: oklch(85% 0.08 82);
  --kgc-brass-100: oklch(94% 0.035 84);

  /* --- Earth / Coffee (warm grounding tones) --- */
  --kgc-roast-950: oklch(22% 0.025 45);
  --kgc-roast-700: oklch(38% 0.04  50);
  --kgc-roast-500: oklch(55% 0.05  55);
  --kgc-roast-300: oklch(75% 0.04  60);

  /* --- Neutrals (warm, never cool grey) --- */
  --kgc-ink:       oklch(20% 0.012 60);
  --kgc-ink-soft:  oklch(36% 0.012 60);
  --kgc-ink-mute:  oklch(54% 0.012 60);
  --kgc-line:      oklch(86% 0.012 70);
  --kgc-line-soft: oklch(92% 0.010 75);
  --kgc-bone:      oklch(98% 0.010 80);
  --kgc-ivory:     oklch(95% 0.018 82);
  --kgc-parchment: oklch(92% 0.025 84);
  --kgc-canvas:    oklch(89% 0.025 86);

  /* --- Semantic --- */
  --kgc-success:   var(--kgc-green-700);
  --kgc-warning:   var(--kgc-brass-700);
  --kgc-danger:    oklch(55% 0.16 28);
  --kgc-info:      oklch(52% 0.07 230);

  /* --- Foreground / Background slots --- */
  --bg:           var(--kgc-bone);
  --bg-elev-1:    var(--kgc-ivory);
  --bg-elev-2:    #ffffff;
  --bg-inverse:   var(--kgc-green-950);
  --fg:           var(--kgc-ink);
  --fg-1:         var(--kgc-ink);
  --fg-2:         var(--kgc-ink-soft);
  --fg-3:         var(--kgc-ink-mute);
  --fg-inverse:   var(--kgc-bone);
  --accent:       var(--kgc-green-900);
  --accent-soft:  var(--kgc-green-100);
  --gold:         var(--kgc-brass-500);
  --gold-deep:    var(--kgc-brass-700);
  --hairline:     var(--kgc-line);

  /* ====================================================
     TYPOGRAPHY
     ==================================================== */
  --font-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-caps:    'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body:    'Lora', 'Iowan Old Style', Georgia, serif;
  --font-ui:      'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-48: 3rem;
  --fs-56: 3.5rem;
  --fs-72: 4.5rem;
  --fs-96: 6rem;

  --lh-tight:   1.05;
  --lh-snug:    1.18;
  --lh-base:    1.55;
  --lh-relaxed: 1.7;

  --tracking-wide:    0.16em;
  --tracking-display: -0.012em;
  --tracking-body:    0em;
  --tracking-ui:      -0.005em;

  /* ====================================================
     SPACING / RADIUS / SHADOW / MOTION
     ==================================================== */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(58, 36, 24, 0.05),
              0 1px 3px rgba(58, 36, 24, 0.04);
  --shadow-2: 0 2px 6px rgba(58, 36, 24, 0.06),
              0 6px 14px rgba(58, 36, 24, 0.05);
  --shadow-3: 0 10px 24px rgba(58, 36, 24, 0.08),
              0 24px 48px -12px rgba(58, 36, 24, 0.10);
  --shadow-inset: inset 0 0 0 1px rgba(58, 36, 24, 0.06);

  /* README's global rule: cubic-bezier(0.2, 0, 0, 1) for everything, no
     bounce/overshoot/spring. The source token file used a different curve
     for --motion-stroll; corrected here to match (duration left as-is). */
  --motion-fast:   150ms cubic-bezier(0.2, 0, 0, 1);
  --motion-base:   240ms cubic-bezier(0.2, 0, 0, 1);
  --motion-slow:   420ms cubic-bezier(0.2, 0, 0, 1);
  --motion-stroll: 700ms cubic-bezier(0.2, 0, 0, 1);

  /* Single breakpoint — the design only specifies two states (1280px
     desktop / 390px mobile), so one split is enough to cover it. */
  --bp-desktop: 768px;
}

/* ============================================================
   SEMANTIC ELEMENTS
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-base);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg-1);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-display);
  margin: 0;
  text-wrap: pretty;
}

h1 { font-size: clamp(2.25rem, 4.6vw, var(--fs-72)); line-height: var(--lh-tight); font-weight: 500; }
h2 { font-size: clamp(2rem, 3.8vw, var(--fs-56)); font-weight: 500; }
h3 { font-size: var(--fs-32); font-weight: 500; }
h4 { font-size: var(--fs-24); font-weight: 600; }
h5 { font-family: var(--font-ui); font-size: var(--fs-16); font-weight: 600; letter-spacing: 0; }

.eyebrow,
.kgc-eyebrow {
  display: block;
  font-family: var(--font-caps);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--gold-deep);
}

.eyebrow--on-dark { color: var(--kgc-brass-300); }

p {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  margin: 0 0 1em;
  text-wrap: pretty;
}

.lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-24);
  line-height: 1.45;
  color: var(--fg-1);
}

small, .meta {
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  color: var(--fg-3);
  letter-spacing: var(--tracking-ui);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklch, currentColor 35%, transparent);
  transition: text-decoration-color var(--motion-fast), color var(--motion-fast);
}
a:hover { text-decoration-color: currentColor; color: var(--kgc-green-800); }

button, input, select, textarea, .ui {
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  letter-spacing: var(--tracking-ui);
}

hr.rule-ornament {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--hairline) 20%,
    var(--gold) 50%,
    var(--hairline) 80%,
    transparent 100%);
}
