/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Brand Colors */
    --color-bg: #0f0f0f;            /* Deepest Black/Charcoal */
    --color-surface: #1a1a1a;       /* Card Backgrounds */
    --color-text-main: #ffffff;     /* Primary Text */
    --color-text-muted: #a1a1aa;    /* Secondary Text */
    --color-accent: #FF5F1F;        /* Safety Orange */
    --color-accent-hover: #e04e15;  /* Darker Orange for hover */

    /* Glassmorphism Variables */
    --glass-bg: rgba(25, 25, 25, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --blur-amount: 12px;

    /* Spacing & Layout */
    --container-width: 1200px;
    --border-radius: 8px;
    --transition-speed: 0.3s ease;
}

/* Modern Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Accessibility: Focus States */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1, h2, h3 {
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Fluid Typography: Scales smoothly from phone to desktop */
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; color: var(--color-accent); text-transform: uppercase; letter-spacing: 1px; }

p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    max-width: 65ch; /* Optimal reading length */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

/* =========================================
   3. COMPONENTS (Buttons & Nav)
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #000; /* Black text on orange for high contrast/readability */
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 95, 31, 0.2);
}

.btn-outline {
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    margin-left: 1rem;
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: #000;
}

/* Glass Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* The Glass Effect */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount)); /* Safari support */
    border-bottom: var(--glass-border);
}

header .logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a:hover {
    color: var(--color-accent);
}

/* =========================================
   4. HERO SECTION (Asymmetrical Grid)
   ========================================= */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Video gets more space */
    min-height: 100vh;
    padding-top: 80px; /* Space for fixed header */
}

.hero-video {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8; /* Slight dim so it doesn't distract */
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    background-color: var(--color-bg);
    border-left: var(--glass-border);
}

/* =========================================
   5. MARKETS GRID (Services)
   ========================================= */
.markets-layout {
    display: grid;
    /* Auto-fit magic: Creates columns automatically based on width */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 5rem 5%;
}

.card {
    background: var(--color-surface);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition-speed);
    position: relative;
    overflow: hidden;
}

/* The Orange Stripe Interaction */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card:hover::before {
    transform: scaleX(1);
}

/* =========================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr; /* Stack vertically */
        grid-template-rows: 50vh auto;
    }
    
    .hero-content {
        padding: 2rem;
    }
    
    h1 {
        margin-top: 1rem;
    }

    /* Mobile Nav Simplification */
    header {
        padding: 1rem;
    }
    nav ul {
        display: none; /* In a real build, you'd add a hamburger menu JS here */
    }
}

@media (max-width: 480px) {
    .btn-outline {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
    }
}