:root, [data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: rgba(14, 14, 22, 0.3);
    --bg-card: rgba(38, 42, 62, 0.82);
    --bg-card-hover: rgba(48, 52, 72, 0.88);
    --text-primary: #eeeef4;
    --text-secondary: #c0c0d8;
    --text-muted: #8888a8;
    --accent: #4f7cff;
    --accent-glow: rgba(79, 124, 255, 0.15);
    --accent-secondary: #00d4aa;
    --border: rgba(140, 145, 180, 0.30);
    --card-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    --header-bg: rgba(10, 10, 15, 0.6);
    --toggle-bg: rgba(232, 232, 240, 0.15);
    --toggle-border: rgba(232, 232, 240, 0.4);
    --toggle-color: #eeeef4;
    --nav-btn-bg: rgba(255, 255, 255, 0.08);
    --nav-btn-border: rgba(255, 255, 255, 0.18);
    --nav-btn-hover: rgba(79, 124, 255, 0.15);
    --glass-blur: blur(16px);
    --radius: 12px;
    --radius-sm: 8px;
}

[data-theme="light"] {
    --bg-primary: #f0f1f5;
    --bg-secondary: rgba(220, 222, 232, 0.35);
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.92);
    --text-primary: #0d0d1a;
    --text-secondary: #3a3a52;
    --text-muted: #6b6b80;
    --accent: #2952cc;
    --accent-glow: rgba(41, 82, 204, 0.10);
    --accent-secondary: #00876a;
    --border: rgba(100, 105, 140, 0.28);
    --header-bg: rgba(240, 241, 245, 0.75);
    --toggle-bg: rgba(13, 13, 26, 0.10);
    --toggle-border: rgba(13, 13, 26, 0.30);
    --toggle-color: #0d0d1a;
    --nav-btn-bg: rgba(0, 0, 0, 0.05);
    --nav-btn-border: rgba(0, 0, 0, 0.13);
    --nav-btn-hover: rgba(41, 82, 204, 0.12);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    --glass-blur: blur(12px);
}

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

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0.01em;
    scroll-behavior: smooth;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: inherit;
    background: transparent;
    color: inherit;
    line-height: inherit;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

a:hover {
    color: var(--accent-secondary);
}

/* ============ GLASS PANEL ============ */

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 2.5rem;
    box-shadow: var(--card-shadow);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

/* ============ CRYSTAL SHINE SWEEP ============ */

.glass-panel,
.feature-card,
.product-card,
.team-card,
.social-links-section {
    position: relative;
    overflow: hidden;
}

.contact-info,
.contact-form-card {
    position: relative;
    overflow: clip;
}

.glass-panel::after,
.feature-card::after,
.product-card::after,
.team-card::after,
.contact-info::after,
.contact-form-card::after,
.social-links-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 60%
    );
    transform: skewX(-15deg);
    transition: none;
    pointer-events: none;
    z-index: 1;
}

.glass-panel:hover::after,
.feature-card:hover::after,
.product-card:hover::after,
.team-card:hover::after,
.contact-info:hover::after,
.contact-form-card:hover::after,
.social-links-section:hover::after {
    animation: crystalShineSweep 0.8s ease forwards;
}

[data-theme="light"] .glass-panel::after,
[data-theme="light"] .feature-card::after,
[data-theme="light"] .product-card::after,
[data-theme="light"] .team-card::after,
[data-theme="light"] .contact-info::after,
[data-theme="light"] .contact-form-card::after,
[data-theme="light"] .social-links-section::after {
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 55%,
        transparent 60%
    );
}

@keyframes crystalShineSweep {
    from { left: -75%; }
    to { left: 125%; }
}

.glass-panel p {
    line-height: 1.9;
    letter-spacing: 0.015em;
    font-weight: 400;
}

/* ============ HEADER ============ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.20em;
    text-decoration: none;
}

.brand:hover {
    color: var(--accent);
}

.brand-icon {
    color: var(--accent);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============ NEΘTHEOS WORDMARK ============
   The brand wordmark in the navbar and footer renders the literal Greek
   capital theta (Θ, U+0398) in place of the first O. This is the brand's
   *true* wordmark and what should appear if anyone copies the text.
   Accessibility is handled via `aria-label="Neotheos — Home"` on the
   parent `.brand` link so screen readers announce "Neotheos — Home"
   instead of attempting to phonetically spell out the Greek glyph.

   The Θ glyph itself is delivered by a companion Google Fonts request in
   App.razor that subsets Inter Bold/ExtraBold to U+0398, so it renders
   in the same typeface, weight, and optical baseline as the surrounding
   Latin letters; without that subset request the browser would fall back
   to a system Greek-capable font with mismatched optical metrics. */

.site-header .hypercube-svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
    filter: drop-shadow(0 0 6px rgba(79, 124, 255, 0.55));
}

.hypercube-svg {
    color: var(--accent);
    filter: drop-shadow(0 0 4px rgba(79, 124, 255, 0.5));
}

[data-theme="light"] .hypercube-svg {
    filter: drop-shadow(0 0 3px rgba(41, 82, 204, 0.45));
}

/* ============ NAV GLASS BUTTONS ============ */

.main-nav {
    display: flex;
    gap: 0.5rem;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all 0.35s ease;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    background: var(--nav-btn-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--nav-btn-border);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.main-nav a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.15) 45%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0.15) 55%,
        transparent 80%
    );
    background-size: 300% 100%;
    background-position: -150% 0;
    animation: glassShine 1.8s ease-out 0.5s forwards;
    pointer-events: none;
}

@keyframes glassShine {
    to { background-position: 250% 0; }
}

.main-nav a:hover {
    color: var(--accent);
    background: var(--nav-btn-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============ HERO ============ */

.hero {
    padding: 8rem 0 6rem;
    background: radial-gradient(ellipse at 30% 50%, var(--accent-glow) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, rgba(0, 212, 170, 0.08) 0%, transparent 50%);
}

.hero-split {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-content {
    max-width: 600px;
    flex: 1;
    position: relative;
    padding: 2rem 2.5rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
}

.tesseract-hero {
    width: 500px;
    height: 540px;
    flex-shrink: 0;
    margin: -3rem -2rem -3rem 0;
    overflow: visible;
    opacity: 0;
    transition: opacity 1.2s ease-in;
    position: relative;
}

.tesseract-hero.visible {
    opacity: 1;
}

.tesseract-hero canvas {
    display: block;
}

.crystal-hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.crystal-teaser {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    opacity: 0;
    animation: crystalTeaserIn 1.2s ease 2.5s forwards;
}

.crystal-teaser-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(79, 124, 255, 0.2), rgba(176, 80, 200, 0.2));
    border: 1px solid rgba(79, 124, 255, 0.35);
    color: var(--accent);
}

.crystal-teaser-text {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

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

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.75;
    letter-spacing: 0.015em;
    font-weight: 400;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.page-hero {
    padding: 6rem 0 3rem;
}

.page-hero .container {
    position: relative;
    max-width: 700px;
    padding: 2rem 2.5rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.page-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.page-hero .hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.75;
    letter-spacing: 0.015em;
    font-weight: 400;
    margin-top: 0.5rem;
}

/* ============ BUTTONS ============ */

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #3a65e0;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(79, 124, 255, 0.3);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-primary);
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============ FEATURES ============ */

.features {
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--card-shadow);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease, transform 0.3s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

a.feature-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

a.feature-card:hover h3 {
    color: var(--accent);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    height: 48px;
    display: flex;
    align-items: center;
}

.feature-icon svg {
    display: block;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.9;
    letter-spacing: 0.015em;
    font-weight: 400;
}

/* ============ PROBLEM SECTION ============ */

.problem-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
}

.split-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.problem-list {
    list-style: none;
    padding: 0;
}

.problem-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.85;
    letter-spacing: 0.015em;
}

.problem-list li strong {
    color: var(--text-primary);
}

.split-visual {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem 2rem;
    text-align: center;
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

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

/* ============ CTA ============ */

@keyframes subtleGradientDrift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cta-section {
    padding: 5rem 0;
    text-align: center;
}

.cta-section .container {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
    background-image: linear-gradient(135deg, transparent 0%, var(--accent-glow) 50%, transparent 100%);
    background-size: 300% 300%;
    animation: subtleGradientDrift 20s ease infinite;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ============ CONTENT SECTIONS ============ */

.content-section {
    padding: 4rem 0;
}

.content-narrow {
    max-width: 800px;
    margin: 0 auto;
}

.content-narrow h2, .content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 3rem;
}

.content-narrow h2:first-child {
    margin-top: 0;
}

.content-narrow p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.content-narrow .approach-grid,
.content-narrow .market-list {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.approach-item {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
}

.content-narrow .approach-grid .approach-item {
    border: 1px solid var(--border);
}

.approach-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.approach-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.9;
    letter-spacing: 0.015em;
    margin: 0;
}

.market-list {
    list-style: none;
    padding: 0;
}

.market-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.market-list li:last-child {
    border-bottom: none;
}

.market-list li strong {
    color: var(--text-primary);
}

.content-narrow .market-list {
    padding: 1rem 1.5rem;
}

/* ============ PRODUCTS ============ */

.product-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.product-card:hover {
    border-color: var(--accent);
}

.product-hero-image {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    border: 1px solid rgba(var(--section-accent), 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .product-hero-image {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.10);
}

.product-card.featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(79, 124, 255, 0.08) 100%);
    backdrop-filter: var(--glass-blur);
}

.product-badge {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.product-info h2 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    margin-top: 0;
}

.product-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    line-height: 1.9;
    letter-spacing: 0.015em;
}

.product-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.pf-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.pf-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.product-how-it-works {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.product-how-it-works h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.product-how-it-works p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.9;
    letter-spacing: 0.015em;
    margin: 0;
}

.use-cases {
    margin: 2rem 0 1.5rem;
}

.use-cases h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.dev-stage {
    display: inline-block;
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 4px;
}

/* ============ TEAM ============ */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.team-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 2.5rem 2.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
    overflow: hidden;
}

.team-card-crystal-top {
    height: 6px;
    margin: 0 -2.5rem 0;
    background: linear-gradient(90deg,
        rgba(80, 140, 255, 0) 0%,
        rgba(80, 140, 255, 0.5) 20%,
        rgba(160, 80, 220, 0.6) 50%,
        rgba(200, 160, 60, 0.5) 80%,
        rgba(200, 160, 60, 0) 100%
    );
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative;
}

.team-card-crystal-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg,
        rgba(120, 140, 220, 0.06) 0%,
        transparent 100%
    );
    pointer-events: none;
}

[data-theme="light"] .team-card-crystal-top::after {
    height: 20px;
    background: linear-gradient(180deg,
        rgba(100, 115, 200, 0.03) 0%,
        transparent 100%
    );
}

.team-avatar {
    width: 56px;
    height: 72px;
    border-radius: 0;
    clip-path: polygon(50% 0%, 100% 18%, 100% 82%, 50% 100%, 0% 82%, 0% 18%);
    background: linear-gradient(170deg, rgba(41, 82, 204, 0.55) 0%, rgba(120, 70, 190, 0.50) 45%, rgba(180, 140, 50, 0.45) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    margin: 1.8rem auto 1.2rem;
    position: relative;
    box-shadow: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.5s ease;
    overflow: hidden;
}

[data-theme="dark"] .team-avatar {
    background: linear-gradient(170deg, rgba(80, 140, 255, 0.5) 0%, rgba(140, 100, 210, 0.45) 45%, rgba(200, 170, 80, 0.4) 100%);
    color: rgba(220, 220, 240, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.team-card:hover .team-avatar {
    transform: scale(1.08);
}

.team-avatar::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.2) 48%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.2) 52%,
        transparent 60%
    );
    transform: skewX(-20deg);
    animation: avatarShimmer 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes avatarShimmer {
    0%, 70% { left: -100%; }
    100% { left: 150%; }
}

.team-avatar.accent {
    background: linear-gradient(170deg, rgba(120, 60, 190, 0.60) 0%, rgba(160, 60, 200, 0.55) 40%, rgba(190, 145, 55, 0.50) 100%);
}

[data-theme="dark"] .team-avatar.accent {
    background: linear-gradient(170deg, rgba(140, 90, 210, 0.6) 0%, rgba(180, 80, 220, 0.5) 40%, rgba(210, 170, 85, 0.45) 100%);
    box-shadow: 0 0 12px rgba(160, 80, 220, 0.15);
}

.team-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.team-role {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.team-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.9;
    letter-spacing: 0.015em;
    text-align: left;
    margin-bottom: 1.2rem;
}

.team-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.team-skills span {
    background: var(--accent-glow);
    color: var(--accent);
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.team-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.team-link:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* ============ CONTACT ============ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 100%;
}

.contact-info {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    box-shadow: var(--card-shadow);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.contact-info h2 {
    margin-top: 0;
}

.contact-info p {
    line-height: 1.9;
    letter-spacing: 0.015em;
}

.contact-details {
    margin: 2rem 0;
}

.contact-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.contact-item strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.contact-item a, .contact-item span {
    font-size: 1.05rem;
}

.contact-interests {
    margin-top: 2.5rem;
}

.contact-interests h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-interests ul {
    list-style: none;
    padding: 0;
}

.contact-interests li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    padding-left: 1.2rem;
    position: relative;
}

.contact-interests li::before {
    content: "\25C6";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-size: 0.6rem;
    top: 0.7rem;
}

/* ============ CONTACT FORM ============ */

.contact-form-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    box-shadow: var(--card-shadow);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
    display: flex;
    flex-direction: column;
}

.contact-form-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.contact-form-card .form-group:has(textarea) {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form-card .form-group textarea {
    flex: 1;
}

.contact-form-card h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group .validation-message {
    color: #e05555;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.form-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-status {
    font-size: 0.9rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1.5rem;
}

.form-status.success {
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.form-status.error {
    background: rgba(224, 85, 85, 0.1);
    color: #e05555;
    border: 1px solid rgba(224, 85, 85, 0.3);
}

.sending-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(79, 124, 255, 0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spinnerRotate 0.7s linear infinite;
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

.map-section {
    margin-top: 3rem;
    text-align: center;
}

.map-section h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.map-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.map-container {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-container iframe {
    display: block;
    width: 100%;
    min-height: 400px;
}

[data-theme="dark"] .map-container {
    filter: invert(0.9) hue-rotate(180deg) saturate(0.3) brightness(0.7);
}

.social-links-section {
    margin-top: 3rem;
    padding: 2rem 2.5rem;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.social-links-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.social-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px var(--accent-glow);
}

.social-link .social-icon {
    font-size: 1.1rem;
}

/* ============ FOOTER ============ */

.site-footer {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 3.5rem 0 1.5rem;
    margin-top: auto;
    flex-shrink: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-brand .brand-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand .brand-icon, .footer-brand .brand-text {
    font-size: 1rem;
    letter-spacing: 0.15em;
    font-weight: 700;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    line-height: 1.6;
}

.footer-brand .footer-tagline {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.8rem;
    font-style: italic;
}

.footer-links h4, .footer-contact h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 0.35rem 0;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 0.3rem;
}

.footer-contact p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.footer-badges {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.nvidia-badge {
    color: var(--text-secondary);
    transition: all 0.3s;
    display: inline-block;
}

.nvidia-badge:hover {
    color: var(--text-primary);
    filter: drop-shadow(0 0 6px rgba(118, 185, 0, 0.4));
}

.home-badge {
    margin-top: 2.5rem;
}

.nvidia-badge-home {
    color: var(--text-secondary);
    transition: all 0.3s;
    display: inline-block;
    opacity: 0.7;
}

.nvidia-badge-home:hover {
    color: var(--text-primary);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(118, 185, 0, 0.35));
}

/* ============ RESPONSIVE ============ */

@media (max-width: 860px) {
    .hero h1 { font-size: 2.2rem; }
    .page-hero h1 { font-size: 2rem; }
    .hero { padding: 5rem 0 3rem; }
    .features-grid { grid-template-columns: 1fr; }
    .split-content { grid-template-columns: 1fr; gap: 2rem; }
    .product-features { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .approach-grid { grid-template-columns: 1fr; gap: 1rem; }
    .approach-item { padding: 1rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-actions { flex-direction: column; }
    .contact-grid { grid-template-columns: 1fr; }
    .hero-split { flex-direction: column; }
    .tesseract-hero { width: 100%; max-width: 320px; height: 340px; margin: 0 auto; }
    .crystal-hero-wrapper { width: 100%; }
    .crystal-teaser { margin-top: 0; }

    .site-header .hypercube-svg {
        width: 36px;
        height: 36px;
    }

    .brand {
        font-size: 1.2rem;
        gap: 0.4rem;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem 2rem;
        gap: 0.5rem;
    }

    .main-nav a {
        display: block;
        border-radius: 6px;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .page-hero .container {
        max-width: 100%;
        padding: 1.5rem;
    }

    .form-row { grid-template-columns: 1fr; }
    .form-submit-row { flex-direction: column; align-items: stretch; }

    .main-nav.open { display: flex; }
    .mobile-toggle { display: block; }
}

/* ============ CONSTELLATION CANVAS ============ */

#constellation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.site-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

.site-wrapper > main {
    flex: 1 0 auto;
}

/* ============ THEME TOGGLE ============ */

.theme-toggle {
    background: var(--toggle-bg);
    border: 1.5px solid var(--toggle-border);
    color: var(--toggle-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-left: 1rem;
    backdrop-filter: blur(8px);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: scale(1.1);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }

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

/* ============ SECTION COLOR TINTS ============ */

:root { --section-accent: 79, 124, 255; }
[data-section="home"]     { --section-accent: 79, 124, 255; }
[data-section="about"]    { --section-accent: 0, 180, 160; }
[data-section="products"] { --section-accent: 60, 120, 230; }
[data-section="team"]     { --section-accent: 180, 80, 200; }
[data-section="contact"]  { --section-accent: 60, 180, 120; }

.page-hero .container {
    border-color: rgba(var(--section-accent), 0.35);
    background: linear-gradient(
        135deg,
        rgba(var(--section-accent), 0.16) 0%,
        rgba(38, 42, 62, 0.85) 40%,
        rgba(var(--section-accent), 0.12) 100%
    );
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

[data-theme="light"] .page-hero .container {
    background: linear-gradient(
        135deg,
        rgba(var(--section-accent), 0.06) 0%,
        rgba(255, 255, 255, 0.70) 40%,
        rgba(var(--section-accent), 0.04) 100%
    );
    border-color: rgba(var(--section-accent), 0.18);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.05);
}

.main-nav a.active {
    color: rgb(var(--section-accent));
    background: rgba(var(--section-accent), 0.12);
    border-color: rgba(var(--section-accent), 0.4);
    box-shadow: 0 2px 8px rgba(var(--section-accent), 0.15);
}

/* Section-tinted content panels — dark mode */
.glass-panel,
.feature-card,
.product-card,
.team-card,
.stat-card,
.cta-section .container,
.content-section .glass-panel,
.split-content .glass-panel,
.contact-info,
.contact-form-card,
.social-links-section,
.social-link {
    border-color: rgba(var(--section-accent), 0.25);
    background: linear-gradient(
        135deg,
        rgba(var(--section-accent), 0.08) 0%,
        var(--bg-card) 50%,
        rgba(var(--section-accent), 0.04) 100%
    );
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

[data-theme="light"] .glass-panel,
[data-theme="light"] .feature-card,
[data-theme="light"] .product-card,
[data-theme="light"] .team-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .cta-section .container,
[data-theme="light"] .content-section .glass-panel,
[data-theme="light"] .split-content .glass-panel,
[data-theme="light"] .contact-info,
[data-theme="light"] .contact-form-card,
[data-theme="light"] .social-links-section,
[data-theme="light"] .social-link {
    background: linear-gradient(
        135deg,
        rgba(var(--section-accent), 0.03) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(var(--section-accent), 0.02) 100%
    );
    border-color: rgba(var(--section-accent), 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Home page hero content gets accent tint as a glass panel */
.hero-content {
    background: linear-gradient(
        135deg,
        rgba(var(--section-accent), 0.10) 0%,
        var(--bg-card) 50%,
        rgba(var(--section-accent), 0.06) 100%
    );
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(var(--section-accent), 0.25);
    border-radius: var(--radius);
    padding: 2.5rem;
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

[data-theme="light"] .hero-content {
    background: linear-gradient(
        135deg,
        rgba(var(--section-accent), 0.04) 0%,
        rgba(255, 255, 255, 0.70) 50%,
        rgba(var(--section-accent), 0.03) 100%
    );
    border-color: rgba(var(--section-accent), 0.15);
}

/* ============ PAGE TRANSITIONS ============ */

@keyframes neoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes neoSlideIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

main.neo-fade-in { animation: neoFadeIn 500ms ease both; }
main.neo-slide-in { animation: neoSlideIn 550ms ease both; overflow-x: hidden; }

@keyframes tileGlowIn {
    0% {
        box-shadow: var(--card-shadow),
                    0 0 24px rgba(var(--section-accent), 0.30),
                    0 0 2px rgba(var(--section-accent), 0.40);
        border-color: rgba(var(--section-accent), 0.45);
    }
    100% {
        box-shadow: var(--card-shadow),
                    0 0 0px rgba(var(--section-accent), 0),
                    0 0 0px rgba(var(--section-accent), 0);
    }
}

.tile-glow-in .glass-panel,
.tile-glow-in .feature-card,
.tile-glow-in .product-card,
.tile-glow-in .team-card,
.tile-glow-in .stat-card,
.tile-glow-in .contact-info,
.tile-glow-in .contact-form-card,
.tile-glow-in .social-links-section,
.tile-glow-in .hero-content,
.tile-glow-in .cta-section .container,
.tile-glow-in .page-hero .container {
    animation: tileGlowIn 800ms ease both;
}

.tile-glow-in .glass-panel:nth-child(1),
.tile-glow-in .feature-card:nth-child(1),
.tile-glow-in .team-card:nth-child(1) { animation-delay: 0ms; }
.tile-glow-in .glass-panel:nth-child(2),
.tile-glow-in .feature-card:nth-child(2),
.tile-glow-in .team-card:nth-child(2) { animation-delay: 80ms; }
.tile-glow-in .glass-panel:nth-child(3),
.tile-glow-in .feature-card:nth-child(3),
.tile-glow-in .team-card:nth-child(3) { animation-delay: 160ms; }
.tile-glow-in .glass-panel:nth-child(4),
.tile-glow-in .feature-card:nth-child(4),
.tile-glow-in .team-card:nth-child(4) { animation-delay: 240ms; }
.tile-glow-in .glass-panel:nth-child(5),
.tile-glow-in .feature-card:nth-child(5) { animation-delay: 320ms; }
.tile-glow-in .glass-panel:nth-child(6),
.tile-glow-in .feature-card:nth-child(6) { animation-delay: 400ms; }

/* ============ SITE CONTROLS WIDGET ============ */

.site-controls {
    position: relative;
    margin-left: 0.5rem;
}

.controls-btn {
    background: var(--toggle-bg);
    border: 1.5px solid var(--toggle-border);
    color: var(--toggle-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.controls-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: scale(1.1);
}

.controls-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 240px;
    background: rgba(14, 14, 22, 0.94);
    backdrop-filter: blur(28px) saturate(1.2);
    -webkit-backdrop-filter: blur(28px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 1rem;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .controls-dropdown {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.controls-dropdown.open {
    display: block;
}

.controls-dropdown h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 0.6rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.control-row label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.control-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    flex-shrink: 0;
}

.control-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.2s;
}

.control-toggle:checked {
    background: rgba(var(--section-accent), 0.3);
    border-color: rgba(var(--section-accent), 0.5);
}

.control-toggle:checked::after {
    left: 18px;
    background: rgb(var(--section-accent));
}

.control-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    outline: none;
    cursor: pointer;
}

.control-select:focus {
    border-color: var(--accent);
}

.perf-indicator {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* ============ FOCUS MANAGEMENT ============ */

h1[tabindex], h2[tabindex], h3[tabindex],
h1:focus, h2:focus, h3:focus,
[tabindex="-1"]:focus,
main:focus, .page-hero:focus, .hero:focus {
    outline: none;
}

/* ============ BLAZOR OVERRIDES ============ */

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

#blazor-error-ui {
    background: rgba(20, 20, 30, 0.95);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    display: none;
    font-size: 0.8rem;
    text-align: center;
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.05);
}

#blazor-error-ui .reload {
    color: var(--accent);
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
    font-size: 1rem;
}

/* ============ COOKIE CONSENT ============ */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    padding: 1rem 2rem;
    background: rgba(15, 15, 25, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(80, 80, 120, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-consent.dismissed {
    transform: translateY(100%);
    pointer-events: none;
}

[data-theme="light"] .cookie-consent {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(100, 105, 140, 0.25);
}

.cookie-consent p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 600px;
}

.cookie-consent a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-consent-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.cookie-consent-btn:hover {
    opacity: 0.85;
}

/* ============ SCROLL TO TOP ============ */

.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 90;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease, background 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

[data-theme="light"] .scroll-top-btn {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   (Apr 2026) The Logo Lab CSS that previously occupied this
   section was migrated out alongside its companion page when
   the playground was lifted into the sibling Neotheos.DevTools
   project — see Websites/staging.neotheos.com.dev-tools/.
   The styles now live only there, where the page is hosted, so
   the public staging bundle no longer carries dead rules.
   ============================================================ */

/* ============================================================
   Intro Overlay — Active Inference brand intro
   Mounted from <IntroOverlay /> on Components/Pages/Home.razor.
   Plays once per device on first visit (gated client-side).
   ============================================================ */
.neo-intro-overlay {
    position: fixed;
    inset: 0;
    /* Above everything else on the page (cookie toast, scroll button,
       blazor-error-ui all sit at lower stacking contexts). */
    z-index: 2147483000;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 600ms ease-out;
    pointer-events: auto;
    /* Default: hidden until JS decides we should play. */
}

/* Light-theme intro field: near-black instead of pure black so the
   handoff into a light page feels like a soft veil lifting rather than
   a flashbulb. The mark itself is engineered for a dark field — pure
   white kills the gold-on-blue contrast — so even in light mode the
   intro stage stays dark. */
[data-theme="light"] .neo-intro-overlay {
    background: #1a1a1f;
}

.neo-intro-overlay.is-active {
    display: flex;
}

.neo-intro-overlay.is-fading-out {
    opacity: 0;
    pointer-events: none;
}

.neo-intro-stage {
    width: min(82vmin, 720px);
    height: min(82vmin, 720px);
    position: relative;
    will-change: transform, opacity;
    transform-origin: center center;
}

.neo-intro-canvas {
    width: 100%;
    height: 100%;
    position: relative;
}

/* (Apr 2026) The .neo-intro-skip button was retired. The intro is short
   enough (~3s) that by the time the eye finds a corner button the animation
   is already two-thirds done, so the visible button was solving a problem
   that didn't exist. The escape hatch still exists silently — any keypress,
   click, scroll, or touch after 250ms triggers the same skip code path that
   the button used to fire. See Components/Layout/IntroOverlay.razor →
   attachAnyInteractionListener(). */

/* Lock body scroll while the intro is playing */
html.neo-intro-active,
body.neo-intro-active {
    overflow: hidden !important;
    height: 100%;
}

/* Suppress all competing chrome while the intro is on screen — cookie
   consent, scroll-to-top, error banner, etc. They reappear naturally
   the moment the overlay unmounts. */
body.neo-intro-active #cookie-consent,
body.neo-intro-active #scroll-top-btn,
body.neo-intro-active #blazor-error-ui {
    display: none !important;
}

/* Navbar brand mark — defaults to invisible on the homepage during the intro;
   revealed (instantly) when the FLIP handoff lands.
   On all other pages and for returning visitors, it's just visible. */
#brand-mark .brand-mark-svg {
    display: block;
    transition: filter 200ms ease-out;
}

/* When the intro is active on the homepage, hide the static navbar mark so
   only the flying canvas is visible. The is-revealed class fires on landing. */
body.neo-intro-active #brand-mark {
    visibility: hidden;
}

#brand-mark.is-revealed {
    visibility: visible !important;
    animation: neo-brand-pop 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes neo-brand-pop {
    0%   { transform: scale(0.92); opacity: 0; }
    60%  { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1.00); opacity: 1; }
}

/* Reduced-motion users: no pop, just instant reveal */
@media (prefers-reduced-motion: reduce) {
    #brand-mark.is-revealed {
        animation: none;
    }
    .neo-intro-overlay,
    .neo-intro-overlay.is-fading-out {
        transition: opacity 200ms linear;
    }
    .neo-intro-stage {
        transition: none !important;
    }
}

/* Light-theme intro: keep it dark — the brand mark is designed for dark field
   anyway, and the abrupt switch from dark intro to light page is part of the
   theatre. */
