/* gabs.day - Value Flows Meditation */
/* Fonts: Anybody, Cormorant, IBM Plex Mono, Inter */
/* Colors: #F5E6D3, #B8877A, #D4724E, #E8A87C, #5C3D2E, #2A231E, #C4956A */

:root {
    --warm-cream: #F5E6D3;
    --dusty-rose: #B8877A;
    --burnt-sienna: #D4724E;
    --soft-terracotta: #E8A87C;
    --dark-walnut: #5C3D2E;
    --deep-charcoal: #2A231E;
    --golden-tan: #C4956A;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--deep-charcoal);
    color: var(--warm-cream);
    font-family: 'Cormorant', 'Inter', serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Full-viewport generative canvas */
#generative-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

/* SVG geometric HUD overlays */
#hud-geometry {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.geo-circle {
    fill: none;
    stroke: #E8A87C;
    stroke-width: 0.15;
    opacity: 0.06;
    animation: geoBreathe 6s ease-in-out infinite;
}

.geo-circle:nth-child(2) { animation-delay: -1.5s; }
.geo-circle:nth-child(3) { animation-delay: -3s; }
.geo-circle:nth-child(4) { animation-delay: -4.5s; }

.geo-crosshair {
    stroke: #E8A87C;
    stroke-width: 0.08;
    opacity: 0.05;
    animation: geoBreathe 6s ease-in-out infinite;
    animation-delay: -2s;
}

.geo-tick {
    stroke: #E8A87C;
    stroke-width: 0.2;
    opacity: 0.06;
    animation: geoBreathe 6s ease-in-out infinite;
}

@keyframes geoBreathe {
    0%, 100% { opacity: 0.04; }
    50% { opacity: 0.08; }
}

/* HUD Overlay */
#hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

.hud-panel {
    position: absolute;
    pointer-events: auto;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Top-left: Identity bar */
.hud-top-left {
    top: 28px;
    left: 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 40vw;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.identity-domain {
    font-family: 'Anybody', sans-serif;
    font-weight: 200;
    font-stretch: 125%;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--warm-cream);
    opacity: 0.85;
}

.identity-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--golden-tan);
    opacity: 0.6;
}

/* Top-right: State indicator */
.hud-top-right {
    top: 28px;
    right: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.state-dots {
    display: flex;
    gap: 8px;
}

.state-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(196, 149, 106, 0.3);
    background: transparent;
    color: var(--golden-tan);
    font-family: 'Inter', 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.state-dot:hover {
    border-color: var(--golden-tan);
    opacity: 0.8;
}

.state-dot.active {
    border-color: var(--burnt-sienna);
    background: rgba(212, 114, 78, 0.15);
    color: var(--burnt-sienna);
    opacity: 1;
    box-shadow: 0 0 12px rgba(212, 114, 78, 0.2);
}

.state-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dusty-rose);
    opacity: 0.6;
}

/* Center: Contemplation panel */
.hud-center-area {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 520px;
    width: 90%;
    padding: 36px 40px;
    background: rgba(42, 35, 30, 0.55);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.counter-number {
    font-family: 'Anybody', sans-serif;
    font-weight: 100;
    font-stretch: 150%;
    font-size: 96px;
    color: var(--soft-terracotta);
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 8px;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.counter-number.fading {
    opacity: 0;
    filter: blur(8px);
}

.contemplation-title {
    font-family: 'Anybody', sans-serif;
    font-weight: 100;
    font-stretch: 150%;
    font-size: 72px;
    letter-spacing: 0.04em;
    color: var(--warm-cream);
    opacity: 0.9;
    margin-bottom: 20px;
    transition: font-stretch 1.2s ease, font-weight 1.2s ease, font-size 1.2s ease, opacity 0.8s ease;
}

.contemplation-text {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-size: 20px;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--warm-cream);
    opacity: 0.65;
    transition: opacity 0.8s ease;
}

/* Bottom-left: Data readout */
.hud-bottom-left {
    bottom: 64px;
    left: 32px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.data-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dusty-rose);
    opacity: 0.5;
    min-width: 70px;
}

.data-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--golden-tan);
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

/* Bottom-left: Timestamp */
.hud-timestamp {
    bottom: 28px;
    left: 32px;
}

.time-display {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--soft-terracotta);
    opacity: 0.6;
}

/* Bottom-right: Hint */
.hud-bottom-right {
    bottom: 28px;
    right: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.hint-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--golden-tan);
    opacity: 0.35;
}

.hint-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 10px;
    color: var(--dusty-rose);
    opacity: 0.25;
}

/* Watermark */
.hud-watermark {
    position: absolute;
    bottom: 50%;
    right: 6%;
    transform: translateY(50%);
    pointer-events: none;
}

#watermark-char {
    font-family: 'Anybody', sans-serif;
    font-weight: 100;
    font-stretch: 75%;
    font-size: 280px;
    color: var(--dusty-rose);
    opacity: 0.035;
    transition: opacity 1.5s ease, font-stretch 2s ease;
    user-select: none;
}

/* Collage layer */
#collage-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 8;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

.collage-fragment {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: soft-light;
}

.collage-fragment.visible {
    opacity: 0.7;
}

.collage-char {
    font-family: 'Anybody', sans-serif;
    font-weight: 200;
    font-size: 120px;
    color: var(--soft-terracotta);
    opacity: 0.5;
}

.collage-shape {
    display: block;
}

/* Transition overlay */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 0%, var(--deep-charcoal) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

#transition-overlay.active {
    opacity: 0.5;
}

/* Breathing animation for HUD panels */
@keyframes breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.hud-panel {
    animation: breathe 6s ease-in-out infinite;
}

/* Fade-in on load */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#hud-overlay {
    animation: fadeIn 2s ease forwards;
}

/* State transition styles for contemplation title */
.contemplation-title.state-1 {
    font-stretch: 150%;
    font-weight: 100;
    font-size: 72px;
}

.contemplation-title.state-2 {
    font-stretch: 120%;
    font-weight: 300;
    font-size: 56px;
}

.contemplation-title.state-3 {
    font-stretch: 100%;
    font-weight: 500;
    font-size: 48px;
}

.contemplation-title.state-4 {
    font-stretch: 85%;
    font-weight: 700;
    font-size: 40px;
}

.contemplation-title.state-5 {
    font-stretch: 75%;
    font-weight: 900;
    font-size: 64px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hud-top-left { top: 16px; left: 16px; width: auto; }
    .hud-top-right { top: 16px; right: 16px; }
    .hud-bottom-left { bottom: 52px; left: 16px; }
    .hud-bottom-right { bottom: 16px; right: 16px; }
    .hud-timestamp { bottom: 16px; left: 16px; }

    .hud-center-area {
        padding: 24px 20px;
    }

    .counter-number {
        font-size: 56px;
    }

    .contemplation-title {
        font-size: 48px !important;
    }

    .contemplation-text {
        font-size: 16px;
    }

    #watermark-char {
        font-size: 160px;
    }

    .state-dot {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .counter-number {
        font-size: 40px;
    }

    .contemplation-title {
        font-size: 36px !important;
    }

    .contemplation-text {
        font-size: 15px;
    }

    #watermark-char {
        font-size: 100px;
    }

    .hud-bottom-left {
        display: none;
    }
}
