/* ==========================================================================
   CasDrive — Personal Spacecraft. Zero-Point Drive.
   SpaceX-inspired deep space aesthetic
   ========================================================================== */

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

:root {
    --cd-black: #000000;
    --cd-deep: #050507;
    --cd-surface: #0a0a0f;
    --cd-border: #1a1a2e;
    --cd-text: #e8e8ec;
    --cd-text-dim: #8a8a9a;
    --cd-text-muted: #5a5a6a;
    --cd-white: #ffffff;
    --cd-accent: #4a9eff;
    --cd-accent-glow: rgba(74, 158, 255, 0.15);
    --cd-gold: #c8a84e;
    --cd-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --cd-font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--cd-font);
    background: var(--cd-black);
    color: var(--cd-text);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--cd-accent);
    color: var(--cd-white);
}

a { color: var(--cd-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #6fb4ff; }

/* ---------- Navigation ---------- */
.cd-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.4s, padding 0.4s;
}

.cd-nav.scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 3rem;
    border-bottom: 1px solid var(--cd-border);
}

.cd-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cd-nav-logo img {
    height: 28px;
    width: auto;
}

.cd-nav-logo span {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cd-white);
}

.cd-nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.cd-nav-links a {
    color: var(--cd-text-dim);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}

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

.cd-nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cd-lang-btn {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--cd-text-muted);
    border: 1px solid var(--cd-border);
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    transition: color 0.2s, border-color 0.2s;
}

.cd-lang-btn:hover {
    color: var(--cd-white);
    border-color: var(--cd-text-dim);
}

/* ---------- Hero ---------- */
.cd-hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.cd-hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cd-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 2rem;
}

.cd-hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--cd-white);
    margin-bottom: 1.5rem;
}

.cd-hero-tagline {
    font-size: clamp(1rem, 2vw, 1.375rem);
    color: var(--cd-text-dim);
    font-weight: 300;
    letter-spacing: 0.02em;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.cd-hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--cd-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: cd-pulse 2s infinite;
}

.cd-hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--cd-text-muted), transparent);
}

@keyframes cd-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ---------- Sections ---------- */
.cd-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cd-section-full {
    padding: 8rem 2rem;
    max-width: 100%;
}

.cd-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cd-accent);
    margin-bottom: 1.5rem;
}

.cd-section h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--cd-white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.cd-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cd-white);
    margin-bottom: 1rem;
    margin-top: 3rem;
}

.cd-section p {
    font-size: 1.125rem;
    color: var(--cd-text-dim);
    max-width: 700px;
    line-height: 1.7;
}

.cd-section p + p {
    margin-top: 1.25rem;
}

/* ---------- Intro Quote ---------- */
.cd-intro {
    border-top: 1px solid var(--cd-border);
    background: var(--cd-deep);
}

.cd-intro-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.cd-intro-inner p {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--cd-text);
    line-height: 1.8;
    max-width: 100%;
    font-weight: 300;
}

.cd-intro-inner .cd-highlight {
    color: var(--cd-white);
    font-weight: 500;
}

/* ---------- Product Roadmap ---------- */
.cd-roadmap {
    border-top: 1px solid var(--cd-border);
}

.cd-roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1px;
    margin-top: 4rem;
    background: var(--cd-border);
    border: 1px solid var(--cd-border);
}

.cd-gen-card {
    background: var(--cd-black);
    padding: 2.5rem;
    transition: background 0.3s;
}

.cd-gen-card:hover {
    background: var(--cd-surface);
}

.cd-gen-id {
    font-family: var(--cd-font-mono);
    font-size: 0.8125rem;
    color: var(--cd-accent);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.cd-gen-name {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--cd-white);
    margin-bottom: 0.5rem;
}

.cd-gen-name-zh {
    font-size: 0.875rem;
    color: var(--cd-text-muted);
    margin-bottom: 1rem;
}

.cd-gen-specs {
    list-style: none;
    font-size: 0.875rem;
    color: var(--cd-text-dim);
}

.cd-gen-specs li {
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--cd-border);
    display: flex;
    justify-content: space-between;
}

.cd-gen-specs li:last-child { border-bottom: none; }

.cd-gen-specs .spec-label { color: var(--cd-text-muted); }
.cd-gen-specs .spec-value { color: var(--cd-text); text-align: right; }

.cd-gen-status {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cd-gen-status.feasible { color: #4ade80; }
.cd-gen-status.testing { color: #facc15; }
.cd-gen-status.concept { color: #fb923c; }
.cd-gen-status.theory { color: #a78bfa; }
.cd-gen-status.research { color: var(--cd-accent); }
.cd-gen-status.speculative { color: #f472b6; }

/* ---------- Research Section ---------- */
.cd-research {
    border-top: 1px solid var(--cd-border);
    background: var(--cd-deep);
}

.cd-tech-ladder {
    margin-top: 3rem;
    display: grid;
    gap: 0;
    border: 1px solid var(--cd-border);
}

.cd-tech-tier {
    display: grid;
    grid-template-columns: 80px 1fr 200px;
    border-bottom: 1px solid var(--cd-border);
    transition: background 0.2s;
}

.cd-tech-tier:last-child { border-bottom: none; }
.cd-tech-tier:hover { background: var(--cd-surface); }

.cd-tech-tier-num {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cd-font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cd-accent);
    border-right: 1px solid var(--cd-border);
    padding: 1.5rem;
}

.cd-tech-tier-info {
    padding: 1.5rem 2rem;
}

.cd-tech-tier-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cd-white);
    margin-bottom: 0.25rem;
}

.cd-tech-tier-desc {
    font-size: 0.875rem;
    color: var(--cd-text-muted);
}

.cd-tech-tier-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cd-text-muted);
}

/* ---------- Vision / Mission ---------- */
.cd-vision {
    border-top: 1px solid var(--cd-border);
}

.cd-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.cd-vision-block h3 {
    margin-top: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cd-accent);
    margin-bottom: 1.25rem;
}

.cd-vision-block p {
    font-size: 1rem;
    color: var(--cd-text-dim);
    line-height: 1.8;
}

/* ---------- Founding Note ---------- */
.cd-founding {
    border-top: 1px solid var(--cd-border);
    background: var(--cd-deep);
}

.cd-founding-content {
    max-width: 720px;
}

.cd-founding-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.cd-founding-content strong {
    color: var(--cd-white);
    font-weight: 600;
}

.cd-blockquote {
    border-left: 2px solid var(--cd-accent);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    background: var(--cd-accent-glow);
}

.cd-blockquote p {
    color: var(--cd-text) !important;
    font-size: 1.125rem !important;
    font-style: italic;
    max-width: 100% !important;
}

/* ---------- Name Etymology ---------- */
.cd-name {
    border-top: 1px solid var(--cd-border);
}

.cd-name-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 3rem;
    background: var(--cd-border);
    border: 1px solid var(--cd-border);
}

.cd-name-item {
    background: var(--cd-black);
    padding: 2.5rem;
    text-align: center;
}

.cd-name-cas {
    font-family: var(--cd-font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cd-accent);
    margin-bottom: 0.75rem;
}

.cd-name-ref {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cd-white);
    margin-bottom: 0.5rem;
}

.cd-name-desc {
    font-size: 0.875rem;
    color: var(--cd-text-muted);
    line-height: 1.6;
}

/* ---------- Footer ---------- */
.cd-footer {
    border-top: 1px solid var(--cd-border);
}

.cd-footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
}

.cd-footer-brand {
    max-width: 300px;
}

.cd-footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.cd-footer-tagline {
    font-size: 0.875rem;
    color: var(--cd-text-muted);
    line-height: 1.5;
}

.cd-footer-links {
    display: flex;
    gap: 4rem;
}

.cd-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cd-footer-col h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cd-text-dim);
    margin-bottom: 0.5rem;
}

.cd-footer-col a {
    font-size: 0.8125rem;
    color: var(--cd-text-muted);
    transition: color 0.2s;
}

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

.cd-footer-legal-bar {
    border-top: 1px solid var(--cd-border);
    padding: 1.5rem 2rem;
    text-align: center;
}

.cd-footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.cd-footer-legal-links a {
    font-size: 0.75rem;
    color: var(--cd-text-muted);
    transition: color 0.2s;
}

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

.cd-legal-sep {
    color: var(--cd-border);
    font-size: 0.75rem;
    margin: 0 0.25rem;
}

.cd-footer-copy {
    font-size: 0.75rem;
    color: var(--cd-text-muted);
}

.cd-footer-copy a {
    color: var(--cd-text-muted);
}

.cd-footer-copy a:hover { color: var(--cd-text-dim); }

/* ---------- Legal Pages ---------- */
.cd-legal-page {
    padding-top: 8rem;
}

.cd-legal-page h2 {
    margin-bottom: 0.5rem;
}

.cd-legal-date {
    font-size: 0.8125rem;
    color: var(--cd-text-muted);
    margin-bottom: 3rem;
}

.cd-legal-page h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cd-white);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.cd-legal-page p {
    font-size: 0.9375rem;
    color: var(--cd-text-dim);
    max-width: 720px;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.cd-legal-page ul {
    list-style: none;
    padding: 0;
    max-width: 720px;
}

.cd-legal-page ul li {
    font-size: 0.9375rem;
    color: var(--cd-text-dim);
    line-height: 1.8;
    padding-left: 1.25rem;
    position: relative;
}

.cd-legal-page ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--cd-text-muted);
}

.cd-legal-page ul li strong {
    color: var(--cd-text);
}

.cd-legal-table {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.875rem;
}

.cd-legal-table th,
.cd-legal-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--cd-border);
}

.cd-legal-table th {
    color: var(--cd-text-dim);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cd-legal-table td {
    color: var(--cd-text-dim);
}

.cd-legal-table code {
    font-family: var(--cd-font-mono);
    font-size: 0.8125rem;
    color: var(--cd-accent);
}

/* ---------- Research Report ---------- */
.cd-research-report {
    max-width: 900px;
}

.cd-research-report .cd-legal-table {
    max-width: 100%;
    overflow-x: auto;
}

/* ---------- Scroll Reveal ---------- */
.cd-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.cd-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .cd-nav { padding: 1rem 1.5rem; }
    .cd-nav-links { display: none; }
    .cd-section { padding: 5rem 1.5rem; }
    .cd-section-full { padding: 5rem 1.5rem; }
    .cd-roadmap-grid { grid-template-columns: 1fr; }
    .cd-vision-grid { grid-template-columns: 1fr; gap: 2rem; }
    .cd-name-grid { grid-template-columns: 1fr; }
    .cd-tech-tier { grid-template-columns: 60px 1fr; }
    .cd-tech-tier-status { display: none; }
    .cd-footer-main { flex-direction: column; gap: 2.5rem; padding: 3rem 1.5rem 2rem; }
    .cd-footer-links { gap: 2rem; flex-wrap: wrap; }
    .cd-legal-page { padding-top: 6rem; }
}

@media (max-width: 480px) {
    .cd-hero h1 { font-size: 2rem; }
}
