/* ============================================
   lovely.day -- styles
   Burgundy terminal daily appreciation log
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 17px);
    letter-spacing: 0.02em;
    color: #d4a0a8;
    background-color: #2a0e14;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---- Cursor blink animation ---- */
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor {
    display: inline-block;
    color: #d4a0a8;
    animation: cursorBlink 1s step-end infinite;
    font-size: inherit;
    line-height: 1;
    vertical-align: baseline;
}

/* ---- Pulse attention dot ---- */
@keyframes pulseDot {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e06070;
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 200ms ease;
}

.pulse-dot.active {
    opacity: 1;
    animation: pulseDot 2s ease-in-out infinite;
}

/* ---- Prompt styling ---- */
.prompt {
    color: #8a5060;
    margin-right: 8px;
}

.typed-text {
    color: #d4a0a8;
}

/* ---- Terminal Window ---- */
.terminal-window {
    width: 90%;
    max-width: 800px;
    background-color: #1a0a10;
    border: 1px solid #4a1a24;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 400ms ease;
}

.terminal-window.visible {
    opacity: 1;
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background-color: #1a0a10;
    border-bottom: 1px solid #4a1a24;
    gap: 10px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4a1a24;
}

.dot-close {
    background-color: #8a3040;
}

.dot-minimize {
    background-color: #8a5060;
}

.dot-maximize {
    background-color: #4a1a24;
}

.terminal-title {
    color: #8a5060;
    font-size: clamp(12px, 1.2vw, 14px);
    letter-spacing: 0.04em;
    opacity: 0;
    transition: opacity 200ms ease;
}

.terminal-title.visible {
    opacity: 1;
}

.terminal-body {
    padding: clamp(20px, 3vw, 40px);
    min-height: 80px;
}

.terminal-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

/* ============================================
   SECTION: Hero
   ============================================ */
.section-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a0e14;
    z-index: 2;
}

.section-hero .diagonal-cut-bottom {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #2a0e14;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 40%);
    z-index: 3;
}

/* ============================================
   SECTION: Log
   ============================================ */
.section-log {
    position: relative;
    background-color: #1a0a10;
    padding: clamp(32px, 6vh, 64px) 0;
    z-index: 1;
}

.section-log .diagonal-cut-top {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #1a0a10;
    clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
    z-index: 1;
}

.section-log .diagonal-cut-bottom-reverse {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #1a0a10;
    clip-path: polygon(0 0, 100% 0, 100% 40%, 0 100%);
    z-index: 3;
}

.section-inner {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.section-label {
    font-family: 'Inconsolata', monospace;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 32px);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a5060;
    margin-bottom: 24px;
}

/* ---- Log entries ---- */
.log-entries {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.log-entry {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 300ms ease, transform 300ms ease;
}

.log-entry.revealed {
    opacity: 1;
    transform: translateY(0);
}

.entry-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.entry-timestamp {
    color: #8a5060;
    white-space: nowrap;
}

.entry-text {
    color: #d4a0a8;
}

.entry-cursor {
    display: none;
}

.log-entry.typing .entry-cursor {
    display: inline-block;
}

/* ============================================
   SECTION: Patterns
   ============================================ */
.section-patterns {
    position: relative;
    background-color: #2a0e14;
    padding: clamp(32px, 6vh, 64px) 0;
    z-index: 1;
}

.section-patterns .diagonal-cut-top-reverse {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #2a0e14;
    clip-path: polygon(0 0, 100% 60%, 100% 100%, 0 100%);
    z-index: 1;
}

.section-patterns .diagonal-cut-bottom {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #2a0e14;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 40%);
    z-index: 3;
}

/* ---- Organic blob ---- */
.organic-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 400px;
    background-color: rgba(74, 26, 36, 0.4);
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    pointer-events: none;
    z-index: 0;
}

/* ---- Data visualization ---- */
.dataviz-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dataviz-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dataviz-label {
    color: #8a5060;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 200ms ease;
    font-size: clamp(13px, 1.3vw, 15px);
}

.dataviz-label.visible {
    opacity: 1;
}

.dataviz-bar-track {
    flex: 1;
    height: 20px;
    background-color: rgba(26, 10, 16, 0.5);
    border-radius: 2px;
    overflow: hidden;
}

.dataviz-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bar-shade-1 {
    background-color: #8a3040;
}

.bar-shade-2 {
    background-color: #b04858;
}

.bar-shade-3 {
    background-color: #d06070;
}

.dataviz-value {
    color: #d4a0a8;
    width: 40px;
    text-align: left;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 200ms ease;
    font-size: clamp(13px, 1.3vw, 15px);
}

.dataviz-value.visible {
    opacity: 1;
}

/* ============================================
   SECTION: Tonight / Closing
   ============================================ */
.section-tonight {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a0a10;
    z-index: 1;
}

.section-tonight .diagonal-cut-top {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #1a0a10;
    clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
    z-index: 1;
}

/* ---- Fade to darkness ---- */
@keyframes fadeToDarkness {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}

.section-tonight.fading {
    animation: fadeToDarkness 3s ease forwards;
    animation-delay: 2s;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .terminal-body {
        padding: 16px;
    }

    .dataviz-label {
        width: 60px;
        font-size: 12px;
    }

    .dataviz-value {
        width: 30px;
        font-size: 12px;
    }

    .organic-blob {
        width: 300px;
        height: 240px;
    }

    .entry-row {
        gap: 6px;
    }
}
