/* ============================================================
   mystical.day — Styles
   Palette: Cool-grays with generative mesh accents
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.75;
    color: #3A3A40;
    background-color: #D0D0D4;
    overflow-x: hidden;
}

/* --- Dawn Viewport (Hero) --- */
.dawn-viewport {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #D0D0D4 0%, #A0A0A8 100%);
    overflow: hidden;
}

/* Generative Mesh Background */
.generative-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    background:
        radial-gradient(ellipse 60% 50% at 25% 30%, rgba(96, 136, 176, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 70% 60%, rgba(176, 120, 136, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 40% 45% at 50% 80%, rgba(112, 168, 136, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse 55% 40% at 80% 20%, rgba(224, 216, 144, 0.2) 0%, transparent 70%);
    background-size: 200% 200%, 180% 180%, 220% 220%, 190% 190%;
    animation: meshMorph 30s ease-in-out infinite;
    z-index: 0;
}

@keyframes meshMorph {
    0% {
        background-position: 20% 30%, 70% 60%, 50% 80%, 80% 20%;
    }
    25% {
        background-position: 40% 50%, 50% 40%, 30% 60%, 60% 40%;
    }
    50% {
        background-position: 60% 70%, 30% 80%, 70% 30%, 40% 70%;
    }
    75% {
        background-position: 30% 40%, 80% 50%, 50% 70%, 70% 30%;
    }
    100% {
        background-position: 20% 30%, 70% 60%, 50% 80%, 80% 20%;
    }
}

.dawn-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.dawn-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(40px, 6vw, 80px);
    letter-spacing: -0.02em;
    color: #3A3A40;
    opacity: 0;
    animation: titleFadeIn 1000ms ease forwards;
}

.dawn-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #A0A0A8;
    margin-top: 16px;
    opacity: 0;
    animation: titleFadeIn 1000ms ease 400ms forwards;
}

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

/* --- Generative Interludes --- */
.generative-interlude {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.interlude-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 70% 60% at 30% 50%, rgba(96, 136, 176, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 50% 70% at 70% 40%, rgba(176, 120, 136, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 50% 70%, rgba(112, 168, 136, 0.2) 0%, transparent 70%);
    background-size: 200% 200%, 180% 200%, 220% 180%;
    animation: interludeMorph 25s ease-in-out infinite;
}

.interlude-mesh-2 {
    background:
        radial-gradient(ellipse 50% 70% at 60% 30%, rgba(176, 120, 136, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 30% 70%, rgba(112, 168, 136, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 70% 60% at 80% 50%, rgba(96, 136, 176, 0.2) 0%, transparent 70%);
    animation-delay: -8s;
}

.interlude-mesh-3 {
    background:
        radial-gradient(ellipse 60% 50% at 40% 60%, rgba(112, 168, 136, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 80% 30%, rgba(96, 136, 176, 0.25) 0%, transparent 70%),
        radial-gradient(ellipse 70% 70% at 20% 40%, rgba(224, 216, 144, 0.2) 0%, transparent 70%);
    animation-delay: -16s;
}

@keyframes interludeMorph {
    0% {
        background-position: 30% 50%, 70% 40%, 50% 70%;
    }
    33% {
        background-position: 50% 30%, 40% 70%, 80% 40%;
    }
    66% {
        background-position: 70% 60%, 50% 30%, 30% 60%;
    }
    100% {
        background-position: 30% 50%, 70% 40%, 50% 70%;
    }
}

/* --- Observations Section --- */
.observations-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 40px;
}

.section-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #A0A0A8;
    margin-bottom: 32px;
}

/* --- Observation Grid --- */
.observation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .observation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .observation-grid {
        grid-template-columns: 1fr;
    }
    .observations-section {
        padding: 40px 20px;
    }
}

/* --- Observation Cards --- */
.observation-card {
    background: #F0F0F2;
    border: 1px solid #D0D0D4;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 300ms ease, box-shadow 400ms ease;
    box-shadow: 0 0 40px rgba(160, 160, 168, 0.15);
}

.observation-card.is-active {
    border-color: #6088B0;
}

.observation-card:hover {
    box-shadow: 0 0 60px rgba(160, 160, 168, 0.25);
}

.observation-card[data-accent="rose"].is-active {
    border-color: #B07888;
}

.observation-card[data-accent="green"].is-active {
    border-color: #70A888;
}

.card-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #A0A0A8;
}

.card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: clamp(18px, 2vw, 24px);
    letter-spacing: -0.02em;
    color: #3A3A40;
    line-height: 1.3;
}

.card-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.75;
    color: #3A3A40;
}

.card-code {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.6;
    color: #A0A0A8;
    background: rgba(160, 160, 168, 0.08);
    padding: 12px 16px;
    border-left: 2px solid #D0D0D4;
    white-space: pre;
    overflow-x: auto;
}

/* --- Underline Draw --- */
.underline-draw {
    position: relative;
    display: inline;
    background-image: linear-gradient(#6088B0, #6088B0);
    background-size: 0% 2px;
    background-position: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 400ms ease;
}

.underline-draw.is-drawn {
    background-size: 100% 2px;
}

.underline-draw:hover {
    text-shadow: 0 0 8px rgba(96, 136, 176, 0.3);
}

/* Accent-colored underlines for rose cards */
[data-accent="rose"] .underline-draw {
    background-image: linear-gradient(#B07888, #B07888);
}

/* Accent-colored underlines for green cards */
[data-accent="green"] .underline-draw {
    background-image: linear-gradient(#70A888, #70A888);
}

/* --- Urban Footer --- */
.urban-footer {
    width: 100%;
    padding: 60px 40px 80px;
    background: linear-gradient(180deg, #D0D0D4 0%, #A0A0A8 100%);
    position: relative;
    overflow: hidden;
}

.urban-grid-container {
    max-width: 900px;
    margin: 24px auto 40px;
}

.city-grid-svg {
    width: 100%;
    height: auto;
}

.street-line {
    stroke: #A0A0A8;
    stroke-width: 1;
    fill: none;
}

.node-glow {
    fill: #E0D890;
    opacity: 0.15;
    transition: opacity 600ms ease;
}

.node-glow-large {
    opacity: 0.2;
}

.node-glow.is-bright {
    opacity: 0.6;
}

.node-glow-large.is-bright {
    opacity: 0.75;
}

.node-center {
    fill: #E0D890;
    opacity: 0.4;
    transition: opacity 600ms ease;
}

.node-center.is-bright {
    opacity: 1;
}

.footer-text {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.footer-note {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.75;
    color: #3A3A40;
    margin-bottom: 16px;
}

.footer-code {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    font-size: 13px;
    color: #A0A0A8;
}
