/* ==========================================================================
   KALP Design Tokens
   Single source of truth for all colors, fonts, spacing, shadows, transitions.
   Edit this file to change the entire site's visual language.
   ========================================================================== */

/* ── Custom Font Faces ── */
@font-face {
    font-family: 'Bastion Free';
    src: url('../../../fonts/BASTIONFREEREGULAR-WO8Y9.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HP Simplified';
    src: url('../../../fonts/hpsimplified_rg.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HP Simplified';
    src: url('../../../fonts/hpsimplified_it.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

:root {
    /* ── Colors ── */
    --gold:         #C9A84C;
    --gold-light:   #E8C97A;
    --gold-pale:    #F5E6C0;
    --gold-dark:    #A68A3A;
    --chocolate:      #5A2010;
    --chocolate-dark: #3D1E0F;
    --brown-text:     #7A4A2E;
    --deep-brown:     #1A0A03;
    /* Header + footer background (item K). Lighter, warmer than --deep-brown
       so the chrome isn't near-black. Used ONLY by .kalp-header / .kalp-footer
       / the mobile drawer (see site-chrome.css) — body --deep-brown unchanged.
       To re-shade, edit both --header-brown and --header-brown-rgb. */
    --header-brown:     #42200C;
    --header-brown-rgb: 66, 32, 12;
    --cream:          #FFF8EE;
    --cream-dark:   #F5EDE0;
    --white:        #FFFFFF;
    --black:        #000000;

    /* Functional colors */
    --bg-primary:    var(--deep-brown);
    --bg-secondary:  var(--chocolate);
    --bg-light:      var(--cream);
    --text-primary:  var(--cream);
    --text-dark:     var(--deep-brown);
    --text-muted:    rgba(255, 248, 238, 0.7);
    --accent:        var(--gold);
    --accent-light:  var(--gold-light);
    --accent-hover:  var(--gold-dark);
    --border-color:  rgba(201, 168, 76, 0.3);
    --overlay:       rgba(26, 10, 3, 0.6);
    --overlay-light: rgba(26, 10, 3, 0.3);

    /* Status colors */
    --success: #4CAF50;
    --error:   #E53935;
    --warning: #FF9800;

    /* ── Typography ──
       Sitewide font system (Chat 03, 2026-06-19):
         - Main headers + big flavour names → HP Simplified (self-hosted)
         - All body / sub-text → Ubuntu (Google Fonts)
       Brand accents preserved:
         - Allura cursive → "Krafting Cultures" tagline in hero overlay
         - Cinzel → nav links + button labels
       Previous fonts (Cormorant Garamond, Bastion Free, Raleway) are no
       longer referenced; their loader URLs were stripped from enqueue.php. */
    --font-display: 'HP Simplified', 'Ubuntu', Georgia, serif;
    --font-flavour: 'HP Simplified', 'Ubuntu', Georgia, serif;
    --font-cursive: 'Allura', cursive;
    --font-button:  'Cinzel', serif;
    --font-body:    'Ubuntu', 'HP Simplified', sans-serif;

    /* Font sizes (fluid) */
    --text-xs:   clamp(0.625rem, 0.55rem + 0.25vw, 0.75rem);     /* 10-12px */
    --text-sm:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);      /* 12-14px */
    --text-base: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);       /* 14-16px */
    --text-md:   clamp(1rem, 0.925rem + 0.375vw, 1.125rem);      /* 16-18px */
    --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);        /* 18-22px */
    --text-xl:   clamp(1.375rem, 1.2rem + 0.75vw, 1.75rem);      /* 22-28px */
    --text-2xl:  clamp(1.75rem, 1.5rem + 1vw, 2.25rem);          /* 28-36px */
    --text-3xl:  clamp(2.25rem, 1.875rem + 1.5vw, 3rem);         /* 36-48px */
    --text-4xl:  clamp(2.75rem, 2.25rem + 2vw, 4rem);            /* 44-64px */

    /* Font weights */
    --weight-thin:     200;
    --weight-light:    300;
    --weight-regular:  400;
    --weight-medium:   500;
    --weight-semibold: 600;

    /* Letter spacing */
    --tracking-tight:  -0.01em;
    --tracking-normal:  0;
    --tracking-wide:    0.05em;
    --tracking-wider:   0.1em;
    --tracking-widest:  0.2em;

    /* Line heights */
    --leading-tight:   1.2;
    --leading-normal:  1.5;
    --leading-relaxed: 1.7;
    --leading-loose:   2;

    /* ── Spacing ── */
    --space-2xs: 0.25rem;    /* 4px */
    --space-xs:  0.5rem;     /* 8px */
    --space-sm:  0.75rem;    /* 12px */
    --space-md:  1rem;       /* 16px */
    --space-lg:  1.5rem;     /* 24px */
    --space-xl:  2rem;       /* 32px */
    --space-2xl: 3rem;       /* 48px */
    --space-3xl: 4rem;       /* 64px */
    --space-4xl: 6rem;       /* 96px */
    --space-5xl: 8rem;       /* 128px */

    /* Section spacing (responsive) */
    --section-gap: clamp(3rem, 2.5rem + 3vw, 6rem);

    /* ── Layout ── */
    --container-max:     1200px;
    --container-narrow:  800px;
    --container-wide:    1400px;
    --container-padding: clamp(1rem, 0.5rem + 2vw, 2rem);

    /* ── Borders ── */
    --radius-sm:   2px;
    --radius-md:   4px;
    --radius-lg:   8px;
    --radius-xl:   16px;
    --radius-card: 12px;   /* flavour cards, press cards */
    --radius-full: 50%;

    /* ── Shadows (warm-toned) ── */
    --shadow-sm:  0 1px 3px rgba(26, 10, 3, 0.12);
    --shadow-md:  0 4px 12px rgba(26, 10, 3, 0.15);
    --shadow-lg:  0 8px 30px rgba(26, 10, 3, 0.2);
    --shadow-xl:  0 16px 50px rgba(26, 10, 3, 0.3);
    --shadow-gold: 0 0 20px rgba(201, 168, 76, 0.3);
    --shadow-btn-gold: 0 4px 16px rgba(201, 168, 76, 0.3);
    --shadow-card: 0 4px 24px rgba(26, 10, 3, 0.06);
    --shadow-card-hover: 0 8px 36px rgba(26, 10, 3, 0.12);

    /* ── Transitions ── */
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-in:      cubic-bezier(0.4, 0, 1, 1);
    --ease-out:     cubic-bezier(0, 0, 0.2, 1);
    --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);

    --duration-fast:   150ms;
    --duration-normal: 300ms;
    --duration-slow:   500ms;
    --duration-slower:  800ms;

    --transition-fast:   all var(--duration-fast) var(--ease-default);
    --transition-normal: all var(--duration-normal) var(--ease-default);
    --transition-slow:   all var(--duration-slow) var(--ease-default);

    /* ── Z-index scale ── */
    --z-behind:    -1;
    --z-base:       0;
    --z-above:      1;
    --z-dropdown:   100;
    --z-sticky:     200;
    --z-overlay:    300;
    --z-modal:      400;
    --z-preloader:  500;
    --z-whatsapp:   450;
    --z-header:     1000;
    --z-announcement: 1000;
    --z-skip-link:  10000;

    /* ── Opacity Scale ── */
    --opacity-faint:    0.25;
    --opacity-subtle:   0.4;
    --opacity-muted:    0.5;
    --opacity-medium:   0.65;
    --opacity-semi:     0.75;
    --opacity-strong:   0.85;

    /* ── Border Widths ── */
    --border-thin:   1px;
    --border-medium: 2px;
    --border-thick:  3px;

    /* ── Container Widths ── */
    /* --container-max: 1200px (already defined above) */
    /* --container-narrow: 800px (already defined above) */
    --container-md:  900px;
    --container-sm:  700px;
    --container-xs:  500px;
    --container-text: 450px;   /* for text-heavy blocks like newsletter */

    /* ── Flavour Accent Colors ── */
    --flavour-gulaab:   #D4517E;
    --flavour-thandai:  #C9A84C;
    --flavour-rajbhog:  #E8A835;
    --flavour-paan:     #2D8B4E;

    /* ── Header ── */
    --header-height: 80px;
    --header-height-scrolled: 64px;

    /* ── Legal / Card Surface Tokens (Phase 11) ── */
    /* Subtle card surfaces (used on dark backgrounds) */
    --surface-card:           rgba(245, 239, 214, 0.04);
    --surface-card-hover:     rgba(245, 239, 214, 0.06);
    --surface-placeholder:    rgba(245, 239, 214, 0.5);

    /* Gold-tinted surfaces (for hero backgrounds, accent blocks) */
    --gold-tint-whisper:      rgba(201, 168, 76, 0.03);
    --gold-tint-faint:        rgba(201, 168, 76, 0.06);
    --gold-tint-subtle:       rgba(201, 168, 76, 0.1);
    --gold-tint-light:        rgba(201, 168, 76, 0.12);
    --gold-tint-medium:       rgba(201, 168, 76, 0.15);

    /* Gold borders (opacity scale) */
    --border-gold-faint:      rgba(201, 168, 76, 0.1);
    --border-gold-subtle:     rgba(201, 168, 76, 0.15);
    --border-gold-light:      rgba(201, 168, 76, 0.2);
    --border-gold-medium:     rgba(201, 168, 76, 0.25);
    /* --border-color     = rgba(201, 168, 76, 0.3) — declared above */
    --border-gold-strong:     rgba(201, 168, 76, 0.4);
    --border-gold-bold:       rgba(201, 168, 76, 0.5);

    /* Danger / rose accent (non-returnable callout, no-international callout) */
    --color-danger:           #D4517E;
    --color-danger-bg:        rgba(212, 81, 126, 0.08);

    /* Elevated dark surface (footer background, slightly lighter than --deep-brown) */
    --bg-elevated:            #1a0f08;
}

/* ── Global Focus Styles ── */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Skip Navigation Link ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--deep-brown);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-button);
    font-size: var(--text-sm);
    letter-spacing: 0.1em;
    text-decoration: none;
    z-index: 10000;
    border-radius: var(--radius-md);
}

.skip-link:focus {
    top: 1rem;
}

/* ── Screen Reader Only ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
