/**
 * SURAU Unified Design System - Global Styles
 * Modern, Professional, Islamic-Inspired Design
 * 
 * @version 1.0.0
 * @date 2025-12-30
 */

/* ═══════════════════════════════════════════════════════════════════════════
   FONT IMPORTS (Optimized to 3 families)
   ═══════════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Scheherazade+New:wght@400;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════
   ROOT VARIABLES
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* ━━━ Colors ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    --primary-50: #ecfdf5;
    --primary-100: #d1fae5;
    --primary-200: #a7f3d0;
    --primary-300: #6ee7b7;
    --primary-400: #34d399;
    --primary-500: #10b981;
    --primary-600: #059669;
    --primary-700: #047857;
    --primary-800: #065f46;
    --primary-900: #064e3b;
    --primary-950: #022c22;

    --secondary-50: #fefce8;
    --secondary-100: #fef9c3;
    --secondary-200: #fef08a;
    --secondary-300: #fde047;
    --secondary-400: #facc15;
    --secondary-500: #eab308;
    --secondary-600: #ca8a04;
    --secondary-700: #a16207;
    --secondary-800: #854d0e;
    --secondary-900: #713f12;
    --secondary-950: #422006;

    --surface-50: #f8fafc;
    --surface-100: #f1f5f9;
    --surface-200: #e2e8f0;
    --surface-300: #cbd5e1;
    --surface-400: #94a3b8;
    --surface-500: #64748b;
    --surface-600: #475569;
    --surface-700: #334155;
    --surface-800: #1e293b;
    --surface-900: #0f172a;
    --surface-950: #020617;

    /* ━━━ Semantic ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* ━━━ Effects ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    --glass-light: rgba(255, 255, 255, 0.05);
    --glass-medium: rgba(255, 255, 255, 0.08);
    --glass-dark: rgba(15, 23, 42, 0.7);

    --glow-primary: rgba(16, 185, 129, 0.3);
    --glow-secondary: rgba(234, 179, 8, 0.3);

    /* ━━━ Typography ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-arabic: 'Scheherazade New', serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-spiritual: 'Crimson Pro', Georgia, serif;
    --font-handwritten: 'Caveat', cursive;
    --font-arabic-alt: 'Amiri', serif;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--surface-950);
    color: var(--surface-50);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 160px;
    /* Space for fixed navbar with logo */
}

@media (max-width: 768px) {
    body {
        padding-top: 140px;
        /* Smaller on mobile */
    }
}

/* ━━━ Typography Classes ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.font-display {
    font-family: var(--font-display);
}

.font-body {
    font-family: var(--font-body);
}

.font-arabic {
    font-family: var(--font-arabic);
}

.font-mono {
    font-family: var(--font-mono);
}

.font-spiritual {
    font-family: var(--font-spiritual);
}

.font-handwritten {
    font-family: var(--font-handwritten);
}

.font-arabic-alt {
    font-family: var(--font-arabic-alt);
}

/* ━━━ Human Element Styles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Handwritten margin notes */
.note-handwritten {
    font-family: var(--font-handwritten);
    font-size: 1.25rem;
    color: var(--theme-500);
    transform: rotate(-2deg);
    display: inline-block;
    opacity: 0.9;
}

/* Strikethrough corrections */
.correction {
    text-decoration: line-through;
    opacity: 0.6;
    margin-right: 0.25em;
}

/* Spiritual quotes with serif */
.quote-spiritual {
    font-family: var(--font-spiritual);
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Date/timestamp for human feel */
.human-timestamp {
    font-family: var(--font-handwritten);
    font-size: 0.875rem;
    color: var(--surface-500);
}

/* Footnote style */
.footnote-human {
    font-size: 0.75rem;
    color: var(--surface-400);
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ━━━ Glass Effects ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.glass {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Unified card-glass component (consolidated from card-glass, glass-card variants) */
.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Card variants */
.glass-card-bordered {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card:hover.glass-card-hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ━━━ Glows ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.glow-primary {
    box-shadow: 0 0 20px var(--glow-primary);
}

.glow-secondary {
    box-shadow: 0 0 20px var(--glow-secondary);
}

/* ━━━ Gradients ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-500), var(--secondary-700));
}

.gradient-surface {
    background: linear-gradient(135deg, var(--surface-900), var(--surface-950));
}

/* Semantic page gradients (standardized) */
.gradient-page-light {
    background: linear-gradient(to bottom, #0f172a, #020617);
}

.gradient-page-dark {
    background: linear-gradient(to bottom, #020617, #0f172a);
}

.gradient-shafawwal-sky {
    background: linear-gradient(to bottom, #0C0C14, #141420, #141420);
}

/* ━━━ Text Gradients ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.text-gradient-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ━━━ Semantic Color Utilities (WCAG AA Compliant) ━━━━━━━━━━━━━━━━━━━━ */
.text-brand {
    color: #10b981; /* emerald-600 */
}

.text-brand-hover:hover {
    color: #34d399; /* emerald-400 */
}

.bg-brand {
    background-color: #10b981; /* emerald-600 */
}

.bg-brand-subtle {
    background-color: rgba(16, 185, 129, 0.1);
}

.border-brand {
    border-color: #10b981; /* emerald-600 */
}

.text-muted {
    color: #cbd5e1; /* surface-300 - WCAG AA on dark bg */
}

.text-subtle {
    color: #94a3b8; /* surface-400 - use sparingly, borderline contrast */
}

/* ━━━ Containers ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.container-main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container-main {
        padding: 0 2rem;
    }
}

/* ━━━ Section Spacing (Standardized) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.section-xs {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.section-md {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.section-lg {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section-xs {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .section-md {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
    
    .section-lg {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* Legacy alias for backward compatibility */
.section-spacing {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-spacing {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

@keyframes blob {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 20px var(--glow-primary);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 40px var(--glow-primary);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.animate-float {
    animation: float 12s ease-in-out infinite;
}

.animate-blob {
    animation: blob 20s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* ━━━ Accessibility: Reduce Motion ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-blob,
    .animate-pulse-glow,
    [class*="animate-"] {
        animation: none !important;
        transition: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENT PATTERNS (Standard CSS - No @apply)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ━━━ Buttons ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 300ms;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-600), var(--primary-700));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(to right, var(--primary-700), var(--primary-800));
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.btn-secondary {
    background: linear-gradient(to right, var(--secondary-700), var(--secondary-800));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(to right, var(--secondary-800), var(--secondary-900));
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.btn-outline {
    background-color: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: white;
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    border-color: rgba(52, 211, 153, 0.6);
    background-color: rgba(30, 41, 59, 0.8);
}

.btn-ghost {
    background-color: transparent;
    color: white;
}

.btn-ghost:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

/* ━━━ Cards ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
    border-radius: 1rem;
    transition: all 300ms;
}

.card-default {
    background-color: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-default:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.card-glass {
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 1.5rem;
}

.card-elevated {
    background-color: var(--surface-800);
    border: 1px solid var(--surface-700);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-elevated:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ━━━ Badges ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-secondary {
    background-color: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ━━━ Inputs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--surface-700);
    border-radius: 0.75rem;
    color: white;
    transition: all 300ms;
}

.input::placeholder {
    color: var(--surface-500);
}

.input:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2), 0 0 20px rgba(16, 185, 129, 0.1);
}

/* ━━━ Islamic Decorative Elements ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.islamic-border {
    position: relative;
}

.islamic-border::before,
.islamic-border::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--primary-500);
    opacity: 0.3;
}

.islamic-border::before {
    top: -12px;
    left: -12px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 24px;
}

.islamic-border::after {
    bottom: -12px;
    right: -12px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .container-main {
        padding: 0 1rem;
    }

    .hide-mobile {
        display: none;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ━━━ Added from Layout ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.heading-xl {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    background: linear-gradient(135deg, var(--surface-50) 0%, var(--surface-200) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.heading-lg {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--surface-50);
}

.heading-md {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--surface-50);
}

.text-brand {
    color: var(--primary-500);
}

.bg-brand {
    background-color: var(--primary-500);
}

.text-brand-gradient {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rounded-card {
    border-radius: 1.5rem;
}

.text-balance {
    text-wrap: balance;
}


/* ━━━ Added from Layout (Part 2) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.text-gold {
    color: #f59e0b;
}

.btn-brand {
    background: #16a34a;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-brand:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.input-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s;
}

.input-premium:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #16a34a;
    outline: none;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.glass-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME SYSTEM - Dynamic Color Theming
   ═══════════════════════════════════════════════════════════════════════════ */

/* Theme: Website (Dark Green / Emerald) */
[data-theme="website"] {
    --theme-50: #ecfdf5;
    --theme-100: #d1fae5;
    --theme-200: #a7f3d0;
    --theme-300: #6ee7b7;
    --theme-400: #34d399;
    --theme-500: #10b981;
    --theme-600: #059669;
    --theme-700: #047857;
    --theme-800: #065f46;
    --theme-900: #064e3b;
    --theme-glow: rgba(16, 185, 129, 0.3);
    --theme-gradient-from: #10b981;
    --theme-gradient-to: #047857;
}

/* Theme: Shafawwal (Warm Gold / Softer Amber)
   Refined palette for better warmth and accessibility */
[data-theme="shafawwal"] {
    --theme-50: #FDF8E8;
    --theme-100: #F7EFD2;
    --theme-200: #EDE0A8;
    --theme-300: #DFD08A;
    --theme-400: #D4C175;
    --theme-500: #C9A962;
    /* Primary gold - softer, warmer */
    --theme-600: #B89B55;
    --theme-700: #9F8347;
    /* Better text contrast */
    --theme-800: #8B7355;
    /* Warm brown accent */
    --theme-900: #6B5A42;
    --theme-glow: rgba(201, 169, 98, 0.25);
    --theme-gradient-from: #D4C175;
    --theme-gradient-to: #9F8347;

    /* Shafawwal-specific night background */
    --shafawwal-bg-start: #0C0C14;
    --shafawwal-bg-mid: #141420;
    --shafawwal-bg-end: #0C0C14;
}

/* ━━━ Theme-Aware Utility Classes ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Text Colors */
.text-theme-50 {
    color: var(--theme-50);
}

.text-theme-100 {
    color: var(--theme-100);
}

.text-theme-300 {
    color: var(--theme-300);
}

.text-theme-400 {
    color: var(--theme-400);
}

.text-theme-500 {
    color: var(--theme-500);
}

.text-theme-600 {
    color: var(--theme-600);
}

.text-theme-700 {
    color: var(--theme-700);
}

/* Background Colors */
.bg-theme-50 {
    background-color: var(--theme-50);
}

.bg-theme-100 {
    background-color: var(--theme-100);
}

.bg-theme-400 {
    background-color: var(--theme-400);
}

.bg-theme-500 {
    background-color: var(--theme-500);
}

.bg-theme-600 {
    background-color: var(--theme-600);
}

.bg-theme-700 {
    background-color: var(--theme-700);
}

/* Border Colors */
.border-theme-400 {
    border-color: var(--theme-400);
}

.border-theme-500 {
    border-color: var(--theme-500);
}

.border-theme-500\/20 {
    border-color: color-mix(in srgb, var(--theme-500) 20%, transparent);
}

.border-theme-500\/30 {
    border-color: color-mix(in srgb, var(--theme-500) 30%, transparent);
}

.border-theme-500\/40 {
    border-color: color-mix(in srgb, var(--theme-500) 40%, transparent);
}

.border-theme-500\/50 {
    border-color: color-mix(in srgb, var(--theme-500) 50%, transparent);
}

/* Theme Gradients */
.text-gradient-theme {
    background: linear-gradient(135deg, var(--theme-400), var(--theme-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-theme {
    background: linear-gradient(135deg, var(--theme-gradient-from), var(--theme-gradient-to));
}

/* Theme Glow Effects */
.shadow-glow-theme {
    box-shadow: 0 0 20px var(--theme-glow);
}

.hover\:shadow-glow-theme:hover {
    box-shadow: 0 0 30px var(--theme-glow);
}

/* ━━━ Theme-Aware Buttons ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn-theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--theme-gradient-from), var(--theme-gradient-to));
    color: var(--surface-950);
    box-shadow: 0 4px 15px var(--theme-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.btn-theme:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px var(--theme-glow);
}

.btn-theme:active {
    transform: translateY(0) scale(0.98);
}

.btn-theme-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--theme-400);
    border: 1px solid color-mix(in srgb, var(--theme-500) 50%, transparent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-theme-outline:hover {
    background: color-mix(in srgb, var(--theme-500) 10%, transparent);
    border-color: var(--theme-400);
    transform: translateY(-2px);
}

/* ━━━ Theme-Aware Cards ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card-theme {
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--theme-500) 5%, transparent) 0%,
            color-mix(in srgb, var(--theme-500) 2%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--theme-500) 15%, transparent);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-theme:hover {
    border-color: color-mix(in srgb, var(--theme-500) 30%, transparent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

/* ━━━ Theme-Aware Badges ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.badge-theme {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: color-mix(in srgb, var(--theme-500) 15%, transparent);
    color: var(--theme-400);
    border: 1px solid color-mix(in srgb, var(--theme-500) 40%, transparent);
    transition: all 0.3s ease;
}

.badge-theme:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ━━━ Theme-Aware Feature Icons ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.feature-icon-theme {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--theme-500) 15%, transparent) 0%,
            color-mix(in srgb, var(--theme-500) 8%, transparent) 100%);
    color: var(--theme-400);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.feature-icon-theme:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--theme-glow);
}

/* ━━━ Theme-Aware Form Inputs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.input-theme {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    font-size: 1rem;
    color: #fafafa;
    transition: all 0.3s ease;
}

.input-theme::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-theme:focus {
    outline: none;
    border-color: var(--theme-500);
    box-shadow: 0 0 0 3px var(--theme-glow);
}

/* ━━━ Premium Design Enhancements ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Subtle grain texture overlay */
.grain-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}

/* Premium scrollbar for theme */
[data-theme] ::-webkit-scrollbar {
    width: 10px;
}

[data-theme] ::-webkit-scrollbar-track {
    background: var(--surface-900);
}

[data-theme] ::-webkit-scrollbar-thumb {
    background: var(--theme-700);
    border-radius: 5px;
}

[data-theme] ::-webkit-scrollbar-thumb:hover {
    background: var(--theme-600);
}

/* Premium focus states */
[data-theme] :focus-visible {
    outline: 2px solid var(--theme-500);
    outline-offset: 2px;
}

/* Premium selection color */
[data-theme] ::selection {
    background: color-mix(in srgb, var(--theme-500) 30%, transparent);
}

/* Section spacing */
.section-spacing {
    padding: 6rem 0;
}

@media (min-width: 768px) {
    .section-spacing {
        padding: 8rem 0;
    }
}

@media (min-width: 1024px) {
    .section-spacing {
        padding: 10rem 0;
    }
}