/* ============================================================
   simai.feedback // The Curator's Console
   palette: gold-black-luxury
   typography: Major Mono Display / Jost / Cormorant Garamond
   ============================================================ */

:root {
    --pitch-ink:       #0A0A0A;
    --vellum-shadow:   #161616;
    --walnut-stain:    #1F1A12;
    --old-gold:        #C9A227;
    --lit-gold:        #E8C547;
    --tarnished-gold:  #7A6324;
    --aged-ivory:      #F4ECD2;

    --gold-grad: linear-gradient(180deg, #E8C547 0%, #C9A227 50%, #7A6324 100%);

    --plate-radius: 2px;
    --hairline: 0.8px;
    --grid-gap: 28px;
}

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

html, body {
    background: var(--pitch-ink);
    color: var(--aged-ivory);
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 18% 14%, rgba(201, 162, 39, 0.04), transparent 42%),
        radial-gradient(circle at 84% 78%, rgba(201, 162, 39, 0.03), transparent 50%);
    background-attachment: fixed;
}

/* ============ HUD CORNERS ============ */
.hud-corner {
    position: fixed;
    z-index: 100;
    color: var(--old-gold);
    font-family: 'Major Mono Display', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hud-tl { top: 18px; left: 22px; }
.hud-tr { top: 18px; right: 22px; }
.hud-bl { bottom: 18px; left: 22px; }
.hud-br { bottom: 18px; right: 22px; }

.hud-corner-label { color: var(--tarnished-gold); }
.hud-timecode {
    color: var(--lit-gold);
    font-family: 'Major Mono Display', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
}

.hud-tr svg { animation: reticle-pulse 3.4s ease-in-out infinite; }
@keyframes reticle-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.signal-bar {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}
.signal-bar span {
    display: block;
    width: 4px;
    background: var(--tarnished-gold);
}
.signal-bar span:nth-child(1) { height: 4px; }
.signal-bar span:nth-child(2) { height: 7px; }
.signal-bar span:nth-child(3) { height: 11px; }
.signal-bar span:nth-child(4) { height: 14px; }
.signal-bar span.lit { background: var(--lit-gold); }

/* ============ MARQUEE APERTURE ============ */
.marquee-aperture {
    position: relative;
    width: 100%;
    height: 240px;
    border-bottom: 1px solid var(--old-gold);
    display: grid;
    grid-template-columns: 240px 1fr auto;
    align-items: center;
    padding: 0 64px;
    overflow: hidden;
    background: linear-gradient(180deg, #0A0A0A 0%, #110E08 100%);
}

.marquee-confetti {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.marquee-trio {
    position: relative;
    width: 200px;
    height: 200px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trio-orbit {
    position: relative;
    width: 200px;
    height: 200px;
    animation: orbit-rotate 90s linear infinite;
}
@keyframes orbit-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.trio-shape {
    position: absolute;
    transform-origin: center;
}
.trio-squiggle {
    top: 12px;
    left: 70px;
}
.trio-triangle {
    bottom: 18px;
    left: 14px;
}
.trio-circle {
    top: 78px;
    right: 8px;
}

.marquee-title {
    font-family: 'Major Mono Display', monospace;
    font-size: 6.5rem;
    font-weight: 400;
    color: var(--old-gold);
    letter-spacing: -0.02em;
    line-height: 1;
    text-align: center;
    z-index: 2;
    text-shadow: 0 0 28px rgba(232, 197, 71, 0.18);
}

.marquee-hud {
    font-family: 'Major Mono Display', monospace;
    font-size: 0.72rem;
    color: var(--lit-gold);
    letter-spacing: 0.18em;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 2;
    border-left: 1px solid var(--tarnished-gold);
    padding-left: 22px;
}
.marquee-hud .hud-segment { white-space: nowrap; }
.marquee-hud .hud-divider { color: var(--tarnished-gold); }
.marquee-hud {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto;
    gap: 0 10px;
}

/* ============ CATALOGUE SHELL ============ */
.catalogue-shell {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 80px 64px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 56px;
}

.catalogue {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    grid-auto-flow: dense;
    grid-auto-rows: 78px;
}

/* ============ PLATES ============ */
.plate {
    position: relative;
    background: var(--vellum-shadow);
    padding: 28px 26px 24px;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
    min-height: 200px;
}

.plate-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
.plate-border rect {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}
.plate.in-view .plate-border rect {
    animation: border-draw 1.1s ease-out forwards;
}
@keyframes border-draw {
    to { stroke-dashoffset: 0; }
}

.plate::after {
    /* hover halo border */
    content: '';
    position: absolute;
    inset: -4px;
    border: 1.5px solid transparent;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}
.plate:hover::after {
    opacity: 1;
    border-color: var(--lit-gold);
    animation: halo-pulse 0.6s ease-out;
}
@keyframes halo-pulse {
    0% { opacity: 0; transform: scale(0.995); }
    100% { opacity: 1; transform: scale(1); }
}

.spec-id {
    position: absolute;
    top: 12px;
    left: 14px;
    font-family: 'Major Mono Display', monospace;
    font-size: 0.66rem;
    color: var(--tarnished-gold);
    letter-spacing: 0.16em;
    z-index: 2;
}

.reticle {
    position: absolute;
    top: 10px;
    right: 14px;
    font-family: 'Major Mono Display', monospace;
    font-size: 0.7rem;
    color: var(--old-gold);
    line-height: 1;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.plate.in-view .reticle svg circle {
    animation: ret-pulse 1.2s ease-out;
}
@keyframes ret-pulse {
    0%   { transform: scale(0.4); opacity: 0; transform-origin: center; }
    40%  { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.plate-body {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 18px;
}

/* ============ PLATE-A (quote) ============ */
.plate-a .quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.45rem;
    line-height: 1.42;
    color: rgba(244, 236, 210, 0.88);
}
.plate-a .quote-text::before { content: '\201C'; color: var(--aged-ivory); margin-right: 2px; }
.plate-a .quote-text::after  { content: ''; }
.plate-a .underlined {
    position: relative;
    color: var(--aged-ivory);
}
.plate-a .underlined::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: -3px;
    height: 6px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none'><path d='M0 4 Q 25 0 50 3 T 100 4' stroke='%23F4ECD2' stroke-width='1.4' fill='none'/></svg>") no-repeat center / 100% 100%;
}
.plate-a .quote-attrib {
    margin-top: 14px;
    font-family: 'Jost', sans-serif;
    font-size: 0.72rem;
    color: var(--tarnished-gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ============ PLATE-B (sentiment) ============ */
.sentiment-body {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    justify-content: center;
}
.dial-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dial-needle {
    transform-origin: 100px 100px;
    transform: rotate(-90deg);
    transition: transform 1.8s cubic-bezier(.34,1.56,.64,1);
}
.plate.in-view .dial-needle {
    /* JS sets transform inline */
}
.dial-arc {
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    transition: stroke-dashoffset 1.6s ease-out;
}
.plate.in-view .dial-arc { stroke-dashoffset: 60; }

.dial-readout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Major Mono Display', monospace;
    color: var(--lit-gold);
}
.dial-label {
    font-size: 0.62rem;
    color: var(--tarnished-gold);
    letter-spacing: 0.22em;
}
.dial-value {
    font-size: 1.5rem;
    color: var(--lit-gold);
    letter-spacing: 0.02em;
}
.dial-sub {
    font-size: 0.6rem;
    color: var(--tarnished-gold);
    letter-spacing: 0.18em;
}

/* ============ PLATE-C (botanical) ============ */
.botanical-body {
    align-items: center;
    justify-content: center;
    padding: 12px 0 0;
}
.botanical {
    flex: 1 1 auto;
    width: 100%;
    height: 78%;
    object-fit: contain;
    display: block;
}
.botanical-label {
    margin-top: 10px;
    font-family: 'Major Mono Display', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    color: var(--tarnished-gold);
    text-align: center;
}
.botanical.fern { animation: fern-nod 6s ease-in-out infinite alternate; transform-origin: 100px 220px; }
@keyframes fern-nod {
    from { transform: rotate(-2deg); }
    to   { transform: rotate(2deg); }
}
.botanical.dandelion .dandelion-seeds line {
    transition: transform 1s ease;
}
.plate-c:hover .ginkgo-vein {
    animation: vein-illuminate 3s ease-in-out;
}
@keyframes vein-illuminate {
    0%   { stroke: var(--old-gold); }
    50%  { stroke: var(--lit-gold); stroke-width: 1.8; }
    100% { stroke: var(--old-gold); }
}

/* ============ PLATE-D (waveform) ============ */
.waveform-body {
    align-items: stretch;
    justify-content: center;
    padding: 16px 6px 6px;
}
.waveform-label {
    font-family: 'Major Mono Display', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    color: var(--tarnished-gold);
    margin-bottom: 14px;
}
.waveform {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    height: 80px;
    width: 100%;
}
.waveform .bar {
    flex: 1 1 0;
    background: var(--old-gold);
    min-width: 3px;
    transition: height 0.4s cubic-bezier(.2,.7,.2,1), background-color 0.4s;
}
.waveform .bar.lit { background: var(--lit-gold); box-shadow: 0 0 6px rgba(232, 197, 71, 0.5); }

/* ============ ANNOTATION MARGIN ============ */
.annotation-margin {
    background: var(--walnut-stain);
    padding: 28px 22px 36px;
    border: 1px solid rgba(201, 162, 39, 0.35);
    position: relative;
    z-index: 3;
    height: fit-content;
    position: sticky;
    top: 60px;
}
.margin-squiggle {
    width: 100%;
    height: 26px;
    display: block;
    margin-bottom: 18px;
}
.margin-title {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--old-gold);
    margin-bottom: 12px;
}
.margin-intro {
    font-family: 'Jost', sans-serif;
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(244, 236, 210, 0.72);
    margin-bottom: 22px;
}
.margin-list { list-style: none; padding: 0; margin: 0; }
.footnote {
    display: grid;
    grid-template-columns: 16px 24px 1fr;
    column-gap: 6px;
    padding: 10px 0;
    border-top: 1px solid rgba(201, 162, 39, 0.18);
    font-family: 'Jost', sans-serif;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(244, 236, 210, 0.86);
    cursor: pointer;
    transition: color 0.3s;
}
.footnote:hover { color: var(--lit-gold); }
.footnote:hover .fn-glyph { color: var(--lit-gold); }
.fn-glyph {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    color: var(--old-gold);
    font-size: 1rem;
    line-height: 1;
}
.fn-num {
    font-family: 'Major Mono Display', monospace;
    color: var(--tarnished-gold);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    align-self: start;
    margin-top: 2px;
}

.margin-grid-dots {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Major Mono Display', monospace;
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: var(--tarnished-gold);
    padding-top: 18px;
    border-top: 1px solid rgba(201, 162, 39, 0.18);
}

/* ============ LEADER OVERLAY ============ */
.leader-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    width: 100%;
    height: 100%;
}
.leader-overlay polyline {
    fill: none;
    stroke: var(--old-gold);
    stroke-width: 0.8;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.leader-overlay polyline.active {
    opacity: 0.7;
}
.leader-overlay polyline.highlighted {
    stroke: var(--lit-gold);
    opacity: 1;
    stroke-width: 1.2;
}

/* ============ CHECKERBOARD RIBBON ============ */
.checker-ribbon {
    width: 100%;
    height: 8px;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    margin: 0 0 0;
    background: var(--pitch-ink);
}
.checker-ribbon span { background: var(--pitch-ink); }
.checker-ribbon span:nth-child(odd) { background: var(--old-gold); }

/* ============ DEPOSIT CONSOLE ============ */
.deposit-console {
    position: relative;
    width: 100%;
    height: 320px;
    background: linear-gradient(180deg, #1F1A12 0%, #161208 100%);
    border-top: 1px solid var(--tarnished-gold);
    border-bottom: 1px solid var(--tarnished-gold);
    padding: 44px 96px 38px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
    overflow: hidden;
    transition: background 0.8s ease;
}
.deposit-console.illuminated {
    background: linear-gradient(180deg, #2A2316 0%, #1A150B 100%);
    box-shadow: inset 0 0 80px rgba(201, 162, 39, 0.06);
}

.rivet {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--lit-gold) 0%, var(--old-gold) 40%, var(--tarnished-gold) 80%, #2a1f08 100%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.rivet-tl { top: 14px; left: 14px; }
.rivet-tr { top: 14px; right: 14px; }
.rivet-bl { bottom: 14px; left: 14px; }
.rivet-br { bottom: 14px; right: 14px; }

.deposit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(201, 162, 39, 0.28);
    padding-bottom: 12px;
}
.deposit-legend {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--old-gold);
    font-size: 0.88rem;
}
.deposit-meta {
    font-family: 'Major Mono Display', monospace;
    font-size: 0.66rem;
    color: var(--tarnished-gold);
    letter-spacing: 0.18em;
}

.deposit-body {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;
    gap: 14px 24px;
    align-items: stretch;
}

.deposit-textarea-wrap {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    background: var(--pitch-ink);
    border: 1px solid var(--tarnished-gold);
    padding: 14px 18px;
    display: block;
}
.deposit-textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--aged-ivory);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.55;
    resize: none;
    caret-color: var(--lit-gold);
}
.deposit-textarea::placeholder {
    color: rgba(122, 99, 36, 0.7);
    font-style: italic;
}

.deposit-meter {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    align-items: center;
    width: 220px;
    height: 22px;
    background: var(--pitch-ink);
    padding: 3px;
    border: 1px solid var(--tarnished-gold);
}
.meter-segment {
    height: 100%;
    background: transparent;
    transition: background 0.3s ease;
}
.meter-segment.lit { background: var(--lit-gold); box-shadow: 0 0 6px rgba(232, 197, 71, 0.45); }
.meter-readout {
    grid-column: 2 / 3;
    font-family: 'Major Mono Display', monospace;
    font-size: 0.62rem;
    color: var(--tarnished-gold);
    letter-spacing: 0.18em;
    text-align: right;
}

.commit-button {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    position: relative;
    width: 220px;
    height: 70px;
    border: none;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.22em;
    color: var(--pitch-ink);
    background: var(--gold-grad);
    overflow: hidden;
    isolation: isolate;
}
.commit-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(from var(--travel, 0deg), transparent 0deg, transparent 320deg, var(--lit-gold) 340deg, transparent 360deg);
    z-index: 0;
    mix-blend-mode: screen;
    opacity: 0.85;
    animation: travel-light 5s linear infinite;
}
@keyframes travel-light {
    from { --travel: 0deg; transform: rotate(0deg); }
    to   { --travel: 360deg; transform: rotate(360deg); }
}
@property --travel {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
.commit-button::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--gold-grad);
    z-index: 1;
}
.commit-label {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 0 rgba(255, 230, 150, 0.5);
}
.commit-rivet {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--aged-ivory) 0%, var(--old-gold) 50%, #4a3818 100%);
    z-index: 3;
}
.commit-rivet-tl { top: 6px; left: 6px; }
.commit-rivet-tr { top: 6px; right: 6px; }
.commit-rivet-bl { bottom: 6px; left: 6px; }
.commit-rivet-br { bottom: 6px; right: 6px; }

.commit-button:hover { filter: brightness(1.08); }
.commit-button.committed { filter: brightness(0.6) saturate(0.4); }

/* ============ LEDGER SPINE ============ */
.ledger-spine {
    width: 100%;
    height: 36px;
    background: var(--pitch-ink);
    border-top: 1px solid rgba(201, 162, 39, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}
.ledger-text {
    font-family: 'Major Mono Display', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.34em;
    color: var(--old-gold);
    text-transform: uppercase;
    white-space: nowrap;
}
.ledger-text .etch-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.ledger-text .etch-char.lit {
    opacity: 1;
    transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .marquee-title { font-size: 4.8rem; }
    .marquee-aperture { grid-template-columns: 180px 1fr auto; padding: 0 32px; }
    .marquee-trio, .trio-orbit { width: 160px; height: 160px; }
    .catalogue-shell { padding: 60px 32px 48px; grid-template-columns: 1fr 220px; gap: 36px; }
}

@media (max-width: 860px) {
    .marquee-aperture {
        grid-template-columns: 1fr;
        height: auto;
        padding: 30px 24px;
        gap: 18px;
        text-align: center;
        justify-items: center;
    }
    .marquee-trio { display: none; }
    .marquee-title { font-size: 3.6rem; }
    .marquee-hud {
        grid-template-columns: auto auto auto auto auto auto auto;
        font-size: 0.6rem;
        letter-spacing: 0.12em;
        gap: 0 6px;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--tarnished-gold);
        padding-top: 12px;
    }

    .catalogue-shell {
        grid-template-columns: 1fr;
        padding: 40px 22px;
        gap: 32px;
    }
    .catalogue {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto;
    }
    .plate {
        grid-column: 1 / -1 !important;
        grid-row: span 1 !important;
        min-height: 240px;
    }
    .annotation-margin {
        position: static;
        border-left: 4px solid var(--old-gold);
    }
    .leader-overlay { display: none; }

    .deposit-console {
        padding: 36px 28px 28px;
        height: auto;
    }
    .deposit-body {
        grid-template-columns: 1fr;
        grid-template-rows: 200px auto auto auto;
    }
    .deposit-textarea-wrap {
        grid-column: 1 / -1;
        grid-row: 1 / 2;
        height: 200px;
    }
    .deposit-meter, .meter-readout, .commit-button {
        grid-column: 1 / -1;
        width: 100%;
    }
    .deposit-meter { grid-row: 2 / 3; }
    .meter-readout { grid-row: 3 / 4; text-align: left; }
    .commit-button { grid-row: 4 / 5; }

    .ledger-text { font-size: 0.5rem; letter-spacing: 0.18em; }
    .hud-corner { font-size: 0.5rem; }
}
