/* ==========================================================================
   concengine.net — Marble Neomorphism / Horizontal Scroll
   Colors: #F4F0E8 #9EAF96 #8C7B6B #FEFCF8 #3B3228 #D5CCBF #EAE2D4 #C4956A
   Fonts: Cormorant Garamond (display), Lora (body), Inter (UI)
   ========================================================================== */

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

html {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    color: #3B3228;
    background-color: #F4F0E8;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* ---------- Marble Veining Background ---------- */
.marble-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 700vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ---------- Progress Navigation ---------- */
#progress-nav {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.progress-track {
    width: 200px;
    height: 3px;
    background: #D5CCBF;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #C4956A;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.panel-dots {
    display: flex;
    gap: 16px;
    align-items: center;
}

.panel-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #D5CCBF;
    background: #F4F0E8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 8px rgba(59, 50, 40, 0.1),
                -4px -4px 8px rgba(254, 252, 248, 0.7);
}

.panel-dot span {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 500;
    color: #8C7B6B;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.panel-dot.active {
    border-color: #C4956A;
    background: #EAE2D4;
    box-shadow: inset 2px 2px 4px rgba(59, 50, 40, 0.12),
                inset -2px -2px 4px rgba(254, 252, 248, 0.5);
}

.panel-dot.active span {
    color: #C4956A;
    font-weight: 600;
}

.panel-dot:hover {
    border-color: #C4956A;
}

/* ---------- Scroll Container ---------- */
#scroll-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
}

#panels-track {
    display: flex;
    flex-direction: row;
    width: 700vw;
    height: 100vh;
    will-change: transform;
    transition: transform 0.05s linear;
}

/* ---------- Panel Base ---------- */
.panel {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.panel-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 80px;
    position: relative;
}

/* ---------- Neomorphic Card ---------- */
.neo-card {
    background: #F4F0E8;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 8px 8px 20px rgba(59, 50, 40, 0.12),
                -8px -8px 20px rgba(254, 252, 248, 0.8);
    position: relative;
    border: 1px solid rgba(213, 204, 191, 0.4);
}

/* ---------- Brass Accents ---------- */
.brass-accent {
    height: 2px;
    background: linear-gradient(90deg, transparent, #C4956A, transparent);
    border-radius: 1px;
}

.brass-line-top {
    margin-bottom: 28px;
}

.brass-line-bottom {
    margin-top: 28px;
}

.brass-dial {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #C4956A, #8C7B6B);
    box-shadow: 1px 1px 3px rgba(59, 50, 40, 0.2);
}

/* ---------- Typography ---------- */
.hero-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8C7B6B;
    margin-bottom: 12px;
}

.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(42px, 6vw, 88px);
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: #3B3228;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(16px, 1.8vw, 22px);
    color: #8C7B6B;
    line-height: 1.5;
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(28px, 4vw, 56px);
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: #3B3228;
    margin-bottom: 20px;
}

.section-body {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.7;
    color: #8C7B6B;
    max-width: 520px;
}

.card-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8C7B6B;
}

/* ---------- Panel 1: Hero ---------- */
.panel-hero .panel-inner {
    justify-content: center;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
}

.hero-card {
    max-width: 640px;
    padding: 48px 56px;
}

/* Thread visualization lines */
.thread-viz {
    position: relative;
    width: 360px;
    height: 80px;
}

.thread-line {
    position: absolute;
    height: 2px;
    border-radius: 1px;
    animation: threadPulse 3s ease-in-out infinite;
}

.hero-threads .thread-1 {
    top: 10px; left: 0; width: 100%;
    background: linear-gradient(90deg, transparent, #9EAF96, transparent);
    animation-delay: 0s;
}

.hero-threads .thread-2 {
    top: 30px; left: 10%; width: 80%;
    background: linear-gradient(90deg, transparent, #C4956A, transparent);
    animation-delay: 0.5s;
}

.hero-threads .thread-3 {
    top: 50px; left: 5%; width: 90%;
    background: linear-gradient(90deg, transparent, #8C7B6B, transparent);
    animation-delay: 1s;
}

.hero-threads .thread-4 {
    top: 70px; left: 15%; width: 70%;
    background: linear-gradient(90deg, transparent, #D5CCBF, transparent);
    animation-delay: 1.5s;
}

@keyframes threadPulse {
    0%, 100% { opacity: 0.3; transform: scaleX(0.7); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: hintFade 2.5s ease-in-out infinite;
}

.scroll-hint-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8C7B6B;
}

.scroll-arrow {
    color: #C4956A;
    animation: arrowSlide 2.5s ease-in-out infinite;
}

@keyframes hintFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes arrowSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* ---------- Panel Content Layouts ---------- */
.panel-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.panel-content-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1000px;
}

.content-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- Panel 2: Thread States ---------- */
.info-card {
    padding: 32px 36px;
    min-width: 340px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #EAE2D4;
}

.thread-states {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.state-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.state-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.state-running {
    background: #9EAF96;
    box-shadow: 0 0 8px rgba(158, 175, 150, 0.5);
    animation: stateGlow 2s ease-in-out infinite;
}

.state-waiting {
    background: #C4956A;
    box-shadow: 0 0 8px rgba(196, 149, 106, 0.4);
}

.state-blocked {
    background: #8C7B6B;
    box-shadow: 0 0 6px rgba(140, 123, 107, 0.3);
}

.state-complete {
    background: #D5CCBF;
}

@keyframes stateGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(158, 175, 150, 0.3); }
    50% { box-shadow: 0 0 14px rgba(158, 175, 150, 0.7); }
}

.state-name {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #3B3228;
    min-width: 80px;
}

.state-value {
    font-family: 'Lora', Georgia, serif;
    font-size: 13px;
    color: #8C7B6B;
    font-style: italic;
}

/* ---------- Panel 3: Engine Diagram ---------- */
.engine-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 40px;
}

.engine-layer {
    padding: 24px 36px;
    min-width: 320px;
    text-align: center;
}

.layer-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8C7B6B;
    margin-bottom: 16px;
}

.layer-threads {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.mini-thread {
    width: 48px;
    height: 6px;
    border-radius: 3px;
    background: #9EAF96;
    animation: miniThreadPulse 2s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes miniThreadPulse {
    0%, 100% { opacity: 0.4; transform: scaleX(0.6); }
    50% { opacity: 1; transform: scaleX(1); }
}

.engine-connector {
    display: flex;
    justify-content: center;
    padding: 4px 0;
}

/* ---------- Panel 4: Timelines ---------- */
.timeline-viz {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 480px;
    position: relative;
}

.timeline-track {
    display: flex;
    align-items: center;
    gap: 16px;
}

.track-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #8C7B6B;
    min-width: 72px;
    text-align: right;
    letter-spacing: 0.04em;
}

.track-bar {
    flex: 1;
    height: 20px;
    background: #EAE2D4;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 2px 2px 4px rgba(59, 50, 40, 0.08),
                inset -2px -2px 4px rgba(254, 252, 248, 0.5);
}

.track-segment {
    position: absolute;
    top: 3px;
    height: 14px;
    border-radius: 3px;
    transition: opacity 0.3s ease;
}

.track-segment.seg-active {
    background: #9EAF96;
    box-shadow: 0 1px 4px rgba(158, 175, 150, 0.3);
}

.track-segment.seg-waiting {
    background: #C4956A;
    opacity: 0.5;
    box-shadow: 0 1px 4px rgba(196, 149, 106, 0.2);
}

.convergence-line {
    position: absolute;
    right: 48px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, #C4956A 20%, #C4956A 80%, transparent);
    opacity: 0.6;
}

/* ---------- Panel 5: Primitives ---------- */
.primitives-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: 40px;
    max-width: 960px;
}

.primitive-card {
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.primitive-card:hover {
    transform: translateY(-4px);
    box-shadow: 12px 12px 28px rgba(59, 50, 40, 0.15),
                -12px -12px 28px rgba(254, 252, 248, 0.9);
}

.primitive-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.primitive-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 22px;
    color: #3B3228;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.primitive-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 13px;
    line-height: 1.6;
    color: #8C7B6B;
}

/* ---------- Panel 6: Metrics ---------- */
.metrics-card {
    padding: 36px 40px;
    min-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.metric-row {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    align-items: center;
    gap: 16px;
}

.metric-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8C7B6B;
    text-align: right;
}

.metric-bar-track {
    height: 8px;
    background: #EAE2D4;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 1px 1px 3px rgba(59, 50, 40, 0.08);
}

.metric-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--bar-color, #9EAF96);
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.metric-value {
    font-family: 'Lora', Georgia, serif;
    font-size: 14px;
    color: #3B3228;
    font-weight: 500;
}

/* ---------- Panel 7: CTA ---------- */
.cta-card {
    max-width: 600px;
    padding: 52px 60px;
    text-align: center;
}

.cta-card .section-body {
    max-width: 100%;
    margin: 0 auto 32px;
}

.cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-primary {
    background: #3B3228;
    color: #F4F0E8;
    box-shadow: 4px 4px 12px rgba(59, 50, 40, 0.25),
                -2px -2px 8px rgba(254, 252, 248, 0.3);
}

.cta-primary:hover {
    background: #C4956A;
    transform: translateY(-2px);
    box-shadow: 6px 6px 16px rgba(59, 50, 40, 0.3),
                -3px -3px 10px rgba(254, 252, 248, 0.4);
}

.cta-secondary {
    background: #F4F0E8;
    color: #3B3228;
    border: 1.5px solid #D5CCBF;
    box-shadow: 4px 4px 10px rgba(59, 50, 40, 0.08),
                -4px -4px 10px rgba(254, 252, 248, 0.6);
}

.cta-secondary:hover {
    border-color: #C4956A;
    color: #C4956A;
    transform: translateY(-2px);
}

.cta-threads {
    width: 280px;
    height: 60px;
    margin-top: 40px;
}

.cta-threads .thread-1 {
    top: 10px; left: 0; width: 100%;
    background: linear-gradient(90deg, transparent, #9EAF96, transparent);
    animation-delay: 0.2s;
}

.cta-threads .thread-2 {
    top: 30px; left: 15%; width: 70%;
    background: linear-gradient(90deg, transparent, #C4956A, transparent);
    animation-delay: 0.7s;
}

.cta-threads .thread-3 {
    top: 50px; left: 8%; width: 84%;
    background: linear-gradient(90deg, transparent, #D5CCBF, transparent);
    animation-delay: 1.2s;
}

/* ---------- Panel Enter Animations ---------- */
.panel .section-title,
.panel .section-body,
.panel .neo-card,
.panel .thread-viz,
.panel .engine-diagram,
.panel .timeline-viz,
.panel .primitives-grid,
.panel .cta-actions {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.panel.visible .section-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.panel.visible .section-body {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.panel.visible .neo-card {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.panel.visible .thread-viz,
.panel.visible .engine-diagram,
.panel.visible .timeline-viz,
.panel.visible .primitives-grid {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.panel.visible .cta-actions {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

/* Hero is always visible initially */
.panel-hero .hero-content,
.panel-hero .neo-card,
.panel-hero .thread-viz,
.panel-hero .scroll-hint {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .panel-inner {
        padding: 40px 32px;
    }

    .panel-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .primitives-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .metric-row {
        grid-template-columns: 80px 1fr 80px;
        gap: 10px;
    }

    .metrics-card {
        min-width: auto;
        width: 100%;
    }

    .info-card {
        min-width: auto;
    }

    .hero-card {
        padding: 32px 28px;
    }
}
