@layer tokens, base, components, pages, utilities;
@layer tokens {
  :root {
    /* Colors: brand primary */
    --teal-dark: #0f3d37;
    --teal: #1a5c53;
    --teal-light: #248f7f;
    --teal-action: #069B8C;
    --teal-action-strong: #06a596;
    --teal-mist: #e8f4f1;

    /* Colors: premium accent */
    --gold-deep: #C9922A;
    --gold: #E8B86A;
    --gold-light: #F5D89A;
    --gold-border: #DDBD77;

    /* Colors: warm neutrals */
    --ink: #2B2620;
    --body: #6B6254;
    --muted: #A09683;
    --cream: #F5EFE4;
    --base: #faf8f5;
    --white: #ffffff;
    --white-warm: #fffdf8;

    /* Semantic */
    --sage: #7A9E8E;
    --warm: #D98973;
    --error: #B85C5C;

    /* Typography */
    --font-display: 'Source Serif 4', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Type scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.0625rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.5rem;
    --text-4xl: clamp(2.5rem, 6vw, 4.5rem);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --container: 1120px;
    --container-wide: 1240px;
    --container-reading: 760px;
    --page-gutter: clamp(1rem, 4vw, 2rem);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(43, 38, 32, 0.05);
    --shadow-md: 0 16px 38px rgba(43, 38, 32, 0.08);
    --shadow-lg: 0 28px 72px rgba(15, 61, 55, 0.14);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 44px rgba(232, 184, 106, 0.20);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-med: 0.4s var(--ease-out);
    --transition-slow: 0.6s var(--ease-out);

    /* Borders */
    --border: rgba(15, 61, 55, 0.12);
    --border-strong: rgba(15, 61, 55, 0.22);
    --border-gold: rgba(201, 146, 42, 0.28);

    /* Temporary legacy aliases */
    --primary: var(--teal);
    --primary-dark: var(--teal-dark);
    --primary-light: var(--teal-light);
    --secondary: var(--teal-light);
    --accent: var(--gold);
    --accent-light: var(--gold-light);
    --text-dark: var(--ink);
    --text-body: var(--body);
    --text-muted: var(--muted);
    --text-light: var(--muted);
    --bg-cream: var(--base);
    --bg-sage: var(--teal-mist);
    --bg-dark: var(--ink);
    --font-heading: var(--font-display);
  }
}
