/* ==========================================================================
   bable.pro - Monochrome Marble & Skeuomorphic Material Design
   ========================================================================== */

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

:root {
    /* Palette - Monochrome Marble */
    --obsidian-base: #0E0E0E;
    --slate-shadow: #1C1A19;
    --quarry-dark: #2B2826;
    --polished-graphite: #4A4543;
    --brushed-pewter: #6B6560;
    --etched-gray: #787070;
    --limestone: #A8A0A0;
    --marble-vein: #C8C0B8;
    --travertine: #D4CCC4;
    --carrara-white: #F5F0EB;
    --pure-specular: #FFFFFF;

    /* Typography sizes */
    --display-size: clamp(56px, 8vw, 96px);
    --heading-size: clamp(24px, 3.5vw, 36px);
    --body-size: clamp(16px, 1.2vw, 18px);
    --mono-size: clamp(12px, 1vw, 14px);

    /* Specular tracking */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--slate-shadow);
    color: var(--travertine);
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 400;
    font-size: var(--body-size);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---------- Plotter Canvas ---------- */
#plotter-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    perspective: 1200px;
}

.section__content {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 2;
}

.section__marble-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 0;
    opacity: 0.08;
}

.section__marble-bg[data-filter="1"] {
    background: var(--carrara-white);
    filter: url(#marble-filter-1);
}

.section__marble-bg[data-filter="2"] {
    background: var(--marble-vein);
    filter: url(#marble-filter-2);
}

.section__marble-bg[data-filter="3"] {
    background: var(--brushed-pewter);
    filter: url(#marble-filter-3);
}

/* Section backgrounds */
.section--surface {
    background-color: var(--slate-shadow);
}

.section--workshop {
    background-color: var(--quarry-dark);
}

.section--quarry {
    background-color: var(--slate-shadow);
}

.section--strata {
    background-color: var(--obsidian-base);
}

/* ---------- Typography ---------- */
.display-title {
    font-family: 'Anybody', sans-serif;
    font-size: var(--display-size);
    font-weight: 700;
    font-stretch: 125%;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--carrara-white);
    text-shadow: 1px 1px 0px #1A1A1A, -1px -1px 0px #3D3D3D;
    line-height: 1.05;
    margin-bottom: 0.3em;
}

.display-subtitle {
    font-family: 'DM Serif Display', serif;
    font-size: var(--heading-size);
    font-weight: 400;
    color: var(--marble-vein);
    letter-spacing: 0.02em;
}

.section-heading {
    font-family: 'DM Serif Display', serif;
    font-size: var(--heading-size);
    font-weight: 400;
    color: var(--marble-vein);
    margin-bottom: 0.8em;
}

.section-heading--mono {
    font-family: 'Fragment Mono', monospace;
    font-size: clamp(20px, 2.5vw, 32px);
    color: var(--etched-gray);
    letter-spacing: 0.06em;
}

.body-text {
    font-family: 'Instrument Sans', sans-serif;
    font-size: var(--body-size);
    font-weight: 400;
    color: var(--limestone);
    line-height: 1.65;
    max-width: 520px;
}

.body-text--emphasis {
    color: var(--travertine);
    font-weight: 500;
}

.body-text--mono {
    font-family: 'Fragment Mono', monospace;
    font-size: var(--mono-size);
    color: var(--etched-gray);
    line-height: 1.8;
}

.mono-readout {
    font-family: 'Fragment Mono', monospace;
    font-size: var(--mono-size);
    color: var(--etched-gray);
    letter-spacing: 0.08em;
    display: block;
    margin-top: 0.5em;
}

.mono-readout--lg {
    font-size: clamp(18px, 2vw, 24px);
    color: var(--brushed-pewter);
    margin-bottom: 0.6em;
}

.mono-readout--dim {
    color: var(--polished-graphite);
}

.label-engraved {
    font-family: 'Anybody', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brushed-pewter);
    text-shadow: 1px 1px 0px rgba(245, 240, 235, 0.15), -1px -1px 0px rgba(0, 0, 0, 0.5);
    display: block;
    margin-bottom: 0.5em;
}

.engraved-note {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(14px, 1.5vw, 20px);
    color: var(--brushed-pewter);
    text-shadow: 1px 1px 0px rgba(245, 240, 235, 0.15), -1px -1px 0px rgba(0, 0, 0, 0.5);
    display: block;
}

.engraved-note--final {
    font-family: 'Anybody', sans-serif;
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---------- Panels ---------- */
.panel {
    position: absolute;
    border-radius: 8px;
    padding: clamp(24px, 3vw, 48px);
    transform: rotate(var(--rotate, 0deg));
    left: calc(50% + var(--offset-x, 0px));
    top: calc(50% + var(--offset-y, 0px));
    translate: -50% -50%;
}

.panel--primary {
    width: clamp(340px, 65vw, 900px);
    z-index: 3;
}

.panel--secondary {
    width: clamp(240px, 38vw, 520px);
    z-index: 4;
}

.panel--overlap {
    width: clamp(280px, 42vw, 580px);
    z-index: 5;
}

/* Marble panel */
.panel--marble,
.panel--marble-heavy {
    background: linear-gradient(
        145deg,
        var(--carrara-white) 0%,
        #E8E2DA 30%,
        var(--travertine) 60%,
        var(--marble-vein) 100%
    );
    border: 3px solid var(--brushed-pewter);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(245, 240, 235, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    color: var(--slate-shadow);
}

.panel--marble .display-title,
.panel--marble-heavy .section-heading {
    color: var(--quarry-dark);
    text-shadow: 1px 1px 0px rgba(245, 240, 235, 0.6), -1px -1px 0px rgba(0, 0, 0, 0.15);
}

.panel--marble .display-subtitle {
    color: var(--polished-graphite);
}

.panel--marble .body-text,
.panel--marble-heavy .body-text {
    color: var(--polished-graphite);
}

.panel--marble-heavy {
    background: linear-gradient(
        135deg,
        var(--travertine) 0%,
        var(--marble-vein) 40%,
        var(--limestone) 70%,
        var(--brushed-pewter) 100%
    );
}

/* Marble texture overlay */
.panel__marble-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    opacity: 0.12;
    mix-blend-mode: multiply;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            35deg,
            transparent,
            transparent 40px,
            rgba(107, 101, 96, 0.15) 40px,
            rgba(107, 101, 96, 0.15) 41px
        ),
        repeating-linear-gradient(
            55deg,
            transparent,
            transparent 80px,
            rgba(200, 192, 184, 0.1) 80px,
            rgba(200, 192, 184, 0.1) 81px
        );
}

.panel__marble-texture--heavy {
    opacity: 0.25;
    background:
        repeating-linear-gradient(
            30deg,
            transparent,
            transparent 20px,
            rgba(107, 101, 96, 0.25) 20px,
            rgba(107, 101, 96, 0.25) 22px
        ),
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 50px,
            rgba(200, 192, 184, 0.2) 50px,
            rgba(200, 192, 184, 0.2) 52px
        );
}

/* Rough panel (workshop) */
.panel--rough {
    background: var(--quarry-dark);
    border: 2px solid var(--polished-graphite);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(107, 101, 96, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* Metal panel */
.panel--metal {
    background: var(--polished-graphite);
    border: 2px solid var(--brushed-pewter);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(200, 192, 184, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.panel__brushed-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(74, 69, 67, 0.3) 0px,
        rgba(107, 101, 96, 0.2) 1px,
        rgba(74, 69, 67, 0.3) 2px
    );
    opacity: 0.6;
}

/* ---------- Phillips-Head Screws ---------- */
.panel__screw {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--brushed-pewter), var(--polished-graphite) 60%, var(--quarry-dark));
    box-shadow:
        inset 0 1px 2px rgba(200, 192, 184, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.4);
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.panel__screw::before,
.panel__screw::after {
    content: '';
    position: absolute;
    background: var(--quarry-dark);
}

/* Cross pattern */
.panel__screw::before {
    width: 8px;
    height: 1.5px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.panel__screw::after {
    width: 1.5px;
    height: 8px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.panel__screw--tl { top: 8px; left: 8px; }
.panel__screw--tr { top: 8px; right: 8px; }
.panel__screw--bl { bottom: 8px; left: 8px; }
.panel__screw--br { bottom: 8px; right: 8px; }

.panel__screw--sm {
    width: 9px;
    height: 9px;
}

.panel__screw--sm::before {
    width: 6px;
    height: 1px;
}

.panel__screw--sm::after {
    width: 1px;
    height: 6px;
}

.panel__screw.screw-rotated {
    transform: rotate(15deg);
}

/* ---------- Marble Spheres ---------- */
.marble-sphere {
    position: absolute;
    border-radius: 50%;
    left: var(--sphere-x, 50vw);
    top: var(--sphere-y, 50vh);
    translate: -50% -50%;
    z-index: 4;
}

.marble-sphere--lg {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 35% 30%,
        var(--carrara-white) 0%,
        var(--travertine) 25%,
        var(--marble-vein) 50%,
        var(--brushed-pewter) 75%,
        var(--polished-graphite) 100%
    );
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset -4px -4px 12px rgba(0, 0, 0, 0.3),
        inset 2px 2px 8px rgba(245, 240, 235, 0.4);
    animation: sphere-rotate 20s linear infinite;
}

.marble-sphere--md {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 38% 32%,
        var(--travertine) 0%,
        var(--marble-vein) 30%,
        var(--brushed-pewter) 65%,
        var(--polished-graphite) 100%
    );
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset -3px -3px 8px rgba(0, 0, 0, 0.25),
        inset 1px 1px 6px rgba(245, 240, 235, 0.3);
    animation: sphere-rotate 15s linear infinite;
}

.marble-sphere--sm {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle at 35% 30%,
        var(--marble-vein) 0%,
        var(--brushed-pewter) 40%,
        var(--polished-graphite) 80%,
        var(--quarry-dark) 100%
    );
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.35),
        inset -2px -2px 6px rgba(0, 0, 0, 0.2);
    animation: sphere-rotate 12s linear infinite reverse;
}

.marble-sphere--obsidian {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle at 35% 30%,
        var(--polished-graphite) 0%,
        var(--quarry-dark) 30%,
        var(--slate-shadow) 60%,
        var(--obsidian-base) 100%
    );
    box-shadow:
        0 16px 60px rgba(0, 0, 0, 0.7),
        inset -6px -6px 20px rgba(0, 0, 0, 0.5),
        inset 3px 3px 12px rgba(107, 101, 96, 0.2);
    animation: sphere-rotate 30s linear infinite;
}

@keyframes sphere-rotate {
    0% {
        background-position: 0% 0%;
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ---------- Accent Objects (Knobs) ---------- */
.accent-object {
    position: absolute;
    left: var(--accent-x, 50vw);
    top: var(--accent-y, 50vh);
    translate: -50% -50%;
    z-index: 5;
}

.accent-object--knob {
    width: 80px;
    text-align: center;
}

.knob__dial {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 6px;
    background: radial-gradient(circle at 40% 35%,
        var(--brushed-pewter),
        var(--polished-graphite) 50%,
        var(--quarry-dark) 90%
    );
    border: 2px solid var(--brushed-pewter);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(200, 192, 184, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.knob__dial:hover {
    transform: rotate(15deg);
}

.knob__indicator {
    position: absolute;
    width: 3px;
    height: 10px;
    background: var(--carrara-white);
    border-radius: 1px;
    top: calc(50% - 22px);
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.accent-object--knob .knob__indicator {
    top: 10px;
    left: calc(50% - 1.5px);
    transform: none;
}

.knob__label {
    font-family: 'Fragment Mono', monospace;
    font-size: 10px;
    color: var(--etched-gray);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ---------- Control Panel ---------- */
.control-panel {
    position: absolute;
    left: calc(50% + var(--offset-x, 0px));
    top: calc(50% + var(--offset-y, 0px));
    translate: -50% -50%;
    transform: rotate(var(--rotate, 0deg));
    z-index: 5;
}

.control-panel__frame {
    position: relative;
    background: var(--polished-graphite);
    border: 2px solid var(--brushed-pewter);
    border-radius: 8px;
    padding: 20px;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(200, 192, 184, 0.1);
    background-image: repeating-linear-gradient(
        0deg,
        rgba(74, 69, 67, 0.3) 0px,
        rgba(107, 101, 96, 0.2) 1px,
        rgba(74, 69, 67, 0.3) 2px
    );
}

.control-panel__recessed {
    background: var(--obsidian-base);
    border-radius: 4px;
    padding: clamp(16px, 2vw, 28px);
    box-shadow:
        inset 2px 2px 6px rgba(0, 0, 0, 0.8),
        inset -1px -1px 3px rgba(200, 192, 184, 0.1);
}

/* ---------- Toggle Switches ---------- */
.toggle-row {
    display: flex;
    gap: clamp(16px, 2vw, 28px);
    margin-bottom: 16px;
}

.toggle-switch {
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.toggle-switch__label {
    font-family: 'Fragment Mono', monospace;
    font-size: 10px;
    color: var(--etched-gray);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 6px;
    text-shadow: 1px 1px 0px rgba(245, 240, 235, 0.08), -1px -1px 0px rgba(0, 0, 0, 0.4);
}

.toggle-switch__track {
    width: 36px;
    height: 18px;
    background: var(--quarry-dark);
    border-radius: 9px;
    margin: 0 auto;
    position: relative;
    border: 1px solid var(--polished-graphite);
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.6);
    transition: background-color 0.2s ease;
}

.toggle-switch__thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--limestone), var(--brushed-pewter));
    position: absolute;
    top: 1px;
    left: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: left 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch.active .toggle-switch__track {
    background: var(--polished-graphite);
}

.toggle-switch.active .toggle-switch__thumb {
    left: 19px;
}

.toggle-switch__indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--quarry-dark);
    margin: 8px auto 0;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.toggle-switch.active .toggle-switch__indicator {
    background: var(--marble-vein);
    box-shadow: 0 0 6px rgba(200, 192, 184, 0.4);
}

/* ---------- Indicator Lights ---------- */
.indicator-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.indicator-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--quarry-dark);
    border: 1px solid var(--polished-graphite);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.indicator-light--active {
    background: var(--marble-vein);
    box-shadow: 0 0 8px rgba(200, 192, 184, 0.3), inset 0 0 2px rgba(245, 240, 235, 0.4);
}

/* ---------- Decorative Elements ---------- */
.dentil-rule {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(200px, 40vw, 500px);
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--brushed-pewter) 0px,
        var(--brushed-pewter) 6px,
        transparent 6px,
        transparent 10px
    );
    opacity: 0.3;
    z-index: 2;
}

.ionic-divider {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 80px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--brushed-pewter) 20%,
        var(--brushed-pewter) 80%,
        transparent
    );
    opacity: 0.4;
    z-index: 2;
}

.ionic-divider::before,
.ionic-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    border: 1px solid var(--brushed-pewter);
    border-radius: 8px 8px 0 0;
    opacity: 0.5;
}

.ionic-divider::before {
    top: 0;
}

.ionic-divider::after {
    bottom: 0;
    border-radius: 0 0 8px 8px;
}

/* ---------- Geometric Overlay ---------- */
.geometric-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 6px;
}

.plotter-svg {
    width: 100%;
    height: 100%;
}

/* ---------- Strata Annotations ---------- */
.strata-annotation {
    position: absolute;
    left: var(--offset-x, 50vw);
    top: var(--offset-y, 50vh);
    z-index: 3;
}

.strata-annotation .mono-readout {
    margin-bottom: 4px;
}

/* ---------- Terminal Surface ---------- */
.terminal-surface {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.terminal-surface__edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--polished-graphite) 20%,
        var(--brushed-pewter) 50%,
        var(--polished-graphite) 80%,
        transparent
    );
}

.terminal-surface .engraved-note--final {
    margin-bottom: 4px;
}

/* ---------- Navigation Panel ---------- */
.nav-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
}

.nav-panel__frame {
    position: relative;
    background: var(--polished-graphite);
    border: 2px solid var(--brushed-pewter);
    border-radius: 8px;
    padding: 12px;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(200, 192, 184, 0.1);
    background-image: repeating-linear-gradient(
        0deg,
        rgba(74, 69, 67, 0.3) 0px,
        rgba(107, 101, 96, 0.2) 1px,
        rgba(74, 69, 67, 0.3) 2px
    );
}

.nav-panel__recessed {
    background: var(--obsidian-base);
    border-radius: 4px;
    padding: 10px 8px;
    box-shadow:
        inset 2px 2px 6px rgba(0, 0, 0, 0.8),
        inset -1px -1px 3px rgba(200, 192, 184, 0.1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(107, 101, 96, 0.15);
}

.nav-toggle__label {
    font-family: 'Fragment Mono', monospace;
    font-size: 10px;
    color: var(--etched-gray);
    letter-spacing: 0.1em;
    width: 28px;
    text-shadow: 1px 1px 0px rgba(245, 240, 235, 0.08), -1px -1px 0px rgba(0, 0, 0, 0.4);
}

.nav-toggle__switch {
    width: 28px;
    height: 14px;
    background: var(--quarry-dark);
    border-radius: 7px;
    position: relative;
    border: 1px solid var(--polished-graphite);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: background-color 0.2s ease;
}

.nav-toggle__thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--limestone), var(--brushed-pewter));
    position: absolute;
    top: 1px;
    left: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: left 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-toggle--active .nav-toggle__switch {
    background: var(--polished-graphite);
}

.nav-toggle--active .nav-toggle__thumb {
    left: 15px;
}

.nav-toggle--active .nav-toggle__label {
    color: var(--marble-vein);
}

/* Active button depression */
.nav-toggle:active {
    transform: translateY(2px);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ---------- Zoom-Focus Animation ---------- */
.zoom-target {
    opacity: 0.7;
    transform: rotate(var(--rotate, 0deg)) scale(0.92);
    filter: blur(3px);
    transition:
        opacity 1000ms cubic-bezier(0.16, 0.85, 0.45, 1),
        transform 1000ms cubic-bezier(0.16, 0.85, 0.45, 1),
        filter 1000ms cubic-bezier(0.16, 0.85, 0.45, 1);
}

.zoom-target.zoom-visible {
    opacity: 1;
    transform: rotate(var(--rotate, 0deg)) scale(1);
    filter: blur(0px);
}

/* Large panels animate slower (more mass) */
.panel--primary.zoom-target {
    transition-duration: 1200ms;
}

.panel--secondary.zoom-target,
.panel--overlap.zoom-target {
    transition-duration: 1000ms;
}

.marble-sphere.zoom-target,
.accent-object.zoom-target {
    transition-duration: 800ms;
}

/* ---------- Specular Highlight on Hover ---------- */
.panel--marble::after,
.panel--marble-heavy::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: radial-gradient(
        circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.08) 0%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel--marble:hover::after,
.panel--marble-heavy:hover::after {
    opacity: 1;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    .panel {
        position: relative;
        left: auto;
        top: auto;
        translate: none;
        transform: none;
        margin: 20px auto;
        width: 90vw !important;
    }

    .panel--primary,
    .panel--secondary,
    .panel--overlap {
        width: 90vw !important;
    }

    .section__content {
        height: auto;
        min-height: 100vh;
        padding: 60px 20px;
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .control-panel {
        position: relative;
        left: auto;
        top: auto;
        translate: none;
        transform: none;
        margin: 20px auto;
    }

    .marble-sphere,
    .accent-object {
        display: none;
    }

    .strata-annotation {
        position: relative;
        left: auto;
        top: auto;
        margin: 20px 0;
    }

    .nav-panel {
        bottom: 12px;
        right: 12px;
    }

    .zoom-target {
        transform: none;
    }

    .zoom-target.zoom-visible {
        transform: none;
    }

    .dentil-rule,
    .ionic-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .display-title {
        font-size: 40px;
    }

    .toggle-row {
        flex-direction: column;
        gap: 12px;
    }

    .control-panel__frame {
        padding: 12px;
    }
}
