/* dilemma.quest - Avant-Garde Botanical Dilemma */

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

:root{
    --amber:#BF5B21;
    --ember:#D4772C;
    --parchment:#F5EDE0;
    --soot:#1C1410;
    --patina:#4A7C6F;
    --petal:#C4917A;
    --fog:#E8DDD0;
    --sienna:#6B2E10;
}

body{
    background:var(--soot);
    color:var(--soot);
    font-family:'DM Sans',sans-serif;
    font-weight:400;
    font-size:1.125rem;
    line-height:1.75;
    overflow-x:hidden;
}

/* Drifting petals */
.petals-layer{
    position:fixed;
    inset:0;
    pointer-events:none;
    z-index:50;
    overflow:hidden;
}

.drift-petal{
    position:absolute;
    width:8px;height:14px;
    border-radius:50% 50% 50% 0;
    opacity:0.2;
    animation:petalDrift 15s ease-in-out infinite;
}

@keyframes petalDrift{
    0%{transform:translateY(-20px) translateX(0) rotate(0)}
    25%{transform:translateY(25vh) translateX(30px) rotate(45deg)}
    50%{transform:translateY(50vh) translateX(-20px) rotate(90deg)}
    75%{transform:translateY(75vh) translateX(40px) rotate(135deg)}
    100%{transform:translateY(110vh) translateX(10px) rotate(180deg)}
}

/* Bokeh circles */
.bokeh-field{
    position:absolute;
    inset:0;
    overflow:hidden;
}

.bokeh-circle{
    position:absolute;
    border-radius:50%;
    animation:bokehDrift 20s ease-in-out infinite alternate;
}

@keyframes bokehDrift{
    0%{transform:translate(0,0)}
    100%{transform:translate(var(--dx,20px),var(--dy,15px))}
}

/* Acts */
.act{
    position:relative;
    overflow:hidden;
}

/* Act I: The Question */
.act-1{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:clamp(24px,4vw,60px);
    background:var(--soot);
}

.act1-content{
    position:relative;
    z-index:2;
    margin-left:35%;
}

.hero-domain{
    font-family:'Fraunces',serif;
    font-weight:900;
    font-variation-settings:'opsz' 144,'WONK' 1;
    font-size:clamp(5rem,12vw,14rem);
    line-height:1;
    color:var(--parchment);
    letter-spacing:0.01em;
    overflow:hidden;
}

.hero-domain .hchar{
    display:inline-block;
    opacity:0;
    clip-path:inset(0 100% 0 0);
}

.hero-domain .hchar.show{
    opacity:1;
    clip-path:inset(0 0% 0 0);
    transition:opacity 600ms cubic-bezier(0.25,0.1,0.25,1),
               clip-path 600ms cubic-bezier(0.25,0.1,0.25,1);
}

.hero-question{
    font-family:'Newsreader',serif;
    font-style:italic;
    font-weight:200;
    font-variation-settings:'opsz' 72;
    font-size:clamp(1rem,2vw,1.5rem);
    color:var(--petal);
    margin-top:1.5rem;
    opacity:0;
    animation:fadeIn 2s ease 4s forwards;
}

@keyframes fadeIn{to{opacity:1}}

.fork-stem{
    position:absolute;
    bottom:0;
    left:50%;
    transform:translateX(-50%);
    height:200px;
    z-index:2;
}

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

/* Stem draw animation */
.stem-path{
    stroke-dasharray:500;
    stroke-dashoffset:500;
}

.stem-draw.drawn .stem-path{
    stroke-dashoffset:0;
    transition:stroke-dashoffset 2s cubic-bezier(0.25,0.1,0.25,1);
}

/* Act II: First Path */
.act-2{
    min-height:100vh;
    background:var(--parchment);
    padding:clamp(40px,6vh,80px) 0;
}

.fork-grid{
    display:grid;
    min-height:80vh;
}

.left-dominant{
    grid-template-columns:40% 60%;
}

.right-dominant{
    grid-template-columns:60% 40%;
}

.path-content{
    padding:clamp(32px,5vw,80px);
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:1.5rem;
    position:relative;
    z-index:2;
}

.path-heading{
    font-family:'Fraunces',serif;
    font-weight:700;
    font-variation-settings:'opsz' 48,'WONK' 0.5;
    font-size:clamp(2.5rem,5vw,5rem);
    line-height:1.1;
    color:var(--soot);
}

.path-heading.alt{
    color:var(--patina);
}

.body-text{
    max-width:50ch;
    color:#3a2a1a;
}

.path-bokeh{
    position:relative;
    background:var(--soot);
    overflow:hidden;
}

/* Zoom focus */
.zoom-focus{
    opacity:0.3;
    transform:scale(0.92);
    filter:blur(2px);
    transition:opacity 800ms cubic-bezier(0.25,0.1,0.25,1),
               transform 800ms cubic-bezier(0.25,0.1,0.25,1),
               filter 800ms cubic-bezier(0.25,0.1,0.25,1);
}

.zoom-focus.focused{
    opacity:1;
    transform:scale(1);
    filter:blur(0);
}

/* Botanical divider */
.botanical-divider{
    height:15vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--parchment);
}

.botanical-line{
    height:80%;
    width:auto;
}

/* Act III: The Pivot */
.act-3{
    min-height:60vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    background:var(--soot);
    padding:clamp(40px,8vw,80px);
    text-align:center;
}

.fork-glyph{
    width:60px;
    height:90px;
    margin-bottom:2rem;
}

.pivot-question{
    font-family:'Newsreader',serif;
    font-style:italic;
    font-weight:200;
    font-variation-settings:'opsz' 72;
    font-size:clamp(1.75rem,4vw,3.5rem);
    line-height:1.3;
    max-width:20ch;
    background:radial-gradient(ellipse at center,var(--ember),var(--amber));
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
}

/* Act IV: Second Path */
.act-4{
    min-height:100vh;
    background:var(--parchment);
    padding:clamp(40px,6vh,80px) 0;
}

/* Act V: Resolution */
.act-5{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(180deg,var(--soot) 0%,var(--soot) 60%,var(--parchment) 100%);
    position:relative;
    padding:clamp(40px,6vw,80px);
}

.resolution-content{
    position:relative;
    z-index:2;
    text-align:center;
    max-width:55ch;
}

.resolution-heading{
    font-family:'Fraunces',serif;
    font-weight:600;
    font-variation-settings:'opsz' 72,'WONK' 1;
    font-size:clamp(1.8rem,3.5vw,3rem);
    line-height:1.3;
    color:var(--parchment);
    margin-bottom:3rem;
}

.closing-bloom{
    width:80px;
    height:80px;
    margin:0 auto;
}

/* Responsive */
@media(max-width:768px){
    .act1-content{margin-left:5%}

    .left-dominant,.right-dominant{
        grid-template-columns:1fr;
    }

    .path-bokeh{min-height:30vh}

    .hero-domain{font-size:clamp(3rem,10vw,6rem)}
}

@media(prefers-reduced-motion:reduce){
    .bokeh-circle{animation:none}
    .drift-petal{animation:none;display:none}
    .zoom-focus{opacity:1;transform:none;filter:none;transition:none}
    .hero-domain .hchar{opacity:1;clip-path:none;transition:none}
    .hero-question{animation:none;opacity:1}
    .stem-path{stroke-dashoffset:0}
}
