/* ============================================================
   chika.bid — Memphis Scholarly Auction
   Colors: #F5C842, #1A1209, #2A1F0D, #6D4FB8, #F5F0E8,
           #3A8C82, #7A5C3A, #2C2416, #E8521A
   Fonts: Playfair Display, Space Mono, DM Mono, Lora, Inter
   ============================================================ */

/* --- Google Fonts (Google Fonts loaded via HTML link tag) ---------- */
/* Playfair Display" (Google Fonts) — display headings at 700, 900    */
/* Playfair+Display:wght@700,900 for section headings                  */
/* Space Mono" (Google Fonts) for structure annotations 12-14px        */
/* Space+Mono:wght@400` for mono structure                             */
/* Lora" (Google Fonts) — Lora:wght@400 body text                     */
/* Intersecting Geometric Rings** — Intersecting circles (200-400px    */
/* diameter rings). Interruption Panels:** Alpha** Beta** State:**      */
/* IntersectionObserver` active state tracking */

/* --- CSS Variables -------------------------------------- */
:root {
    --yellow: #F5C842;
    --ink: #1A1209;
    --dark-brown: #2A1F0D;
    --darkest-brown: #2C2416;
    --violet: #6D4FB8;
    --cream: #F5F0E8;
    --teal: #3A8C82;
    --warm-brown: #7A5C3A;
    --orange: #E8521A;

    --sidebar-width: 280px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;
    --font-dm: 'DM Mono', 'Courier New', monospace;
    --font-body: 'Lora', Georgia, serif;
    --font-ui: 'Inter', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR — Fixed Commentary Track
   ============================================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--dark-brown);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    border-right: 3px solid var(--yellow);
}

/* Sidebar Top: Domain Mark */
.sidebar-top {
    padding: 32px 24px 24px;
    border-bottom: 1px solid rgba(245, 200, 66, 0.2);
}

.sidebar-domain-mark {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 28px;
    color: var(--yellow);
    letter-spacing: -0.02em;
    line-height: 1;
}

.domain-dot {
    color: var(--orange);
}

.domain-tld {
    color: var(--cream);
    opacity: 0.7;
}

.sidebar-schema {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.schema-label {
    font-family: var(--font-dm);
    font-size: 9px;
    font-weight: 300;
    color: var(--warm-brown);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.schema-value {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--yellow);
    opacity: 0.6;
}

/* Sidebar Index Navigation */
.sidebar-index {
    flex: 1;
    padding: 28px 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-index::-webkit-scrollbar {
    display: none;
}

.index-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.3s ease, border-left-color 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.index-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--yellow);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.index-item.active::before,
.index-item:hover::before {
    transform: scaleY(1);
}

.index-item.active {
    background: rgba(245, 200, 66, 0.08);
}

.index-item:hover {
    background: rgba(245, 200, 66, 0.05);
}

.index-number {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--yellow);
    opacity: 0.5;
    min-width: 20px;
    letter-spacing: 0.05em;
}

.index-item.active .index-number {
    opacity: 1;
}

.index-title {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    color: var(--cream);
    opacity: 0.6;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.index-item.active .index-title,
.index-item:hover .index-title {
    opacity: 1;
}

/* Sidebar Annotation */
.sidebar-annotation {
    padding: 16px 24px;
    border-top: 1px solid rgba(245, 200, 66, 0.1);
    border-bottom: 1px solid rgba(245, 200, 66, 0.1);
    min-height: 72px;
    display: flex;
    align-items: center;
}

.annotation-text {
    font-family: var(--font-dm);
    font-size: 10px;
    font-weight: 300;
    font-style: italic;
    color: var(--yellow);
    opacity: 0.7;
    line-height: 1.6;
    transition: opacity 0.4s ease;
}

/* Sidebar Bottom */
.sidebar-bottom {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-line {
    font-family: var(--font-dm);
    font-size: 9px;
    font-weight: 300;
    color: var(--warm-brown);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-geo-accent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.geo-circle-small {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--teal);
    opacity: 0.4;
}

.geo-dot-row {
    display: flex;
    gap: 5px;
}

.geo-dot-row span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--yellow);
    opacity: 0.3;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

/* ============================================================
   DOT GRID OVERLAY — Memphis Texture
   ============================================================ */
.dot-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(232, 82, 26, 0.18) 8px, transparent 8px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 1;
}

.dot-grid-light {
    background-image: radial-gradient(circle, rgba(232, 82, 26, 0.08) 5px, transparent 5px);
    background-size: 24px 24px;
}

/* ============================================================
   SECTION: COVER FOLIO
   ============================================================ */
.cover-folio {
    position: relative;
    min-height: 100vh;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cover-parallax-bg {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(58, 140, 130, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 20% 70%, rgba(109, 79, 184, 0.12) 0%, transparent 60%);
    will-change: transform;
}

.cover-inner {
    position: relative;
    z-index: 2;
    max-width: 740px;
    width: 100%;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cover-tag {
    margin-bottom: 24px;
}

.mono-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--yellow);
    opacity: 0.7;
}

.cover-title {
    font-family: var(--font-display);
    font-weight: 900;
    color: var(--cream);
    line-height: 0.85;
    letter-spacing: -0.04em;
}

.title-line-1 {
    display: block;
    font-size: clamp(72px, 12vw, 140px);
    color: var(--yellow);
}

.title-line-2 {
    display: block;
    font-size: clamp(48px, 8vw, 96px);
    color: var(--cream);
    opacity: 0.55;
    font-style: italic;
    margin-left: 40px;
}

.cover-rule-group {
    margin: 28px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rule-thick {
    height: 4px;
    width: 240px;
    background: var(--yellow);
}

.rule-thin {
    height: 1px;
    width: 180px;
    background: var(--orange);
    opacity: 0.6;
}

.cover-subtitle {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    color: var(--cream);
    opacity: 0.7;
    line-height: 1.6;
    font-style: italic;
    max-width: 360px;
}

/* Cover Geometric Shapes */
.cover-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.shape-ring-large {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 28px solid var(--teal);
    opacity: 0.2;
    will-change: transform;
}

.shape-triangle-cover {
    position: absolute;
    left: 8%;
    bottom: 10%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid var(--violet);
    opacity: 0.3;
}

.shape-square-cover {
    position: absolute;
    right: 15%;
    top: 12%;
    width: 48px;
    height: 48px;
    background: var(--orange);
    transform: rotate(18deg);
    opacity: 0.35;
}

/* Scroll Cue */
.cover-scroll-cue {
    position: absolute;
    bottom: 40px;
    left: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    z-index: 3;
}

.scroll-label {
    font-family: var(--font-dm);
    font-size: 9px;
    letter-spacing: 0.25em;
    color: var(--yellow);
    opacity: 0.5;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--yellow), transparent);
    opacity: 0.4;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.1); }
}

/* ============================================================
   INTERRUPTION PANELS
   ============================================================ */
.interruption-panel {
    position: relative;
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Panel Alpha** — Coral/teal background, orange circle (Google Fonts loaded for headings) */
/* Intersecting Geometric Rings** — circles (200-400px diameter) */
/* Intersection Observer for Active State** via IntersectionObserver` */
.panel-alpha {
    background: var(--teal);
}

.panel-shape-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--orange);
    opacity: 0.85;
}

/* Panel Beta** — Violet background, yellow triangle */
.panel-beta {
    background: var(--violet);
}

.panel-shape-triangle {
    width: 0;
    height: 0;
    border-left: 90px solid transparent;
    border-right: 90px solid transparent;
    border-bottom: 156px solid var(--yellow);
    opacity: 0.9;
}

/* ============================================================
   SECTION: MANIFESTO
   ============================================================ */
.section-manifesto {
    position: relative;
    background: var(--cream);
    padding: 80px 60px 100px;
    overflow: hidden;
}

.section-header-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 60px;
}

.section-marker {
    display: block;
    opacity: 0.5;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(48px, 7vw, 80px);
    color: var(--ink);
    line-height: 0.9;
    letter-spacing: -0.03em;
}

.section-title em {
    color: var(--orange);
    font-style: italic;
}

.header-rule {
    height: 3px;
    width: 120px;
    background: var(--ink);
    margin-top: 8px;
}

/* Manifesto Two-Column Grid */
.manifesto-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    align-items: start;
}

.manifesto-col-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.body-lora {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
}

.lede {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.65;
    color: var(--darkest-brown);
}

.pull-quote {
    position: relative;
    padding: 28px 32px 24px 48px;
    border-left: 4px solid var(--yellow);
    background: var(--dark-brown);
    border-radius: 0 4px 4px 0;
}

.quote-mark {
    position: absolute;
    top: -8px;
    left: 16px;
    font-family: var(--font-display);
    font-size: 72px;
    color: var(--yellow);
    opacity: 0.4;
    line-height: 1;
}

.pull-quote p {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 20px;
    color: var(--cream);
    line-height: 1.5;
}

.pull-quote cite {
    display: block;
    margin-top: 12px;
    font-family: var(--font-dm);
    font-size: 11px;
    font-style: normal;
    color: var(--yellow);
    opacity: 0.7;
    letter-spacing: 0.1em;
}

/* Manifesto Aside Column */
.manifesto-col-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 40px;
}

.aside-annotation-card {
    background: var(--dark-brown);
    padding: 18px 20px;
    border-top: 2px solid var(--yellow);
}

.card-label {
    display: block;
    color: var(--yellow);
    opacity: 0.6;
    font-size: 9px;
    margin-bottom: 8px;
}

.card-body {
    font-family: var(--font-dm);
    font-size: 12px;
    font-weight: 300;
    color: var(--cream);
    line-height: 1.7;
}

.dm-mono {
    font-family: var(--font-dm);
    font-size: 12px;
    font-weight: 300;
}

.aside-shape-block {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape-oblique-plane {
    width: 80px;
    height: 80px;
    background: var(--violet);
    transform: rotate(22deg) skewX(-8deg);
    opacity: 0.5;
}

.shape-dot-cluster {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60px;
    height: 60px;
    background-image: radial-gradient(circle, var(--orange) 4px, transparent 4px);
    background-size: 14px 14px;
    opacity: 0.5;
}

/* ============================================================
   INTERRUPTION PANEL SHAPE STYLES
   ============================================================ */
.panel-shape {
    transition: transform 0.6s ease;
}

.interruption-panel:hover .panel-shape {
    transform: scale(1.05) rotate(3deg);
}

/* ============================================================
   SECTION: CATALOGUE
   ============================================================ */
.section-catalogue {
    background: var(--darkest-brown);
    padding: 80px 60px 100px;
    overflow: hidden;
}

.section-catalogue .section-title {
    color: var(--cream);
}

.section-catalogue .section-marker {
    color: var(--yellow);
}

.section-catalogue .header-rule {
    background: var(--yellow);
}

/* Zigzag Divider */
.zigzag-divider {
    width: 100%;
    height: 24px;
    background:
        linear-gradient(135deg, var(--darkest-brown) 25%, transparent 25%) -12px 0,
        linear-gradient(225deg, var(--darkest-brown) 25%, transparent 25%) -12px 0,
        linear-gradient(315deg, var(--darkest-brown) 25%, transparent 25%),
        linear-gradient(45deg, var(--darkest-brown) 25%, transparent 25%);
    background-size: 24px 24px;
    background-color: var(--dark-brown);
    margin: 20px 0;
}

.zigzag-divider--bottom {
    transform: scaleY(-1);
    margin-top: 40px;
}

/* Catalogue Asymmetric Grid */
.catalogue-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    grid-auto-rows: auto;
    gap: 2px;
    background: var(--ink);
    border: 2px solid var(--ink);
    margin: 24px 0;
}

.cat-item {
    display: flex;
    flex-direction: column;
    background: var(--dark-brown);
    transition: background 0.3s ease;
}

.cat-item:hover {
    background: var(--darkest-brown);
    z-index: 2;
}

.cat-item--large {
    grid-column: span 2;
}

.cat-item--medium {
    grid-column: span 1;
}

.cat-item--small {
    grid-column: span 1;
}

.cat-item-geo {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.cat-geo-a { background: rgba(245, 200, 66, 0.08); }
.cat-geo-b { background: rgba(58, 140, 130, 0.12); }
.cat-geo-c { background: rgba(109, 79, 184, 0.12); }
.cat-geo-d { background: rgba(232, 82, 26, 0.08); }
.cat-geo-e { background: rgba(245, 200, 66, 0.06); }
.cat-geo-f { background: rgba(58, 140, 130, 0.08); }

/* Geometric shapes for catalogue items */
.geo-rect-stack {
    width: 60px;
    height: 60px;
    background: var(--yellow);
    opacity: 0.5;
    transform: rotate(12deg);
}

.geo-circle-stack {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--teal);
    opacity: 0.5;
}

.geo-triangle-stack {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--violet);
    opacity: 0.5;
}

.geo-ring-stack {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 12px solid var(--orange);
    opacity: 0.45;
}

.geo-cross-stack {
    position: relative;
    width: 20px;
    height: 70px;
    background: var(--yellow);
    opacity: 0.4;
}
.geo-cross-stack::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 20px;
    background: var(--yellow);
    opacity: 1;
}

.geo-zigzag-stack {
    width: 60px;
    height: 60px;
    background: var(--teal);
    opacity: 0.4;
    clip-path: polygon(0 50%, 25% 0, 50% 50%, 75% 0, 100% 50%, 75% 100%, 50% 50%, 25% 100%);
}

.cat-item-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.cat-lot {
    display: block;
    color: var(--yellow);
    opacity: 0.6;
    font-size: 9px;
}

.cat-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--cream);
    line-height: 1.2;
}

.cat-desc {
    color: var(--cream);
    opacity: 0.5;
    font-size: 11px;
    line-height: 1.5;
}

.cat-estimate {
    display: flex;
    gap: 6px;
    align-items: baseline;
    margin-top: 8px;
}

.estimate-label {
    font-family: var(--font-dm);
    font-size: 9px;
    color: var(--warm-brown);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.estimate-value {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--yellow);
    font-weight: 700;
}

/* ============================================================
   SECTION: CLOSING FOLIO
   ============================================================ */
.closing-folio {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.closing-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--dark-brown) 0%, var(--darkest-brown) 40%, var(--ink) 100%);
    z-index: 0;
}

.closing-bg-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 80% 30%, rgba(245, 200, 66, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 20% 70%, rgba(58, 140, 130, 0.08) 0%, transparent 60%);
}

.closing-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.closing-rule {
    width: 320px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--yellow), transparent);
    margin-bottom: 40px;
}

.closing-rule--bottom {
    margin-top: 40px;
    margin-bottom: 0;
}

.closing-domain-mark {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(56px, 10vw, 120px);
    color: var(--cream);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 28px;
}

.closing-domain-mark .domain-dot {
    color: var(--orange);
}

.closing-domain-mark .domain-tld {
    color: var(--yellow);
    opacity: 0.7;
}

.closing-tagline {
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.65;
    color: var(--cream);
    opacity: 0.65;
}

.closing-tagline em {
    color: var(--yellow);
    opacity: 0.85;
}

/* Closing Geometric Shapes */
.closing-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.closing-shape-a {
    position: absolute;
    left: 5%;
    top: 20%;
    width: 80px;
    height: 80px;
    border: 6px solid var(--teal);
    border-radius: 50%;
    opacity: 0.2;
}

.closing-shape-b {
    position: absolute;
    right: 8%;
    bottom: 25%;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 88px solid var(--violet);
    opacity: 0.25;
}

.closing-shape-c {
    position: absolute;
    right: 15%;
    top: 15%;
    width: 36px;
    height: 36px;
    background: var(--orange);
    transform: rotate(20deg);
    opacity: 0.2;
}

.closing-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
}

.meta-item {
    font-size: 10px;
    opacity: 0.45;
    color: var(--cream);
}

.meta-sep {
    color: var(--yellow);
    opacity: 0.3;
    font-family: var(--font-dm);
    font-size: 12px;
}

/* ============================================================
   SECTION BASE STYLES
   ============================================================ */
.section {
    position: relative;
}

/* ============================================================
   PARALLAX ANIMATION
   ============================================================ */
@keyframes floatRing {
    0%, 100% { transform: translateY(-50%) translateX(0px); }
    50% { transform: translateY(calc(-50% - 20px)) translateX(10px); }
}

/* ============================================================
   RESPONSIVE — Tablet / Mobile (< 900px)
   ============================================================ */
@media (max-width: 900px) {
    :root {
        --sidebar-width: 220px;
    }
}

@media (max-width: 700px) {
    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
    }

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

    .manifesto-col-aside {
        position: static;
    }

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

    .cat-item--large,
    .cat-item--medium,
    .cat-item--small {
        grid-column: span 1;
    }

    .cover-inner {
        padding: 60px 32px;
    }

    .section-manifesto,
    .section-catalogue {
        padding: 60px 32px 80px;
    }
}

/* ============================================================
   TRANSITION / ANIMATION UTILITIES
   ============================================================ */
.section-header-block,
.manifesto-grid,
.catalogue-grid,
.closing-inner {
    transition: opacity 0.4s ease;
}
