/* ==========================================================================
   Conscious Pharmacist — "Natural Sanctuary" Design Tokens
   ========================================================================== */

/* fonts.css is enqueued via functions.php */

:root {
    /* Semantic Colors */
    --cp-bg: #f5efe3; /* Slightly darker linen */
    --cp-surface: #f5efe3;
    --cp-surface-container: #f1eee3;
    --cp-surface-lowest: #ffffff;
    --cp-surface-highest: #e5e2d8;

    --cp-text: #1c1c15; /* On Surface */
    --cp-text-muted: #444844; /* On Surface Variant */

    --cp-primary: #1C241E; /* Forest Deep */
    --cp-on-primary: #ffffff;
    --cp-primary-container: #dce5db; /* Primary Fixed */

    --cp-secondary: #D5C9A9; /* Warm Sand */
    --cp-on-secondary: #211b07; /* On Secondary Fixed */

    --cp-tertiary: #59654d; /* Moss accent */
    --cp-tertiary-deep: #3f4b38;
    --cp-bark: #675b4d;
    --cp-lichen: #a9ad87;
    --cp-on-tertiary: #ffffff;

    --cp-outline: #c4c8c2;
    --cp-outline-soft: #D5C9A9; /* Warm sand for subtle borders */

    /* Original Mappings to prevent theme breaking */
    --cp-bg-alt: var(--cp-surface-container);
    --cp-bg-accent: var(--cp-surface-highest);
    --cp-border: var(--cp-outline);
    --cp-white: #ffffff;
    --cp-black: #1c1c15;

    /* Typography System */
    --cp-font-heading: 'Merriweather', Georgia, serif;
    --cp-font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --cp-font-accent: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Font Sizes (calibrated: -2px on headings, +1px on body) */
    --cp-fs-headline-xl: 62px;
    --cp-fs-headline-lg: 46px;
    --cp-fs-headline-md: 30px;
    --cp-fs-headline-sm: 22px;
    --cp-fs-body-lg: 18.5px;
    --cp-fs-body-md: 17px;
    --cp-fs-label-md: 14.5px;
    --cp-fs-label-sm: 12.5px;

    /* Fluid clamp for templates */
    --cp-fs-hero: clamp(2.35rem, 4.8vw, 3.8rem);
    --cp-fs-h1: clamp(1.85rem, 3.8vw, 2.85rem);
    --cp-fs-h2: clamp(1.6rem, 3.2vw, 2.35rem);
    --cp-fs-h3: clamp(1.2rem, 2.3vw, 1.85rem);
    --cp-fs-h4: clamp(1.05rem, 1.8vw, 1.4rem);
    --cp-fs-body: var(--cp-fs-body-md);
    --cp-fs-small: var(--cp-fs-label-md);
    --cp-fs-meta: var(--cp-fs-label-sm);

    /* Spacing & Layout */
    --cp-space-unit: 8px;
    --cp-gutter: 32px;
    --cp-margin-desktop: 64px;
    --cp-margin-mobile: 24px;
    --cp-section-gap: 120px;

    --cp-max-width: 1280px;
    --cp-content-width: 800px;

    /* Legacy Spacing Mapping */
    --cp-space-xs: 8px;
    --cp-space-sm: 16px;
    --cp-space-md: 24px;
    --cp-space-lg: 32px;
    --cp-space-xl: 64px;
    --cp-space-2xl: 120px;
    --cp-space-3xl: 160px;

    /* Radius */
    --cp-radius-sm: 0.25rem;
    --cp-radius-md: 0.75rem; /* More rounded */
    --cp-radius-lg: 1.5rem; /* The 24px card radius */
    --cp-radius-pill: 9999px;
    --cp-radius-round: 50%;

    /* Effects (Minimal, Calm, Earthy) */
    --cp-shadow-sm: none;
    --cp-shadow-md: 0 4px 20px rgba(28, 36, 30, 0.05); /* Forest Deep tinted shadow */
    --cp-shadow-lg: 0 8px 32px rgba(28, 36, 30, 0.08);
    --cp-shadow-hover: 0 12px 40px rgba(28, 36, 30, 0.12);

    /* Legacy Panel support */
    --cp-panel-bg: var(--cp-surface-lowest);
    --cp-panel-bg-hover: var(--cp-surface);
    --cp-panel-border: var(--cp-outline-soft);

    /* ── Terracotta Three-Stop AA Ramp (Astryx Design System) ── */
    --cp-terracotta-decorative: #CC633D; /* decorative borders, icons, >=18pt bold ONLY */
    --cp-terracotta-text: #9E4727;       /* AA normal text, links, overlines (4.74:1+ on all light surfaces) */
    --cp-terracotta-cta: #A64624;        /* AA white-text button fill (5.96:1 with #FFFFFF) */
    --cp-clay: #CC633D;                  /* alias for decorative terracotta */
    --cp-accent: var(--cp-terracotta-text); /* accent text = AA terracotta */

    /* ── Multi-Tier Light Surfaces (Astryx) ── */
    --cp-canvas: #F4F0E8;
    --cp-canvas-warm: #F5EFE3;
    --cp-alabaster: #FAF7F2;
    --cp-card-elevated: #FFFDF7;
    --cp-card-white: #FFFFFF;
    --cp-sand-panel: #EEE9E0;
    --cp-sand-cta: #E7E0D6;
    --cp-sage-wash: #E8EDE6;

    /* ── Borders (Astryx) ── */
    --cp-border-hairline: #E2DDD5;
    --cp-border-sand: #D5C9A9;
    --cp-border-sage: #C4C8C2;
    --cp-border-forest: rgba(19, 37, 24, 0.12);

    /* ── Dark Botanical Bands ── */
    --cp-botanical-deep: #132518;
    --cp-botanical-slate: #263229;
    --cp-botanical-mist: #354038;
    --cp-on-botanical: #FDF9EE;
    --cp-on-botanical-sand: #E5D6B7;
    --cp-on-botanical-terracotta: #E5A382;

    /* ── Gold & Success ── */
    --cp-gold-star: #D49520;
    --cp-gold-text: #8C5D08;
    --cp-gold-badge-bg: #FDF3D8;
    --cp-success: #386641;
    --cp-success-bg: #E1EDE4;

    /* Transitions */
    --cp-transition: 0.22s ease;
    --cp-transition-slow: 0.32s ease;
}
