:root {
    --color-orange: #d38b29;
    --color-dark-gray: #777769;
    --color-light-gray: #bcbbae;
    --color-bg: #11100f; 
    --color-text: #f4f4f0;
    
    --font-heading: "hoefler-text", 'Hoefler Text', 'Hoefler', Georgia, serif;
    --font-body: 'Inter', sans-serif;
}

body.light-theme {
    --color-bg: #f4f4f0;
    --color-text: #11100f;
    --color-light-gray: #4a4a42;
    --color-dark-gray: #777769;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.8s ease, color 0.8s ease;
}

/* Base Loader */
.loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #000;
    z-index: 9999;
    transition: opacity 1s ease, background-color 0.8s ease;
}
body.light-theme .loader { background-color: #fff; }
.loader-dot {
    display: block; width: 20px; height: 20px; background-color: var(--color-orange);
    border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}

/* Navigation */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 2rem 4rem;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-logo {
    height: 315px;
    max-width: 100%;
    object-fit: contain;
    opacity: 0;
    /* Hardware acceleration */
    transform: translateZ(0);
    transition: filter 0.8s ease;
}

/* Theme Toggle (Bottom Right) */
.theme-toggle {
    position: fixed;
    bottom: 2.5rem;
    right: 4rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--color-dark-gray);
    color: var(--color-light-gray);
    cursor: pointer;
    z-index: 102;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.theme-toggle:hover {
    color: var(--color-orange);
    border-color: var(--color-orange);
}



@keyframes fadeIn { to { opacity: 1; } }

/* Sections */
.panel {
    min-height: 100vh;
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-color: transparent;
}

.panel:not(.hero) {
    min-height: 60vh;
    padding: 2rem 4rem;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Typography */
h1, h2, h3, .large-text {
    font-family: var(--font-heading);
    font-weight: 400;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--color-light-gray);
    transition: color 0.8s ease;
}

.hero-sub {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--color-dark-gray);
    font-family: var(--font-heading);
    font-style: italic;
    transition: color 0.8s ease;
}

.section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-orange);
    margin-bottom: 3rem;
    font-family: var(--font-body);
    font-weight: 700;
}

.large-text {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.3;
    color: var(--color-light-gray);
    transition: color 0.8s ease;
}

.medium-text {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.4;
    color: var(--color-light-gray);
    transition: color 0.8s ease;
}

.highlight-text {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--color-orange);
    margin-bottom: 2rem;
}

.body-text {
    font-size: 1.25rem;
    max-width: 700px;
    color: var(--color-dark-gray);
    font-family: var(--font-heading);
    font-style: italic;
    transition: color 0.8s ease;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--color-dark-gray);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.line {
    width: 1px;
    height: 60px;
    background-color: var(--color-dark-gray);
    position: relative;
    overflow: hidden;
}

.line::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-orange);
    transform: translateY(-100%);
    animation: scrollLine 4s infinite ease-in-out;
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    50% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}



/* Utilities */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
}
.split-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

/* -------------------------------------
   FEATURE STYLES (Controlled by Body Classes)
--------------------------------------- */



/* 2. Center Focus Text */
.center-focus { transition: opacity 0.5s ease; }
body.feature-focus .center-focus { opacity: 0.3; }
body.feature-focus .center-focus.in-focus { opacity: 1; }

/* 3. Progress Bar */
.reading-progress { display: none; position: fixed; bottom: 0; left: 0; height: 4px; background-color: var(--color-orange); width: 0%; z-index: 10000; }
body.feature-progress-bar .reading-progress { display: block; }

/* -------------------------------------
   SWITCHBOARD PANEL
--------------------------------------- */
.demo-menu {
    position: fixed;
    top: 50%; left: 1.5rem; transform: translateY(-50%);
    background: rgba(17, 16, 15, 0.9);
    border: 1px solid var(--color-dark-gray);
    padding: 1.5rem; border-radius: 12px; z-index: 1000;
    backdrop-filter: blur(10px);
    display: flex; flex-direction: column; gap: 1rem;
    width: 240px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: background 0.8s ease, border-color 0.8s ease;
}
body.light-theme .demo-menu {
    background: rgba(244, 244, 240, 0.9);
    border-color: #dcdccb;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.demo-menu-header {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--color-light-gray); text-align: center; font-weight: 700;
}
.demo-divider {
    border: 0; height: 1px; background: var(--color-dark-gray); opacity: 0.3;
}
.trigger-btn {
    background: transparent; border: 1px solid var(--color-orange); color: var(--color-orange);
    padding: 0.75rem; text-align: center; font-family: var(--font-body); font-size: 0.8rem; font-weight: 700;
    cursor: pointer; transition: all 0.2s; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}
.trigger-btn:hover { background: rgba(211, 139, 41, 0.1); color: var(--color-orange); }

/* Switch Styles */
.switch-row {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; font-family: var(--font-body); font-size: 0.8rem; color: var(--color-light-gray);
}
.switch-row input { display: none; }
.slider {
    position: relative; width: 36px; height: 20px; background-color: var(--color-dark-gray);
    border-radius: 20px; transition: .4s;
}
.slider:before {
    position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px;
    background-color: white; border-radius: 50%; transition: .4s;
}
input:checked + .slider { background-color: var(--color-orange); }
input:checked + .slider:before { transform: translateX(16px); }

/* Mobile Optimization */
@media (max-width: 768px) {
    .navbar { padding: 1rem; }
    .nav-logo { height: 187px; }
    .panel { padding: 4rem 1.5rem; }
    h1 { font-size: clamp(2.5rem, 8vw, 4rem); }
    .theme-toggle { right: 1.5rem; bottom: 1.5rem; }
    .demo-menu { left: -100%; /* Hide demo menu on mobile for now */ }
}
