/* --- Theme Variables --- */
:root {
    --bg: #F2EFE7;
    --panel: #FFFFFF;
    --ink: #221F1B;
    --dim: #8A857A;
    --line: rgba(34, 31, 27, 0.13);
    --acc: #D93A2B;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    color: var(--ink);
    background-color: var(--bg);
}

a {
    text-decoration: none;
    color: var(--ink);
    transition: color 0.35s cubic-bezier(0.2,1,0.3,1);
}

a:hover {
    color: var(--acc);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, .logo {
    font-family: system-ui, -apple-system, sans-serif; font-weight: bold;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.3;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.data-label, .bg-ui, .price span, .badge, .feature-card h3 span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--acc);
    color: #fff;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.35s cubic-bezier(0.2,1,0.3,1);
    font-family: system-ui, -apple-system, sans-serif; font-weight: bold;
}

.btn:hover {
    background-color: #fff;
    color: var(--acc);
    border-color: var(--acc);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.25rem;
}

/* Background Layer */
.bg-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    background-color: var(--bg);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.bg-ui {
    position: absolute;
    pointer-events: none;
}
.bg-ui.top-left { top: 24px; left: 24px; }
.bg-ui.top-right { top: 24px; right: 24px; text-align: right; }
.bg-ui.bottom-left { bottom: 24px; left: 24px; }
.bg-ui.bottom-right { bottom: 24px; right: 24px; text-align: right; color: var(--acc); font-weight: bold;}
.bg-ui .pace { color: var(--acc); }

/* Main Content */
.content-wrapper {
    position: relative;
    z-index: 10;
    pointer-events: none; /* Allows clicks to pass through to document.body for sprint */
}

/* Re-enable pointer events for interactive areas */
header, .feature-card, .pricing-card, .faq-item, .review-card, .support-item, .btn, a, footer {
    pointer-events: auto;
}

/* Header & Nav */
header {
    background-color: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--ink);
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--acc);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: var(--ink);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Features */
.features {
    padding: 4rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background-color: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: all 0.35s cubic-bezier(0.2,1,0.3,1);
}

.feature-card:hover {
    border-color: var(--acc);
}

.feature-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Streaming & AI */
.streaming-ai {
    padding: 4rem 0;
    text-align: center;
}

.support-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.support-item {
    background-color: var(--panel);
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid var(--line);
    font-weight: 500;
    transition: all 0.35s cubic-bezier(0.2,1,0.3,1);
}

.support-item:hover {
    border-color: var(--acc);
}

/* Pricing */
.pricing {
    padding: 4rem 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: center;
}

.pricing-card {
    background-color: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 2rem;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.2,1,0.3,1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pricing-card .btn {
    margin-top: auto;
}

.pricing-card:hover {
    border-color: var(--acc);
}

.pricing-card.popular {
    border-color: var(--acc);
    transform: scale(1.02);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--acc);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.price {
    font-family: system-ui, -apple-system, sans-serif; font-weight: bold;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--acc);
    margin-bottom: 1.5rem;
}

.price span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    color: var(--dim);
}

.pricing-features {
    margin-bottom: 2rem;
    text-align: left;
    display: inline-block;
}

.pricing-features li {
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 4px;
}

/* FAQ */
.faq {
    padding: 4rem 0;
}

.faq-item {
    margin-bottom: 1.5rem;
    background-color: var(--panel);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--line);
    transition: all 0.35s cubic-bezier(0.2,1,0.3,1);
}

.faq-item:hover {
    border-color: var(--acc);
}

/* Reviews */
.reviews {
    padding: 4rem 0;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    padding: 2rem;
    background-color: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: all 0.35s cubic-bezier(0.2,1,0.3,1);
}

.review-card:hover {
    border-color: var(--acc);
}

.reviewer {
    margin-top: 1rem;
    font-family: system-ui, -apple-system, sans-serif; font-weight: bold;
    font-weight: 700;
    text-align: right;
    color: var(--dim);
}

/* Footer */
footer {
    background-color: var(--panel);
    border-top: 1px solid var(--line);
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.copyright {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    color: var(--dim);
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.35s cubic-bezier(0.2,1,0.3,1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Subpages */
.subpage-content {
    padding: 4rem 0;
    min-height: calc(100vh - 180px);
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .hero { padding: 3rem 0; }
    .btn { display: block; width: 100%; }
    header .container { flex-direction: column; gap: 1rem; }
    .nav-menu { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .header-btn { display: none; }
    .pricing-card.popular { transform: none; }
}

/* Accessibility & Mobile Overrides */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 100px; }
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--acc);
    color: white;
    padding: 8px;
    z-index: 10000;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }
a:focus, button:focus { outline: 2px solid var(--acc); outline-offset: 2px; }
.btn, .header-btn { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.nav-menu a { min-height: 44px; display: inline-flex; align-items: center; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 1rem; padding: 1rem; text-align: left; }
summary { font-weight: bold; cursor: pointer; }
summary:focus { outline: 2px solid var(--acc); }
details[open] summary { margin-bottom: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: 0.5rem; }
