/* =============================================
   AMANAH CAPITALS - Base Styles
   Cinematic 3D Aura Website
   ============================================= */

/* CSS Variables - Design System */
:root {
    /* Colors - Dark Tech Theme */
    --color-bg-primary: #050810;
    --color-bg-secondary: #0a1020;
    --color-bg-tertiary: #101830;

    /* Accent Colors - Blue Theme */
    --color-primary: #00a8ff;
    --color-primary-light: #4dc3ff;
    --color-primary-dark: #0077b3;
    --color-accent-blue: #0066ff;
    --color-accent-cyan: #00d4ff;
    --color-accent-purple: #6366f1;

    /* Legacy compatibility */
    --color-gold: var(--color-primary);
    --color-gold-light: var(--color-primary-light);
    --color-gold-dark: var(--color-primary-dark);

    /* Text Colors */
    --color-text-primary: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-muted: rgba(255, 255, 255, 0.5);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    /* Transitions - Fast for snappy UX */
    --transition-fast: 50ms ease;
    --transition-normal: 100ms ease;
    --transition-slow: 150ms ease;
    --transition-cinematic: 200ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow-gold: 0 0 30px rgba(0, 168, 255, 0.3);
    --shadow-glow-blue: 0 0 30px rgba(0, 168, 255, 0.4);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Z-Index Scale */
    --z-base: 1;
    --z-above: 10;
    --z-overlay: 100;
    --z-modal: 1000;
    --z-max: 9999;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--color-gold-light);
}

/* Accessibility - Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip to content link - hidden until focused */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.visually-hidden:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 1rem 1.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    z-index: var(--z-max);
}

/* Selection */
::selection {
    background-color: var(--color-gold);
    color: var(--color-bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gold-dark);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* Utility Classes */
.text-gold { 
    color: var(--color-gold); 
}
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* Button Base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: var(--color-bg-primary);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-gold);
    transform: translateY(-2px);
    color: var(--color-bg-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
}

.btn-outline:hover {
    background: var(--color-gold);
    color: var(--color-bg-primary);
}

/* Loading States */
.loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-primary);
    z-index: var(--z-max);
    transition: opacity var(--transition-slow);
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-bg-tertiary);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: var(--z-max);
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-bg-primary);
}

/* List styles */
ul {
    list-style: none;
}
