/* ========================================
   gabs.cafe — Styles
   Zen-contemplative dashboard aesthetic
   ======================================== */

:root {
    --darkest-umber: #1A0E08;
    --burnt-espresso: #2E1A0F;
    --cocoa-bark: #5C3D2E;
    --burnt-sienna: #D4702A;
    --amber-glow: #E8923B;
    --parchment-cream: #F5E6D0;
    --linen-white: #FAF3EA;
    --terracotta-dust: #A85A32;
    --slate-charcoal: #3A3A3C;
    --saddlebrown: #8B4513;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    font-size: 16px;
}

body {
    background-color: var(--burnt-espresso);
    color: var(--parchment-cream);
    font-family: 'Zilla Slab', Georgia, serif;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   Status Bar
   ======================================== */

.status-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 32px;
    background-color: var(--burnt-espresso);
    border-bottom: 1px solid var(--cocoa-bark);
    transition: background-color 1.5s ease;
}

.status-bar__wordmark {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    color: var(--parchment-cream);
}

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

.status-bar__indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--burnt-sienna);
    animation: pulse-dot 3s ease-in-out infinite;
}

.indicator-label {
    font-family: 'Zilla Slab', Georgia, serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cocoa-bark);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ========================================
   Station Layout
   ======================================== */

.station {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 32px;
    scroll-snap-align: start;
    position: relative;
}

.station__grid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.station__header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}

.station__title {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 700;
    font-size: clamp(36px, 4.5vw, 72px);
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: var(--parchment-cream);
    margin-bottom: 40px;
}

/* ========================================
   Panels (generic)
   ======================================== */

.panel__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cocoa-bark);
}

.panel__title {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--parchment-cream);
}

.panel__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Reveal animation for panels */
[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 800ms cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 800ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Station 01: The Console
   ======================================== */

.console-grid {
    display: grid;
    grid-template-columns: 5fr 3fr 4fr;
    gap: 24px;
    height: calc(100vh - 160px);
    max-height: 700px;
}

.panel--waveform {
    display: flex;
    flex-direction: column;
    background-color: rgba(46, 26, 15, 0.6);
    border-radius: 8px;
    border: 1px solid var(--cocoa-bark);
    overflow: hidden;
}

.waveform-container {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 20px;
}

.waveform--main {
    width: 100%;
    height: 100%;
}

.panel--readouts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.readout-tile {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(46, 26, 15, 0.6);
    border-radius: 8px;
    border: 1px solid var(--cocoa-bark);
    padding: 16px;
    text-align: center;
}

.readout-tile__label {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cocoa-bark);
    margin-bottom: 8px;
}

.readout-tile__value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: 2.4rem;
    letter-spacing: 0.12em;
    color: var(--parchment-cream);
}

.readout-tile__value--word {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    color: var(--amber-glow);
}

.readout-tile__value--counter {
    color: var(--burnt-sienna);
}

.panel--photograph {
    display: flex;
    flex-direction: column;
    background-color: rgba(46, 26, 15, 0.6);
    border-radius: 8px;
    border: 1px solid var(--cocoa-bark);
    overflow: hidden;
}

.photograph-frame {
    flex: 1;
    padding: 0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.vintage-photo {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 0 0 8px 8px;
    filter: contrast(1.05) saturate(0.9);
}

/* ========================================
   Station 02: The Frequency Board
   ======================================== */

.station--frequency {
    background-color: var(--burnt-espresso);
}

.frequency-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    height: calc(100vh - 160px);
    max-height: 700px;
}

.freq-panel {
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
}

.freq-panel--1 { background-color: rgba(212, 112, 42, 0.12); }
.freq-panel--2 { background-color: rgba(168, 90, 50, 0.15); }
.freq-panel--3 { background-color: rgba(139, 69, 19, 0.12); }
.freq-panel--4 { background-color: rgba(212, 112, 42, 0.1); }
.freq-panel--5 { background-color: rgba(168, 90, 50, 0.12); }
.freq-panel--6 { background-color: rgba(139, 69, 19, 0.1); }

/* Bar Chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 20px 20px 40px;
    flex: 1;
}

.bar {
    flex: 1;
    height: 0%;
    background-color: var(--burnt-sienna);
    border-radius: 3px 3px 0 0;
    position: relative;
    min-height: 4px;
    transition: height 1.2s ease-out;
}

.bar__label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cocoa-bark);
    white-space: nowrap;
}

/* Radial Gauge */
.gauge-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.radial-gauge {
    width: 140px;
    height: 140px;
}

.gauge-fill {
    transition: stroke-dasharray 2s ease-out;
}

.gauge-text {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
}

/* Counter Display */
.counter-display {
    flex-direction: column;
    text-align: center;
    gap: 8px;
}

.counter-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: 2.4rem;
    letter-spacing: 0.12em;
    color: var(--burnt-sienna);
}

.counter-label {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cocoa-bark);
}

/* Frequency readout */
.freq-readout {
    position: absolute;
    bottom: 16px;
    right: 20px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.freq-readout__value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    color: var(--amber-glow);
}

.freq-readout__unit {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cocoa-bark);
}

/* ========================================
   Station 03: The Listening Room
   ======================================== */

.station--listening {
    background-color: var(--burnt-espresso);
}

.listening-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.listening-panel {
    width: 83.333%;
    max-width: 1160px;
}

.photograph-reveal {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    clip-path: inset(50% 50% 50% 50%);
    transition: clip-path 1.8s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.photograph-reveal.revealed {
    clip-path: inset(0% 0% 0% 0%);
}

.vintage-photo--large {
    width: 100%;
    height: auto;
    display: block;
    filter: contrast(1.05) saturate(0.9);
}

.koan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(26, 14, 8, 0.35);
}

.koan-text {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(28px, 3.2vw, 52px);
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-align: center;
    color: var(--linen-white);
    padding: 20px 40px;
}

.wave-tiles {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.wave-tile {
    width: 180px;
    height: 180px;
    background-color: rgba(46, 26, 15, 0.5);
    border-radius: 8px;
    border: 1px solid var(--cocoa-bark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wave-tile svg {
    width: 100%;
    height: 100%;
}

/* ========================================
   Station 04: The Archive
   ======================================== */

.station--archive {
    background-color: var(--burnt-espresso);
    padding-top: 80px;
    justify-content: flex-start;
    gap: 32px;
}

.archive-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 20px 32px;
    scrollbar-width: thin;
    scrollbar-color: var(--cocoa-bark) transparent;
    cursor: grab;
}

.archive-scroll:active {
    cursor: grabbing;
}

.archive-scroll::-webkit-scrollbar {
    height: 4px;
}

.archive-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.archive-scroll::-webkit-scrollbar-thumb {
    background-color: var(--cocoa-bark);
    border-radius: 2px;
}

.archive-track {
    display: flex;
    gap: 16px;
    width: max-content;
}

.archive-card {
    width: 280px;
    min-width: 280px;
    height: 400px;
    background-color: rgba(46, 26, 15, 0.6);
    border-radius: 8px;
    border: 1px solid var(--cocoa-bark);
    overflow: hidden;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    transition: border-color 0.6s ease;
}

.archive-card:hover {
    border-color: var(--burnt-sienna);
}

.archive-card__image {
    width: 100%;
    height: 60%;
    overflow: hidden;
}

.archive-card__image svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: contrast(1.05) saturate(0.9);
}

.archive-card__title {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--parchment-cream);
    padding: 16px 16px 8px;
}

.archive-card__desc {
    font-family: 'Zilla Slab', Georgia, serif;
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--cocoa-bark);
    padding: 0 16px 16px;
}

/* Waveform divider */
.waveform-divider {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px;
    overflow: hidden;
}

.waveform--divider {
    width: 100%;
    height: 40px;
}

/* ========================================
   Station 05: The Exit
   ======================================== */

.station--exit {
    background-color: var(--darkest-umber);
}

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

.exit-text {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(24px, 2.8vw, 44px);
    letter-spacing: 0.04em;
    line-height: 1.5;
    color: var(--parchment-cream);
}

.exit-waveform {
    width: 200px;
}

.waveform--exit {
    width: 100%;
    height: 20px;
}

.exit-wordmark {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cocoa-bark);
}

/* ========================================
   Waveform Animations
   ======================================== */

.waveform-path--primary {
    animation: waveScroll 60s linear infinite;
}

.waveform-path--secondary {
    animation: waveScroll 45s linear infinite reverse;
}

.waveform-path--ghost {
    animation: waveScroll 80s linear infinite;
}

@keyframes waveScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.waveform--snippet .waveform-path {
    animation: waveScroll 40s linear infinite;
}

.waveform--sine .waveform-path {
    animation: waveScroll 30s linear infinite reverse;
}

.waveform--divider path {
    animation: waveScroll 60s linear infinite;
}

/* Waveform amplitude scaling via scroll */
.waveform {
    transition: transform 1.5s ease;
}

/* ========================================
   Background Waveform
   ======================================== */

.bg-waveform {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.waveform-path--bg {
    animation: waveScroll 120s linear infinite;
}

/* ========================================
   Responsive: Mobile
   ======================================== */

@media (max-width: 768px) {
    .status-bar {
        padding: 0 16px;
        height: 60px;
    }

    .status-bar__clock,
    .status-bar__indicator {
        display: none;
    }

    .station {
        padding: 24px 16px;
    }

    /* Station 01 */
    .console-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        max-height: none;
        gap: 16px;
    }

    .panel--waveform {
        min-height: 200px;
    }

    .panel--readouts {
        flex-direction: row;
        gap: 8px;
    }

    .readout-tile__value {
        font-size: 1.6rem;
    }

    .panel--photograph {
        min-height: 300px;
    }

    /* Station 02 */
    .frequency-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        max-height: none;
        gap: 8px;
    }

    .freq-panel {
        min-height: 180px;
    }

    /* Station 03 */
    .listening-panel {
        width: 100%;
    }

    .koan-text {
        font-size: clamp(20px, 5vw, 32px);
        padding: 16px 20px;
    }

    .wave-tiles {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .wave-tile {
        width: 140px;
        height: 140px;
    }

    /* Station 04 */
    .station--archive {
        padding-top: 40px;
    }

    .archive-track {
        flex-direction: column;
        width: 100%;
    }

    .archive-card {
        width: 100%;
        min-width: 100%;
        height: 360px;
    }

    .archive-scroll {
        overflow-x: hidden;
        padding: 10px 16px;
    }

    /* Station 05 */
    .exit-text {
        font-size: clamp(20px, 5vw, 32px);
    }
}

/* ========================================
   Responsive: Tablet
   ======================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .console-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        height: auto;
        max-height: none;
    }

    .panel--waveform {
        grid-column: 1 / -1;
        min-height: 250px;
    }

    .frequency-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        height: auto;
        max-height: none;
    }
}
