/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #d4a855;
    --teal: #7eb8c9;
    --hide: #1e1710;
    --deep-navy: #0b1026;
    --burnt-sienna: #c47b3f;
    --parchment: #f0e6d3;
    --charcoal: #2a2a3d;
}

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

body {
    background-color: var(--deep-navy);
    color: var(--parchment);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* === TYPOGRAPHY === */
.hero-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 9rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: var(--parchment);
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title .dot {
    color: var(--gold);
}

.hero-subtitle {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--gold);
    text-align: center;
    margin-top: 1rem;
    opacity: 0.7;
    animation: pulse-subtle 3s ease-in-out infinite;
}

.section-heading {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 2rem;
    color: var(--parchment);
}

.section-body {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.7;
    max-width: 600px;
    color: var(--parchment);
    opacity: 0.85;
}

/* === LAYOUT === */
.act {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
}

.act-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* === ACT 1: THE POUR === */
.act-1 {
    background: radial-gradient(ellipse at 50% 80%, var(--charcoal) 0%, var(--deep-navy) 70%);
}

.pour-animation {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.pour-svg {
    width: 100%;
    height: 100%;
}

#pour-stream {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 0.1s linear;
}

#pour-pool {
    transition: rx 0.3s ease, ry 0.3s ease;
}

/* === ACT 2: THE GRAIN === */
.act-2 {
    background-color: var(--hide);
    position: relative;
    overflow: hidden;
}

.leather-texture {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='leather'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23leather)' opacity='0.5'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.act-2 .section-heading {
    color: var(--gold);
}

.act-2 .section-body {
    color: var(--parchment);
}

/* === ACT 3: THE HEAT === */
.act-3 {
    background: linear-gradient(180deg, var(--deep-navy) 0%, #1a0a05 50%, var(--deep-navy) 100%);
    overflow: hidden;
}

.temperature-display {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(4rem, 15vw, 12rem);
    color: var(--burnt-sienna);
    margin: 1rem 0;
    display: flex;
    align-items: baseline;
}

.temp-unit {
    font-size: 0.3em;
    color: var(--gold);
    margin-left: 0.2em;
}

.heat-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.heat-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--burnt-sienna);
    border-radius: 50%;
    animation: rise 3s ease-out infinite;
    opacity: 0;
}

/* === ACT 4: THE CUP === */
.act-4 {
    background: radial-gradient(ellipse at 50% 60%, var(--charcoal) 0%, var(--deep-navy) 80%);
}

.steam-container {
    width: 100px;
    height: 120px;
    position: relative;
    margin: 2rem auto;
}

.steam-line {
    position: absolute;
    bottom: 0;
    width: 2px;
    height: 80px;
    background: linear-gradient(to top, var(--parchment), transparent);
    opacity: 0.4;
    animation: steam-rise 4s ease-in-out infinite;
}

.steam-line:nth-child(1) { left: 25%; animation-delay: 0s; }
.steam-line:nth-child(2) { left: 50%; animation-delay: 1.3s; }
.steam-line:nth-child(3) { left: 75%; animation-delay: 2.6s; }

/* === ACT 5: THE RITUAL === */
.act-5 {
    background-color: var(--deep-navy);
}

.closing-mark {
    margin-top: 3rem;
}

.closing-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--gold);
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* === THE CURVE === */
.curve-path {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === ANIMATIONS === */
@keyframes pulse-subtle {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    100% { transform: translateY(-200px) scale(0); opacity: 0; }
}

@keyframes steam-rise {
    0% { transform: translateY(0) scaleX(1); opacity: 0; }
    20% { opacity: 0.4; }
    80% { opacity: 0.2; }
    100% { transform: translateY(-60px) scaleX(1.5); opacity: 0; }
}

/* === SCROLL REVEAL === */
.act-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.act-content.visible {
    opacity: 1;
    transform: translateY(0);
}
