html, body {
    max-width: 100%;
    overflow-x: hidden; /* This kills the side-scroll on the main page */
    position: relative;
}
/* --- 1. RESET & VARIABLES --- */
:root {
    /* The Palette */
    --bg-color: #000000;       /* Pitch Black */
    --surface-color: #111111;  /* Slightly lighter for cards */
    --text-color: #ffffff;     /* Pure White */
    --text-muted: #a1a1a1;     /* Grey for secondary text */
    
    /* Tactical Colors */
    --hospital-red: #FF3B30;   /* WARNING / ENEMY */
    --gravity-green: #30D158;  /* SAFETY / SOLUTION */
    
    /* Typography */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Crisp text on iPhone */
}

/* --- 2. TYPOGRAPHY --- */
h1, h2, h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Scales smoothly from phone to desktop */
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-color);
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    max-width: 65ch; /* Optimal reading length */
}

/* --- 3. LAYOUT UTILITIES --- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 100px 0;
    border-bottom: 1px solid #222;
}

/* --- 4. HERO SECTION (The Hook) --- */
header.hero {
    min-height: 90vh; /* Full screen impact */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #222 0%, #000 70%);
}

.hero-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--text-color);
    padding: 18px 40px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border: 2px solid var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 2rem;
}

.hero-btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: translateY(-3px); /* Slight lift effect */
}

/* --- 5. THE ENEMY (Hospital Red) --- */
.problem-section h2 span {
    color: var(--hospital-red); /* Highlights the word "Problem" or "Risk" */
}

.stat-box {
    background-color: var(--surface-color);
    border-left: 4px solid var(--hospital-red); /* Red Border */
    padding: 2rem;
    margin-top: 2rem;
}

.stat-box h3 {
    color: var(--hospital-red);
    margin-bottom: 1rem;
}

/* --- 6. THE SOLUTION (Gravity Green) --- */
.solution-section h2 span {
    color: var(--gravity-green);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Stacks on mobile */
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-top: 4px solid var(--gravity-green);
    text-align: center;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    background-color: #1a1a1a;
}

.step-number {
    display: block;
    font-size: 4rem;
    font-weight: 900;
    color: var(--gravity-green);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* --- TANK-PROOF MOBILE SCROLL FIX --- */
.table-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;       /* Hard limit: Cannot be wider than the screen */
    overflow-x: scroll;    /* Forces horizontal scrollbar to exist */
    -webkit-overflow-scrolling: touch; /* Momentum scrolling (smooth) */
    touch-action: pan-x;   /* CRITICAL: Tells phone "Swipe Left/Right here" */
    background: #111;
    border: 1px solid #333;
    padding-bottom: 5px;   /* Space for the scrollbar */
    margin-bottom: 20px;
}

.proof-table {
    width: 100%;
    min-width: 700px;      /* Forces table to be wide so scrolling is REQUIRED */
    border-collapse: collapse;
    /* We REMOVED 'white-space: nowrap' because it causes the text-selection bug */
}
.proof-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    min-width: 600px; /* Forces scroll on very small screens */
}

.proof-table th, 
.proof-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid #333;
}

.proof-table th {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.proof-table td {
    font-size: 1.2rem;
    font-weight: 600;
}

.text-red { color: var(--hospital-red); }
.text-green { color: var(--gravity-green); }

/* --- 8. FOOTER --- */
footer {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid #222;
}

.footer-hashtag {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

/* --- 9. MOBILE RESPONSIVENESS (The Critical Part) --- */
@media (max-width: 768px) {
    section {
        padding: 60px 0; /* Less padding on mobile */
    }

    .container {
        width: 90%;
    }

    /* Stack the table if needed, or allow scroll */
    .table-wrapper {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero-btn {
        width: 100%; /* Full width button on phone */
        padding: 20px;
    }
}
/* --- TACTICAL UPGRADES (Add to bottom of style.css) --- */

/* Data Table Glow */
.positive { color: #30D158 !important; font-weight: 900; }
.negative { color: #FF3B30 !important; font-weight: 900; }

/* Diagram Box */
.diagram-box { margin: 40px auto; text-align: center; max-width: 800px; }
.diagram-img { width: 100%; height: auto; border: 1px solid #333; border-radius: 8px; }

/* Refusal Button (Liability Page) */
.refuse-btn {
    background: #ffebeb; color: #cc0000; border: 1px solid #cc0000;
    font-size: 0.75rem; font-weight: bold; padding: 8px 12px;
    cursor: pointer; margin-top: 15px; border-radius: 4px;
    font-family: sans-serif; text-transform: uppercase;
    width: 100%; letter-spacing: 1px;
}
.refuse-btn:hover { background: #cc0000; color: white; }

/* Print Mode Fixes */
@media print {
    .refuse-btn, .bypass-link { display: none !important; }
    .diagram-img { border: 1px solid #000; }
}
/* THE BAYONET (Sticky Footer) */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000;
    border-top: 2px solid #FF3B30;
    padding: 15px;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.8);
    display: none; /* Hidden on desktop, shown on mobile */
}

.sticky-btn {
    background: #FF3B30;
    color: white;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    display: block;
    width: 100%;
}

@media (max-width: 768px) {
    .sticky-footer { display: block; }
    body { padding-bottom: 80px; } /* Prevent content from being hidden behind button */
}
/* --- COMMAND BAR (Navigation) --- */
.main-nav {
    background: rgba(0, 0, 0, 0.95); /* Nearly solid black */
    border-bottom: 1px solid #333;
    padding: 15px 0;
    position: sticky; /* STICKS TO THE TOP */
    top: 0;
    z-index: 1000; /* Stays above everything else */
    backdrop-filter: blur(10px); /* Modern "Glass" effect */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.nav-logo {
    color: white;
    font-weight: 900;
    text-decoration: none;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a {
    color: #a1a1a1;
    text-decoration: none;
    margin-left: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: #FF3B30; /* Turns Red on hover */
}

/* Mobile Nav adjustments */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; }
    .nav-links { margin-top: 15px; display: flex; gap: 15px; }
    .nav-links a { margin: 0; font-size: 0.8rem; }
}
/* --- CENTERING FIX (For Laptop) --- */
.join-section p, 
footer p {
    margin-left: auto;   /* Pushes from the left */
    margin-right: auto;  /* Pushes from the right */
    max-width: 800px;    /* Optional: allows it to be a bit wider */
}
/* --- MOBILE EMERGENCY PATCH --- */
@media (max-width: 768px) {
    
    /* 1. Shrink the Giant Text */
    h1 {
        font-size: 2.2rem !important; /* Force smaller size */
        word-wrap: break-word; /* Prevents overflow */
        padding: 0 10px; /* Safety buffer from edge */
    }
    
    /* 2. Fix the Logo Size */
    .logo-img {
        height: 60px; /* Smaller logo on phone */
        margin-bottom: 10px;
    }

    /* 3. Tighten the Hero Spacing */
    header.hero {
        min-height: 60vh; /* Takes up less vertical space */
        padding-top: 20px;
    }
    
    /* 4. Ensure Buttons Stack Nicely */
    .hero-btn {
        display: block;
        width: 100%;
        margin: 10px 0 0 0 !important; /* Stacks buttons */
    }
    
    /* 5. Fix "About" Page Image Sizing */
    .bio-img-box {
        max-width: 100% !important;
        margin-bottom: 20px;
    }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}
/* =========================================
   STRIKE 1: SCROLL REVEAL ANIMATIONS
   ========================================= */

/* The Starting State (Invisible and pushed down 40px) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); /* Premium, smooth easing */
}

/* The Active State (Visible and locked in place) */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Optional Staggering for Grids (so they don't all pop at once) */
.step-card:nth-child(1) { transition-delay: 0.1s; }
.step-card:nth-child(2) { transition-delay: 0.2s; }
.step-card:nth-child(3) { transition-delay: 0.3s; }
/* =========================================
   STRIKE 2: INTERACTIVE PHYSICS TOGGLE
   ========================================= */
.physics-toggle-container {
    max-width: 500px; /* Forces a sleek mobile-app look on desktop */
    margin: 40px auto;
    text-align: center;
}
.toggle-controls {
    display: flex;
    justify-content: center;
    background: #222;
    border-radius: 8px 8px 0 0;
    border: 2px solid #333;
    border-bottom: none;
    overflow: hidden;
}
.toggle-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    color: #888;
    border: none;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.toggle-btn.active-red {
    background: #FF3B30;
    color: #fff;
}
.toggle-btn.active-green {
    background: #30D158;
    color: #000;
}
.physics-viewport {
    width: 100%;
    overflow: hidden;
    border: 2px solid #333;
    border-radius: 0 0 8px 8px;
    background: #f4f4f4; /* Matches diagram background */
    position: relative;
}
.physics-img {
    /* Set to 210% to account for the off-center line */
    width: 210%; 
    max-width: none;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateX(0%);
}
.physics-caption {
    font-size: 0.85rem;
    color: #888;
    margin-top: 15px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .physics-img { width: 220%; } /* Zooms slightly more on small screens to maintain the illusion */
}
/* =========================================
   STRIKE 3: RISK ASSESSMENT UI
   ========================================= */
.quiz-btn {
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.quiz-btn:hover, .quiz-btn:active {
    background: #FF3B30;
    border-color: #FF3B30;
    transform: scale(0.98);
}
/* =========================================
   STRIKE 4: THE PULSE BEACON
   ========================================= */
.beacon-container {
    position: fixed;
    /* env() protects it from being hidden by the iPhone home bar */
    bottom: calc(20px + env(safe-area-inset-bottom)); 
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* The Hidden Menu */
.beacon-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* The Active Menu */
.beacon-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* The Menu Buttons */
.beacon-item {
    background: #111;
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    border: 1px solid #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    transition: all 0.2s;
    text-transform: uppercase;
}
.beacon-item:hover {
    background: #FF3B30;
    border-color: #FF3B30;
}

/* The Main Button */
.beacon-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #FF3B30;
    color: #fff;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    animation: pulse-red 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s;
}

/* The Active Button (Rotates to an X) */
.beacon-btn.active {
    transform: rotate(45deg); 
    animation: none; /* Stops pulsing when menu is open */
    background: #000;
    border: 2px solid #FF3B30;
}

/* The Glowing Radar Pulse */
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}
/* =========================================
   OPERATION 1: TRIAGE MAP & DIAL
   ========================================= */
/* Custom styling for the Blood Loss Slider */
input[type=range] {
    -webkit-appearance: none;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 25px;
    width: 25px;
    border-radius: 50%;
    background: #FF3B30;
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.8);
	touch-action: pan-y; /* Locks horizontal swiping to the slider, allows vertical page scrolling */
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #333;
    border-radius: 3px;
}
input[type=range]:focus { outline: none; }