/* ==========================================================================
   APEXEDIT — Design System & Component Styles
   Native macOS aesthetic • Frosted glass • Tactical Obsidian & Ghost Frost
   Pure vanilla CSS. Every token is calibrated for speed and legibility.
   ========================================================================== */

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Plus Jakarta Sans", system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
    background: var(--accent-primary);
    color: #000;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* === DESIGN TOKENS (DARK FIRST — OBSIDIAN TACTICAL) === */
:root,
html.dark {
    /* Brand Accents */
    --accent-primary:         #00F0FF;          /* Electric Cyan */
    --accent-primary-hover:   #33F3FF;
    --accent-primary-glow:    rgba(0, 240, 255, 0.28);
    --accent-secondary:       #B28CFF;          /* Radiant Lavender */
    --accent-amber:           #FFB800;          /* Solar Amber */
    --accent-emerald:         #00E599;          /* Emerald Success */
    --accent-crimson:         #FF453A;          /* macOS Red Alert */

    /* Surfaces & Glass */
    --bg-base:                #0A0C10;          /* Deep Obsidian */
    --bg-base-translucent:    rgba(10, 12, 16, 0.85);
    --surface-glass:          rgba(18, 24, 38, 0.68);
    --surface-glass-heavy:    rgba(14, 18, 28, 0.88);
    --surface-card:           rgba(22, 28, 44, 0.55);
    --surface-card-hover:     rgba(28, 36, 56, 0.75);
    --surface-input:          rgba(14, 18, 28, 0.65);
    --surface-pill:           rgba(255, 255, 255, 0.06);
    --surface-pill-active:    rgba(0, 240, 255, 0.12);

    /* Borders & Outlines */
    --border-subtle:          rgba(255, 255, 255, 0.08);
    --border-strong:          rgba(255, 255, 255, 0.16);
    --border-accent:          rgba(0, 240, 255, 0.45);
    --aura-glow:              0 0 35px rgba(0, 240, 255, 0.18);
    --glass-shadow:           0 20px 50px rgba(0, 0, 0, 0.5);

    /* Text */
    --text-primary:           #F8FAFC;
    --text-secondary:         #94A3B8;
    --text-muted:             #64748B;
    --text-accent:            #00F0FF;

    /* Buttons */
    --btn-primary-bg:         #FFFFFF;
    --btn-primary-text:       #0A0C10;
    --btn-primary-hover-bg:   #F1F5F9;
    --btn-secondary-bg:       rgba(255, 255, 255, 0.06);
    --btn-secondary-border:   rgba(255, 255, 255, 0.12);
    --btn-secondary-hover-bg: rgba(255, 255, 255, 0.12);

    /* Navbar */
    --nav-bg:                 rgba(10, 12, 16, 0.75);
    --nav-border:             rgba(255, 255, 255, 0.08);

    /* Graphical Text Logo Filter (White in Dark Mode) */
    --logo-filter:            none;
    --sim-logo-filter:        none;
    --cammio-filter:          invert(1) brightness(1.8);

    /* Editor Simulator (Obsidian Theme Defaults) */
    --sim-bg:                 #0A0C10;
    --sim-sidebar-bg:         #07080B;
    --sim-titlebar-bg:        rgba(14, 18, 28, 0.85);
    --sim-gutter-color:       #6B7394;
    --sim-line-active:        rgba(20, 26, 40, 0.8);
    --sim-telemetry-bg:       rgba(14, 18, 28, 0.9);
    --sim-telemetry-text:     #E2E8F0;
    --sim-text-main:          #E0E5FF;
    --sim-token-keyword:      #00F0FF;
    --sim-token-string:       #00E599;
    --sim-token-number:       #FFB800;
    --sim-token-comment:      #6B7394;
    --sim-token-func:         #FF6B6B;
    --sim-token-type:         #B28CFF;
}

/* === LIGHT MODE TOKENS (GHOST FROST) === */
html:not(.dark) {
    /* Brand Accents */
    --accent-primary:         #0071E3;          /* Apple System Blue */
    --accent-primary-hover:   #005BB5;
    --accent-primary-glow:    rgba(0, 113, 227, 0.25);
    --accent-secondary:       #6366F1;          /* Indigo */
    --accent-amber:           #D97706;          /* Deep Amber */
    --accent-emerald:         #059669;          /* Deep Emerald */
    --accent-crimson:         #DC2626;

    /* Surfaces & Glass */
    --bg-base:                #F4F7FB;          /* Crisp Alabaster */
    --bg-base-translucent:    rgba(244, 247, 251, 0.88);
    --surface-glass:          rgba(255, 255, 255, 0.72);
    --surface-glass-heavy:    rgba(255, 255, 255, 0.92);
    --surface-card:           rgba(255, 255, 255, 0.78);
    --surface-card-hover:     rgba(255, 255, 255, 0.95);
    --surface-input:          rgba(255, 255, 255, 0.9);
    --surface-pill:           rgba(0, 0, 0, 0.04);
    --surface-pill-active:    rgba(0, 113, 227, 0.1);

    /* Borders & Outlines */
    --border-subtle:          rgba(0, 0, 0, 0.08);
    --border-strong:          rgba(0, 0, 0, 0.16);
    --border-accent:          rgba(0, 113, 227, 0.4);
    --aura-glow:              0 0 35px rgba(0, 113, 227, 0.14);
    --glass-shadow:           0 20px 45px rgba(0, 0, 0, 0.07);

    /* Text */
    --text-primary:           #0F172A;          /* Deep Slate */
    --text-secondary:         #475569;
    --text-muted:             #94A3B8;
    --text-accent:            #0071E3;

    /* Buttons */
    --btn-primary-bg:         #0F172A;
    --btn-primary-text:       #FFFFFF;
    --btn-primary-hover-bg:   #1E293B;
    --btn-secondary-bg:       rgba(0, 0, 0, 0.04);
    --btn-secondary-border:   rgba(0, 0, 0, 0.08);
    --btn-secondary-hover-bg: rgba(0, 0, 0, 0.08);

    /* Navbar */
    --nav-bg:                 rgba(244, 247, 251, 0.75);
    --nav-border:             rgba(0, 0, 0, 0.06);

    /* Graphical Text Logo Filter (Black in Light Mode) */
    --logo-filter:            brightness(0);
    --sim-logo-filter:        brightness(0);
    --cammio-filter:          none;

    /* Editor Simulator (Ghost Frost Defaults) */
    --sim-bg:                 #FFFFFF;
    --sim-sidebar-bg:         #F8FAFC;
    --sim-titlebar-bg:        rgba(241, 245, 249, 0.95);
    --sim-gutter-color:       #94A3B8;
    --sim-line-active:        rgba(226, 232, 240, 0.6);
    --sim-telemetry-bg:       rgba(241, 245, 249, 0.95);
    --sim-telemetry-text:     #1E2430;
    --sim-text-main:          #1E293B;
    --sim-token-keyword:      #0071E3;
    --sim-token-string:       #059669;
    --sim-token-number:       #D97706;
    --sim-token-comment:      #94A3B8;
    --sim-token-func:         #DC2626;
    --sim-token-type:         #7C3AED;
}

/* === TYPOGRAPHY TOKENS === */
.font-mono {
    font-family: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, monospace;
}

/* === AMBIENT BACKGROUND GLOWS === */
.ambient-glow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    transition: opacity 0.5s ease;
}

html.dark .ambient-blob--1 {
    top: -10%;
    left: 20%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.22) 0%, rgba(178, 140, 255, 0.08) 50%, transparent 70%);
}

html.dark .ambient-blob--2 {
    bottom: 20%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(178, 140, 255, 0.16) 0%, rgba(0, 240, 255, 0.06) 50%, transparent 70%);
}

html:not(.dark) .ambient-blob--1 {
    top: -10%;
    left: 15%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.12) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 70%);
}

html:not(.dark) .ambient-blob--2 {
    bottom: 10%;
    right: -5%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(0, 113, 227, 0.04) 50%, transparent 70%);
}

/* === LAYOUT CONTAINERS === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.container--narrow {
    max-width: 840px;
}

.section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section--hero {
    padding-top: 140px;
    padding-bottom: 80px;
}

/* === GLASS PANELS === */
.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* === TYPOGRAPHIC & GRAPHICAL BRAND LOGO === */
.brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-wordmark:hover {
    opacity: 0.9;
}

.brand-graphical-logo {
    height: 15px;
    width: auto;
    object-fit: contain;
    filter: var(--logo-filter);
    transition: filter 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
    display: block;
}

.brand-wordmark:hover .brand-graphical-logo {
    transform: scale(1.02);
}

.brand-icon-pill {
    width: 24px;
    height: 24px;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* === NAVIGATION === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 14px 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--nav-border);
}

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

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 6px 4px;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-pill);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--surface-card-hover);
    border-color: var(--border-strong);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

html.dark .theme-icon--moon { display: none; }
html.dark .theme-icon--sun { display: block; }
html:not(.dark) .theme-icon--sun { display: none; }
html:not(.dark) .theme-icon--moon { display: block; }

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: var(--surface-pill);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

/* === BUTTONS & KEYCAPS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    position: relative;
    cursor: pointer;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid transparent;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background: var(--btn-primary-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--btn-secondary-border);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover-bg);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 7px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: 12px;
}

.keycap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "SF Mono", Menlo, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--surface-pill);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* === HERO SECTION === */
.hero {
    text-align: center;
}

.hero-inner {
    max-width: 880px;
    margin: 0 auto;
    padding-top: 54px;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 100px;
    background: var(--surface-pill);
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
}

.hero-pill-badge .badge-icon {
    width: 16px;
    height: 16px;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
}

.heading-hero {
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 22px;
}

.heading-hero .accent-gradient {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 36px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.hero-badge svg {
    width: 15px;
    height: 15px;
    color: var(--accent-primary);
}

/* === SECTION HEADINGS === */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    font-family: "SF Mono", Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.heading-section {
    font-size: clamp(2rem, 3.8vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   INTERACTIVE EDITOR PLAYGROUND (SIMULATOR)
   Full macOS Window Frame Mockup with Live Theme & Tab Switching
   ========================================================================== */
.playground-section {
    margin-top: 20px;
}

.playground-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 12px 18px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
}

.playground-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.playground-hint svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.theme-morpher-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-pill);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.morpher-btn {
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.morpher-btn .theme-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.morpher-btn.is-active {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Simulated macOS Window */
.editor-window-mockup {
    border-radius: 14px;
    overflow: hidden;
    background: var(--sim-bg);
    border: 1px solid var(--border-strong);
    box-shadow: var(--glass-shadow), var(--aura-glow);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    text-align: left;
}

/* Window Titlebar & Frosted Tab Bar */
.window-titlebar {
    display: flex;
    align-items: center;
    background: var(--sim-titlebar-bg);
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    user-select: none;
}

.window-traffic-lights {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 18px;
}

.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.traffic-light--close { background: #FF5F56; border: 1px solid #E0443E; }
.traffic-light--min   { background: #FFBD2E; border: 1px solid #DEA123; }
.traffic-light--zoom  { background: #27C93F; border: 1px solid #1AAB29; }

.window-tabs-container {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
}

.editor-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.editor-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.editor-tab.is-active {
    color: var(--text-primary);
    background: var(--surface-glass);
    border: 1px solid var(--sim-token-keyword);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 4px;
    color: var(--text-muted);
    opacity: 0.45;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.editor-tab:hover .tab-close,
.editor-tab.is-active .tab-close {
    opacity: 0.85;
}

.tab-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

html:not(.dark) .tab-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.window-omni-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--surface-pill);
    border: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.window-omni-trigger:hover {
    background: var(--surface-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

/* Sticky Scope Bar */
.window-sticky-scope {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 18px;
    background: var(--sim-titlebar-bg);
    border-bottom: 1px solid var(--border-subtle);
    font-family: "SF Mono", Menlo, monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.scope-badge {
    color: var(--sim-token-type);
    font-weight: 600;
}

/* Editor Workspace Canvas (Line Numbers + Code Body + Minimap) */
.editor-canvas-mockup {
    display: flex;
    min-height: 380px;
    font-family: "SF Mono", "JetBrains Mono", Menlo, monospace;
    font-size: 0.86rem;
    line-height: 1.68;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.canvas-gutter {
    width: 52px;
    padding: 16px 0;
    text-align: right;
    color: var(--sim-gutter-color);
    user-select: none;
    border-right: 1px solid var(--border-subtle);
    background: var(--sim-sidebar-bg);
    font-size: 0.8rem;
}

.gutter-line {
    padding-right: 12px;
    position: relative;
}

.gutter-line.git-added::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-emerald);
}

.gutter-line.git-modified::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
}

.canvas-code-pane {
    flex: 1;
    padding: 16px 20px;
    color: var(--sim-text-main);
    overflow-x: auto;
    position: relative;
    text-align: left;
}

.pane-content {
    text-align: left;
}

.canvas-line {
    display: block;
    white-space: pre;
    text-align: left;
    transition: background 0.15s ease;
}

.canvas-line.active-line {
    background: var(--sim-line-active);
    margin: 0 -20px;
    padding: 0 20px;
    border-radius: 4px;
    text-align: left;
}

/* Syntax Token Colors (Dynamically styled via custom properties) */
.token-keyword  { color: var(--sim-token-keyword); font-weight: 600; }
.token-string   { color: var(--sim-token-string); }
.token-number   { color: var(--sim-token-number); }
.token-comment  { color: var(--sim-token-comment); font-style: italic; }
.token-func     { color: var(--sim-token-func); }
.token-type     { color: var(--sim-token-type); }

/* Simulated Minimap */
.canvas-minimap {
    width: 80px;
    border-left: 1px solid var(--border-subtle);
    background: var(--sim-sidebar-bg);
    padding: 14px 6px;
    opacity: 0.65;
    user-select: none;
}

.minimap-trace {
    height: 4px;
    border-radius: 2px;
    background: var(--sim-gutter-color);
    margin-bottom: 3px;
}

.minimap-trace.trace-kw  { background: var(--sim-token-keyword); width: 45%; }
.minimap-trace.trace-str { background: var(--sim-token-string); width: 75%; }
.minimap-trace.trace-fn  { background: var(--sim-token-func); width: 60%; }
.minimap-trace.trace-cm  { background: var(--sim-token-comment); width: 50%; opacity: 0.5; }

/* Dynamic Smart-Contrast Telemetry Bar */
.window-telemetry-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 18px;
    background: var(--sim-telemetry-bg);
    border-top: 1px solid var(--sim-token-keyword);
    font-family: "SF Mono", Menlo, monospace;
    font-size: 0.74rem;
    color: var(--sim-telemetry-text);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.telemetry-left, .telemetry-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.telemetry-apexedit-logo {
    height: 10px;
    width: auto;
    object-fit: contain;
    filter: var(--sim-logo-filter, var(--logo-filter));
    opacity: 0.7;
    transition: opacity 0.2s ease, filter 0.3s ease;
    display: block;
    user-select: none;
    pointer-events: none;
}

.window-telemetry-bar:hover .telemetry-apexedit-logo {
    opacity: 0.95;
}

.telemetry-pill {
    display: flex;
    align-items: center;
    gap: 6px;
}

.telemetry-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald);
}

/* OmniBar Interactive Overlay inside Playground */
.playground-omnibar-box {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 520px;
    background: var(--surface-glass-heavy);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 10;
    padding: 12px;
    display: none;
    animation: omniDrop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.playground-omnibar-box.is-visible {
    display: block;
}

@keyframes omniDrop {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.omnibar-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--surface-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 10px;
}

.omnibar-input-wrap svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.omnibar-input {
    border: none;
    background: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.omnibar-prompts-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    padding-left: 4px;
}

.omnibar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.omni-chip {
    padding: 5px 10px;
    border-radius: 6px;
    background: var(--surface-pill);
    border: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
}

.omni-chip:hover {
    background: var(--surface-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

/* ==========================================================================
   PERSONAS SECTION
   Tailored for Developers, Writers & Power Minimalists
   ========================================================================== */
.personas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.persona-card {
    background: var(--surface-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.persona-card:hover {
    transform: translateY(-4px);
    background: var(--surface-card-hover);
    border-color: var(--border-strong);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.persona-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-pill-active);
    border: 1px solid var(--border-accent);
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.persona-icon-box svg {
    width: 24px;
    height: 24px;
}

.persona-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.persona-card p {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.persona-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   FEATURE DEEP DIVES (ALTERNATING SPLIT BLOCKS)
   ========================================================================== */
.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 90px;
}

.feature-block:last-child {
    margin-bottom: 0;
}

.feature-block--reverse {
    grid-template-columns: 1fr 1fr;
}

.feature-block--reverse .feature-block-content {
    order: 1;
}

.feature-block--reverse .feature-block-graphic {
    order: 2;
}

.heading-feature {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-top: 10px;
    margin-bottom: 16px;
}

.feature-body {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.feature-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.feature-detail-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--accent-primary);
    margin-top: 2px;
}

.feature-detail-text {
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.feature-detail-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Feature Graphic Cards */
.feature-card-showcase {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.showcase-inner {
    border-radius: 10px;
    overflow: hidden;
    background: var(--sim-bg);
    border: 1px solid var(--border-subtle);
    padding: 16px;
}

/* ==========================================================================
   SECONDARY FEATURES GRID
   ========================================================================== */
.secondary-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.feature-compact-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 24px;
    transition: all 0.25s ease;
}

.feature-compact-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    background: var(--surface-card-hover);
}

.compact-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-pill);
    border: 1px solid var(--border-subtle);
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.compact-icon svg {
    width: 20px;
    height: 20px;
}

.feature-compact-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

/* ==========================================================================
   PRIVACY & LOCAL SOVEREIGNTY SECTION
   ========================================================================== */
.privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.privacy-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px 26px;
    text-align: left;
}

.privacy-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-pill);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-emerald);
    margin-bottom: 20px;
}

.privacy-card-icon svg {
    width: 22px;
    height: 22px;
}

.privacy-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.privacy-card p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.privacy-cta-wrap {
    text-align: center;
}

/* ==========================================================================
   SUPPORT & FEEDBACK SECTION
   ========================================================================== */
.support-form-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 36px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--glass-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.entity-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--surface-pill);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.entity-toggle {
    cursor: pointer;
}

.entity-toggle input {
    display: none;
}

.entity-toggle-label {
    text-align: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.entity-toggle input:checked + .entity-toggle-label {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.corporate-fields {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

.corporate-fields.is-visible {
    max-height: 300px;
    opacity: 1;
    margin-bottom: 20px;
}

.btn-transmit {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-transmit:hover {
    background: var(--btn-primary-hover-bg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.form-msg-box {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    display: none;
}

.form-msg-box.is-success {
    display: block;
    background: rgba(0, 229, 153, 0.15);
    border: 1px solid var(--accent-emerald);
    color: var(--accent-emerald);
}

.form-msg-box.is-error {
    display: block;
    background: rgba(255, 69, 58, 0.15);
    border: 1px solid #ff453a;
    color: #ff453a;
}

.form-legal {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

.form-legal a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

.form-legal a:hover {
    color: var(--accent-blue);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 50px 0 30px;
    background: var(--bg-base-translucent);
    backdrop-filter: blur(16px);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.footer-brand-link:hover {
    opacity: 0.9;
}

.footer-icon-pill {
    width: 16px;
    height: 16px;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.footer-graphical-logo {
    height: 10.5px;
    width: auto;
    object-fit: contain;
    filter: var(--logo-filter);
    transition: filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.footer-dot-separator {
    color: var(--border-strong);
    font-size: 0.85rem;
    user-select: none;
    line-height: 1;
}

.footer-cammio-link {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.footer-cammio-logo {
    height: 15px;
    width: auto;
    object-fit: contain;
    filter: var(--cammio-filter);
    opacity: 0.8;
    transition: opacity 0.2s ease, filter 0.3s ease;
    display: block;
}

.footer-cammio-logo:hover {
    opacity: 1;
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1;
}

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

.footer-link {
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.footer-link:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   MOBILE MENU DRAWER
   ========================================================================== */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface-glass-heavy);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-left: 1px solid var(--border-subtle);
    padding: 30px 24px;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-drawer.is-open {
    transform: translateX(0);
}

.mobile-menu-close {
    align-self: flex-end;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.mobile-nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
    .personas-grid {
        grid-template-columns: 1fr;
    }

    .secondary-features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-block {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .feature-block--reverse .feature-block-content {
        order: 2;
    }

    .feature-block--reverse .feature-block-graphic {
        order: 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

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

    .secondary-features-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .playground-controls-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .theme-morpher-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .canvas-minimap {
        display: none;
    }
}
