/* ============================================
   postp.day — Styles
   Anti-design aesthetic / Post-production suite
   ============================================ */

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

:root {
    --midnight-blue: #0A1028;
    --monitor-glow: #1830A0;
    --candle-warm: #F0B040;
    --glass-frost: #E0E8F0;
    --edit-white: #E8E8F0;
    --render-green: #40C870;
    --rough-gray: #404860;

    --font-primary: 'Playfair Display', Georgia, serif;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--rough-gray) var(--midnight-blue);
}

body {
    background: var(--midnight-blue);
    color: var(--edit-white);
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Hero Sections (full viewport) --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 48px 24px;
}

/* --- Monitor Glow Effects --- */
.monitor-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.15) 0%, transparent 70%);
    top: 10%;
    left: 15%;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.12) 0%, transparent 70%);
    bottom: 20%;
    right: 10%;
}

.glow-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.14) 0%, transparent 70%);
    top: 30%;
    right: 20%;
}

.glow-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.10) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.glow-5 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.13) 0%, transparent 70%);
    top: 15%;
    left: 25%;
}

.glow-6 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.18) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.monitor-glow--bright {
    background: radial-gradient(circle, rgba(24, 48, 160, 0.25) 0%, transparent 70%);
}

/* --- Candle Glow Effects --- */
.candle-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: candleFadeIn 1200ms ease forwards;
}

.candle-1 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.12) 0%, transparent 70%);
    top: 25%;
    right: 25%;
    animation-delay: 300ms;
}

.candle-2 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.10) 0%, transparent 70%);
    bottom: 30%;
    left: 20%;
    animation-delay: 600ms;
}

.candle-3 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.14) 0%, transparent 70%);
    top: 20%;
    left: 15%;
    animation-delay: 200ms;
}

.candle-4 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.16) 0%, transparent 70%);
    top: 15%;
    right: 30%;
    animation-delay: 400ms;
}

.candle-5 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.11) 0%, transparent 70%);
    bottom: 25%;
    left: 35%;
    animation-delay: 700ms;
}

.candle-6 {
    width: 190px;
    height: 190px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.13) 0%, transparent 70%);
    bottom: 35%;
    right: 15%;
    animation-delay: 500ms;
}

.candle-7 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.20) 0%, transparent 70%);
    top: 30%;
    left: 20%;
    animation-delay: 300ms;
}

.candle-8 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.18) 0%, transparent 70%);
    bottom: 20%;
    right: 25%;
    animation-delay: 600ms;
}

.candle-glow--warm {
    animation: candleFadeIn 1200ms ease forwards, candleFlicker 3000ms ease-in-out infinite;
}

@keyframes candleFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes candleFlicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    25% { opacity: 0.85; transform: scale(1.02); }
    50% { opacity: 1; transform: scale(0.98); }
    75% { opacity: 0.9; transform: scale(1.01); }
}

/* --- Typography --- */
.domain-title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 52px);
    color: var(--edit-white);
    letter-spacing: 0.02em;
    opacity: 0;
    animation: titleFadeIn 1000ms ease 500ms forwards;
    position: relative;
    z-index: 2;
}

@keyframes titleFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-heading {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: clamp(22px, 2.5vw, 38px);
    color: var(--edit-white);
    margin-bottom: 16px;
}

.section-heading--final {
    color: var(--render-green);
}

.status-label {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rough-gray);
    display: inline-block;
    margin-bottom: 8px;
}

.status-label--complete {
    color: var(--render-green);
}

.timestamp {
    font-family: var(--font-primary);
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: var(--rough-gray);
}

.body-text {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.85;
    color: var(--edit-white);
}

.hero-tagline {
    font-family: var(--font-primary);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--rough-gray);
    margin-top: 8px;
    opacity: 0;
    animation: titleFadeIn 1000ms ease 800ms forwards;
    position: relative;
    z-index: 2;
}

/* --- Hero Content --- */
.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 60px;
}

.hero-content .status-label {
    opacity: 0;
    animation: titleFadeIn 800ms ease 300ms forwards;
}

.hero-content .timestamp {
    display: block;
    margin-top: 12px;
    opacity: 0;
    animation: titleFadeIn 800ms ease 1100ms forwards;
}

/* --- Glassmorphic Cards --- */
.glass-card {
    background: rgba(224, 232, 240, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(224, 232, 240, 0.15);
    padding: 32px;
    position: relative;
    z-index: 2;
    transition: backdrop-filter 400ms ease, -webkit-backdrop-filter 400ms ease, border-radius 400ms ease, background 400ms ease, transform 300ms ease;
}

.glass-card:hover {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(224, 232, 240, 0.12);
}

/* Anti-design rough edges — intentionally mismatched border-radius */
.glass-card--rough-1 {
    border-radius: 8px 14px 6px 16px;
}

.glass-card--rough-1:hover {
    border-radius: 10px 10px 10px 10px;
}

.glass-card--rough-2 {
    border-radius: 16px 6px 12px 4px;
}

.glass-card--rough-2:hover {
    border-radius: 10px 10px 10px 10px;
}

.glass-card--rough-3 {
    border-radius: 4px 18px 10px 14px;
}

.glass-card--rough-3:hover {
    border-radius: 10px 10px 10px 10px;
}

.glass-card--rough-4 {
    border-radius: 12px 4px 18px 8px;
}

.glass-card--rough-4:hover {
    border-radius: 10px 10px 10px 10px;
}

.glass-card--rough-5 {
    border-radius: 6px 16px 4px 12px;
}

.glass-card--rough-5:hover {
    border-radius: 10px 10px 10px 10px;
}

/* Card sizing and layout */
.glass-card--hero {
    width: min(600px, 90vw);
    margin: 12px auto;
    opacity: 0;
    animation: cardMaterialize 600ms ease forwards;
}

.glass-card--offset-left {
    border-radius: 10px 16px 6px 14px;
    transform: translateX(-30px);
    animation-delay: 1200ms;
}

.glass-card--offset-left:hover {
    border-radius: 10px 10px 10px 10px;
    transform: translateX(-28px) scale(1.01);
}

.glass-card--offset-right {
    border-radius: 6px 12px 16px 8px;
    transform: translateX(30px);
    animation-delay: 1500ms;
}

.glass-card--offset-right:hover {
    border-radius: 10px 10px 10px 10px;
    transform: translateX(28px) scale(1.01);
}

.glass-card--preview {
    width: min(700px, 90vw);
    margin: 16px auto;
    opacity: 0;
}

.glass-card--preview.visible {
    animation: cardReveal 700ms ease forwards;
}

.glass-card--bay {
    width: min(650px, 90vw);
    margin: 24px auto;
    border-radius: 4px 18px 10px 14px;
    opacity: 0;
}

.glass-card--bay.visible {
    animation: cardReveal 700ms ease forwards;
}

.glass-card--small {
    width: min(350px, 80vw);
    padding: 20px 24px;
    opacity: 0;
}

.glass-card--small.visible {
    animation: cardReveal 700ms ease 200ms forwards;
}

.glass-card--final {
    width: min(700px, 90vw);
    margin: 16px auto;
    text-align: center;
    opacity: 0;
}

.glass-card--final.visible {
    animation: cardClear 800ms ease forwards;
}

.glass-card--clear {
    border-radius: 12px;
}

.glass-card--clear.visible {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: rgba(224, 232, 240, 0.04);
    border-color: rgba(64, 200, 112, 0.25);
}

/* Float offset for anti-design stacking */
.glass-card--float {
    transform: translateX(40px) translateY(-20px);
}

.glass-card--float:hover {
    transform: translateX(38px) translateY(-22px);
}

.glass-card--float-2 {
    margin-top: -30px;
    transform: translateX(-50px);
}

.glass-card--float-2:hover {
    transform: translateX(-48px) translateY(-2px);
}

@keyframes cardMaterialize {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        transform: translateY(0);
    }
}

@keyframes cardReveal {
    from {
        opacity: 0;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

@keyframes cardClear {
    from {
        opacity: 0;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
}

/* --- Timeline Elements --- */
.timeline-bar {
    width: 100%;
    height: 6px;
    background: rgba(64, 72, 96, 0.5);
    border-radius: 3px;
    position: relative;
    margin: 16px 0 8px;
    overflow: visible;
}

.timeline-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--monitor-glow), var(--candle-warm));
    border-radius: 3px;
    animation: timelineScrub 4000ms ease-in-out infinite;
}

@keyframes timelineScrub {
    0% { width: 0%; }
    50% { width: 72%; }
    100% { width: 0%; }
}

.playhead {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 14px;
    background: var(--candle-warm);
    border-radius: 1px;
    animation: playheadMove 4000ms ease-in-out infinite;
}

@keyframes playheadMove {
    0% { left: 0%; }
    50% { left: 72%; }
    100% { left: 0%; }
}

.timeline-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

/* --- Render Queue --- */
.render-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.render-item:last-child {
    margin-bottom: 0;
}

.render-item--queued {
    opacity: 0.5;
}

.render-label {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 13px;
    color: var(--edit-white);
    min-width: 160px;
}

.render-bar {
    flex: 1;
    height: 4px;
    background: rgba(64, 72, 96, 0.4);
    border-radius: 2px;
    min-width: 80px;
    overflow: hidden;
}

.render-progress {
    height: 100%;
    background: var(--render-green);
    border-radius: 2px;
    width: 0%;
    transition: width 2000ms ease;
}

.render-percent {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 12px;
    color: var(--render-green);
    min-width: 36px;
    text-align: right;
}

/* --- Edit Bay Section --- */
.edit-bay-section {
    background: linear-gradient(180deg, var(--midnight-blue) 0%, #0D1535 50%, var(--midnight-blue) 100%);
}

.edit-bay-content {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
    max-width: 600px;
}

.bay-quote {
    font-family: var(--font-primary);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.6;
    color: var(--candle-warm);
    margin: 20px 0;
    opacity: 0.85;
}

/* --- Status Grid --- */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin-top: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot--complete {
    background: var(--render-green);
}

.status-dot--active {
    background: var(--candle-warm);
    animation: pulseActive 1500ms ease-in-out infinite;
}

.status-dot--queued {
    background: var(--rough-gray);
}

@keyframes pulseActive {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* --- Waveform --- */
.waveform {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 60px;
    margin: 24px 0 12px;
    padding: 8px 0;
}

.waveform-bar {
    flex: 1;
    height: var(--h, 50%);
    background: var(--monitor-glow);
    border-radius: 2px 2px 0 0;
    opacity: 0.6;
    animation: waveformPulse 2000ms ease-in-out infinite;
    animation-delay: calc(var(--h, 50%) * 10ms);
}

@keyframes waveformPulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.7); }
}

/* --- Note Block --- */
.note-block {
    border-left: 2px solid var(--candle-warm);
    padding-left: 16px;
    margin: 12px 0;
}

.note-block .body-text {
    font-size: 14px;
    color: rgba(232, 232, 240, 0.7);
    margin-bottom: 6px;
}

.note-block .body-text:last-child {
    margin-bottom: 0;
}

/* --- Final Timeline --- */
.final-timeline {
    margin-top: 24px;
}

.final-timeline-bar {
    width: 100%;
    height: 4px;
    background: rgba(64, 72, 96, 0.4);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.final-timeline-progress {
    width: 0%;
    height: 100%;
    background: var(--render-green);
    border-radius: 2px;
    transition: width 2000ms ease;
}

/* --- Footer Meta --- */
.footer-meta {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    width: min(700px, 90vw);
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(64, 72, 96, 0.3);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, var(--rough-gray));
    animation: scrollPulse 2000ms ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* --- Global Timeline (bottom edge) --- */
#global-timeline {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 100;
    background: rgba(10, 16, 40, 0.8);
}

.global-timeline-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.global-timeline-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--monitor-glow), var(--candle-warm), var(--render-green));
    transition: width 100ms linear;
}

.global-timeline-playhead {
    position: absolute;
    top: -3px;
    width: 6px;
    height: 9px;
    background: var(--candle-warm);
    border-radius: 1px;
    left: 0%;
    transition: left 100ms linear;
}

/* --- Preview Section Depth --- */
.preview-section {
    background: linear-gradient(180deg, var(--midnight-blue) 0%, #080E22 50%, var(--midnight-blue) 100%);
}

/* --- Footer Section Warmth --- */
.footer-section {
    background: linear-gradient(180deg, var(--midnight-blue) 0%, #0F1A30 50%, var(--midnight-blue) 100%);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .glass-card--offset-left {
        transform: translateX(-10px);
    }

    .glass-card--offset-left:hover {
        transform: translateX(-8px) scale(1.01);
    }

    .glass-card--offset-right {
        transform: translateX(10px);
    }

    .glass-card--offset-right:hover {
        transform: translateX(8px) scale(1.01);
    }

    .glass-card--float {
        transform: translateX(15px) translateY(-10px);
    }

    .glass-card--float:hover {
        transform: translateX(13px) translateY(-12px);
    }

    .glass-card--float-2 {
        margin-top: -15px;
        transform: translateX(-20px);
    }

    .glass-card--float-2:hover {
        transform: translateX(-18px) translateY(-2px);
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .render-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .render-bar {
        width: 100%;
    }

    .footer-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}
