/* MERIDIAN LABS — Commercial Site Styles */
/* Dark premium theme inspired by brand identity */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #0a1628;
    --color-bg-elevated: #0f1d33;
    --color-bg-card: rgba(15, 29, 51, 0.8);
    --color-bg-secondary: #131f36;
    --color-text: #e8eaf0;
    --color-text-secondary: #9ba2b5;
    --color-border: rgba(0, 212, 255, 0.12);
    --color-border-subtle: rgba(139, 146, 165, 0.15);
    --color-accent: #00d4ff;
    --color-accent-dim: rgba(0, 212, 255, 0.15);
    --color-gold: #c8a84e;
    --color-gold-dim: rgba(200, 168, 78, 0.15);
    --color-esthetics: #EEDDCB;
    --color-cosmetology: #D9C5E8;
    --color-barber: #C8A050;
    --color-nailtech: #F8BBD0;
    --color-ptcb: #80DEEA;
    --color-asvab: #FFCC80;
    --color-secai: #80CBC4;
    --color-securityplus: #90CAF9;
    --color-snowflake: #B3E5FC;
    --color-itil5: #A5D6A7;
    --color-glowstudy: #C8A050;
    --color-vitalprep: #00BCD4;
    --color-aceprep: #E67E22;
    --color-techprep: #5CB8B2;
    --max-width: 980px;
    --nav-height: 56px;

    /* Fluid Typography — Perfect Fourth (1.333) */
    --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.333rem);
    --text-xl:   clamp(1.333rem, 1.1rem + 1vw, 1.777rem);
    --text-2xl:  clamp(1.777rem, 1.4rem + 1.5vw, 2.369rem);
    --text-3xl:  clamp(2.369rem, 1.8rem + 2.5vw, 3.157rem);
    --text-4xl:  clamp(3.157rem, 2.2rem + 4vw, 4.209rem);

    /* Easing curves */
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.3, 0.7, 0.4, 1.5);
    --ease-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Scroll offset for sticky nav */
[id] {
    scroll-margin-top: calc(var(--nav-height) + 24px);
}

/* Focus States */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Active Nav Indicator */
.nav-links a[aria-current="page"] {
    color: var(--color-accent);
}

/* Scroll Reveal — with blur-in effect */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth), filter 0.6s var(--ease-smooth);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Page load reveal */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
}

body.loaded {
    opacity: 1;
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
    height: var(--nav-height);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.nav-logo { height: 36px; width: auto; margin-right: 10px; vertical-align: middle; }

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s var(--ease-smooth);
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* Mobile nav actions — hidden on desktop */
.nav-mobile-actions {
    display: none;
    align-items: center;
    gap: 12px;
}

.nav-mobile-cta {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-accent), #0099cc);
    color: #ffffff;
}

/* Hamburger button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-expo-out), opacity 0.3s var(--ease-smooth);
    transform-origin: center;
}

/* Hamburger → X morphing */
body.menu-open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.menu-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
}

body.menu-open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-expo-out), visibility 0.4s;
}

body.menu-open .mobile-menu {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-links li {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.4s var(--ease-expo-out), transform 0.4s var(--ease-expo-out);
}

body.menu-open .mobile-menu-links li {
    opacity: 1;
    transform: translateX(0);
}

body.menu-open .mobile-menu-links li:nth-child(1) { transition-delay: 0.05s; }
body.menu-open .mobile-menu-links li:nth-child(2) { transition-delay: 0.1s; }
body.menu-open .mobile-menu-links li:nth-child(3) { transition-delay: 0.15s; }
body.menu-open .mobile-menu-links li:nth-child(4) { transition-delay: 0.2s; }
body.menu-open .mobile-menu-links li:nth-child(5) { transition-delay: 0.25s; }

.mobile-menu-links a {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.01em;
    padding: 8px 0;
    display: block;
    transition: color 0.2s;
}

.mobile-menu-links a:hover {
    color: var(--color-accent);
}

.mobile-menu-cta {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 40px;
    border-radius: 980px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-accent), #0099cc);
    color: #ffffff;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s var(--ease-expo-out), transform 0.4s var(--ease-expo-out);
}

body.menu-open .mobile-menu-cta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* ========================================
   CONTAINER
   ======================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   HERO
   ======================================== */

.hero {
    position: relative;
    text-align: center;
    padding: 72px 24px 36px;
    overflow: hidden;
}

/* Dot grid removed — background image provides enough texture */

.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('images/MeridianLabs_header.jpg') center bottom/cover no-repeat;
    opacity: 0.20;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--color-bg), transparent);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Glowing accent orb behind headline */
.hero-content::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 350px;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.15), transparent 70%);
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
    animation: hero-orb-pulse 4s ease-in-out infinite;
}

@keyframes hero-orb-pulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.3; }
}

.hero-label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
    padding: 6px 16px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 980px;
    background: rgba(0, 212, 255, 0.06);
}

.hero h1 {
    font-size: clamp(2.5rem, 1.4rem + 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 28px;
    color: #ffffff;
}

.hero-gradient-text {
    background: linear-gradient(90deg, var(--color-accent), var(--color-gold), var(--color-accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.accent-dot {
    color: var(--color-accent);
}

.hero-tagline {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.92);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
}

.hero-stat {
    text-align: center;
    padding: 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat:last-child {
    border-right: none;
}

.hero-stat-value {
    display: block;
    font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    min-width: 3ch;
    filter: drop-shadow(0 0 24px rgba(0, 212, 255, 0.25));
}

.hero-stat-label {
    display: block;
    font-size: var(--text-xs);
    color: rgba(232, 234, 240, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    font-weight: 500;
}

@keyframes accent-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Hero CTA Buttons */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 0;
}

.hero-cta {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 980px;
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-accent), #0099cc);
    color: #ffffff;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-smooth);
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 212, 255, 0.35);
}

.hero-cta:active {
    transform: translateY(-1px);
    transition: transform 34ms;
}

.hero-cta-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 980px;
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth);
}

.hero-cta-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ========================================
   TRUST BAND
   ======================================== */

.trust-band {
    padding: 10px 0;
    opacity: 0.8;
    transition: opacity 0.3s var(--ease-smooth);
}

.trust-band:hover {
    opacity: 1;
}

.trust-band-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 6px 14px;
    border-radius: 980px;
    border: 1px solid var(--color-border-subtle);
    background: rgba(15, 29, 51, 0.5);
    white-space: nowrap;
}

.trust-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.trust-divider {
    width: 1px;
    height: 20px;
    background: var(--color-border-subtle);
}

/* ========================================
   APP TABS (Brand Filter)
   ======================================== */

.app-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}

.app-tab {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth), background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth);
}

.app-tab:hover {
    transform: translateY(-2px);
}

.app-tab-it {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
}
.app-tab-it:hover, .app-tab-it.active {
    background: rgba(0, 212, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.15);
}

.app-tab-healthcare {
    color: #00BFA5;
    background: rgba(0, 191, 165, 0.08);
    border: 1px solid rgba(0, 191, 165, 0.2);
}
.app-tab-healthcare:hover, .app-tab-healthcare.active {
    background: rgba(0, 191, 165, 0.18);
    border-color: rgba(0, 191, 165, 0.5);
    box-shadow: 0 4px 16px rgba(0, 191, 165, 0.15);
}

.app-tab-military {
    color: var(--color-aceprep);
    background: rgba(230, 126, 34, 0.08);
    border: 1px solid rgba(230, 126, 34, 0.2);
}
.app-tab-military:hover, .app-tab-military.active {
    background: rgba(230, 126, 34, 0.18);
    border-color: rgba(230, 126, 34, 0.5);
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.15);
}

.app-tab-beauty {
    color: var(--color-glowstudy);
    background: rgba(200, 160, 80, 0.08);
    border: 1px solid rgba(200, 160, 80, 0.2);
}
.app-tab-beauty:hover, .app-tab-beauty.active {
    background: rgba(200, 160, 80, 0.18);
    border-color: rgba(200, 160, 80, 0.5);
    box-shadow: 0 4px 16px rgba(200, 160, 80, 0.15);
}

/* Brand section show/hide */
.brand-section {
    display: none;
}

.brand-section.brand-section-active {
    display: block;
}

/* ========================================
   SECTION HEADINGS
   ======================================== */

.section-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 12px;
    text-align: center;
}

/* ========================================
   APP SHOWCASE
   ======================================== */

.apps-section {
    padding: 80px 0 60px;
}

.apps-section h2 {
    text-align: center;
    font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--color-text);
}

.apps-section .section-subtitle {
    text-align: center;
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto 48px;
    line-height: 1.5;
}

.apps-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
    scrollbar-width: none;
}

.apps-grid::-webkit-scrollbar {
    display: none;
}

.app-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
    min-width: 220px;
    max-width: 220px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.app-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.12), 0 0 0 1px rgba(0, 212, 255, 0.1);
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 27px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.app-card h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text);
}

.app-card .app-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.app-card p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.app-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 980px;
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s var(--ease-smooth), transform 0.2s var(--ease-smooth);
}

.app-badge:hover {
    transform: translateY(-1px);
}

.badge-esthetics { background: var(--color-esthetics); color: #1a1a18; }
.badge-cosmetology { background: var(--color-cosmetology); color: #1a1a18; }
.badge-barber { background: var(--color-barber); color: #1a1a18; }
.badge-nailtech { background: var(--color-nailtech); color: #1a1a18; }
.badge-ptcb { background: var(--color-ptcb); color: #1a1a18; }
.badge-asvab { background: var(--color-asvab); color: #1a1a18; }
.badge-secai { background: var(--color-secai); color: #1a1a18; }
.badge-securityplus { background: var(--color-securityplus); color: #1a1a18; }
.badge-snowflake { background: var(--color-snowflake); color: #1a1a18; }
.badge-itil5 { background: var(--color-itil5); color: #1a1a18; }
.badge-cna { background: #A5D6A7; color: #1a1a18; }
.badge-aplus { background: #B0BEC5; color: #1a1a18; }
.badge-insurance { background: #FFF176; color: #1a1a18; }
.badge-awsaip { background: #FFB74D; color: #1a1a18; }
.badge-awscp { background: #FF9800; color: #1a1a18; }
.badge-cma { background: #CE93D8; color: #1a1a18; }
.badge-cannabis { background: #AED581; color: #1a1a18; }
.badge-networkplus { background: #81D4FA; color: #1a1a18; }
.badge-teas { background: #EF9A9A; color: #1a1a18; }
.badge-pmp { background: #90CAF9; color: #1a1a18; }

/* Launching Soon Badge */
.badge-launching {
    position: relative;
    animation: badge-glow 3s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 16px 2px rgba(255, 255, 255, 0.1); }
}

/* Brand Section Labels */
.brand-label {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 6px;
    margin: 0 auto 16px;
    width: fit-content;
}

.brand-glowstudy { background: rgba(200, 160, 80, 0.15); color: var(--color-glowstudy); }
.brand-vitalprep { background: rgba(0, 188, 212, 0.15); color: var(--color-vitalprep); }
.brand-aceprep { background: rgba(230, 126, 34, 0.15); color: var(--color-aceprep); }
.brand-techprep { background: rgba(92, 184, 178, 0.15); color: var(--color-techprep); }

/* Brand Sections — controlled by tab switcher */
.brand-section.brand-section-active {
    padding: 0 0 40px;
}

.brand-section h2 {
    text-align: center;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--color-text);
}

.brand-section .section-subtitle {
    text-align: center;
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.5;
}

/* Scroll Arrow Buttons */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), opacity 0.3s var(--ease-smooth), transform 0.2s var(--ease-smooth);
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-50%) scale(1.08);
}

.scroll-arrow-left { left: 4px; }
.scroll-arrow-right { right: 4px; }

/* Show/hide arrows based on scroll position */
.apps-grid-wrapper:not(.scroll-start) .scroll-arrow-left,
.apps-grid-wrapper:not(.scroll-end) .scroll-arrow-right {
    opacity: 1;
    pointer-events: auto;
}

/* Horizontal scroll fade indicators */
.apps-grid-wrapper {
    position: relative;
}

.apps-grid-wrapper::before,
.apps-grid-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 12px;
    width: 40px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apps-grid-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg), transparent);
}

.apps-grid-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg), transparent);
}

.apps-grid-wrapper.scroll-start::after,
.apps-grid-wrapper:not(.scroll-start):not(.scroll-end)::before,
.apps-grid-wrapper:not(.scroll-start):not(.scroll-end)::after {
    opacity: 1;
}

.apps-grid-wrapper:not(.scroll-end)::after {
    opacity: 1;
}

.apps-grid-wrapper:not(.scroll-start)::before {
    opacity: 1;
}

/* ========================================
   ENGINE SECTION
   ======================================== */

.engine-section {
    padding: 80px 0;
    border-top: 1px solid var(--color-border-subtle);
    position: relative;
}

.engine-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
}

.engine-section h2 {
    text-align: center;
    font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--color-text);
}

.engine-section .section-subtitle {
    text-align: center;
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.engine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.engine-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: 14px;
    padding: 24px 20px;
    overflow: hidden;
    transition: transform 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.engine-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.25);
    border-left-color: var(--color-accent);
    box-shadow: 0 6px 24px rgba(0, 212, 255, 0.1), 0 0 0 1px rgba(0, 212, 255, 0.08);
}

.engine-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.engine-card h3 { font-size: 14px; font-weight: 600; color: var(--color-text); margin: 0; }
.engine-card p { font-size: 13px; color: var(--color-text-secondary); line-height: 1.5; margin: 0; }

.engine-link {
    display: block;
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s var(--ease-smooth);
}

.engine-link:hover { text-decoration: underline; }

/* Proprietary Badge */
.proprietary-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 980px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--color-gold-dim);
    color: var(--color-gold);
    border: 1px solid rgba(200, 168, 78, 0.3);
    white-space: nowrap;
}

/* Engine Card SVG Visualizations */
.engine-viz { margin-top: 12px; }
.engine-viz svg { display: block; width: 100%; max-width: 200px; }

/* ========================================
   ABOUT / MISSION
   ======================================== */

.about-section {
    padding: 80px 0;
    border-top: 1px solid var(--color-border-subtle);
}

.about-section h2 {
    font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    text-align: center;
    color: var(--color-text);
}

.about-section p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto 16px;
    text-align: center;
}

.about-section p:last-child { margin-bottom: 0; }

.vision-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 920px;
    margin: 40px auto 0;
}

.vision-item {
    text-align: center;
    padding: 28px 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.vision-item:hover {
    border-color: rgba(0, 212, 255, 0.25);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.06);
}

.vision-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 12px;
    background: var(--color-accent-dim);
    color: var(--color-accent);
    border: 1px solid rgba(0, 212, 255, 0.15);
}
.vision-item h3 { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.vision-item p { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.5; margin: 0; text-align: center; }

/* ========================================
   FOUNDER SECTION
   ======================================== */

.founder-section {
    padding: 80px 0 40px;
    border-top: 1px solid var(--color-border-subtle);
}

/* Founder toggle button */
.founder-toggle {
    display: block;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0;
    text-align: center;
    color: inherit;
    font-family: inherit;
}
.founder-toggle:hover .founder-toggle-hint { color: var(--color-accent); }
.founder-toggle-hint {
    display: block;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: 8px;
    transition: color 0.2s;
}
.founder-toggle-arrow {
    display: inline-block;
    animation: founderBounce 2s ease-in-out infinite;
}
@keyframes founderBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Founder reveal container */
.founder-reveal {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.founder-reveal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--color-bg));
    pointer-events: none;
    transition: opacity 0.4s;
}
.founder-reveal-open {
    overflow: visible;
}
.founder-reveal-open::after {
    opacity: 0;
    pointer-events: none;
}

.founder-section h2 {
    text-align: center;
    font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--color-text);
}

.founder-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: start;
    max-width: 880px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.06), 0 0 0 1px rgba(0, 212, 255, 0.08);
}

.founder-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 160px;
}

.founder-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    border: 2px solid rgba(0, 212, 255, 0.25);
}

.founder-credentials {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.credential-pill {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--color-accent-dim);
    color: var(--color-accent);
    border: 1px solid rgba(0, 212, 255, 0.15);
    white-space: nowrap;
}

.founder-bio h3 { font-size: var(--text-xl); font-weight: 700; color: var(--color-text); margin-bottom: 2px; }

.founder-bio .founder-title {
    font-size: var(--text-sm);
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 20px;
    display: block;
}

.founder-bio p { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.7; margin-bottom: 16px; }
.founder-bio p:last-of-type { margin-bottom: 0; }

/* Founder expand/collapse */
.founder-details {
    margin-top: 4px;
}

.founder-details summary {
    font-size: var(--text-sm);
    color: var(--color-accent);
    cursor: pointer;
    font-weight: 500;
    padding: 8px 0;
    list-style: none;
    transition: color 0.2s var(--ease-smooth);
}

.founder-details summary::-webkit-details-marker { display: none; }
.founder-details summary::marker { display: none; content: ''; }

.founder-details summary::after { content: ' \2193'; }
.founder-details[open] summary::after { content: ' \2191'; }

.founder-details summary:hover { color: #33dfff; }

.founder-details p:first-of-type { margin-top: 16px; }

.founder-links { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

.founder-cv-link {
    display: inline-block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-accent);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth);
    letter-spacing: 0.02em;
}

.founder-cv-link:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--color-accent);
}

/* ========================================
   FOOTER — Multi-column
   ======================================== */

.footer {
    border-top: 1px solid var(--color-border-subtle);
    padding: 48px 0 0;
    margin-top: 20px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s var(--ease-smooth);
}

.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
    border-top: 1px solid var(--color-border-subtle);
    padding: 20px 0;
    text-align: center;
}

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

/* ========================================
   CONTENT PAGES (Privacy, Terms, Support, Methodology)
   ======================================== */

.page-header {
    padding: 48px 0 24px;
    border-bottom: 1px solid var(--color-border-subtle);
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--color-text);
}

.last-updated { font-size: var(--text-sm); color: var(--color-text-secondary); }

.content { max-width: 720px; padding-bottom: 60px; }
.content h2 { font-size: 22px; font-weight: 600; margin: 40px 0 12px; letter-spacing: -0.01em; color: var(--color-text); }
.content h3 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; color: var(--color-text); }
.content p { font-size: 16px; color: var(--color-text-secondary); margin-bottom: 16px; line-height: 1.6; }
.content ul, .content ol { margin: 0 0 16px 24px; color: var(--color-text-secondary); }
.content li { margin-bottom: 8px; font-size: 16px; line-height: 1.6; }
.content strong { color: var(--color-text); }
.content a { color: var(--color-accent); text-decoration: none; }
.content a:hover { text-decoration: underline; }

/* Support page specifics */
.contact-box {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-bottom: 40px;
}

.contact-box h2 { margin-top: 0; margin-bottom: 8px; color: var(--color-text); }
.contact-box a { font-size: 20px; color: var(--color-accent); text-decoration: none; font-weight: 500; }
.contact-box a:hover { text-decoration: underline; }
.contact-box .response-time { font-size: 14px; color: var(--color-text-secondary); margin-top: 8px; margin-bottom: 0; }

.faq-section { margin-bottom: 40px; }

.faq-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border-subtle);
    color: var(--color-text);
}

.faq-item { margin-bottom: 24px; }
.faq-item h3 { font-size: 16px; font-weight: 600; color: var(--color-text); margin-bottom: 4px; }
.faq-item p { font-size: 15px; margin-bottom: 0; }

/* Guarantee box (terms page) */
.guarantee-box {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06) 0%, rgba(200, 168, 78, 0.08) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 32px;
    border-radius: 16px;
    margin: 24px 0;
}

.guarantee-box h3 { color: var(--color-accent); margin-top: 16px; }
.guarantee-box h3:first-child { margin-top: 0; }

.highlight-box {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: 12px;
    margin: 16px 0;
}

/* ========================================
   METHODOLOGY PAGE STYLES
   ======================================== */

.methodology-hero {
    text-align: center;
    padding: 100px 24px 60px;
    position: relative;
    overflow: hidden;
}

.methodology-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('images/methodology-hero-bg.jpg') center/cover no-repeat;
    opacity: 0.18;
    z-index: 0;
}

.methodology-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--color-bg), transparent);
    z-index: 1;
}

.methodology-hero > .container { position: relative; z-index: 1; }

.methodology-hero h1 {
    font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #ffffff;
}

.methodology-hero h1 .accent {
    background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: accent-shimmer 6s ease-in-out infinite;
}

.methodology-hero p {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.mh-stats { display: flex; justify-content: center; gap: 48px; }

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

.mh-stat-value {
    display: block;
    font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.mh-stat-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.methodology-intro { padding: 60px 0 0; text-align: center; }
.methodology-intro p { font-size: var(--text-lg); color: var(--color-text-secondary); line-height: 1.7; max-width: 720px; margin: 0 auto; }

.methodology-algorithms { padding: 80px 0; }
.methodology-algorithms h2 { text-align: center; font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--color-text); }
.methodology-algorithms .section-subtitle { text-align: center; font-size: var(--text-base); color: var(--color-text-secondary); max-width: 520px; margin: 0 auto 48px; line-height: 1.5; }

.algorithm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.algorithm-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
    border-radius: 16px;
    padding: 32px;
    transition: transform 0.3s var(--ease-smooth), border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.algorithm-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.25);
    border-left-color: var(--color-accent);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.08);
}

.algorithm-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.algorithm-header h3 { font-size: 18px; font-weight: 600; color: var(--color-text); margin: 0; }
.algorithm-problem { font-size: 14px; color: var(--color-text-secondary); font-style: italic; margin-bottom: 12px; line-height: 1.5; }
.algorithm-approach { font-size: 15px; color: var(--color-text); line-height: 1.6; margin-bottom: 16px; }
.algorithm-citations { display: flex; flex-wrap: wrap; gap: 8px; }
.algorithm-citations span { font-size: 12px; color: var(--color-text-secondary); background: var(--color-bg-secondary); padding: 4px 10px; border-radius: 6px; }

.methodology-flow-section { padding: 80px 0; border-top: 1px solid var(--color-border-subtle); }
.methodology-flow-section h2 { text-align: center; font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 48px; color: var(--color-text); }

.methodology-flow { max-width: 560px; margin: 0 auto; position: relative; }

.methodology-flow::before {
    content: '';
    position: absolute;
    left: 20px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-gold));
    opacity: 0.3;
}

.flow-step { display: flex; align-items: flex-start; gap: 24px; padding: 16px 0; position: relative; }

.flow-indicator {
    width: 40px; height: 40px; min-width: 40px;
    border-radius: 50%;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: var(--color-accent);
    position: relative; z-index: 1;
}

.flow-content h3 { font-size: 16px; font-weight: 600; color: var(--color-text); margin-bottom: 4px; }
.flow-content p { font-size: 14px; color: var(--color-text-secondary); line-height: 1.5; margin: 0; }

.methodology-stats-section { padding: 60px 0; border-top: 1px solid var(--color-border-subtle); }
.methodology-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; }
.ms-item { text-align: center; }

.ms-value {
    font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem); font-weight: 700; line-height: 1; margin-bottom: 4px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.ms-label { font-size: var(--text-xs); color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }

.methodology-research { padding: 80px 0; border-top: 1px solid var(--color-border-subtle); }
.methodology-research h2 { text-align: center; font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; color: var(--color-text); }
.methodology-research .section-subtitle { text-align: center; font-size: var(--text-base); color: var(--color-text-secondary); max-width: 520px; margin: 0 auto 48px; line-height: 1.5; }

.research-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.research-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 28px 24px;
    transition: border-color 0.3s var(--ease-smooth);
}

.research-card:hover { border-color: rgba(0, 212, 255, 0.25); }
.research-card h3 { font-size: 16px; font-weight: 600; color: var(--color-accent); margin-bottom: 8px; }
.research-card p { font-size: 14px; color: var(--color-text-secondary); line-height: 1.5; margin-bottom: 16px; }
.research-names { font-size: 12px; color: var(--color-text-secondary); opacity: 0.7; line-height: 1.5; }

.methodology-guarantee {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.04) 0%, rgba(200, 168, 78, 0.06) 100%);
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
}

.methodology-guarantee h2 { font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; color: var(--color-text); }
.methodology-guarantee p { font-size: var(--text-base); color: var(--color-text-secondary); line-height: 1.7; max-width: 640px; margin: 0 auto 24px; }

.guarantee-link { font-size: var(--text-sm); color: var(--color-accent); text-decoration: none; font-weight: 500; transition: color 0.2s var(--ease-smooth); }
.guarantee-link:hover { text-decoration: underline; }

.methodology-cta { padding: 80px 0; text-align: center; }
.methodology-cta h2 { font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; color: var(--color-text); }
.methodology-cta p { font-size: var(--text-base); color: var(--color-text-secondary); margin-bottom: 32px; }

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 980px;
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-accent), #0099cc);
    color: #ffffff;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-smooth);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 212, 255, 0.35);
}

.cta-button:active {
    transform: translateY(-1px);
    transition: transform 34ms;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 960px) {
    .algorithm-grid { grid-template-columns: 1fr; }
    .research-grid { grid-template-columns: repeat(2, 1fr); }
    .engine-grid { grid-template-columns: repeat(2, 1fr); }
    .vision-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }

    .founder-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
        padding: 36px 28px;
    }

    .founder-identity {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .founder-credentials {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
    }

    .credential-pill { flex: 0 0 auto; }
    .founder-bio { text-align: left; }
}

@media (max-width: 768px) {
    .hero { padding: 56px 24px 28px; }

    .scroll-arrow { display: none; }

    .hero-stats { gap: 24px; flex-wrap: wrap; }

    .hero-stat {
        padding: 0 16px;
        border-right: none;
    }

    .hero-content::before {
        width: 300px;
        height: 200px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* Mobile nav: show hamburger, hide desktop links */
    .nav-links { display: none; }
    .nav-mobile-actions { display: flex; }
    .nav-hamburger { display: flex; }

    .app-card {
        min-width: 180px;
        max-width: 180px;
        padding: 24px 18px;
    }

    .brand-section.brand-section-active { padding: 0 0 24px; }
    .app-icon { width: 88px; height: 88px; border-radius: 20px; }

    .vision-grid { grid-template-columns: 1fr; gap: 16px; }
    .engine-grid { grid-template-columns: 1fr; }

    .founder-card {
        grid-template-columns: 1fr;
        padding: 28px 20px;
        gap: 24px;
    }

    .footer-grid { grid-template-columns: 1fr 1fr; }

    .trust-divider { display: none; }

    .app-tabs { gap: 8px; }
    .app-tab { padding: 8px 18px; font-size: 13px; }

    /* Methodology responsive */
    .methodology-hero { padding: 64px 24px 40px; }
    .mh-stats { gap: 24px; flex-wrap: wrap; }
    .algorithm-card { padding: 24px; }
    .research-grid { grid-template-columns: 1fr; }

    .content { padding: 0 0 40px; }
}

@media (max-width: 480px) {
    .nav-inner { padding: 0 16px; }
    .nav-brand { font-size: 14px; }
    .nav-logo { height: 28px; width: auto; margin-right: 6px; }
    .container { padding: 0 16px; }
    .mh-stats { flex-direction: column; gap: 16px; }

    .app-tabs { gap: 6px; }
    .app-tab { padding: 8px 14px; font-size: 12px; }

    .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
    .footer-col ul { align-items: center; }

    .algorithm-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .methodology-stats { gap: 24px; }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    body {
        opacity: 1 !important;
    }

    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .hero-gradient-text {
        background-size: 100% 100% !important;
    }

    .hero-content::before {
        opacity: 0.12 !important;
    }

    .mobile-menu-links li {
        opacity: 1 !important;
        transform: none !important;
    }
}
