/* ═══════════════════════════════════════════════════════════════
   MachinistX — "The Precision Grid" Design System
   PHP 8.2 + Vanilla JS + SQLite
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── CSS Custom Properties ────────────────────────────────── */
:root {
    /* Palette — Dark (default) */
    --color-primary:    #1A1C1E;
    --color-surface:    #23262A;
    --color-elevated:   #2A2D32;
    --color-border:     #2E3136;
    --color-accent:     #004aad;
    --color-accent-rgb: 0, 74, 173;
    --color-accent-hover: #0058CC;
    --color-secondary:  #F1F4F9;
    --color-text:       #F1F4F9;
    --color-text-muted: #8B929A;
    --color-success:    #00C853;
    --color-bg:         #111214;
    --color-card-bg:    #1A1C1E;
    --color-hero-overlay: rgba(17, 18, 20, 0.85);

    /* Typography */
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --space-xs:   0.5rem;
    --space-sm:   1rem;
    --space-md:   1.5rem;
    --space-lg:   2.5rem;
    --space-xl:   4rem;
    --space-2xl:  6rem;
    --space-3xl:  8rem;

    /* Radii */
    --radius-sm:  1rem;
    --radius-md:  1.5rem;
    --radius-lg:  2rem;
    --radius-xl:  3rem;

    /* Transitions */
    --ease-out:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.2s;
    --duration-med:  0.4s;
    --duration-slow: 0.8s;

    /* Navbar */
    --navbar-height: 4rem;
}

/* ─── Light Theme ──────────────────────────────────────────── */
[data-theme="light"] {
    --color-primary:    #FFFFFF;
    --color-surface:    #F1F4F9;
    --color-elevated:   #E8EBF0;
    --color-border:     #D1D5DB;
    --color-bg:         #F8F9FB;
    --color-card-bg:    #FFFFFF;
    --color-text:       #1A1C1E;
    --color-text-muted: #5F6673;
    --color-hero-overlay: rgba(248, 249, 251, 0.85);
}

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

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    transition: background-color var(--duration-med) var(--ease-out),
                color var(--duration-med) var(--ease-out);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

img, video {
    max-width: 100%;
    display: block;
}

ul, ol { list-style: none; }

/* ─── SVG Noise Overlay ────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ─── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.125rem; }

.mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
}

/* ─── Layout ───────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-3xl) 0;
    position: relative;
}

/* ─── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 2rem);
    max-width: 1100px;
    transition: all var(--duration-med) var(--ease-out);
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-xl);
    background: transparent;
    border: 1px solid transparent;
    transition: all var(--duration-med) var(--ease-out);
}

.navbar.scrolled .navbar__inner {
    background: rgba(26, 28, 30, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-color: var(--color-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .navbar.scrolled .navbar__inner {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .navbar__link {
    color: #4a5568;
}

[data-theme="light"] .navbar__link:hover {
    color: var(--color-accent);
}

[data-theme="light"] .hero__label {
    color: #4a5568;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.navbar__logo { flex-shrink: 0; }

.navbar__nav {
    display: flex;
    gap: var(--space-lg);
}

.navbar__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    transition: color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    position: relative;
}

.navbar__link:hover {
    color: var(--color-accent);
    transform: translateY(-1px);
}

.navbar__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--duration-med) var(--ease-out);
}

.navbar__link:hover::after { width: 100%; }

.navbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.navbar__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-lg);
    transition: all var(--duration-med) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.navbar__cta:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 8px 24px rgba(var(--color-accent-rgb), 0.35);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
    background: var(--color-elevated);
    transform: translateY(-1px);
}

.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; }
[data-theme="light"] .theme-toggle__sun { display: block; }
[data-theme="light"] .theme-toggle__moon { display: none; }

/* Burger Menu */
.navbar__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.navbar__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: all var(--duration-fast) var(--ease-out);
    transform-origin: center;
}

.navbar__burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { opacity: 0; }
.navbar__burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero Section ─────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-3xl) 0;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg video,
.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--color-bg) 0%,
        rgba(17, 18, 20, 0.95) 20%,
        rgba(17, 18, 20, 0.7) 50%,
        rgba(17, 18, 20, 0.5) 100%
    );
    z-index: 1;
}

[data-theme="light"] .hero__overlay {
    background: linear-gradient(
        to top,
        var(--color-bg) 0%,
        rgba(248, 249, 251, 0.95) 20%,
        rgba(248, 249, 251, 0.7) 50%,
        rgba(248, 249, 251, 0.5) 100%
    );
}

/* Blueprint Grid Overlay */
.hero__grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(var(--color-accent-rgb), 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--color-accent-rgb), 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 860px;
}

.hero__label {
    margin-bottom: var(--space-md);
    color: #fff;
}

.hero__title {
    margin-bottom: var(--space-md);
}

.hero__title span {
    display: block;
}

.hero__title .hero__accent {
    color: var(--color-accent);
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--color-text-muted);
    max-width: 560px;
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

/* Dual Search Bar */
.hero__search {
    display: flex;
    gap: 1px;
    background: var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 680px;
    border: 1px solid var(--color-border);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.hero__search:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15);
}

.hero__search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--color-card-bg);
}

.hero__search-field svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.hero__search-field input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
}

.hero__search-field input::placeholder {
    color: var(--color-text-muted);
}

.hero__search-divider {
    width: 1px;
    background: var(--color-border);
    align-self: stretch;
}

/* ─── Stats Ticker ─────────────────────────────────────────── */
.ticker {
    padding: var(--space-lg) 0;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-card-bg);
}

.ticker__track {
    display: flex;
    gap: var(--space-xl);
    width: max-content;
    animation: ticker-scroll 30s linear infinite;
}

.ticker__item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
}

.ticker__value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
}

.ticker__label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ticker__dot {
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── Bento Grid ───────────────────────────────────────────── */
.bento {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-md);
}

.bento__tile {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-med) var(--ease-out);
}

.bento__tile:hover {
    border-color: rgba(var(--color-accent-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.bento__tile--masterclass {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(
        to top,
        var(--color-primary) 0%,
        rgba(26, 28, 30, 0.4) 100%
    ),
    url('https://images.unsplash.com/photo-1565043666747-69f6646db940?w=800&q=80');
}

.bento__tile--podcast {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
}

.bento__tile--membership {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
}

.bento__tile-label {
    margin-bottom: var(--space-sm);
}

.bento__tile-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.bento__tile-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Masterclass Play Button */
.play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(var(--color-accent-rgb), 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    transition: all var(--duration-med) var(--ease-spring);
    cursor: pointer;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 32px rgba(var(--color-accent-rgb), 0.5);
}

.play-btn svg { margin-left: 3px; }

/* Glass overlay for masterclass title */
.glass-overlay {
    background: rgba(26, 28, 30, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

/* Waveform Visualizer */
.waveform {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    padding: var(--space-md) 0;
    flex: 1;
}

.waveform__bar {
    flex: 1;
    background: var(--color-accent);
    border-radius: 2px;
    min-height: 8px;
    opacity: 0.4;
    transition: all var(--duration-med) var(--ease-out);
}

.bento__tile--podcast:hover .waveform__bar {
    opacity: 1;
    animation: waveform-pulse 0.8s ease-in-out infinite alternate;
}

.waveform__bar:nth-child(odd) { animation-delay: 0.1s; }
.waveform__bar:nth-child(3n) { animation-delay: 0.2s; }
.waveform__bar:nth-child(4n) { animation-delay: 0.3s; }
.waveform__bar:nth-child(5n) { animation-delay: 0.15s; }

@keyframes waveform-pulse {
    0% { height: var(--bar-h, 30%); }
    100% { height: calc(var(--bar-h, 30%) + 30%); }
}

/* Live Feed */
.live-feed {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    overflow: hidden;
}

.live-feed__line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    opacity: 0;
    transform: translateY(8px);
    animation: feed-in 0.4s var(--ease-out) forwards;
}

.live-feed__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.live-feed__dot--green { background: var(--color-success); }
.live-feed__dot--accent { background: var(--color-accent); }
.live-feed__dot--muted { background: var(--color-text-muted); }

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-success);
    margin-bottom: var(--space-sm);
}

.live-indicator__dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(0, 200, 83, 0); }
}

@keyframes feed-in {
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Apprentice Path ──────────────────────────────────────── */
.path {
    overflow: hidden;
}

.path__track {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: var(--space-md) 0;
}

.path__track::-webkit-scrollbar { display: none; }

.path__card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    transition: all var(--duration-med) var(--ease-out);
}

.path__card:hover {
    border-color: rgba(var(--color-accent-rgb), 0.3);
    transform: translateY(-4px);
}

.path__card-step {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(var(--color-accent-rgb), 0.15);
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    line-height: 1;
}

.path__card-icon {
    width: 48px;
    height: 48px;
    background: rgba(var(--color-accent-rgb), 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.path__card-title {
    margin-bottom: var(--space-xs);
}

.path__card-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.path__progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--space-md);
}

.path__progress-bar {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.path__progress-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
    transition: width 1s var(--ease-out);
}

.path__progress-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* ─── Knowledge Graph ──────────────────────────────────────── */
.graph {
    position: relative;
    min-height: 500px;
}

.graph__canvas {
    width: 100%;
    height: 530px;
    position: relative;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.graph__node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all var(--duration-med) var(--ease-out);
    /* Center horizontally, shift up by half circle height so circle center = coordinate */
    transform: translateX(-50%);
    margin-top: -28px;
    z-index: 2;
}

.graph__node:hover {
    filter: brightness(1.2);
}

.graph__node-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-med) var(--ease-out);
    /* Solid background — set per-group via inline style */
    border: none;
}

.graph__node-circle svg {
    color: #fff !important;
    stroke: #fff !important;
    display: block;
}

.graph__node-circle span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    line-height: 0;
}

.graph__node:hover .graph__node-circle {
    transform: scale(1.12);
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.15);
}

.graph__node-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    max-width: 100px;
    color: var(--color-text-muted);
}

.graph__node:hover .graph__node-label {
    color: var(--color-text);
}

.graph__svg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.graph__line {
    stroke: rgba(var(--color-accent-rgb), 0.15);
    stroke-width: 1.5;
    fill: none;
    transition: all var(--duration-med) var(--ease-out);
}

.graph__line.active {
    stroke: rgba(var(--color-accent-rgb), 0.6);
    stroke-width: 2;
}

/* ─── Pricing ──────────────────────────────────────────────── */
.pricing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    align-items: start;
}

.pricing__card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    position: relative;
    transition: all var(--duration-med) var(--ease-out);
}

.pricing__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.pricing__card--featured {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    transform: scale(1.03);
    box-shadow: 0 16px 48px rgba(var(--color-accent-rgb), 0.3);
}

.pricing__card--featured:hover {
    transform: scale(1.03) translateY(-4px);
}

.pricing__card-badge {
    position: absolute;
    top: -12px;
    right: var(--space-md);
    background: var(--color-bg);
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-accent);
}

.pricing__card-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.pricing__card-price {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: var(--space-md);
}

.pricing__card-price span {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.7;
}

.pricing__card-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.pricing__card--featured .pricing__card-desc {
    color: rgba(255, 255, 255, 0.75);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.pricing__card-features {
    margin-bottom: var(--space-lg);
}

.pricing__card-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pricing__card:not(.pricing__card--featured) .pricing__card-feature {
    border-bottom-color: var(--color-border);
    color: var(--color-text-muted);
}

.pricing__card-feature svg {
    flex-shrink: 0;
    color: var(--color-success);
}

.pricing__card--featured .pricing__card-feature svg {
    color: rgba(255, 255, 255, 0.9);
}

.pricing__card-cta {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--duration-med) var(--ease-out);
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.pricing__card-cta:hover {
    transform: translateY(-1px) scale(1.03);
}

.pricing__card--featured .pricing__card-cta {
    background: #fff;
    color: var(--color-accent);
    border-color: transparent;
    font-weight: 700;
}

.pricing__card--featured .pricing__card-cta:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
    background: var(--color-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.footer__brand { font-size: 1.5rem; font-weight: 800; margin-bottom: var(--space-xs); }
.footer__tagline { color: var(--color-text-muted); font-size: 0.9rem; max-width: 280px; line-height: 1.6; }

.footer__col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.footer__col a {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    padding: 0.25rem 0;
    transition: color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}

.footer__col a:hover {
    color: var(--color-text);
    transform: translateX(4px);
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-lg);
}

.footer__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-success);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer__status-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.footer__legal {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ─── CAD Schematic Parallax ───────────────────────────────── */
.cad-schematic {
    position: absolute;
    pointer-events: none;
    opacity: 0.04;
    color: var(--color-accent);
    transition: transform 0.1s linear;
}

[data-theme="light"] .cad-schematic {
    opacity: 0.06;
}

/* ─── Section Headers ──────────────────────────────────────── */
.section__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-xl);
}

.section__header .label {
    margin-bottom: var(--space-sm);
    display: block;
}

.section__header h2 {
    margin-bottom: var(--space-sm);
}

.section__header p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ─── Magnetic Button ──────────────────────────────────────── */
.magnetic-btn {
    transition: transform var(--duration-med) var(--ease-out);
    will-change: transform;
}

/* ─── 3D Tilt Card ─────────────────────────────────────────── */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform var(--duration-med) var(--ease-out);
    will-change: transform;
}

/* ─── In-View Animations ──────────────────────────────────── */
.animate-in {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
    will-change: opacity, transform;
}

.animate-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

.animate-in.animate-scale {
    transform: translateY(32px) scale(0.96);
}

.animate-in.animate-scale.in-view {
    transform: translateY(0) scale(1);
}

/* Stagger children */
.stagger-children > .animate-in:nth-child(1) { transition-delay: 0s; }
.stagger-children > .animate-in:nth-child(2) { transition-delay: 0.08s; }
.stagger-children > .animate-in:nth-child(3) { transition-delay: 0.16s; }
.stagger-children > .animate-in:nth-child(4) { transition-delay: 0.24s; }
.stagger-children > .animate-in:nth-child(5) { transition-delay: 0.32s; }
.stagger-children > .animate-in:nth-child(6) { transition-delay: 0.4s; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .bento {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento__tile--podcast {
        grid-row: auto;
        grid-column: auto;
    }
    .pricing__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
    .pricing__card--featured {
        transform: scale(1);
    }
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .navbar__nav { display: none; }
    .navbar__burger { display: flex; }

    /* Mobile nav dropdown */
    .navbar__nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background: var(--color-card-bg);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        padding: var(--space-md);
        gap: var(--space-xs);
        backdrop-filter: blur(24px);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    }

    .navbar__nav.open .navbar__link {
        padding: 0.75rem var(--space-sm);
        border-radius: var(--radius-sm);
    }

    .navbar__nav.open .navbar__link:hover {
        background: var(--color-surface);
    }

    .hero__search {
        flex-direction: column;
    }

    .hero__search-divider {
        width: 100%;
        height: 1px;
    }

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

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

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .path__card { flex: 0 0 280px; }
}

@media (max-width: 480px) {
    :root {
        --space-md: 1rem;
        --space-lg: 1.5rem;
        --space-xl: 2.5rem;
        --space-2xl: 4rem;
        --space-3xl: 5rem;
    }

    .navbar {
        width: calc(100% - 1rem);
    }

    .navbar__cta {
        display: none;
    }
}
