/* ========================================
   globaltonecheck.com - Styles
   Sci-Fi Signal Observatory
   ======================================== */

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

:root {
    --void-indigo: #0D0B2E;
    --nebula-violet: #2A1B5E;
    --plasma-cyan: #00D4FF;
    --biolume-green: #00E5A0;
    --supernova-coral: #FF6B6B;
    --transmission-amber: #FFB347;
    --frostglass: #E8E6F0;
    --spectral-gray: #8B87A8;
    --mid-indigo: #1A0F4A;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--void-indigo);
    color: var(--frostglass);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    color: var(--frostglass);
}

h1 {
    font-size: 4rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    font-size: 2.4rem;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin-bottom: 32px;
}

h3 {
    font-size: 1.6rem;
    line-height: 1.4;
    margin-bottom: 16px;
}

p {
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 24px;
    font-weight: 400;
}

.signal-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--biolume-green);
    display: block;
    margin-bottom: 8px;
}

/* --- Navigation Dial --- */
.nav-dial {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    z-index: 1000;
    cursor: pointer;
}

.dial-ring {
    width: 48px;
    height: 48px;
    border: 2px solid var(--plasma-cyan);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: dialSpin 60s linear infinite;
    opacity: 0.7;
}

.dial-indicator {
    width: 8px;
    height: 8px;
    background: var(--plasma-cyan);
    border-radius: 50%;
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    animation: dialSpin 60s linear infinite;
}

@keyframes dialSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radial-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-dial.open .radial-menu {
    pointer-events: auto;
    opacity: 1;
}

.radial-link {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--plasma-cyan);
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 12px;
    background: rgba(13, 11, 46, 0.9);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 4px;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease, background 0.2s ease;
}

.nav-dial.open .radial-link {
    transform: translate(-50%, -50%) scale(1);
}

.nav-dial.open .radial-link[data-angle="0"] { top: -80px; left: 0; }
.nav-dial.open .radial-link[data-angle="1"] { top: -50px; left: -90px; }
.nav-dial.open .radial-link[data-angle="2"] { top: 20px; left: -100px; }
.nav-dial.open .radial-link[data-angle="3"] { top: 70px; left: -70px; }
.nav-dial.open .radial-link[data-angle="4"] { top: 90px; left: 10px; }

.radial-link:hover {
    background: rgba(0, 212, 255, 0.15);
    color: var(--frostglass);
}

/* --- Scenes (Sections) --- */
.scene {
    position: relative;
    overflow: hidden;
}

.scene-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0D0B2E 0%, #2A1B5E 40%, #1A0F4A 70%, #0D0B2E 100%);
}

.scene-spectrum {
    min-height: 120vh;
    background: var(--nebula-violet);
    padding: 120px 0 160px;
}

.scene-analysis {
    min-height: 120vh;
    background: var(--void-indigo);
    padding: 120px 0 160px;
}

.scene-resonance {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.08) 0%, var(--void-indigo) 70%);
    padding: 120px 0 160px;
}

.scene-transmission {
    min-height: 60vh;
    background: linear-gradient(135deg, var(--void-indigo) 0%, rgba(255, 107, 107, 0.04) 50%, var(--void-indigo) 100%);
    padding: 120px 0 80px;
}

/* --- Noise Overlays --- */
.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.noise-tight { filter: url(#noise-tight); }
.noise-normal { filter: url(#noise-normal); }
.noise-loose { filter: url(#noise-loose); }

/* --- Diagonal Containers --- */
.diagonal-container {
    position: relative;
    z-index: 2;
}

.diagonal-positive {
    transform: skewY(3deg);
}

.diagonal-negative {
    transform: skewY(-3deg);
}

.diagonal-positive > .decoder-window,
.diagonal-negative > .decoder-window {
    transform: skewY(-3deg);
}

.diagonal-negative > .decoder-window {
    transform: skewY(3deg);
}

.diagonal-edge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: var(--nebula-violet);
    transform: skewY(-3deg);
    transform-origin: bottom left;
    z-index: 2;
}

/* --- Decoder Windows --- */
.decoder-window {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px;
    background: rgba(13, 11, 46, 0.7);
    border: 2px solid rgba(232, 230, 240, 0.15);
    border-radius: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    z-index: 3;
}

.section-header {
    margin-bottom: 40px;
}

/* --- Hero Content --- */
.hero-content {
    text-align: center;
    position: relative;
    z-index: 5;
    padding: 0 24px;
}

.hero-title {
    opacity: 0;
}

.hero-title.revealed .letter {
    display: inline-block;
    animation: letterReveal 0.4s ease forwards;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(-2px);
    }
    50% {
        transform: translateY(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-tagline {
    font-weight: 300;
    font-size: 1.25rem;
    color: var(--spectral-gray);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-tagline.visible {
    opacity: 1;
}

/* --- Blobs --- */
.blob {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 212, 255, 0.25) 0%, rgba(0, 229, 160, 0.15) 40%, transparent 70%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

.blob-hero.blob-1 {
    width: 500px;
    height: 500px;
    top: 10%;
    left: -5%;
    animation: blobMorph1 10s ease-in-out infinite;
    opacity: 0.3;
}

.blob-hero.blob-2 {
    width: 400px;
    height: 400px;
    top: 30%;
    right: -8%;
    animation: blobMorph2 12s ease-in-out infinite;
    opacity: 0.25;
}

.blob-hero.blob-3 {
    width: 600px;
    height: 600px;
    bottom: -10%;
    left: 30%;
    animation: blobMorph3 8s ease-in-out infinite;
    opacity: 0.2;
}

.blob-anchor {
    z-index: 3;
}

.blob-anchor-1 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    right: 10%;
    animation: blobMorph1 9s ease-in-out infinite;
    opacity: 0.25;
}

.blob-anchor-2 {
    width: 250px;
    height: 250px;
    bottom: -60px;
    left: 15%;
    animation: blobMorph2 11s ease-in-out infinite;
    opacity: 0.2;
}

.blob-resonance-center {
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: blobPulse 4s ease-in-out infinite;
    z-index: 0;
}

.blob-scatter {
    z-index: 1;
}

.blob-scatter-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 5%;
    animation: blobDrift1 15s ease-in-out infinite;
    opacity: 0.3;
}

.blob-scatter-2 {
    width: 100px;
    height: 100px;
    top: 40%;
    right: 8%;
    animation: blobDrift2 18s ease-in-out infinite;
    opacity: 0.25;
}

.blob-scatter-3 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    left: 40%;
    animation: blobDrift3 12s ease-in-out infinite;
    opacity: 0.2;
}

@keyframes blobMorph1 {
    0%, 100% { border-radius: 60% 40% 55% 45% / 55% 60% 40% 45%; }
    25% { border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%; }
    50% { border-radius: 55% 45% 60% 40% / 40% 55% 45% 60%; }
    75% { border-radius: 40% 60% 45% 55% / 45% 40% 60% 55%; }
}

@keyframes blobMorph2 {
    0%, 100% { border-radius: 50% 50% 45% 55% / 60% 40% 55% 45%; }
    33% { border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%; }
    66% { border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%; }
}

@keyframes blobMorph3 {
    0%, 100% { border-radius: 45% 55% 50% 50% / 50% 45% 55% 50%; }
    50% { border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%; }
}

@keyframes blobPulse {
    0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.35; transform: translate(-50%, -50%) scale(1.03); }
}

@keyframes blobDrift1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -15px); }
}

@keyframes blobDrift2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-15px, 20px); }
}

@keyframes blobDrift3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -25px); }
}

/* --- Inline Blobs --- */
.content-with-blob {
    position: relative;
    padding-left: 120px;
    min-height: 100px;
    margin-bottom: 32px;
}

.inline-blob {
    position: absolute;
    left: 0;
    top: 0;
    width: 90px;
    height: 90px;
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 212, 255, 0.2) 0%, rgba(0, 229, 160, 0.1) 40%, transparent 70%);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.inline-blob-1 {
    border-radius: 60% 40% 55% 45% / 55% 60% 40% 45%;
    animation: blobMorph1 8s ease-in-out infinite;
}

.inline-blob-2 {
    border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%;
    animation: blobMorph2 10s ease-in-out infinite;
}

/* --- Signal Readout --- */
.signal-readout {
    padding: 16px 24px;
    background: rgba(0, 229, 160, 0.05);
    border-left: 3px solid var(--biolume-green);
    margin: 32px 0;
}

/* --- Signal Cards --- */
.signal-cards {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.signal-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px;
    background: rgba(13, 11, 46, 0.7);
    border: 1px solid var(--plasma-cyan);
    border-radius: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.signal-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.signal-card p:last-child {
    margin-bottom: 0;
}

/* --- Resonance Section --- */
.resonance-core {
    position: relative;
    text-align: center;
}

.revelation-text {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.85;
    max-width: 640px;
    margin: 0 auto 24px;
}

.signal-quote {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--plasma-cyan);
    padding: 32px;
    margin: 40px auto;
    max-width: 600px;
    border-left: 3px solid var(--transmission-amber);
    text-align: left;
}

.signal-quote .signal-label {
    font-style: normal;
    margin-bottom: 12px;
}

/* --- Transmission Section --- */
.transmission-coordinates {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.coord-block {
    flex: 1;
    min-width: 160px;
    text-align: center;
    padding: 24px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
}

.coord-value {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--plasma-cyan);
    letter-spacing: 0.04em;
}

.transmission-message {
    text-align: center;
    font-weight: 300;
    color: var(--spectral-gray);
    font-size: 1rem;
}

/* --- Waveforms --- */
.waveform {
    position: absolute;
    width: 100%;
    pointer-events: none;
    z-index: 2;
}

.waveform-hero {
    top: 50%;
    transform: translateY(-50%);
    height: 100px;
    opacity: 0.3;
}

.waveform-seam {
    bottom: -30px;
    height: 60px;
}

.waveform-final {
    bottom: 40px;
    height: 60px;
}

.waveform-path {
    fill: none;
    stroke-width: 1.5;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 3s ease;
}

.waveform-path.drawn {
    stroke-dashoffset: 0;
}

.waveform-cyan { stroke: rgba(0, 212, 255, 0.3); }
.waveform-cyan-faint { stroke: rgba(0, 212, 255, 0.2); }
.waveform-green-faint { stroke: rgba(0, 229, 160, 0.25); }
.waveform-coral-faint { stroke: rgba(255, 107, 107, 0.15); }
.waveform-final-path { stroke: rgba(255, 179, 71, 0.2); }

/* --- Ripple Effects --- */
.ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--plasma-cyan);
    opacity: 0;
    animation: rippleExpand 1.2s ease-out forwards;
    pointer-events: none;
}

.ripple:nth-child(2) { animation-delay: 0.15s; }
.ripple:nth-child(3) { animation-delay: 0.3s; }

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
        transform: translate(-50%, -50%);
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
        transform: translate(-50%, -50%);
    }
}

.ripple.small {
    animation-name: rippleExpandSmall;
}

@keyframes rippleExpandSmall {
    0% {
        width: 0;
        height: 0;
        opacity: 0.3;
        transform: translate(-50%, -50%);
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        transform: translate(-50%, -50%);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }

    .decoder-window {
        margin: 0 16px;
        padding: 32px 24px;
    }

    .content-with-blob {
        padding-left: 0;
        padding-top: 100px;
    }

    .inline-blob {
        left: 50%;
        transform: translateX(-50%);
    }

    .transmission-coordinates {
        flex-direction: column;
    }

    .blob-hero.blob-1 { width: 250px; height: 250px; }
    .blob-hero.blob-2 { width: 200px; height: 200px; }
    .blob-hero.blob-3 { width: 300px; height: 300px; }
}
