/* ═══════════════════════════════════════════════════════════════
   NINJACHA - Optimized Stylesheet
   Critical CSS is inline in HTML - this file contains enhancements
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   CSS Variables (Extended)
   ───────────────────────────────────────────────────────────────── */
:root {
    --bg: #050206;
    --bg-card: rgba(15, 10, 25, 0.85);
    --text: #f4f6ff;
    --text-muted: rgba(244, 246, 255, 0.7);
    --cyan: #00ffff;
    --cyan-glow: rgba(0, 255, 255, 0.4);
    --magenta: #ff00ff;
    --magenta-glow: rgba(255, 0, 255, 0.4);
    --purple: #8a2be2;
    --purple-deep: #4a1080;
    --gold: #ffd700;
    --success: #00ff88;
    
    --font-body: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-chinese: 'Noto Serif SC', 'Noto Sans SC', serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --shadow-glow: 0 0 30px var(--cyan-glow), 0 0 60px var(--magenta-glow);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    --transition-fast: 0.15s ease-out;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --header-height: 84px;
    --section-padding: clamp(40px, 8vw, 100px);
}

/* ─────────────────────────────────────────────────────────────────
   Base Enhancements (Critical CSS handles core)
   ───────────────────────────────────────────────────────────────── */
html {
    scroll-padding-top: var(--header-height);
}

/* ─────────────────────────────────────────────────────────────────
   Background Effects - Activated after CSS loads
   ───────────────────────────────────────────────────────────────── */
body.css-loaded .grid-overlay {
    opacity: 0.6;
    animation: gridPulse 8s ease-in-out infinite;
    will-change: opacity;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 1;
    contain: strict;
}

/* Floating Chinese Characters */
.char-decoration {
    position: fixed;
    font-family: var(--font-chinese);
    font-size: clamp(60px, 12vw, 140px);
    font-weight: 900;
    pointer-events: none;
    z-index: 0;
    contain: layout style;
}

body.css-loaded .char-decoration {
    animation: floatIn 1s ease-out forwards;
}

.char-decoration span {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.08;
    filter: blur(1px);
    display: block;
}

body.css-loaded .char-decoration span {
    animation: floatGentle 12s ease-in-out infinite;
    will-change: transform;
}

.char-1 { top: 10%; left: 5%; }
.char-2 { top: 30%; right: 3%; animation-delay: 0.2s; }
.char-3 { bottom: 25%; left: 8%; animation-delay: 0.4s; }
.char-4 { bottom: 10%; right: 5%; animation-delay: 0.6s; }

.char-1 span { animation-delay: 0s; }
.char-2 span { animation-delay: -3s; }
.char-3 span { animation-delay: -6s; }
.char-4 span { animation-delay: -9s; }

@keyframes floatIn {
    to { opacity: 1; }
}

@keyframes floatGentle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

/* ─────────────────────────────────────────────────────────────────
   Header Enhancements
   ───────────────────────────────────────────────────────────────── */
header {
    transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
    contain: layout style;
}

header.scrolled {
    background: rgba(5, 2, 6, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo-img {
    transition: transform var(--transition-bounce);
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-link {
    transition: all var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    transition: all var(--transition-smooth);
    transform: translateX(-50%);
}

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

.nav-link:hover::after,
.nav-link:focus::after {
    width: calc(100% - 32px);
}

/* ─────────────────────────────────────────────────────────────────
   Floating CTA Enhancements
   ───────────────────────────────────────────────────────────────── */
.floating-cta {
    box-shadow: var(--shadow-glow), var(--shadow-card);
    contain: layout style;
}

.floating-cta:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 0 40px var(--cyan-glow), 0 0 80px var(--magenta-glow);
}

.floating-cta:active {
    transform: scale(1.02);
}

/* ─────────────────────────────────────────────────────────────────
   Section Spacing & Headings
   ───────────────────────────────────────────────────────────────── */
section {
    padding: var(--section-padding) 0;
    contain: layout style;
}

.mt-medium { margin-top: clamp(40px, 6vw, 80px); }
.mt-large { margin-top: clamp(60px, 10vw, 120px); }

.section-heading {
    text-align: center;
    margin-bottom: clamp(32px, 5vw, 60px);
}

.section-heading h2 {
    font-size: clamp(1.75rem, 5vw, 2.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text) 0%, var(--cyan) 50%, var(--magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-heading span {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--cyan);
    font-weight: 600;
    text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────
   Hero Enhancements
   ───────────────────────────────────────────────────────────────── */
body.css-loaded .hero-content {
    animation: heroFadeIn 0.8s ease-out;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

body.css-loaded .hero h1 {
    animation: heroGlow 4s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 40px rgba(255, 0, 255, 0.4)); }
}

.meta-chip {
    transition: all var(--transition-smooth);
}

.meta-chip:hover {
    background: rgba(0, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--cyan-glow);
}

.google-play-badge-hero {
    transition: transform var(--transition-bounce);
}

.google-play-badge-hero:hover {
    transform: scale(1.05);
}

.value-prop-box {
    backdrop-filter: blur(10px);
}

/* Video Card Enhancements */
.video-card {
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-smooth);
    contain: layout style;
}

.video-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 50px var(--cyan-glow);
}

/* Hero Visual */
.hero-visual {
    text-align: center;
    padding: 40px 0;
}

.hero-visual img {
    max-width: 400px;
    width: 100%;
    filter: drop-shadow(0 0 40px var(--magenta-glow));
}

body.css-loaded .hero-visual img {
    animation: heroImageFloat 6s ease-in-out infinite;
    will-change: transform;
}

@keyframes heroImageFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

/* ─────────────────────────────────────────────────────────────────
   Screenshots Carousel
   ───────────────────────────────────────────────────────────────── */
.screenshots-section {
    padding: var(--section-padding) 0;
}

.carousel-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    padding: 20px 0 60px;
    contain: layout;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

/* Default: native scroll */
.carousel-track {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 20px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
}

.carousel-track::-webkit-scrollbar { display: none; }

/* JS-enhanced: disable native scroll */
body.js-carousel-ready .carousel-track {
    overflow: visible;
    scroll-snap-type: none;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 auto;
    width: clamp(260px, 70vw, 320px);
    scroll-snap-align: center;
}

.screenshot-link {
    display: block;
    text-decoration: none;
}

.screenshot-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-card);
    contain: layout style;
}

.screenshot-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--cyan);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px var(--cyan-glow);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 9 / 19;
    object-fit: cover;
    background: var(--bg-card);
}

.screenshot-caption {
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    background: linear-gradient(to top, rgba(5, 2, 6, 0.95), transparent);
}

/* Carousel Buttons */
.carousel-button {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--cyan);
    background: rgba(5, 2, 6, 0.9);
    color: var(--cyan);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-smooth);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

body.js-carousel-ready .carousel-button {
    display: flex;
}

.carousel-button:hover {
    background: var(--cyan);
    color: var(--bg);
    box-shadow: 0 0 25px var(--cyan-glow);
}

.carousel-button:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-button--left { left: 10px; }
.carousel-button--right { right: 10px; }

/* Carousel Indicators */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-smooth);
    padding: 0;
}

.carousel-indicator.current-slide,
.carousel-indicator:hover {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-glow);
}

/* ─────────────────────────────────────────────────────────────────
   Stats Section
   ───────────────────────────────────────────────────────────────── */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    padding: 40px 0;
}

.stat-box {
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all var(--transition-smooth);
    contain: layout style;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--cyan);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--cyan-glow);
}

.stat-number {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─────────────────────────────────────────────────────────────────
   Features Section
   ───────────────────────────────────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    contain: layout style;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: var(--shadow-card), 0 0 30px var(--cyan-glow);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 14px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Legend */
.legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 28px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.9rem;
    margin-right: 8px;
}

.legend-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
}

.legend-chip:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.legend-chip span:first-child {
    font-family: var(--font-chinese);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legend-chip div {
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--text);
}

.legend-chip div small {
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────────────────────────
   Glass Cards (How it Works)
   ───────────────────────────────────────────────────────────────── */
.dual-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    border: 1px solid rgba(0, 255, 255, 0.15);
    transition: all var(--transition-smooth);
    contain: layout style;
}

.glass-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 30px var(--cyan-glow);
}

.glass-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 20px;
}

.glass-card ul {
    list-style: none;
    margin-bottom: 0;
}

.glass-card li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.glass-card li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-size: 0.9rem;
}

.glass-card li strong {
    color: var(--text);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--cyan), var(--magenta));
}

.timeline-step {
    position: relative;
    margin-bottom: 40px;
    padding: 24px 28px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-smooth);
    contain: layout style;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 28px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cyan);
    border: 3px solid var(--bg);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.timeline-step:hover {
    transform: translateX(8px);
    border-color: var(--cyan);
}

.timeline-step h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 10px;
}

.timeline-step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────────
   FAQ Section
   ───────────────────────────────────────────────────────────────── */
.faq {
    max-width: 800px;
    margin: 0 auto;
}

.faq details {
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all var(--transition-smooth);
    contain: layout style;
}

.faq details:hover {
    border-color: rgba(0, 255, 255, 0.3);
}

.faq details[open] {
    border-color: var(--cyan);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.faq summary {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: all var(--transition-smooth);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--cyan);
    transition: transform var(--transition-smooth);
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq summary:hover {
    color: var(--cyan);
}

.faq details p {
    padding: 0 24px 20px;
    color: var(--text-muted);
    line-height: 1.7;
    animation: faqReveal 0.3s ease-out;
}

@keyframes faqReveal {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────────
   Final CTA Section
   ───────────────────────────────────────────────────────────────── */
.final-cta-card {
    text-align: center;
    padding: 60px 32px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.08) 0%, rgba(255, 0, 255, 0.08) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    contain: layout style;
}

.final-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 0, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.final-cta-card .prompt {
    font-size: 1rem;
    color: var(--cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.final-cta-card h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--text) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.final-cta-container {
    position: relative;
    z-index: 1;
}

.urgency-message {
    margin-top: 24px;
}

.urgency-message p {
    font-size: 1rem;
    color: var(--gold);
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 80px;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

footer a {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-smooth);
}

footer a:hover {
    color: var(--magenta);
}

/* ─────────────────────────────────────────────────────────────────
   Lazy Images - Progressive Enhancement
   ───────────────────────────────────────────────────────────────── */
img[loading="lazy"] {
    opacity: 1;
    background: var(--bg-card);
}

body.js-images-ready img[loading="lazy"]:not(.img-loaded) {
    filter: blur(8px);
    opacity: 0.7;
    transition: filter 0.4s ease-out, opacity 0.4s ease-out;
}

body.js-images-ready img.img-loaded {
    filter: blur(0);
    opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────
   Scroll Animations - Progressive Enhancement
   ───────────────────────────────────────────────────────────────── */
.feature-card,
.stat-box,
.glass-card,
.timeline-step,
.faq details {
    opacity: 1;
    transform: translateY(0);
}

body.js-animations-ready .feature-card,
body.js-animations-ready .stat-box,
body.js-animations-ready .glass-card,
body.js-animations-ready .timeline-step,
body.js-animations-ready .faq details {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

body.js-animations-ready .animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ─────────────────────────────────────────────────────────────────
   Responsive Adjustments
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --header-height: 68px;
    }
    
    main {
        padding: 0 16px;
    }
    
    .hero {
        min-height: auto;
        padding: 40px 0;
    }
    
    .hero-meta {
        gap: 8px;
    }
    
    .meta-chip {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    
    .feature-grid,
    .dual-cards {
        grid-template-columns: 1fr;
    }
    
    .floating-cta {
        width: 140px;
        bottom: 16px;
        right: 16px;
    }
    
    .carousel-button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .carousel-button--left { left: 5px; }
    .carousel-button--right { right: 5px; }
    
    .carousel-slide {
        width: clamp(240px, 80vw, 280px);
    }
    
    .timeline {
        padding-left: 30px;
    }
    
    .timeline::before {
        left: 8px;
    }
    
    .timeline-step::before {
        left: -26px;
        width: 12px;
        height: 12px;
    }
    
    .legend {
        flex-direction: column;
        gap: 12px;
    }
    
    .legend-chip {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 12px;
    }
    
    .nav-buttons {
        gap: 4px;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .feature-card,
    .glass-card {
        padding: 24px 20px;
    }
    
    .final-cta-card {
        padding: 40px 20px;
    }
    
    .floating-cta {
        width: 120px;
        bottom: 12px;
        right: 12px;
    }
}

/* ─────────────────────────────────────────────────────────────────
   Touch & Interaction Improvements
   ───────────────────────────────────────────────────────────────── */
@media (hover: none) {
    .feature-card:hover,
    .stat-box:hover,
    .screenshot-item:hover,
    .timeline-step:hover {
        transform: none;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .carousel-button {
        width: 56px;
        height: 56px;
    }
    
    .carousel-indicator {
        width: 16px;
        height: 16px;
    }
}

.feature-card:active,
.stat-box:active,
.screenshot-item:active {
    transform: scale(0.98);
}

.nav-link:active {
    background: rgba(0, 255, 255, 0.1);
}

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

/* ─────────────────────────────────────────────────────────────────
   Print Styles
   ───────────────────────────────────────────────────────────────── */
@media print {
    .floating-cta,
    .grid-overlay,
    .char-decoration,
    .carousel-button,
    .carousel-nav,
    .video-card {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero h1,
    .section-heading h2,
    .feature-card h3 {
        background: none;
        -webkit-text-fill-color: initial;
        color: black;
    }
}
