/* === lowest.dev — Art Deco × Glitch at warm temperature === */

:root {
    --coal: #221E19;
    --void: #0D0B09;
    --amber: #A8803C;
    --deep-brown: #1C1714;
    --parchment: #F0E6D6;
    --sand: #B89A78;
    --oxide: #C45A3C;
    --copper: #D4864A;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void);
    color: var(--parchment);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Scan lines overlay */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
}

/* === FREQUENCY HEADER === */
.frequency-header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, var(--deep-brown) 0%, var(--void) 70%);
}

.frequency-header .deco-border-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    position: relative;
    width: 80%;
    max-width: 700px;
    padding: 4rem 2rem;
}

.deco-border-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.deco-path {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    animation: drawBorder 3s ease-out forwards 0.5s;
}

@keyframes drawBorder {
    to { stroke-dashoffset: 0; }
}

.deco-corner {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawBorder 1.5s ease-out forwards 2s;
}

/* Logotype */
.logotype {
    font-family: 'Poiret One', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    text-align: center;
    color: var(--parchment);
    text-shadow:
        0 0 20px rgba(168, 128, 60, 0.6),
        0 0 40px rgba(168, 128, 60, 0.3),
        0 0 80px rgba(168, 128, 60, 0.15);
    animation: glowPulse 4s ease-in-out infinite alternate;
    position: relative;
}

.domain-dot {
    color: var(--oxide);
    text-shadow:
        0 0 15px rgba(196, 90, 60, 0.8),
        0 0 30px rgba(196, 90, 60, 0.4);
}

@keyframes glowPulse {
    0% { text-shadow: 0 0 20px rgba(168,128,60,0.6), 0 0 40px rgba(168,128,60,0.3); }
    100% { text-shadow: 0 0 30px rgba(168,128,60,0.8), 0 0 60px rgba(168,128,60,0.4), 0 0 100px rgba(168,128,60,0.2); }
}

/* Frequency indicator */
.frequency-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.freq-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--sand);
    text-transform: uppercase;
}

.freq-dial {
    width: 120px;
    height: 60px;
    border: 1px solid var(--amber);
    border-bottom: none;
    border-radius: 60px 60px 0 0;
    position: relative;
    overflow: hidden;
}

.dial-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 50px;
    background: var(--oxide);
    transform-origin: bottom center;
    transform: rotate(-40deg);
    animation: needleSweep 6s ease-in-out infinite alternate;
    box-shadow: 0 0 8px rgba(196, 90, 60, 0.6);
}

@keyframes needleSweep {
    0% { transform: rotate(-40deg); }
    100% { transform: rotate(40deg); }
}

.dial-marks {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-conic-gradient(
            from -90deg at 50% 100%,
            var(--amber) 0deg,
            transparent 2deg,
            transparent 18deg
        );
    opacity: 0.3;
}

.freq-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    color: var(--amber);
    letter-spacing: 0.1em;
}

/* Scroll hint */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    animation: fadeInUp 2s ease-out forwards 3s, hintBob 2s ease-in-out infinite 5s;
    opacity: 0;
}

.scroll-hint span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sand);
}

.chevron-down {
    animation: bobDown 1.5s ease-in-out infinite;
}

@keyframes fadeInUp {
    to { opacity: 0.6; }
}

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

/* === SIGNAL BAND SECTIONS === */
.signal-band {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    position: relative;
}

.signal-band .deco-border-frame {
    width: 90%;
    max-width: 700px;
    border: 1px solid rgba(168, 128, 60, 0.2);
    padding: 3rem 2.5rem;
    position: relative;
    background: linear-gradient(180deg, rgba(28, 23, 20, 0.4) 0%, rgba(13, 11, 9, 0.6) 100%);
}

.signal-band .deco-border-frame::before,
.signal-band .deco-border-frame::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--amber);
    border-style: solid;
}

.signal-band .deco-border-frame::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.signal-band .deco-border-frame::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

/* Band header */
.band-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.band-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--amber), transparent);
}

.band-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--parchment);
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 0 15px rgba(168, 128, 60, 0.4);
}

.band-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--sand);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Signal meter */
.signal-meter {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    padding: 1rem 0;
}

.meter-bar {
    flex: 1;
    background: linear-gradient(to top, var(--oxide), var(--amber));
    border-radius: 2px 2px 0 0;
    height: 0%;
    transition: height 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 8px rgba(168, 128, 60, 0.3);
    position: relative;
}

.meter-bar.animate {
    animation: meterPulse 2s ease-in-out infinite alternate;
}

@keyframes meterPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Waveform */
.waveform-display {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(168, 128, 60, 0.15);
    background: rgba(13, 11, 9, 0.5);
}

.waveform-canvas {
    width: 100%;
    height: 120px;
    display: block;
}

/* Chevron pattern */
.deco-chevron-pattern {
    width: 100%;
    height: 80px;
    opacity: 0.7;
}

.deco-chevron-pattern svg {
    width: 100%;
    height: 100%;
}

.chevron-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.chevron-line.animate {
    animation: drawChevron 3s ease-out forwards;
}

.chevron-line.c2.animate {
    animation-delay: 0.3s;
}

.chevron-line.c3.animate {
    animation-delay: 0.6s;
}

@keyframes drawChevron {
    to { stroke-dashoffset: 0; }
}

/* Static field */
.static-field {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(168, 128, 60, 0.15);
    background: rgba(13, 11, 9, 0.5);
}

.static-canvas {
    width: 100%;
    height: 100px;
    display: block;
}

/* Section depth coloring */
.signal-band[data-depth="1"] { background: linear-gradient(180deg, var(--void), rgba(28,23,20,0.3)); }
.signal-band[data-depth="2"] { background: linear-gradient(180deg, rgba(28,23,20,0.3), rgba(34,30,25,0.4)); }
.signal-band[data-depth="3"] { background: linear-gradient(180deg, rgba(34,30,25,0.4), rgba(34,30,25,0.6)); }
.signal-band[data-depth="4"] { background: linear-gradient(180deg, rgba(34,30,25,0.6), var(--coal)); }

/* Glitch animation for bands entering view */
.signal-band .deco-border-frame {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.signal-band.in-view .deco-border-frame {
    opacity: 1;
    transform: translateY(0);
}

/* Occasional glitch flicker */
@keyframes glitchFlicker {
    0%, 95%, 100% { opacity: 1; transform: translate(0); }
    96% { opacity: 0.8; transform: translate(-2px, 1px); }
    97% { opacity: 1; transform: translate(1px, -1px); }
    98% { opacity: 0.9; transform: translate(-1px, 0); }
}

.signal-band.in-view .band-title {
    animation: glitchFlicker 8s linear infinite;
}

/* === NOISE FLOOR === */
.noise-floor {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    background: var(--coal);
}

.noise-floor .deco-border-frame {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.floor-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.deco-sunburst svg {
    width: 120px;
    height: 120px;
    animation: slowRotate 60s linear infinite;
}

@keyframes slowRotate {
    to { transform: rotate(360deg); }
}

.deco-sunburst .ray {
    opacity: 0.5;
}

.floor-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--sand);
    text-transform: uppercase;
    opacity: 0.6;
}

.floor-freq {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2rem;
    color: var(--amber);
    text-shadow: 0 0 20px rgba(168, 128, 60, 0.5);
    letter-spacing: 0.1em;
}

.deco-fan-divider {
    width: 200px;
}

.deco-fan-divider svg {
    width: 100%;
    height: 40px;
}

.copyright {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--sand);
    opacity: 0.3;
    text-transform: uppercase;
}

/* === AMBIENT HUM INDICATOR === */
.ambient-hum {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 3px;
    align-items: flex-end;
    z-index: 999;
    opacity: 0.4;
}

.hum-bar {
    width: 3px;
    background: var(--amber);
    border-radius: 1px;
}

.hum-bar:nth-child(1) { height: 8px; animation: humPulse 1.2s ease-in-out infinite; }
.hum-bar:nth-child(2) { height: 14px; animation: humPulse 1.2s ease-in-out infinite 0.2s; }
.hum-bar:nth-child(3) { height: 6px; animation: humPulse 1.2s ease-in-out infinite 0.4s; }

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

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .frequency-header .deco-border-frame {
        width: 95%;
        padding: 2rem 1rem;
    }

    .signal-band .deco-border-frame {
        padding: 2rem 1.5rem;
    }

    .band-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .band-line {
        width: 60px;
    }
}
