/**
 * Design System Variables
 * Testing With Renata Theme
 * 
 * Brand color palette with a dark, developer-focused aesthetic.
 * All design tokens are defined here for consistency across the theme.
 */

/* ================================
   CUSTOM FONT FACES
   ================================ */

/* Averox - Display/Accent Font (use sparingly, always lowercase) */
@font-face {
    font-family: 'Averox';
    src: url('../fonts/averox/averox.otf') format('opentype'),
         url('../fonts/averox/averox.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Noah - Primary Brand Font */
@font-face {
    font-family: 'Noah';
    src: url('../fonts/noah/noah-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noah';
    src: url('../fonts/noah/noah-regularitalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Noah';
    src: url('../fonts/noah/noah-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noah';
    src: url('../fonts/noah/noah-bolditalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    /* ================================
       COLOR PALETTE (Brand Colors)
       ================================ */
    
    /* Background Colors */
    --bg-primary: #030214;          /* Deep purple-black - Main background */
    --bg-secondary: #2e1246;        /* Deep purple - Cards, elevated surfaces */
    --bg-tertiary: #483638;         /* Dark maroon - Hover states, inputs */
    --bg-overlay: rgba(3, 2, 20, 0.95); /* Modal/overlay backgrounds */
    
    /* Text Colors */
    --text-primary: #fbf7df;        /* Warm cream - Main text, headings */
    --text-secondary: #e4dfd9;      /* Warm gray - Muted text, descriptions */
    --text-tertiary: #a48d84;       /* Taupe - Very muted, placeholders */
    --text-inverse: #030214;        /* Text on light backgrounds */
    
    /* Accent Colors - Primary (Teal) */
    --accent-green: #4f829b;        /* Teal - Primary accent, CTAs */
    --accent-green-hover: #3d6a80;  /* Teal hover state (darker) */
    --accent-green-muted: rgba(79, 130, 155, 0.15); /* Teal backgrounds */
    
    /* Accent Colors - Secondary (Plum) */
    --accent-purple: #724b63;       /* Plum - Secondary accent, highlights */
    --accent-purple-hover: #5a3c4f; /* Plum hover state (darker) */
    --accent-purple-muted: rgba(114, 75, 99, 0.15); /* Plum backgrounds */
    
    /* Accent Colors - Tertiary (keeping teal variants for links) */
    --accent-blue: #4f829b;         /* Teal - Links, info elements */
    --accent-blue-hover: #3d6a80;   /* Teal hover state */
    --accent-blue-muted: rgba(79, 130, 155, 0.15); /* Teal backgrounds */
    
    /* Accent Colors - Utility */
    --accent-orange: #a48d84;       /* Taupe - Warnings, attention */
    --accent-pink: #724b63;         /* Plum - Special highlights */
    --accent-cyan: #4f829b;         /* Teal - Code, terminal elements */
    
    /* Border Colors */
    --border-default: #483638;      /* Dark maroon borders */
    --border-muted: #2e1246;        /* Deep purple - Subtle borders */
    --border-accent: var(--accent-green); /* Teal - Highlighted borders */
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px rgba(3, 2, 20, 0.3);
    --shadow-md: 0 4px 12px rgba(3, 2, 20, 0.4);
    --shadow-lg: 0 8px 24px rgba(3, 2, 20, 0.5);
    --shadow-glow-green: 0 0 20px rgba(79, 130, 155, 0.3);  /* Teal glow */
    --shadow-glow-purple: 0 0 20px rgba(114, 75, 99, 0.3);  /* Plum glow */
    
    /* ================================
       TYPOGRAPHY
       ================================ */
    
    /* Font Families */
    --font-primary: 'Noah', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-display: 'Averox', 'Noah', sans-serif;  /* For main titles only, use lowercase */
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    --text-7xl: 4.5rem;      /* 72px */
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;
    
    /* ================================
       SPACING
       ================================ */
    
    --space-1: 0.25rem;      /* 4px */
    --space-2: 0.5rem;       /* 8px */
    --space-3: 0.75rem;      /* 12px */
    --space-4: 1rem;         /* 16px */
    --space-5: 1.25rem;      /* 20px */
    --space-6: 1.5rem;       /* 24px */
    --space-8: 2rem;         /* 32px */
    --space-10: 2.5rem;      /* 40px */
    --space-12: 3rem;        /* 48px */
    --space-16: 4rem;        /* 64px */
    --space-20: 5rem;        /* 80px */
    --space-24: 6rem;        /* 96px */
    --space-32: 8rem;        /* 128px */
    
    /* ================================
       LAYOUT
       ================================ */
    
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1200px;
    --container-2xl: 1400px;
    
    --header-height: 80px;
    --footer-min-height: 400px;
    
    /* ================================
       BORDERS & RADIUS
       ================================ */
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    --border-width: 1px;
    --border-width-2: 2px;
    
    /* ================================
       TRANSITIONS
       ================================ */
    
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-slower: 500ms ease;
    
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* ================================
       Z-INDEX SCALE
       ================================ */
    
    --z-below: -1;
    --z-base: 0;
    --z-above: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;

    /* Focus ring & touch targets (WCAG 2.4.7 / 2.5.8) */
    --focus-ring-width: 3px;
    --focus-ring-offset: 2px;
    --focus-ring-color: var(--text-primary);
    --tap-target-min: 44px;

    /* Accent text on card surfaces (--bg-secondary): teal is only 3.87:1 there in dark mode */
    --accent-on-card: var(--text-secondary);

    /* Plum used as TEXT or ICON colour: #724b63 is only 2.84:1 on the dark page, this tint is 5.9-8.2:1 */
    --accent-purple-text: #c597ae;
}

/* Dark mode is default */
.twr-dark-theme,
:root {
    color-scheme: dark;
}

/* ================================
   LIGHT MODE
   Applied via html[data-theme="light"].
   Keeps brand identity (teal + plum accents) on warm, 
   high-contrast light backgrounds for accessibility.
   ================================ */

html[data-theme="light"] {
    color-scheme: light;

    /* Backgrounds — warm creams and whites */
    --bg-primary:   #fafaf6;                        /* Warm white — main background */
    --bg-secondary: #f0ece4;                        /* Warm beige — cards, elevated surfaces */
    --bg-tertiary:  #e4dfd9;                        /* Warm gray — hover states, inputs */
    --bg-overlay:   rgba(250, 250, 246, 0.97);      /* Modal/overlay backgrounds */

    /* Text — dark purples and maroons for readability */
    --text-primary:   #1a0a2e;                      /* Deep purple — main text, headings */
    --text-secondary: #483638;                      /* Dark maroon — muted text */
    --text-tertiary:  #6b5651;                      /* Mid maroon — placeholders */
    --text-inverse:   #fbf7df;                      /* Warm cream — text on dark buttons */

    /* Accent — teal deepened for contrast on light bg (WCAG AA) */
    --accent-green:       #2d5f78;
    --accent-green-hover: #1e4a5e;
    --accent-green-muted: rgba(45, 95, 120, 0.12);

    /* Accent — plum deepened for contrast on light bg (WCAG AA) */
    --accent-purple:       #5a3c4f;
    --accent-purple-hover: #472f3e;
    --accent-purple-muted: rgba(90, 60, 79, 0.12);

    /* Accent — blue/cyan/pink follow same teal/plum adjustments */
    --accent-blue:       #2d5f78;
    --accent-blue-hover: #1e4a5e;
    --accent-blue-muted: rgba(45, 95, 120, 0.12);

    --accent-orange: #7a5c52;
    --accent-pink:   #5a3c4f;
    --accent-cyan:   #2d5f78;

    /* Borders — warm light grays */
    --border-default: #c8bfb8;
    --border-muted:   #ddd8d0;
    --border-accent:  var(--accent-green);
    --accent-on-card: var(--accent-green);
    --accent-purple-text: var(--accent-purple);

    /* Shadows — subtle on light backgrounds */
    --shadow-sm:          0 1px 3px rgba(26, 10, 46, 0.08);
    --shadow-md:          0 4px 12px rgba(26, 10, 46, 0.12);
    --shadow-lg:          0 8px 24px rgba(26, 10, 46, 0.16);
    --shadow-glow-green:  0 0 20px rgba(45, 95, 120, 0.2);
    --shadow-glow-purple: 0 0 20px rgba(90, 60, 79, 0.2);
}

