/* postp.day -- a midnight-blue, glassmorphic, anti-design editing-suite diary
   Fonts: "Playfair Display" (Google Fonts) -- serif revival, weights 400 and 700.
*/

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

    --serif: "Playfair Display", "Lora", Georgia, serif;
}

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

html, body {
    background: var(--midnight);
    color: var(--edit-white);
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.85;
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(circle at 20% 15%, rgba(24, 48, 160, 0.18), transparent 50%),
        radial-gradient(circle at 80% 75%, rgba(240, 176, 64, 0.07), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(24, 48, 160, 0.10), transparent 70%),
        var(--midnight);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

/* SUBTLE FILM-GRAIN OVERLAY (for nostalgic-retro feel) */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: overlay;
    z-index: 100;
    background-image:
        radial-gradient(circle at 12% 22%, rgba(232, 232, 240, 0.4) 1px, transparent 2px),
        radial-gradient(circle at 71% 31%, rgba(232, 232, 240, 0.3) 1px, transparent 2px),
        radial-gradient(circle at 33% 78%, rgba(232, 232, 240, 0.35) 1px, transparent 2px),
        radial-gradient(circle at 88% 88%, rgba(232, 232, 240, 0.3) 1px, transparent 2px),
        radial-gradient(circle at 55% 12%, rgba(232, 232, 240, 0.3) 1px, transparent 2px);
    background-size: 240px 240px, 180px 180px, 320px 320px, 200px 200px, 260px 260px;
    animation: grainShift 7s steps(6) infinite;
}

@keyframes grainShift {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-3px, 2px); }
    40% { transform: translate(2px, -1px); }
    60% { transform: translate(-1px, -3px); }
    80% { transform: translate(3px, 1px); }
}

/* CANDLE / MONITOR GLOWS (radial-gradients positioned as light pools) */
.candle-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
    z-index: 0;
    opacity: 0;
    animation: glowFadeIn 1400ms ease-out forwards;
}

.glow-a {
    width: 520px; height: 520px;
    top: -120px; left: -100px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.30), transparent 65%);
    animation-delay: 200ms;
}
.glow-b {
    width: 380px; height: 380px;
    bottom: 4%; right: -40px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.18), transparent 60%);
    animation-delay: 500ms;
}
.glow-c {
    width: 280px; height: 280px;
    top: 38%; left: 52%;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.13), transparent 70%);
    animation-delay: 800ms;
}
.glow-d {
    width: 460px; height: 460px;
    top: 10%; right: -80px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.22), transparent 65%);
    animation-delay: 200ms;
}
.glow-e {
    width: 420px; height: 420px;
    bottom: 8%; left: -60px;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.16), transparent 65%);
    animation-delay: 200ms;
}
.glow-f {
    width: 500px; height: 500px;
    top: 20%; left: -100px;
    background: radial-gradient(circle, rgba(24, 48, 160, 0.20), transparent 65%);
    animation-delay: 200ms;
}
.glow-warm {
    width: 600px; height: 600px;
    top: -100px; left: 20%;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.20), transparent 65%);
    animation-delay: 200ms;
}
.glow-warm-2 {
    width: 380px; height: 380px;
    bottom: -60px; right: 15%;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.15), transparent 65%);
    animation-delay: 500ms;
}
.glow-final-1 {
    width: 700px; height: 700px;
    top: 10%; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(64, 200, 112, 0.16), transparent 65%);
    animation-delay: 300ms;
}
.glow-final-2 {
    width: 500px; height: 500px;
    bottom: 0; right: 5%;
    background: radial-gradient(circle, rgba(240, 176, 64, 0.20), transparent 60%);
    animation-delay: 600ms;
}

@keyframes glowFadeIn {
    to { opacity: 1; }
}

/* HERO -- EDITING SUITE */
.suite {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.suite-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px clamp(20px, 4vw, 56px);
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(64, 72, 96, 0.5);
    padding-bottom: 14px;
}

.status-bar.bottom-bar {
    border-bottom: none;
    border-top: 1px solid rgba(64, 72, 96, 0.5);
    padding-top: 14px;
    padding-bottom: 0;
}

.status-label {
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--edit-white);
    opacity: 0.78;
}

.status-time {
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    color: var(--edit-white);
    opacity: 0.85;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--candle);
    box-shadow: 0 0 12px rgba(240, 176, 64, 0.8);
    animation: pulseDot 1600ms ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* HERO CONTENT */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 60px 0;
    text-align: center;
    position: relative;
}

.kicker {
    font-family: var(--serif);
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--candle);
    opacity: 0;
    animation: textFade 1200ms ease-out 600ms forwards;
}

.domain-mark {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(56px, 10vw, 168px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--edit-white);
    text-shadow: 0 4px 36px rgba(24, 48, 160, 0.35);
    opacity: 0;
    animation: heroFade 1400ms ease-out 200ms forwards;
}

.domain-mark .word-post { color: var(--edit-white); }
.domain-mark .dot {
    color: var(--candle);
    text-shadow: 0 0 28px rgba(240, 176, 64, 0.7);
}
.domain-mark .word-day {
    color: var(--glass);
    font-style: italic;
    font-weight: 400;
}

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

@keyframes textFade {
    to { opacity: 1; }
}

.tagline {
    max-width: 640px;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
    color: var(--edit-white);
    opacity: 0;
    animation: textFade 1200ms ease-out 900ms forwards;
}

/* GLASSMORPHIC CARDS -- compositing-window panels */
.card.glass {
    position: relative;
    background: rgba(224, 232, 240, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(224, 232, 240, 0.28);
    color: var(--edit-white);
    padding: 38px 44px;
    transition: backdrop-filter 480ms ease, -webkit-backdrop-filter 480ms ease,
                background 480ms ease, border-color 480ms ease,
                border-radius 600ms ease, transform 480ms ease,
                box-shadow 480ms ease;
    will-change: backdrop-filter, transform;
    /* anti-design: irregular border radii */
    border-radius: 14px 22px 8px 19px;
    box-shadow:
        0 12px 36px rgba(10, 16, 40, 0.5),
        inset 0 0 0 1px rgba(224, 232, 240, 0.04);
}

.card.glass.card-hero {
    margin-top: 32px;
    max-width: 720px;
    width: 100%;
    border-radius: 18px 7px 22px 11px;
    opacity: 0;
    animation: cardMaterialize 1400ms ease-out 1100ms forwards;
}

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

.card.glass:hover {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(224, 232, 240, 0.16);
    border-color: rgba(224, 232, 240, 0.45);
    border-radius: 10px 10px 10px 10px; /* anti-design straightens slightly on hover */
    box-shadow:
        0 16px 48px rgba(10, 16, 40, 0.6),
        0 0 64px rgba(24, 48, 160, 0.35),
        inset 0 0 0 1px rgba(224, 232, 240, 0.08);
}

.card-edge {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    /* anti-design rough edge */
    background: linear-gradient(135deg, transparent 95%, rgba(64, 72, 96, 0.55) 100%);
    opacity: 0.6;
}

.card-edge.edge-rough::after,
.card-edge.edge-rough-2::after {
    content: '';
    position: absolute;
    background: var(--rough);
    opacity: 0.6;
}

.card-edge.edge-rough::after {
    top: -2px; left: 18%;
    width: 38%; height: 1px;
}

.card-edge.edge-rough-2::after {
    bottom: -2px; right: 12%;
    width: 28%; height: 1px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(224, 232, 240, 0.18);
}

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

.card-body.short {
    font-size: 15px;
    margin-top: 12px;
}

.card-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 52px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 22px;
    color: var(--edit-white);
}

/* TIMELINE / LOTTIE-STYLE EDITORIAL MOTION */
.timeline {
    margin-top: 28px;
}

.timeline-track {
    position: relative;
    height: 4px;
    background: rgba(224, 232, 240, 0.14);
    border-radius: 1px;
    overflow: visible;
}

.timeline-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: linear-gradient(90deg, var(--monitor), var(--candle));
    border-radius: 1px;
    animation: scrubFill 8s ease-in-out infinite;
}

.timeline-head {
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    background: var(--candle);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 14px rgba(240, 176, 64, 0.7);
    animation: scrubHead 8s ease-in-out infinite;
}

.timeline-mark {
    position: absolute;
    top: -3px;
    width: 1px;
    height: 10px;
    background: var(--rough);
    opacity: 0.7;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--edit-white);
    opacity: 0.6;
    font-style: italic;
}

@keyframes scrubFill {
    0% { width: 0%; }
    50% { width: 78%; }
    100% { width: 0%; }
}

@keyframes scrubHead {
    0% { left: 0%; }
    50% { left: 78%; }
    100% { left: 0%; }
}

/* PREVIEW SECTIONS */
.preview {
    min-height: 100vh;
    width: 100%;
    position: relative;
    padding: clamp(60px, 10vh, 120px) 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.preview.alt {
    background:
        radial-gradient(circle at 70% 30%, rgba(24, 48, 160, 0.10), transparent 60%),
        transparent;
}

.preview-inner {
    width: min(92%, 1100px);
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 2;
}

.screen-label {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 12px;
    color: var(--edit-white);
}

.screen-label.right {
    justify-content: flex-end;
}

.screen-num {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(48px, 6vw, 96px);
    line-height: 1;
    color: var(--candle);
    opacity: 0.55;
    letter-spacing: -0.04em;
}

.card.glass.card-wide {
    max-width: 720px;
    width: 100%;
}

.card.glass.card-narrow {
    max-width: 380px;
    width: 100%;
    padding: 26px 30px;
}

.card.glass.card-tiny {
    max-width: 280px;
    width: 100%;
    padding: 20px 24px;
    border-radius: 8px 14px 9px 16px;
}

.offset-right {
    align-self: flex-end;
    margin-right: clamp(0px, 4vw, 60px);
    margin-top: -36px; /* anti-design overlap */
}

.offset-left {
    align-self: flex-start;
    margin-left: clamp(0px, 4vw, 60px);
}

.offset-down {
    margin-top: -52px;
    margin-left: clamp(40px, 18vw, 240px);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 18px 0 22px;
    padding: 14px 0;
    border-top: 1px solid rgba(224, 232, 240, 0.14);
    border-bottom: 1px solid rgba(224, 232, 240, 0.14);
    align-items: baseline;
}

.meta-row .status-label { opacity: 0.6; }
.meta-row .status-time { margin-right: 14px; }

.scrubber {
    height: 3px;
    width: 100%;
    background: rgba(224, 232, 240, 0.12);
    margin-top: 16px;
    overflow: hidden;
    border-radius: 1px;
}

.scrubber-fill {
    height: 100%;
    width: 64%;
    background: linear-gradient(90deg, var(--monitor), var(--edit-white));
    animation: scrubLoop 6s ease-in-out infinite;
}

.scrubber-fill.alt {
    width: 38%;
    background: linear-gradient(90deg, var(--candle), var(--render-green));
    animation-duration: 7s;
}

@keyframes scrubLoop {
    0%, 100% { transform: translateX(-30%); }
    50% { transform: translateX(50%); }
}

.pulse-dot {
    margin-top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--monitor);
    box-shadow: 0 0 16px rgba(24, 48, 160, 0.85);
    animation: pulseDot 1800ms ease-in-out infinite;
}

.pulse-dot.warm {
    background: var(--candle);
    box-shadow: 0 0 16px rgba(240, 176, 64, 0.8);
}

/* CANDLE-LIT BAY (the editing suite quote section) */
.bay {
    min-height: 70vh;
    padding: clamp(80px, 14vh, 160px) 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bay-inner {
    width: min(86%, 820px);
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.bay-quote {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(20px, 2.4vw, 32px);
    line-height: 1.55;
    color: var(--edit-white);
    font-style: italic;
    margin-bottom: 22px;
    position: relative;
}

.quote-mark {
    color: var(--candle);
    font-size: 1.2em;
    font-weight: 700;
    opacity: 0.85;
    margin: 0 4px;
}

.bay-attrib {
    font-family: var(--serif);
    font-size: 13px;
    color: var(--edit-white);
    opacity: 0.6;
    letter-spacing: 0.04em;
}

/* ROUGH-LIST (anti-design list) */
.rough-list {
    list-style: none;
    margin: 16px 0 24px;
    padding: 0;
}

.rough-list li {
    font-family: var(--serif);
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.85;
    color: var(--edit-white);
    padding: 4px 0 4px 24px;
    position: relative;
    border-bottom: 1px dashed rgba(64, 72, 96, 0.4);
}

.rough-list li:last-child { border-bottom: none; }

.rough-list .bullet {
    position: absolute;
    left: 4px;
    top: 14px;
    width: 6px;
    height: 6px;
    background: var(--candle);
    /* anti-design: square bullet, slightly rotated */
    transform: rotate(45deg);
    box-shadow: 0 0 8px rgba(240, 176, 64, 0.5);
}

/* FINAL RENDER (footer) */
.render {
    min-height: 100vh;
    padding: clamp(80px, 12vh, 140px) 0 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.render-inner {
    width: min(92%, 820px);
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.render-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(40px, 6vw, 84px);
    line-height: 1.1;
    color: var(--edit-white);
    margin: 12px 0 14px;
    letter-spacing: -0.02em;
}

.render-body {
    font-family: var(--serif);
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.85;
    color: var(--edit-white);
    margin-bottom: 36px;
    opacity: 0.88;
}

.card.glass.card-final {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
    /* The final card is "rendered" -- clearer, less rough */
    border-radius: 12px 12px 12px 12px;
    background: rgba(224, 232, 240, 0.18);
    border-color: rgba(64, 200, 112, 0.40);
    box-shadow:
        0 16px 48px rgba(10, 16, 40, 0.55),
        0 0 64px rgba(64, 200, 112, 0.18),
        inset 0 0 0 1px rgba(64, 200, 112, 0.18);
}

/* Final card: still hover-clarifies but stays clear */
.card.glass.card-final:hover {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-color: rgba(64, 200, 112, 0.65);
    border-radius: 8px;
}

.render-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.render-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(224, 232, 240, 0.12);
}

.render-row:last-of-type { border-bottom: none; }

.render-ok {
    color: var(--render-green);
    font-style: normal;
    letter-spacing: 0.06em;
}

.render-progress {
    height: 5px;
    background: rgba(224, 232, 240, 0.14);
    border-radius: 1px;
    overflow: hidden;
    margin-top: 18px;
}

.render-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--monitor), var(--render-green), var(--candle));
    box-shadow: 0 0 16px rgba(64, 200, 112, 0.5);
    transition: width 2400ms ease-out;
}

.render-sign {
    margin-top: 24px;
    text-align: right;
    font-family: var(--serif);
    font-size: 13px;
    color: var(--edit-white);
    opacity: 0.75;
}

.render-bar {
    margin-top: clamp(60px, 8vh, 100px);
    padding: 24px clamp(20px, 4vw, 56px);
    border-bottom: none;
    border-top: 1px solid rgba(64, 72, 96, 0.55);
    text-align: center;
    justify-content: center;
}

/* SCROLL REVEAL STATES */
[data-card] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 900ms ease-out, transform 900ms ease-out,
                backdrop-filter 900ms ease-out, -webkit-backdrop-filter 900ms ease-out;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

[data-card].in-view {
    opacity: 1;
    transform: translateY(0);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-card][data-final].in-view {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* RESPONSIVE */
@media (max-width: 700px) {
    .suite-frame { padding: 18px 18px; }
    .card.glass { padding: 26px 22px; }
    .offset-right, .offset-left, .offset-down { margin-left: 0; margin-right: 0; align-self: stretch; }
    .meta-row { gap: 4px 12px; }
    .meta-row .status-time { margin-right: 8px; }
    .domain-mark { font-size: clamp(48px, 16vw, 92px); }
    .render-bar { padding: 18px; }
    .screen-num { font-size: 56px; }
}
