/* ============================================
   a6c.quest  —  Styles
   Swiss International Style × After-Hours Urban
   Palette: burgundy / cream / copper / charcoal
   Fonts:   Bebas Neue / DM Sans / IBM Plex Mono
   ============================================ */

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

:root {
    --oxblood:       #4A0E1B;  /* left panel primary */
    --wine-shadow:   #2E0A12;  /* depth */
    --garnet:        #8B2D3A;  /* accent, rules, mono */
    --copper:        #C47A5A;  /* signal, hover, accent */
    --parchment:     #F5EDE0;  /* cream base */
    --antique-cream: #E8D5B7;  /* warm highlight */
    --charcoal:      #1C1A19;  /* dark base */
    --concrete:      #9A9590;  /* neutral */

    --split-left:  38.2fr;
    --split-right: 61.8fr;

    --ease-swiss: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-soft:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--charcoal);
}

body {
    margin: 0;
    padding: 0;
    background: var(--charcoal);
    color: var(--parchment);
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

a {
    color: var(--copper);
    text-decoration: none;
}

::selection {
    background: var(--garnet);
    color: var(--parchment);
}

/* ---------- Top Bar ---------- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    z-index: 200;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    background: rgba(28, 26, 25, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--garnet);
}

.top-bar-identifier {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--parchment);
    text-transform: uppercase;
    transition: letter-spacing 0.3s var(--ease-soft), color 0.3s ease;
}

.top-bar-identifier:hover {
    letter-spacing: 0.5em;
    color: var(--copper);
}

.top-bar-rule {
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--garnet) 20%,
        var(--garnet) 80%,
        transparent 100%);
    opacity: 0.55;
}

.top-bar-meta {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--concrete);
    text-transform: uppercase;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.top-bar-meta .meta-key {
    color: var(--garnet);
}

.top-bar-meta .meta-val {
    color: var(--parchment);
    font-variant-numeric: tabular-nums;
}

/* ---------- Split Screen Root ---------- */
.split-screen {
    display: grid;
    grid-template-columns: var(--split-left) var(--split-right);
    min-height: 100vh;
    width: 100%;
    padding-top: 44px; /* clear top bar */
}

/* ---------- Left Panel (The Index) ---------- */
.left-panel {
    position: sticky;
    top: 44px;
    height: calc(100vh - 44px);
    background: var(--oxblood);
    overflow: hidden;
    z-index: 10;
    border-right: 1px solid rgba(245, 237, 224, 0.08);
}

/* Subtle breathing gradient behind content */
.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 10%, rgba(196, 122, 90, 0.12), transparent 55%),
        radial-gradient(ellipse at 10% 90%, rgba(46, 10, 18, 0.8), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Ghost numeral — 200px Bebas in corner */
.ghost-numeral {
    position: absolute;
    top: 36px;
    right: 36px;
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 200px;
    font-weight: 400;
    line-height: 0.85;
    letter-spacing: 0.04em;
    color: rgba(245, 237, 224, 0.08);
    pointer-events: none;
    z-index: 1;
    transition: transform 1.2s var(--ease-swiss), color 1.2s var(--ease-swiss), opacity 1.2s var(--ease-swiss);
    font-variant-numeric: tabular-nums;
    will-change: transform;
}

.ghost-numeral.pulse {
    color: rgba(245, 237, 224, 0.15);
    transform: scale(2);
}

.left-panel-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 56px 48px 48px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--parchment) transparent;
}

.left-panel-inner::-webkit-scrollbar {
    width: 3px;
}
.left-panel-inner::-webkit-scrollbar-track {
    background: rgba(154, 149, 144, 0.1);
}
.left-panel-inner::-webkit-scrollbar-thumb {
    background: var(--parchment);
    opacity: 0.4;
}

/* ---------- Left Panel Hero (crossfade slides) ---------- */
.index-hero {
    position: relative;
    flex: 0 0 auto;
    min-height: 48vh;
    margin-bottom: 40px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease-out, transform 0.6s var(--ease-soft);
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.section-number {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--garnet);
    text-transform: uppercase;
}

.section-number .num-mark {
    color: var(--copper);
}

.section-number .num-text {
    color: var(--garnet);
}

.hero-title {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(72px, 9vw, 160px);
    line-height: 0.92;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--parchment);
    margin-bottom: 28px;
}

.hero-accent {
    color: var(--copper);
}

.hero-subtitle {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--antique-cream);
    margin-bottom: 20px;
}

.hero-caption {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--concrete);
    max-width: 34ch;
}

/* ---------- Index Navigation ---------- */
.index-nav {
    margin-top: auto;
    padding-top: 28px;
    border-top: 1px solid rgba(139, 45, 58, 0.35);
}

.index-nav-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.nav-head-label {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    letter-spacing: 0.28em;
    color: var(--garnet);
    text-transform: uppercase;
}

.nav-head-rule {
    flex: 1;
    height: 1px;
    background: rgba(139, 45, 58, 0.35);
}

.index-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 13px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(196, 122, 90, 0.1);
    transition: padding 0.4s var(--ease-soft),
                background 0.4s var(--ease-soft);
    position: relative;
}

.index-item:hover {
    padding-left: 8px;
}

.index-item.active {
    background: linear-gradient(90deg, rgba(196,122,90,0.08), transparent 70%);
}

.index-item.active .index-number {
    color: var(--copper);
    opacity: 1;
}

.index-item.active .index-label {
    color: var(--parchment);
    opacity: 1;
}

.index-item.active .index-line {
    width: 56px;
    background: var(--copper);
    opacity: 1;
}

.index-number {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--concrete);
    opacity: 0.55;
    transition: color 0.4s ease, opacity 0.4s ease;
    min-width: 24px;
    font-variant-numeric: tabular-nums;
}

.index-label {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--antique-cream);
    opacity: 0.55;
    transition: color 0.4s ease, opacity 0.4s ease;
}

.index-line {
    height: 1px;
    width: 24px;
    background: var(--concrete);
    opacity: 0.35;
    transition: width 0.6s var(--ease-soft),
                background 0.4s ease,
                opacity 0.4s ease;
}

/* ---------- Left Panel Footer ---------- */
.left-panel-footer {
    margin-top: 32px;
}

.footer-rule {
    height: 1px;
    background: linear-gradient(90deg, var(--garnet), transparent 70%);
    opacity: 0.5;
    margin-bottom: 12px;
}

.footer-triad {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--concrete);
    text-transform: uppercase;
    opacity: 0.6;
}

.footer-triad .triad-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--copper);
    opacity: 0.7;
}

/* ---------- Vertical text ---------- */
.vertical-text {
    position: absolute;
    bottom: 48px;
    right: 16px;
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--concrete);
    opacity: 0.35;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    z-index: 3;
}

/* ---------- Scroll Progress (inside left panel) ---------- */
.scroll-progress {
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: rgba(154, 149, 144, 0.1);
    z-index: 4;
}

.scroll-progress-bar {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--copper), var(--garnet));
    transition: height 0.12s ease-out;
}

/* ---------- Right Panel (The Canvas) ---------- */
.right-panel {
    position: relative;
    z-index: 5;
    background: var(--charcoal);
}

/* Architectural grid at 3% opacity */
.architectural-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    pointer-events: none;
    z-index: 1;
    opacity: 0.03;
}

.architectural-grid .ag-col {
    border-right: 0.5px solid var(--parchment);
}

/* ---------- Content Section ---------- */
.content-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 80px 0;
}

.content-section.dark-section {
    background: var(--charcoal);
}

/* ---------- Gradient-Mesh Backgrounds (slow breathing) ---------- */
.mesh-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: meshBreathe 30s ease-in-out infinite alternate;
    will-change: background-position, transform;
}

@keyframes meshBreathe {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 25% 15%; }
    100% { background-position: 15% 25%; }
}

/* Section 1 — volcanic (oxblood → garnet → copper) */
.mesh-volcanic {
    background:
        radial-gradient(ellipse 70% 60% at 18% 24%, rgba(196,122,90,0.55) 0%, transparent 60%),
        radial-gradient(ellipse 65% 55% at 82% 18%, rgba(139,45,58,0.75) 0%, transparent 60%),
        radial-gradient(ellipse 60% 55% at 62% 82%, rgba(196,122,90,0.45) 0%, transparent 55%),
        radial-gradient(ellipse 70% 65% at 38% 62%, rgba(46,10,18,0.75) 0%, transparent 65%),
        radial-gradient(ellipse 55% 50% at 92% 72%, rgba(196,122,90,0.3) 0%, transparent 50%),
        linear-gradient(135deg, #4A0E1B 0%, #2E0A12 100%);
}

/* Section 2 — nocturnal (charcoal → wine shadow → parchment 5%) */
.mesh-nocturnal {
    background:
        radial-gradient(ellipse 65% 60% at 28% 72%, rgba(46,10,18,0.8) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 72% 28%, rgba(28,26,25,0.9) 0%, transparent 60%),
        radial-gradient(ellipse 55% 50% at 50% 50%, rgba(74,14,27,0.55) 0%, transparent 60%),
        radial-gradient(ellipse 50% 45% at 88% 86%, rgba(139,45,58,0.4) 0%, transparent 50%),
        radial-gradient(ellipse 45% 40% at 14% 18%, rgba(245,237,224,0.06) 0%, transparent 55%),
        linear-gradient(180deg, #1C1A19 0%, #2E0A12 100%);
}

/* Section 3 — mineral / dawn stone */
.mesh-mineral {
    background:
        radial-gradient(ellipse 60% 55% at 24% 38%, rgba(154,149,144,0.35) 0%, transparent 55%),
        radial-gradient(ellipse 60% 55% at 76% 62%, rgba(232,213,183,0.28) 0%, transparent 55%),
        radial-gradient(ellipse 65% 60% at 50% 18%, rgba(74,14,27,0.75) 0%, transparent 60%),
        radial-gradient(ellipse 55% 50% at 60% 92%, rgba(154,149,144,0.22) 0%, transparent 50%),
        radial-gradient(ellipse 65% 60% at 8% 82%, rgba(46,10,18,0.75) 0%, transparent 60%),
        linear-gradient(225deg, #1C1A19 0%, #2E0A12 50%, #4A0E1B 100%);
}

/* Section 4 — warm copper (oxblood in glow) */
.mesh-warm {
    background:
        radial-gradient(ellipse 58% 52% at 38% 28%, rgba(232,213,183,0.4) 0%, transparent 55%),
        radial-gradient(ellipse 60% 55% at 72% 70%, rgba(196,122,90,0.55) 0%, transparent 55%),
        radial-gradient(ellipse 65% 60% at 18% 82%, rgba(74,14,27,0.75) 0%, transparent 60%),
        radial-gradient(ellipse 50% 48% at 82% 22%, rgba(245,237,224,0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(139,45,58,0.55) 0%, transparent 60%),
        linear-gradient(45deg, #2E0A12 0%, #4A0E1B 50%, #1C1A19 100%);
}

/* Section 5 — dawn (parchment → antique cream → copper) */
.mesh-dawn {
    background:
        radial-gradient(ellipse 60% 55% at 52% 28%, rgba(245,237,224,0.35) 0%, transparent 55%),
        radial-gradient(ellipse 55% 52% at 28% 60%, rgba(196,122,90,0.5) 0%, transparent 55%),
        radial-gradient(ellipse 50% 48% at 80% 52%, rgba(232,213,183,0.45) 0%, transparent 55%),
        radial-gradient(ellipse 65% 60% at 18% 88%, rgba(74,14,27,0.7) 0%, transparent 60%),
        radial-gradient(ellipse 60% 55% at 62% 80%, rgba(139,45,58,0.35) 0%, transparent 55%),
        linear-gradient(0deg, #2E0A12 0%, #4A0E1B 40%, #1C1A19 100%);
}

/* ---------- Section Content ---------- */
.section-content {
    position: relative;
    z-index: 2;
    padding: 72px 80px;
    max-width: 680px;
    margin-left: 4vw;
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-soft);
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Corner Brackets ---------- */
.corner-bracket {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s var(--ease-soft);
    transition-delay: 0.2s;
    pointer-events: none;
}

.section-content.visible .corner-bracket {
    opacity: 1;
    transform: translateY(0);
}

.section-content.visible .corner-bracket.br {
    transition-delay: 0.35s;
}

.corner-bracket.tl {
    top: 36px;
    left: 40px;
    border-top: 1px solid var(--garnet);
    border-left: 1px solid var(--garnet);
}

.corner-bracket.br {
    bottom: 36px;
    right: 40px;
    border-bottom: 1px solid var(--garnet);
    border-right: 1px solid var(--garnet);
}

/* ---------- Section meta (mono caption row) ---------- */
.section-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
}

.meta-tag {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--garnet);
    text-transform: uppercase;
}

.meta-divider {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 11px;
    color: var(--copper);
    opacity: 0.55;
}

/* ---------- Section heading ---------- */
.section-heading {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(56px, 6vw, 104px);
    line-height: 0.94;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--parchment);
    margin-bottom: 36px;
}

.dark-section .section-heading {
    color: var(--antique-cream);
}

/* ---------- Section body ---------- */
.section-body {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: var(--antique-cream);
    margin-bottom: 22px;
    max-width: 56ch;
    opacity: 0.92;
}

.dark-section .section-body {
    color: var(--parchment);
    opacity: 0.85;
}

/* ---------- Callout ---------- */
.section-callout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 36px 0 24px;
    padding: 20px 24px;
    background: rgba(28, 26, 25, 0.45);
    border-left: 2px solid var(--copper);
}

.callout-index {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--copper);
    flex-shrink: 0;
    padding-top: 2px;
}

.callout-text {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
    color: var(--parchment);
}

/* ---------- Section detail (labeled rule) ---------- */
.section-detail {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 44px;
}

.detail-line {
    width: 48px;
    height: 1px;
    background: var(--copper);
    opacity: 0.65;
}

.detail-text {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--concrete);
    text-transform: uppercase;
}

/* ---------- Skyline Strip Divider ---------- */
.skyline-strip {
    position: relative;
    z-index: 2;
    height: 80px;
    background: var(--charcoal);
    border-top: 1px solid rgba(139, 45, 58, 0.35);
    border-bottom: 1px solid rgba(139, 45, 58, 0.35);
    overflow: hidden;
}

.skyline-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- Process Grid ---------- */
.process-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: 36px;
    background: rgba(196, 122, 90, 0.22);
    border: 1px solid rgba(196, 122, 90, 0.22);
}

.process-item {
    background: rgba(28, 26, 25, 0.68);
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.4s ease;
    position: relative;
}

.process-item:hover {
    background: rgba(74, 14, 27, 0.55);
}

.process-number {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--copper);
    transition: transform 0.3s ease;
}

.process-label {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 22px;
    letter-spacing: 0.06em;
    color: var(--parchment);
    text-transform: uppercase;
    line-height: 1;
}

.process-line {
    width: 32px;
    height: 1px;
    background: var(--garnet);
    opacity: 0.55;
}

.process-desc {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.55;
    color: var(--concrete);
}

/* ---------- Blockquote ---------- */
.section-quote {
    position: relative;
    margin: 40px 0;
    padding: 28px 0 28px 36px;
    border-left: 2px solid var(--copper);
}

.quote-mark {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 80px;
    color: var(--copper);
    opacity: 0.35;
    position: absolute;
    top: -6px;
    left: 32px;
    line-height: 1;
}

.section-quote p {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 500;
    font-style: italic;
    line-height: 1.55;
    color: var(--parchment);
    opacity: 0.95;
    max-width: 48ch;
}

.quote-attribution {
    display: block;
    margin-top: 14px;
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    font-style: normal;
    letter-spacing: 0.22em;
    color: var(--garnet);
    text-transform: uppercase;
    opacity: 0.85;
}

/* ---------- Structure Showcase ---------- */
.structure-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 40px 0 16px;
}

.structure-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cell-inner {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid rgba(196, 122, 90, 0.25);
    padding: 18px;
    background: rgba(28, 26, 25, 0.55);
    transition: border-color 0.4s ease, background 0.4s ease;
    position: relative;
}

.cell-inner::before,
.cell-inner::after {
    content: '';
    position: absolute;
    width: 8px; height: 8px;
    border: 1px solid var(--garnet);
    opacity: 0.6;
}

.cell-inner::before {
    top: -1px; left: -1px;
    border-right: 0; border-bottom: 0;
}

.cell-inner::after {
    bottom: -1px; right: -1px;
    border-left: 0; border-top: 0;
}

.cell-inner:hover {
    border-color: var(--copper);
    background: rgba(74, 14, 27, 0.3);
}

.cell-svg {
    width: 100%;
    height: 100%;
    transition: transform 0.5s var(--ease-soft);
}

.cell-label {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--parchment);
    text-transform: uppercase;
}

.cell-id {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--garnet);
    text-transform: uppercase;
}

/* ---------- Signal CTA ---------- */
.signal-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    margin-top: 44px;
}

.cta-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--copper), transparent);
    opacity: 0.45;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 18px 0;
    transition: gap 0.4s var(--ease-soft);
    align-self: flex-start;
}

.cta-link:hover {
    gap: 28px;
}

.cta-text {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: 0.12em;
    color: var(--copper);
    transition: color 0.3s ease, background-size 0.4s ease;
    background-image: linear-gradient(var(--parchment), var(--parchment));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
}

.cta-link:hover .cta-text {
    color: var(--parchment);
    background-size: 100% 2px;
}

.cta-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.4s var(--ease-soft);
}

.cta-link:hover .cta-arrow {
    transform: translateX(10px);
}

/* ---------- Contact Grid ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 40px;
    background: rgba(196, 122, 90, 0.2);
    border: 1px solid rgba(196, 122, 90, 0.2);
}

.contact-cell {
    background: rgba(28, 26, 25, 0.6);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-key {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--garnet);
    text-transform: uppercase;
}

.contact-val {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--parchment);
}

/* ---------- Footer meta ---------- */
.footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid rgba(154, 149, 144, 0.18);
}

.footer-item {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    color: var(--concrete);
    opacity: 0.7;
}

.footer-divider {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 10px;
    color: var(--copper);
    opacity: 0.55;
}

/* ---------- Collapse Moments ---------- */
.collapse-moment {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 40px;
    z-index: 3;
}

.collapse-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 55% at 50% 50%, rgba(74,14,27,0.85) 0%, transparent 70%),
        radial-gradient(ellipse 80% 70% at 20% 30%, rgba(196,122,90,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 80% 70% at 80% 70%, rgba(139,45,58,0.25) 0%, transparent 60%),
        linear-gradient(180deg, #1C1A19 0%, #2E0A12 100%);
    z-index: 0;
}

.collapse-backdrop.dark {
    background:
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(28,26,25,0.9) 0%, transparent 70%),
        radial-gradient(ellipse 80% 70% at 30% 40%, rgba(46,10,18,0.65) 0%, transparent 65%),
        radial-gradient(ellipse 80% 70% at 70% 60%, rgba(74,14,27,0.5) 0%, transparent 65%),
        linear-gradient(135deg, #1C1A19 0%, #2E0A12 50%, #4A0E1B 100%);
}

.collapse-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 560px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s var(--ease-soft);
}

.collapse-moment.active .collapse-content {
    opacity: 1;
    transform: translateY(0);
}

.collapse-caption {
    font-family: 'IBM Plex Mono', 'IBM Plex', monospace;
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--copper);
    text-transform: uppercase;
    margin-top: 32px;
    margin-bottom: 14px;
}

.collapse-heading {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 3vw, 44px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--parchment);
    margin-bottom: 18px;
}

.collapse-text {
    font-family: 'DM Sans', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--antique-cream);
    opacity: 0.85;
}

/* ---------- Signal Pulse (Lottie-style CSS) ---------- */
.signal-pulse {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.signal-pulse .pulse-ring {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.5px solid var(--garnet);
    opacity: 0;
    transform: scale(0.5);
}

.signal-pulse.playing .pulse-ring {
    animation: signalPulse 2s var(--ease-swiss) infinite;
}

.signal-pulse .pulse-ring:nth-child(2) { animation-delay: 0.5s; border-color: var(--copper); }
.signal-pulse .pulse-ring:nth-child(3) { animation-delay: 1.0s; border-color: var(--antique-cream); }
.signal-pulse .pulse-ring:nth-child(4) { animation-delay: 1.5s; border-color: var(--garnet); }

.signal-pulse .pulse-core {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--copper);
    box-shadow: 0 0 24px rgba(196,122,90,0.6), 0 0 12px rgba(196,122,90,0.8);
}

.signal-pulse.playing .pulse-core {
    animation: corePulse 2s ease-in-out infinite;
}

@keyframes signalPulse {
    0%   { opacity: 0.9; transform: scale(0.5); }
    70%  { opacity: 0.15; }
    100% { opacity: 0; transform: scale(3.6); }
}

@keyframes corePulse {
    0%, 100% { transform: scale(1);   box-shadow: 0 0 24px rgba(196,122,90,0.6); }
    50%      { transform: scale(1.25); box-shadow: 0 0 36px rgba(196,122,90,0.9); }
}

/* ---------- Urban Grid Build (SVG stroke-dash draw-in) ---------- */
.urban-grid {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    position: relative;
}

.urban-grid .ug-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.urban-grid .ug-h, .urban-grid .ug-v {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.urban-grid .ug-b {
    opacity: 0;
    transform-origin: center;
    transform: scale(0.2);
}

.collapse-moment.active .urban-grid .ug-h {
    animation: ugLine 0.8s var(--ease-swiss) forwards;
}

.collapse-moment.active .urban-grid .ug-v {
    animation: ugLine 0.8s var(--ease-swiss) forwards;
    animation-delay: 0.8s;
}

.collapse-moment.active .urban-grid .ug-b {
    animation: ugBlock 0.4s var(--ease-soft) forwards;
}

.collapse-moment.active .urban-grid .ug-b:nth-child(1) { animation-delay: 1.6s; }
.collapse-moment.active .urban-grid .ug-b:nth-child(2) { animation-delay: 1.75s; }
.collapse-moment.active .urban-grid .ug-b:nth-child(3) { animation-delay: 1.9s; }
.collapse-moment.active .urban-grid .ug-b:nth-child(4) { animation-delay: 2.05s; }
.collapse-moment.active .urban-grid .ug-b:nth-child(5) { animation-delay: 2.2s; }
.collapse-moment.active .urban-grid .ug-b:nth-child(6) { animation-delay: 2.35s; }
.collapse-moment.active .urban-grid .ug-b:nth-child(7) { animation-delay: 2.5s; }
.collapse-moment.active .urban-grid .ug-b:nth-child(8) { animation-delay: 2.65s; }

@keyframes ugLine {
    from { stroke-dashoffset: 200; }
    to   { stroke-dashoffset: 0; }
}

@keyframes ugBlock {
    from { opacity: 0; transform: scale(0.2); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- Data Flow (braided paths) ---------- */
.data-flow {
    width: min(520px, 90%);
    margin: 0 auto;
}

.data-flow .df-svg {
    width: 100%;
    height: auto;
    display: block;
}

.data-flow .df-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    opacity: 0.85;
}

.collapse-moment.active .data-flow .df-path {
    animation: dfFlow 3s linear infinite;
}

.collapse-moment.active .data-flow .df-path:nth-child(1) { animation-delay: 0s; }
.collapse-moment.active .data-flow .df-path:nth-child(2) { animation-delay: 0.5s; }
.collapse-moment.active .data-flow .df-path:nth-child(3) { animation-delay: 1.0s; }
.collapse-moment.active .data-flow .df-path:nth-child(4) { animation-delay: 1.5s; }

@keyframes dfFlow {
    0%   { stroke-dashoffset: 600; }
    60%  { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -600; }
}

/* ---------- Grid Overlay (toggle via 'g' key) ---------- */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.grid-overlay.visible {
    opacity: 1;
}

.grid-line {
    position: absolute;
    background: rgba(196, 122, 90, 0.25);
}

.grid-line-v {
    width: 1px;
    height: 100%;
    top: 0;
}

.grid-line-h {
    width: 100%;
    height: 1px;
    left: 0;
}

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .split-screen {
        grid-template-columns: 1fr;
    }

    .left-panel {
        position: relative;
        top: 0;
        height: auto;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(245,237,224,0.12);
    }

    .left-panel-inner {
        padding: 44px 32px 32px;
        overflow: visible;
    }

    .ghost-numeral {
        font-size: 140px;
        top: 20px;
        right: 20px;
    }

    .index-hero {
        min-height: auto;
        margin-bottom: 28px;
    }

    .hero-slide {
        position: relative;
        inset: auto;
        opacity: 0;
        display: none;
    }

    .hero-slide.active {
        display: block;
    }

    .vertical-text {
        display: none;
    }

    .scroll-progress {
        display: none;
    }

    .section-content {
        padding: 64px 40px;
        margin-left: 0;
    }

    .structure-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .corner-bracket.tl { top: 24px; left: 24px; }
    .corner-bracket.br { bottom: 24px; right: 24px; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }

    .top-bar { height: 40px; gap: 12px; padding: 0 16px; }
    .split-screen { padding-top: 40px; }
    .top-bar-meta { font-size: 10px; }

    .ghost-numeral { font-size: 96px; }

    .left-panel-inner { padding: 32px 24px; }

    .hero-title { font-size: clamp(56px, 14vw, 84px); }

    .section-heading {
        font-size: clamp(40px, 11vw, 64px);
    }

    .section-content {
        padding: 48px 24px;
    }

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

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

    .structure-showcase {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-meta {
        gap: 10px;
    }

    .collapse-heading {
        font-size: 26px;
    }

    .signal-pulse { width: 180px; height: 180px; }
    .urban-grid { width: 220px; height: 220px; }
}
