/* haroo.day — Mid-Century Space Operations HUD */
/* Colors: #2e1f2e #d4a0a0 #8aab8a #f8e4d0 #f2e8e4 #4a2040 #d8ddef #e87461 */
/* Fonts: Outfit (display), Libre Baskerville (body/italic), Space Mono (mono) */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    color: #f2e8e4;
    background: #2e1f2e;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== TYPOGRAPHY ===== */
.display-huge {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(56px, 10vw, 120px);
    letter-spacing: 0.04em;
    line-height: 1.0;
    color: #f2e8e4;
}

.display-medium {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(32px, 5vw, 56px);
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: #f2e8e4;
}

.display-small {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(20px, 3vw, 36px);
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #f8e4d0;
}

.subtitle {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(18px, 2.5vw, 28px);
    font-weight: 400;
    line-height: 1.5;
    color: #d8ddef;
}

.body-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 400;
    line-height: 1.7;
    color: #f2e8e4;
    max-width: 520px;
}

.italic {
    font-style: italic;
}

.mono {
    font-family: 'Space Mono', monospace;
    font-size: clamp(10px, 1vw, 13px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8aab8a;
}

/* ===== SKY BACKGROUND ===== */
#sky-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#sky-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #f8e4d0 0%, #d8ddef 50%, #d4a0a0 100%);
    transition: opacity 0.3s ease;
}

#sky-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

/* ===== HUD FRAME ===== */
#hud-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.hud-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    border-color: #8aab8a;
    border-style: solid;
    opacity: 0.4;
}

.hud-corner-tl {
    top: 20px;
    left: 20px;
    border-width: 2px 0 0 2px;
}

.hud-corner-tr {
    top: 20px;
    right: 20px;
    border-width: 2px 2px 0 0;
}

.hud-corner-bl {
    bottom: 20px;
    left: 20px;
    border-width: 0 0 2px 2px;
}

.hud-corner-br {
    bottom: 20px;
    right: 20px;
    border-width: 0 2px 2px 0;
}

.hud-line {
    position: absolute;
    background: #8aab8a;
    opacity: 0.15;
}

.hud-line-top,
.hud-line-bottom {
    height: 1px;
    left: 90px;
    right: 90px;
}

.hud-line-top { top: 20px; }
.hud-line-bottom { bottom: 20px; }

.hud-line-left,
.hud-line-right {
    width: 1px;
    top: 90px;
    bottom: 90px;
}

.hud-line-left { left: 20px; }
.hud-line-right { right: 20px; }

/* ===== TIME INDICATOR (right rail) ===== */
#time-indicator {
    position: fixed;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    height: 300px;
    pointer-events: none;
}

#time-track {
    width: 2px;
    height: 100%;
    background: rgba(138, 171, 138, 0.2);
    border-radius: 1px;
    position: relative;
}

#time-marker {
    width: 10px;
    height: 10px;
    background: #e87461;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    transition: top 0.15s ease-out;
    box-shadow: 0 0 12px rgba(232, 116, 97, 0.5);
}

#time-labels {
    position: absolute;
    top: 0;
    right: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#time-labels span {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: #8aab8a;
    opacity: 0.5;
    letter-spacing: 0.1em;
}

/* ===== NARRATIVE / ZONES ===== */
#narrative {
    position: relative;
    z-index: 5;
}

.zone {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    gap: 40px;
}

.zone-dawn { padding-top: 120px; }

/* ===== PANELS ===== */
.panel {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.panel.is-visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--panel-rotate, 0deg));
}

.panel-glass {
    background: rgba(46, 31, 46, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(138, 171, 138, 0.2);
    border-radius: 4px;
    padding: 32px 40px;
    max-width: 560px;
    position: relative;
}

.panel-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 171, 138, 0.4), transparent);
}

.panel-glass-narrow {
    max-width: 280px;
    padding: 24px 28px;
}

.panel-glass-stamp {
    max-width: 240px;
    padding: 20px 24px;
    text-align: center;
    border: 2px solid rgba(232, 116, 97, 0.4);
}

.panel-tag {
    display: block;
    margin-bottom: 12px;
    opacity: 0.8;
}

.panel-title {
    text-align: center;
}

.panel-title .panel-glass {
    max-width: 700px;
    text-align: center;
}

/* ===== DATA READOUTS ===== */
.data-readout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(138, 171, 138, 0.1);
}

.data-readout:last-child {
    border-bottom: none;
}

.data-label {
    font-size: 9px;
    opacity: 0.6;
}

.data-value {
    color: #f8e4d0;
}

/* ===== MOTIFS ===== */
.motif {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.motif.is-visible {
    opacity: 0.7;
    transform: scale(1);
}

.motif-starburst {
    position: absolute;
    top: 10%;
    right: 8%;
}

.motif-coffee {
    position: absolute;
    bottom: 15%;
    left: 10%;
}

.motif-solar-dial {
    position: relative;
}

.motif-birds {
    position: absolute;
    top: 20%;
    right: 12%;
}

.motif-constellation {
    position: absolute;
    top: 8%;
    left: 8%;
}

/* ===== STAMP ===== */
.stamp-text {
    display: block;
    font-size: 12px;
    color: #e87461;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.stamp-date {
    display: block;
    font-size: 10px;
    color: #d4a0a0;
    opacity: 0.7;
}

/* ===== HUD CLOCK ===== */
#hud-clock {
    position: fixed;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}

#hud-clock-time {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: #8aab8a;
    letter-spacing: 0.2em;
}

#hud-clock-label {
    font-size: 8px;
    opacity: 0.4;
    color: #8aab8a;
    letter-spacing: 0.2em;
}

/* ===== SCROLL PROMPT ===== */
#scroll-prompt {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 1;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

#scroll-prompt.hidden {
    opacity: 0;
}

#scroll-prompt .mono {
    font-size: 10px;
    opacity: 0.6;
}

.scroll-arrow {
    animation: bounceDown 2s ease-in-out infinite;
}

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

/* ===== SVG ANIMATIONS ===== */
.steam {
    animation: steamRise 3s ease-in-out infinite;
    opacity: 0.6;
}

.steam-1 { animation-delay: 0s; }
.steam-2 { animation-delay: 0.8s; }
.steam-3 { animation-delay: 1.6s; }

@keyframes steamRise {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-12px); }
}

/* ===== LAYOUT POSITIONING ===== */
.zone-dawn {
    min-height: 120vh;
}

.zone-morning {
    min-height: 110vh;
}

.zone-midday {
    min-height: 120vh;
}

.zone-evening {
    min-height: 110vh;
}

.zone-night {
    min-height: 130vh;
    padding-bottom: 160px;
}

/* Panel offsets for asymmetry */
.panel-title {
    align-self: center;
    z-index: 2;
}

.panel-dawn-info {
    align-self: flex-start;
    margin-left: 10%;
    z-index: 2;
}

.panel-morning-main {
    align-self: flex-end;
    margin-right: 8%;
    z-index: 2;
}

.panel-morning-data {
    align-self: flex-start;
    margin-left: 15%;
    z-index: 2;
}

.panel-midday-main {
    align-self: flex-start;
    margin-left: 12%;
    z-index: 2;
}

.panel-midday-quote {
    align-self: flex-end;
    margin-right: 10%;
    z-index: 2;
}

.panel-evening-main {
    align-self: flex-end;
    margin-right: 12%;
    z-index: 2;
}

.panel-evening-data {
    align-self: flex-start;
    margin-left: 10%;
    z-index: 2;
}

.panel-night-main {
    align-self: center;
    z-index: 2;
}

.panel-night-closing {
    align-self: center;
    z-index: 2;
}

.panel-end-stamp {
    align-self: center;
    margin-top: 40px;
    z-index: 2;
}

/* ===== BLOCKQUOTE ===== */
blockquote.body-text {
    border-left: 2px solid rgba(138, 171, 138, 0.3);
    padding-left: 20px;
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .zone {
        padding: 60px 24px;
        gap: 28px;
    }

    .panel-glass {
        padding: 24px 28px;
        max-width: 100%;
    }

    .panel-dawn-info,
    .panel-morning-main,
    .panel-morning-data,
    .panel-midday-main,
    .panel-midday-quote,
    .panel-evening-main,
    .panel-evening-data {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    .motif-starburst,
    .motif-coffee,
    .motif-birds,
    .motif-constellation {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
    }

    #time-indicator {
        display: none;
    }

    .hud-corner {
        width: 30px;
        height: 30px;
    }

    .hud-corner-tl { top: 10px; left: 10px; }
    .hud-corner-tr { top: 10px; right: 10px; }
    .hud-corner-bl { bottom: 10px; left: 10px; }
    .hud-corner-br { bottom: 10px; right: 10px; }

    .hud-line-top, .hud-line-bottom { left: 50px; right: 50px; }
    .hud-line-left, .hud-line-right { top: 50px; bottom: 50px; }
    .hud-line-top { top: 10px; }
    .hud-line-bottom { bottom: 10px; }
    .hud-line-left { left: 10px; }
    .hud-line-right { right: 10px; }
}

/* Solar hand rotation animation */
#solar-hand {
    transform-origin: 0 0;
    transition: transform 0.3s ease-out;
}