/* ============================================
   BASE CSS - Reset, Variables, Typography
   COOL BRITANNIA - Neo-Britpop UI Design
   ============================================ */

/* Typography - Bold, condensed, attitude-driven */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Core British Colors */
    --brit-red: #C8102E;
    --brit-red-bright: #FF1744;
    --brit-blue: #012169;
    --brit-blue-light: #1a3a8a;
    --brit-navy: #0a1628;
    --brit-white: #FFFFFF;
    --racing-green: #004225;
    
    /* Neon Accents - 90s Britpop zing */
    --neon-yellow: #E4FF1A;
    --neon-pink: #FF2D92;
    --neon-cyan: #00F5FF;
    --acid-green: #B8FF00;
    
    /* Dark Mode Base */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-strong: rgba(255, 255, 255, 0.1);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
    
    /* Glassmorphism */
    --glass-blur: 20px;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(26, 26, 37, 0.8);
    
    /* Borders & Shadows */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.08);
    --border-accent: 1px solid var(--brit-red);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-red: 0 0 30px rgba(200, 16, 46, 0.3);
    --shadow-glow-neon: 0 0 30px rgba(228, 255, 26, 0.2);
    
    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Typography Scale */
    --font-display: 'Bebas Neue', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-6xl: 5rem;
    --text-hero: clamp(3rem, 8vw, 7rem);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    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);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-top: 36px;
}

body.homepage {
    background: transparent;
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* Diagonal Union Jack accent stripes - subtle */
body::after {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 45%,
        var(--brit-red) 45%,
        var(--brit-red) 46%,
        transparent 46%,
        transparent 54%,
        var(--brit-blue) 54%,
        var(--brit-blue) 55%,
        transparent 55%
    );
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

body.homepage::before,
body.homepage::after {
    z-index: 1;
}

/* Home page background video container */
.home-background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.home-background video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1);
    opacity: 0.8;
}

.home-background .home-blur {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.title, h1 {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--text-primary);
    text-transform: uppercase;
    position: relative;
}

.title:hover, h1:hover {
    text-shadow: none;
}

h2 {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
}

h3 {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
}

h4 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-secondary);
}

p {
    color: var(--text-secondary);
    max-width: 65ch;
}

.text-accent {
    color: var(--brit-red);
}

.text-neon {
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
}

.subtitle {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: var(--space-sm);
}

/* ============================================
   PAGE HEADER - Unified across all pages
   ============================================ */
.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--neon-yellow) 0%, var(--neon-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title--cyan {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, #0099ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title--red {
    background: linear-gradient(135deg, var(--brit-red) 0%, var(--neon-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title--green {
    background: linear-gradient(135deg, var(--acid-green) 0%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Section Headers */
.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ============================================
   LINK STYLES
   ============================================ */
a {
    color: var(--brit-red);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--brit-red-bright);
    text-decoration: underline;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brit-red);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: var(--brit-red);
    color: var(--brit-white);
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --text-hero: clamp(2.5rem, 6vw, 5rem);
    }
}

@media (max-width: 768px) {
    :root {
        --text-hero: clamp(2rem, 8vw, 3.5rem);
    }
    
    body::after {
        display: none;
    }
}
