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

:root {
    --bg-main: #09090b;
    --bg-card: rgba(18, 18, 24, 0.7);
    --bg-nav: rgba(9, 9, 11, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 59, 48, 0.3);
    
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --color-o2-red: #ff3b30;
    --color-o2-orange: #ff9500;
    --color-deo2-blue: #3498db;
    --color-green-stable: #2ecc71;
    
    --glow-red: rgba(255, 59, 48, 0.15);
    --glow-blue: rgba(52, 152, 219, 0.15);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Container Utility --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Premium Buttons & Typography --- */
h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 60%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h3 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-o2-red) 0%, var(--color-o2-orange) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.6), 0 0 10px rgba(255, 149, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #ffffff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* --- Header & Navigation --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-svg {
    width: 38px;
    height: 38px;
}

.logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-cta-btn {
    padding: 8px 18px !important;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 30px;
    color: var(--color-o2-red) !important;
}

.nav-cta-btn:hover {
    background: var(--color-o2-red) !important;
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple hidden links on mobile for simplicity */
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-red) 0%, rgba(9, 9, 11, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    color: var(--color-o2-orange);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

@media (max-width: 992px) {
    .hero-lead {
        margin: 0 auto 40px;
    }
}

.hero-ctas {
    display: flex;
    gap: 20px;
}

@media (max-width: 992px) {
    .hero-ctas {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Garmin Screen Mockup */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.watch-screen-glow {
    position: absolute;
    width: 250px;
    height: 350px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, rgba(9, 9, 11, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.phone-mockup {
    width: 280px;
    height: 440px;
    background: #000000;
    border: 8px solid #222;
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.05);
    z-index: 2;
}

.garmin-screen {
    width: 100%;
    height: 100%;
    background: #000000;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    padding: 14px;
}

.garmin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.g-lbl {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.g-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
}

.g-val .g-unit {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.g-minmax {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: right;
    font-weight: 600;
}

.garmin-chart {
    flex-grow: 1;
    border: 1px solid #1a1a1a;
    border-radius: 6px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.chart-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
}

.garmin-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.garmin-footer .unit {
    color: var(--text-muted);
}

.status-indicator {
    color: var(--color-o2-orange);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* --- Sections & Cards --- */
.section {
    padding: 100px 0;
    position: relative;
}

.section-dark {
    background: #0f0f12;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    margin-bottom: 15px;
}

.section-lead {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 60px;
    font-size: 1.1rem;
}

/* Glassmorphism Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
    box-shadow: 0 10px 30px rgba(255, 59, 48, 0.05);
}

.card-icon {
    font-size: 2rem;
    color: var(--color-o2-red);
    margin-bottom: 20px;
}

/* Two Column Grid */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 992px) {
    .two-col-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.section-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-o2-red);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.features-list {
    list-style: none;
    margin-top: 25px;
}

.features-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.features-list li i {
    color: var(--color-green-stable);
}

/* --- State Matrix Card --- */
.matrix-card {
    background: rgba(18, 18, 24, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
}

.matrix-grid {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.m-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.m-row div {
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.header-row div {
    color: var(--text-muted);
}

.r-header {
    text-align: left;
    color: var(--text-secondary);
}

.state-recovery {
    background: rgba(52, 152, 219, 0.15);
    color: var(--color-deo2-blue);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.state-stable {
    background: rgba(46, 204, 113, 0.15);
    color: var(--color-green-stable);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.state-drift {
    background: rgba(241, 196, 15, 0.15);
    color: var(--color-o2-orange);
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.state-strain {
    background: rgba(231, 76, 60, 0.15);
    color: var(--color-o2-red);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.matrix-footnote {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- Setup Guide Steps --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.step-card {
    position: relative;
    padding-top: 20px;
}

.step-num {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 59, 48, 0.1);
    position: absolute;
    top: -20px;
    left: 0;
}

.step-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.step-card p {
    color: var(--text-secondary);
}

/* --- Science Papers --- */
.papers-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.paper-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
}

.paper-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-o2-red);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.paper-item h4 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.paper-item h4 a:hover {
    color: var(--color-o2-orange);
}

.paper-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* --- Support/Donate Section --- */
.support-section {
    position: relative;
    padding: 140px 0;
    overflow: hidden;
}

.support-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, var(--glow-red) 0%, rgba(9, 9, 11, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.support-container {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.support-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.support-lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.support-callout {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.donate-btn {
    font-size: 1.1rem !important;
    padding: 16px 36px !important;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background: #050507;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Testimonial Cards */
.testimonial-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card .stars {
    color: var(--color-o2-orange);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.testimonial-author {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.author-name {
    display: block;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.author-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Simulator Screenshot styling in Hero */
.simulator-screenshot {
    max-width: 100%;
    height: 380px;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
    z-index: 2;
    transition: transform 0.3s ease;
}

.simulator-screenshot:hover {
    transform: scale(1.02);
}

.analysis-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

@media (max-width: 992px) {
    .analysis-gallery {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.gallery-item {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.gallery-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    min-height: 50px;
}

.gallery-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.01);
}

/* --- Lightbox Modal --- */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-primary);
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: var(--color-o2-red);
}

/* --- Annotations Grid & Badges --- */
.annotation-grid {
    align-items: center;
    gap: 80px !important;
}

.mockup-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.annotation-overlay-wrap {
    position: relative;
    display: inline-block;
    max-width: 380px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.annotated-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Positioned Badges */
.anno-badge {
    position: absolute;
    width: 28px;
    height: 28px;
    background: var(--color-o2-red);
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.anno-badge:hover {
    transform: scale(1.15);
    background: var(--color-o2-orange);
}

/* Coordinate mapping matching the Edge 1050 screenshot */
.badge-1 {
    top: 10%;
    left: 30%;
}

.badge-2 {
    top: 5%;
    right: 8%;
}

.badge-3 {
    top: 38%;
    left: 20%;
}

.badge-4 {
    top: 70%;
    left: 25%;
}

.badge-5 {
    top: 88%;
    right: 32%;
}

/* Annotations List */
.annotation-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.annotation-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.annotation-item:hover, .annotation-item.active {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
}

.item-num {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    flex-shrink: 0;
}

.annotation-item:hover .item-num, .annotation-item.active .item-num {
    background: var(--color-o2-red);
    border-color: var(--color-o2-red);
}

.item-content h4 {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 5px;
}

.item-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
