/* XRealDisplay - Design System */

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

/* CSS Variables - Dark theme default */
:root {
    --bg: #0a0a0a;
    --bg-alt: #111111;
    --text: #e5e5e5;
    --text-secondary: #737373;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-alt: #f0f0f0;
    --text: #171717;
    --text-secondary: #737373;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(0, 0, 0, 0.02);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 48px;
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text);
    text-decoration: none;
}

.logo-icon {
    color: var(--accent);
}

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

.nav a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--text);
}

.icon-moon {
    display: none;
}

[data-theme="light"] .icon-sun {
    display: none;
}

[data-theme="light"] .icon-moon {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    text-decoration: none;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1rem;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.center {
    text-align: center;
}

/* Hero */
.hero {
    padding: 140px 0 60px;
    text-align: center;
    overflow: hidden;
}

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

.hero h1 {
    max-width: 800px;
    margin: 0 auto 24px;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

/* Hero Parallax Visual */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: 400px;
    perspective: 1000px;
}

.glasses-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.glasses-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.virtual-screen {
    width: 80px;
    height: 56px;
    background: #12121a;
    border-radius: 4px;
    border: 1px solid #3b82f6;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}

.screen-left {
    transform: perspective(400px) rotateY(12deg);
}

.screen-center {
    transform: translateZ(0);
    width: 90px;
    height: 62px;
}

.screen-right {
    transform: perspective(400px) rotateY(-12deg);
}

.screen-content {
    width: 100%;
    height: 100%;
    padding: 3px;
}

.screen-titlebar {
    height: 6px;
    background: #1e1e2e;
    border-radius: 2px 2px 0 0;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    padding-left: 3px;
    gap: 2px;
    border-bottom: 1px solid #3b82f6;
}

.screen-titlebar::before,
.screen-titlebar::after {
    content: '';
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ff5f57;
}

.screen-titlebar::after {
    background: #28c840;
}

/* Fake code editor content */
.screen-code {
    height: calc(100% - 8px);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 15%,
        rgba(96, 165, 250, 0.7) 15%,
        rgba(96, 165, 250, 0.7) 20%,
        transparent 20%,
        transparent 32%,
        rgba(167, 139, 250, 0.7) 32%,
        rgba(167, 139, 250, 0.7) 37%,
        transparent 37%,
        transparent 50%,
        rgba(74, 222, 128, 0.7) 50%,
        rgba(74, 222, 128, 0.7) 55%,
        transparent 55%,
        transparent 68%,
        rgba(251, 191, 36, 0.6) 68%,
        rgba(251, 191, 36, 0.6) 73%,
        transparent 73%,
        transparent 85%,
        rgba(96, 165, 250, 0.6) 85%,
        rgba(96, 165, 250, 0.6) 90%,
        transparent 90%
    );
    border-radius: 0 0 2px 2px;
}

/* Fake browser content */
.screen-browser {
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 0 0 2px 2px;
    position: relative;
}

.screen-browser::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.screen-browser::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.2) 0%, transparent 40%);
    border-radius: 2px;
}

/* Fake terminal content */
.screen-terminal {
    height: calc(100% - 8px);
    background: #0d1117;
    border-radius: 0 0 2px 2px;
    position: relative;
    overflow: hidden;
}

.screen-terminal::before {
    content: '$ build\n✓ Done';
    white-space: pre;
    position: absolute;
    top: 3px;
    left: 3px;
    font-family: "SF Mono", Monaco, monospace;
    font-size: 5px;
    color: #4ade80;
    line-height: 1.4;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.glasses-frame {
    position: relative;
    width: 700px;
    height: 200px;
}

.lens {
    position: absolute;
    top: 50%;
    width: 280px;
    height: 120px;
    background: rgba(10, 15, 25, 0.85);
    border: 3px solid #64748b;
    border-radius: 20px 60px 40px 20px;
    transform: translateY(-50%);
    box-shadow: inset 0 0 30px rgba(59, 130, 246, 0.15), 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.lens-left {
    left: 40px;
}

.lens-right {
    right: 40px;
    border-radius: 60px 20px 20px 40px;
}

/* Screens container inside each lens */
.lens-screens {
    position: absolute;
    top: 50%;
    display: flex;
    gap: 6px;
    align-items: center;
    will-change: transform;
    transition: transform 0.15s ease-out;
}

/* Position screens so center screen spans across both lenses */
.lens-left .lens-screens {
    right: -48px;
    transform: translateY(-50%);
}

.lens-right .lens-screens {
    left: -48px;
    transform: translateY(-50%);
}

.bridge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 20px;
    background: linear-gradient(to bottom, #64748b, #475569);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.temple {
    position: absolute;
    top: 30%;
    width: 120px;
    height: 8px;
    background: linear-gradient(to right, #64748b, #475569);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.temple-left {
    left: -80px;
    transform: rotate(-5deg);
}

.temple-right {
    right: -80px;
    transform: rotate(5deg);
}

/* Light mode adjustments for glasses */
[data-theme="light"] .virtual-screen {
    background: #f5f5f5;
    border-color: #a0a0a0;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .screen-titlebar {
    background: #e0e0e0;
    border-color: #a0a0a0;
}

[data-theme="light"] .screen-terminal {
    background: #1e1e1e;
}

[data-theme="light"] .lens {
    background: rgba(230, 235, 245, 0.9);
    border-color: #888;
}

[data-theme="light"] .bridge,
[data-theme="light"] .temple {
    background: linear-gradient(to bottom, #666, #555);
}

/* Responsive hero visual */
@media (max-width: 768px) {
    .hero-visual {
        height: 280px;
        margin-top: 20px;
    }

    .glasses-frame {
        width: 500px;
        height: 150px;
    }

    .lens {
        width: 200px;
        height: 90px;
    }

    .lens-left {
        left: 30px;
    }

    .lens-right {
        right: 30px;
    }

    .virtual-screen {
        width: 65px;
        height: 45px;
    }

    .screen-center {
        width: 72px;
        height: 50px;
    }

    .lens-screens {
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .hero-visual {
        height: 200px;
    }

    .glasses-frame {
        width: 340px;
        height: 120px;
    }

    .lens {
        width: 140px;
        height: 70px;
        border-width: 2px;
    }

    .lens-left {
        left: 15px;
    }

    .lens-right {
        right: 15px;
    }

    .bridge {
        width: 40px;
        height: 14px;
    }

    .temple {
        width: 80px;
        height: 6px;
    }

    .temple-left {
        left: -55px;
    }

    .temple-right {
        right: -55px;
    }

    .virtual-screen {
        width: 50px;
        height: 35px;
    }

    .screen-center {
        width: 55px;
        height: 38px;
    }

    .lens-screens {
        gap: 3px;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    overflow: hidden;
}

.stat-number {
    display: block;
    font-family: "SF Mono", Monaco, monospace;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 0.9375rem;
    color: var(--text);
    margin-bottom: 4px;
}

.stat-detail {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.stats-note {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-align: center;
}

/* Comparison Table */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 16px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table th.highlight,
.comparison-table td.highlight {
    background: var(--card-bg);
    color: var(--accent);
    font-weight: 500;
}

.table-note {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Comparison Features */
.comparison-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
}

.feature-card h3 {
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 1.125rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

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

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.step h3 {
    margin-bottom: 8px;
}

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

/* Video */
.video-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.video-item {
    min-width: 0;
}

.video-container {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-container video {
    width: 100%;
    display: block;
}

.video-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 8px;
    font-weight: 500;
}

.video-note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 16px;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.pricing-grid-two {
    max-width: 640px;
}

.pricing-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 32px;
}

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}

.pricing-featured {
    border-color: var(--accent);
    position: relative;
}

.pricing-card h3 {
    margin-bottom: 16px;
}

.price {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.price-suffix {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-lines {
    list-style: none;
    margin-bottom: 12px;
}

.pricing-lines p {
    padding: 4px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text);
    font-size: 0.875rem;
    margin: 0;
}

.pricing-lines p::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent);
    border-radius: 3px;
    background: var(--accent);
}

.pricing-lines p::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pricing-subtext {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-card li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
}

.pricing-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.pricing-card .btn {
    width: 100%;
}

/* Compatibility */
.compat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.compat-card h3 {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compat-card ul {
    list-style: none;
}

.compat-card li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.compat-card li:last-child {
    border-bottom: none;
}

/* FAQ */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    padding: 20px 0;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.faq-item summary::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

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

.faq-item p {
    padding-bottom: 20px;
    color: var(--text-secondary);
}

/* Download Section */
.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 32px 0 16px;
}

.download-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.download-note {
    color: var(--text-secondary);
    font-size: 0.875rem;
    min-height: 1.2em;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.compat-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text);
    opacity: 0.6;
    margin-top: 4px;
}

.untested {
    opacity: 0.6;
    font-style: italic;
}

.sale-badge {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

.price-original {
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    color: var(--text);
    opacity: 0.6;
    font-size: 1.25rem;
    margin-right: 8px;
}

/* Free License Button (accent contrast from download btn) */
.btn-accent {
    background: #22c55e;
    color: #fff;
}

.btn-accent:hover {
    background: #16a34a;
    text-decoration: none;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-box h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    margin-bottom: 4px;
}

.modal-input:focus {
    border-color: var(--accent);
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--text);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .section {
        padding: 64px 0;
    }

    h2 {
        margin-bottom: 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .comparison-table {
        font-size: 0.8125rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
    }

    .steps {
        gap: 32px;
    }

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-buttons .btn {
        width: 100%;
    }
}
