/* ════════════════════════════════════════════════════════
   HIVANA — CSS Variables & Reset
   All design tokens defined here; overridden by inline
   <style id="theme-vars"> from PHP/DB at runtime.
════════════════════════════════════════════════════════ */

/* ── Tokens (defaults — overridden by DB theme) ─────── */
:root {
    --font-family:     'Poppins', sans-serif;
    --font-size-xs:    0.75rem;
    --font-size-sm:    0.875rem;
    --font-size-base:  1rem;
    --font-size-md:    1.125rem;
    --font-size-lg:    1.25rem;
    --font-size-xl:    1.5rem;
    --font-size-2xl:   2rem;
    --font-size-3xl:   2.5rem;
    --font-size-4xl:   3rem;

    --font-weight-light:   300;
    --font-weight-normal:  400;
    --font-weight-medium:  500;
    --font-weight-semibold:600;
    --font-weight-bold:    700;

    --line-height-tight:  1.25;
    --line-height-normal: 1.6;
    --line-height-loose:  1.85;

    --color-font:      #1a1a1a;
    --color-icon:      #800000;
    --color-bg:        #FAFAFA;
    --color-primary:   #800000;
    --color-primary-hover: #660000;
    --color-secondary: #F5F5F5;
    --color-accent:    #D4AF37;
    --color-card:      #FFFFFF;
    --color-border:    #E0E0E0;
    --color-muted:     #888888;
    --color-success:   #2e7d32;
    --color-warning:   #ed6c02;
    --color-error:     #c62828;
    --color-info:      #0277bd;

    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
    --shadow-md:   0 4px 12px rgba(0,0,0,.12);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.16);
    --shadow-xl:   0 20px 60px rgba(0,0,0,.20);

    --spacing-1:  0.25rem;
    --spacing-2:  0.5rem;
    --spacing-3:  0.75rem;
    --spacing-4:  1rem;
    --spacing-5:  1.25rem;
    --spacing-6:  1.5rem;
    --spacing-8:  2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;

    --header-height: 68px;
    --transition:    all 0.22s ease;
    --transition-slow: all 0.4s ease;

    --z-dropdown: 100;
    --z-drawer:   200;
    --z-header:   300;
    --z-modal:    9999;
    --z-toast:    500;
}

/* Dark mode overrides already come from DB via inline <style> */

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-font);
    background-color: var(--color-bg);
    transition: background-color 0.25s ease, color 0.25s ease;
    min-height: 100vh;
    overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: var(--transition); }
a:hover { opacity: 0.82; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-family); }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
fieldset { border: none; }
hr { border: none; border-top: 1px solid var(--color-border); }

/* ── Utility classes ─────────────────────────────────── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); border: 0;
}
.muted       { color: var(--color-muted); font-size: var(--font-size-sm); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid        { display: grid; }
.hidden      { display: none !important; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
