/* ==============================================================================
   MED HUB WEB PORTAL — PUBLIC LANDING & LEGAL STYLESHEET
   Aesthetic Thesis: High-Density Academic Precision & Native Platform Showcase
   Strictly Enforces:
     - Rule 12: Zero Unicode Emojis (Pure Inline Vector SVGs)
     - Rule 13: Zero Security Mechanism Disclosure (OpSec / Stealth DRM)
     - Rule 14: Zero Filler / Decorative Badges (High Signal Content)
     - Rule 15: Universal Educational Terminology (Zero Medical / Clinical Jargon)
   ============================================================================== */

/* --- Local Font Face Definition (Zero External CDN Tracking) --- */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter.var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

:root {
    /* Brand Injected Design Tokens */
    --bg-main: #070C1A;
    --bg-surface: #0D162E;
    --bg-surface-elevated: #142246;
    --bg-surface-hover: #1C2F5E;
    --border-subtle: rgba(242, 247, 253, 0.08);
    --border-strong: rgba(242, 247, 253, 0.16);
    --text-primary: #F2F7FD;
    --text-secondary: #A3B9DC;
    --text-muted: #6882AA;
    
    /* Interactive Brand Foil */
    --accent: #0084FE;
    --accent-hover: #0066D6;
    --accent-dim: rgba(0, 132, 254, 0.16);
    --accent-glow: rgba(0, 132, 254, 0.32);
    
    /* Educational Status Signals */
    --accent-emerald: #10B981;
    --accent-crimson: #F43F5E;
    --accent-amber: #EAB308;
    
    /* Metric & Spacing Standards */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --font-stack: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --container-max: 1180px;
    --container-legal: 880px;
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==============================================================================
   SITE HEADER & NAVIGATION
   ============================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(18, 16, 14, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.header-container {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text-primary);
    user-select: none;
}

.header-logo {
    height: 36px;
    width: auto;
    display: block;
}

.brand-label {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.brand-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Desktop Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.15s ease;
    padding: 0.35rem 0;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--accent);
}

.btn-nav-download {
    background: var(--accent);
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-nav-download:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Mobile Hamburger Toggle Button */
.btn-mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-mobile-nav-toggle:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--border-strong);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-strong);
    padding: 1.25rem 1.5rem 2rem;
    z-index: 999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.mobile-nav-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-link:hover {
    color: var(--accent);
}

.mobile-nav-cta {
    margin-top: 0.5rem;
    background: var(--accent);
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Mobile Backdrop */
.mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-height);
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* ==============================================================================
   HERO SECTION
   ============================================================================== */
.hero-section {
    position: relative;
    padding: 6rem 1.5rem 5rem;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 450px;
    background: radial-gradient(circle, var(--accent-glow) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.75;
    pointer-events: none;
    filter: blur(50px);
}

.hero-container {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hero-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.hero-title {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 680px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
    text-decoration: none;
    padding: 0.85rem 1.85rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    text-decoration: none;
    padding: 0.85rem 1.65rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--text-secondary);
}

/* ==============================================================================
   SECTIONS & LAYOUT
   ============================================================================== */
.section {
    padding: 5rem 1.5rem;
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.85rem;
    color: var(--text-primary);
}

.section-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ==============================================================================
   PLATFORMS GRID (DEDICATED NATIVE CLIENT APPS)
   ============================================================================== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    align-items: stretch;
}

.platform-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.platform-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

.platform-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--accent-dim);
    border: 1px solid var(--border-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.35rem;
}

.platform-name {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.platform-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.platform-specs {
    list-style: none;
    margin-top: auto;
    margin-bottom: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.platform-spec-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spec-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.btn-download-action {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    text-decoration: none;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-download-action:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

/* ==============================================================================
   FEATURES GRID
   ============================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    display: flex;
    gap: 1.5rem;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-strong);
}

.feature-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ==============================================================================
   LEGAL PAGES STYLES (TOS, EULA, PRIVACY)
   ============================================================================== */
.legal-container {
    max-width: var(--container-legal);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    width: 100%;
}

.legal-header {
    margin-bottom: 2.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-strong);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    transition: color 0.15s ease;
}

.legal-back:hover {
    color: var(--accent);
}

.legal-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.legal-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.7;
}

.legal-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin-top: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-subtle);
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.legal-content p {
    margin: 0;
}

.legal-content ul, .legal-content ol {
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-content strong {
    color: var(--text-primary);
}

.legal-callout {
    background: var(--bg-surface);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* Deletion Form on Privacy Policy */
.deletion-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    margin-top: 2rem;
}

.deletion-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.deletion-panel-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.75rem;
}

.deletion-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input, .form-select {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-check input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-check-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    cursor: pointer;
}

.btn-danger-submit {
    background: var(--accent-crimson);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    align-self: flex-start;
}

.btn-danger-submit:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-danger-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.alert-message {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    display: none;
}

.alert-message.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid var(--accent-emerald);
    color: var(--accent-emerald);
}

.alert-message.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid var(--accent-crimson);
    color: #F87171;
}

/* ==============================================================================
   SITE FOOTER (ZERO STAFF LOGIN LINKS)
   ============================================================================== */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 1.5rem;
    background: var(--bg-surface);
    margin-top: auto;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-copy {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

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

.footer-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

/* ==============================================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS
   Tested down to 320px screen width
   ============================================================================== */
@media (max-width: 1024px) {
    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .header-nav {
        display: none;
    }

    .btn-mobile-nav-toggle {
        display: flex;
    }

    .mobile-nav-drawer {
        display: flex;
    }

    .mobile-nav-backdrop {
        display: block;
    }

    .hero-section {
        padding: 4rem 1.25rem 3.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 380px;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: 3.5rem 1.25rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .platform-card {
        padding: 1.75rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .feature-card {
        padding: 1.75rem 1.5rem;
    }

    .legal-container {
        padding: 2.5rem 1.25rem 4rem;
    }

    .deletion-panel {
        padding: 1.75rem 1.25rem;
    }

    .btn-danger-submit {
        width: 100%;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .footer-links {
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .brand-badge {
        display: none;
    }

    .hero-tag {
        font-size: 0.72rem;
        padding: 0.3rem 0.65rem;
    }

    .platform-specs {
        margin-bottom: 1.25rem;
    }
}
