/* globaltonecheck.com - Watercolor Spectrogram HUD */

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

:root {
    --sapphire: #0F3460;
    --amethyst: #5B2C6F;
    --ruby: #922B21;
    --emerald: #145A32;
    --topaz: #D4AC0D;
    --white: #E8E4DF;
    --faded: #A89F91;
    --surface: rgba(10, 10, 30, 0.45);
    --border: rgba(255, 255, 255, 0.12);
    --fade: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--white);
    background: var(--sapphire);
    overflow-x: hidden;
    line-height: 1.7;
}

/* Watercolor Canvas */
.watercolor-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 30% 40%, var(--sapphire) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, var(--amethyst) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, var(--emerald) 0%, transparent 50%);
    background-size: 100% 100%;
    animation: washShift 30s ease-in-out infinite alternate;
}

@keyframes washShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(15deg); }
}

.wc-filter-svg {
    position: absolute;
    width: 0;
    height: 0;
}

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    mix-blend-mode: overlay;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='6'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* HUD Elements */
.hud-crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 50;
    pointer-events: none;
    animation: rotateHUD 720s linear infinite;
}

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

.ch-h, .ch-v {
    position: absolute;
    background: rgba(255,255,255,0.15);
}
.ch-h { width: 40px; height: 0.5px; top: 0; left: -20px; }
.ch-v { width: 0.5px; height: 40px; left: 0; top: -20px; }

.hud-corner {
    position: fixed;
    z-index: 50;
    pointer-events: none;
    transition: opacity 800ms ease;
}

.hud-corner::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 0.5px solid rgba(255,255,255,0.15);
}

.tl { top: 16px; left: 16px; }
.tl::before { border-right: none; border-bottom: none; }
.tr { top: 16px; right: 16px; }
.tr::before { border-left: none; border-bottom: none; right: 0; }
.bl { bottom: 16px; left: 16px; }
.bl::before { border-right: none; border-top: none; }
.br { bottom: 16px; right: 16px; }
.br::before { border-left: none; border-top: none; right: 0; }

.hud-data {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--faded);
    display: block;
    padding: 36px 4px 0 4px;
}

.tr .hud-data, .br .hud-data { text-align: right; }

/* Zone Dots */
.zone-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    cursor: pointer;
    transition: background 400ms ease, border-color 400ms ease;
    padding: 0;
}

.dot.active {
    background: var(--c);
    border-color: var(--c);
}

/* Waveforms */
.waveforms {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Zones */
.zone {
    position: relative;
    min-height: 140vh;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 64px;
}

/* Fade Reveal */
.fade-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--fade), transform 600ms var(--fade);
    transition-delay: var(--d, 0ms);
}

.fade-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero */
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-word {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

/* HUD Panels */
.hud-panel {
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 32px;
    position: relative;
    max-width: 520px;
}

.hud-panel::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -4px;
    right: 4px;
    bottom: 4px;
    background: radial-gradient(ellipse at top left, rgba(15,52,96,0.15), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.panel-label {
    font-weight: 500;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    letter-spacing: 0.15em;
    line-height: 1.4;
    display: block;
    margin-bottom: 16px;
    color: var(--topaz);
}

.panel-body {
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    letter-spacing: 0.02em;
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Caveat Notes */
.caveat-note {
    font-family: 'Caveat', cursive;
    font-size: 15px;
    color: rgba(255,255,255,0.35);
    display: block;
    margin-top: 12px;
}

/* Frequency Zone Layout */
.zone-frequency {
    flex-direction: row;
    gap: 60px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.panel-left { flex: 1; max-width: 480px; }
.panel-right { flex: 1; max-width: 400px; }

.frequency-line {
    width: 2px;
    height: 200px;
    border-left: 1px dashed rgba(255,255,255,0.15);
}

.panel-wave {
    width: 100%;
    height: 120px;
}

/* Spectrum Fan */
.spectrum-fan {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.spec-panel {
    width: 15vw;
    min-width: 140px;
    height: 70vh;
    min-height: 400px;
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: rotate(var(--tilt, 0deg));
    position: relative;
    overflow: hidden;
}

.spec-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg);
    opacity: 0.15;
    z-index: -1;
}

.spec-label {
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
    color: var(--topaz);
}

.spec-freq {
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--faded);
    margin-bottom: 12px;
}

.spec-desc {
    font-weight: 300;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--white);
}

.spectrum-note {
    margin-top: 32px;
}

/* Closing Zone */
.zone-reading {
    min-height: 100vh;
}

.panel-center {
    max-width: 520px;
    text-align: center;
}

.closing-mark {
    text-align: center;
    margin-top: 60px;
}

.closing-rule {
    width: 80px;
    height: 1px;
    background: var(--faded);
    border: none;
    margin: 0 auto 16px;
}

.closing-name {
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--faded);
}

/* Responsive */
@media (max-width: 768px) {
    .zone {
        padding: 60px 24px;
        min-height: 100vh;
    }

    .zone-frequency {
        flex-direction: column;
    }

    .frequency-line {
        width: 80px;
        height: 1px;
        border-left: none;
        border-top: 1px dashed rgba(255,255,255,0.15);
    }

    .spectrum-fan {
        flex-direction: column;
        gap: 12px;
    }

    .spec-panel {
        width: 100%;
        min-width: auto;
        height: auto;
        min-height: 160px;
        transform: none;
    }

    .hud-crosshair { display: none; }
    .hud-corner { display: none; }
}
