/* ==========================================================================
   MĀGEUS — The Breath
   One page. One scroll. One lifetime. One companion.
   ========================================================================== */

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

:root {
    --white: #FAF9F7;
    --black: #1C1C1B;
    --cream: #F5F3EF;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'DM Sans', -apple-system, sans-serif;
    --breath-cycle: 4s;
}

html {
    font-size: 16px;
    overflow-x: hidden;
}

body {
    background: var(--white);
    color: var(--black);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   BREATH CANVAS — the living presence
   ========================================================================== */

#breath-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   HEARTBEAT BUTTON — animated heart, bottom-left
   ========================================================================== */

.heart-btn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 100;
    background: none;
    border: none;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(190, 110, 90, 0.45);
    padding: 0;
    transition: color 0.3s ease;
}

.heart-btn .heart-icon {
    animation: heartbeat var(--heart-cycle, 0.75s) ease-in-out infinite;
    transition: color 0.3s ease;
}

.heart-btn:hover {
    color: rgba(190, 90, 70, 0.7);
}

.heart-btn:hover .heart-mute-label {
    opacity: 1;
}

.heart-mute-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-sans);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.heart-btn.muted {
    color: rgba(26, 26, 26, 0.12);
}

.heart-btn.muted .heart-icon {
    animation: none;
}

.heart-btn.muted .heart-mute-label {
    opacity: 0.5;
}

/* Pulse heart when audio needs a click to unlock (desktop autoplay policy) */
.heart-btn.needs-click {
    animation: heart-pulse-hint 1.5s ease-in-out 3;
}
@keyframes heart-pulse-hint {
    0%, 100% { transform: scale(1); color: rgba(190, 110, 90, 0.45); }
    50% { transform: scale(1.3); color: rgba(190, 90, 70, 0.8); }
}

/* S1-S2 heartbeat: quick double pulse then rest */
@keyframes heartbeat {
    0%   { transform: scale(1); }
    10%  { transform: scale(1.18); }
    18%  { transform: scale(1); }
    28%  { transform: scale(1.12); }
    38%  { transform: scale(1); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   AGE INDICATOR — time passing as you scroll
   ========================================================================== */

.age-indicator {
    position: fixed;
    top: 80px;
    right: 40px;
    z-index: 100;
    text-align: right;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.age-indicator.visible {
    opacity: 1;
}

.age-indicator.fade-out {
    opacity: 0;
}

.age-number {
    display: block;
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
    color: var(--black);
}

.age-label {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.4);
}

/* ==========================================================================
   HERO — before life begins
   ========================================================================== */

.hero-stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.brand-name {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 5.5rem);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--black);
    opacity: 0;
    margin-right: -0.35em;
}

.brand-name span {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
}

.tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    letter-spacing: 0.15em;
    color: var(--black);
    opacity: 0;
    margin-top: 1.5rem;
    transform: translateY(8px);
}

.scroll-hint {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.3);
    margin-top: 80px;
    opacity: 0;
}

/* ==========================================================================
   LIFE STAGES — the timeline
   ========================================================================== */

.stage {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 160px 24px;
}

.stage-content {
    max-width: 680px;
    width: 100%;
    text-align: center;
}

.stage-label {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.35);
    margin-bottom: 24px;
}

.stage-heading {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.08em;
    margin-bottom: 32px;
    line-height: 1.2;
}

.stage-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    line-height: 1.8;
    letter-spacing: 0.02em;
    color: rgba(26, 26, 26, 0.75);
    margin-bottom: 48px;
}

/* Activity tags */
.stage-activity {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.activity-tag {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 8px 20px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    color: rgba(26, 26, 26, 0.6);
    /* Sharp edges */
}

/* Product trigger — the subtle link to the product */
.stage-product-trigger {
    display: inline-block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 20px 32px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stage-product-trigger:hover {
    background: rgba(26, 26, 26, 0.02);
}

.product-name-small {
    display: block;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--black);
    color: var(--white);
    padding: 6px 16px;
    display: inline-block;
    margin-bottom: 8px;
}

.product-hint {
    display: block;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    font-size: 0.85rem;
    color: rgba(26, 26, 26, 0.5);
    letter-spacing: 0.05em;
}

/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger within sections */
.stage-content .reveal:nth-child(2) { transition-delay: 0.1s; }
.stage-content .reveal:nth-child(3) { transition-delay: 0.2s; }
.stage-content .reveal:nth-child(4) { transition-delay: 0.3s; }
.stage-content .reveal:nth-child(5) { transition-delay: 0.4s; }

/* ==========================================================================
   PRODUCT DRAWER — slides in from right
   ========================================================================== */

.product-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: var(--white);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0);
    overflow-y: auto;
    padding: 60px 40px;
}

.product-drawer.open {
    transform: translateX(0);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.06);
}

.drawer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--black);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.drawer-close:hover {
    opacity: 1;
}

.drawer-product {
    padding-top: 40px;
    text-align: left;
}

.drawer-badge {
    display: inline-block;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    padding: 8px 20px;
    margin-bottom: 24px;
}

.drawer-tagline {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.drawer-desc {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(26, 26, 26, 0.7);
    margin-bottom: 40px;
}

.drawer-ingredients {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: rgba(26, 26, 26, 0.6);
    line-height: 2;
    margin-bottom: 40px;
}

.drawer-dot {
    margin: 0 8px;
    opacity: 0.3;
}

.drawer-ritual {
    margin-bottom: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.drawer-ritual-label {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.35);
    margin-bottom: 12px;
}

.drawer-ritual-text {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--black);
}

.drawer-cta {
    display: inline-block;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 40px;
    transition: all 0.4s ease;
}

.drawer-cta:hover {
    background: rgba(26, 26, 26, 0.85);
    letter-spacing: 0.2em;
}

/* ==========================================================================
   PARALLAX VIDEO LAYERS — full-screen, scroll-scrubbed
   ========================================================================== */

.parallax-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.parallax-video.active {
    opacity: 1;
}

.parallax-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.12;
    mix-blend-mode: multiply;
}

/* Product image placeholder in drawer */
.drawer-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(180,140,100,0.06) 0%, rgba(200,170,140,0.03) 100%);
    border: 1px solid rgba(26,26,26,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.drawer-image-placeholder {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(26,26,26,0.2);
}

/* ==========================================================================
   ASYMMETRIC STAGE LAYOUTS — each stage feels different
   ========================================================================== */

/* NEWBORN — left-aligned, tender, spacious */
.stage--newborn {
    align-items: center;
    justify-content: flex-start;
    padding-left: 12vw;
}

.stage--newborn .stage-content {
    text-align: left;
    max-width: 540px;
}

.stage--newborn .stage-heading {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 0.12em;
}

.stage--newborn .stage-activity {
    justify-content: flex-start;
}

.stage--newborn .activity-tag {
    border-radius: 20px;
    border-color: rgba(26, 26, 26, 0.08);
    color: rgba(26, 26, 26, 0.45);
}

/* CHILDHOOD — right-aligned, playful, energetic */
.stage--childhood {
    align-items: center;
    justify-content: flex-end;
    padding-right: 10vw;
}

.stage--childhood .stage-content {
    text-align: right;
    max-width: 560px;
}

.stage--childhood .stage-activity {
    justify-content: flex-end;
    gap: 16px;
}

.stage--childhood .activity-tag {
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
}

.stage--childhood .activity-tag:nth-child(2) {
    transform: rotate(1.5deg);
}

.stage--childhood .activity-tag:nth-child(3) {
    transform: rotate(-0.5deg);
}

.stage--childhood .activity-tag:hover {
    transform: rotate(0deg) scale(1.05);
}

/* YOUNG ADULT — split layout, structured, busy */
.stage--young-adult .stage-content {
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 60px;
    text-align: left;
}

.stage--young-adult .stage-label {
    grid-column: 1;
}

.stage--young-adult .stage-heading {
    grid-column: 1;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.stage--young-adult .stage-text {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    margin-bottom: 0;
}

.stage--young-adult .stage-activity {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 8px;
}

.stage--young-adult .activity-tag {
    font-size: 0.65rem;
    padding: 6px 14px;
    letter-spacing: 0.15em;
}

.stage--young-adult .stage-product-trigger {
    grid-column: 2;
    text-align: right;
}

/* PARENTHOOD — right-aligned, intimate, mirrors Newborn */
.stage--parenthood {
    justify-content: flex-end;
    padding-right: 12vw;
}

.stage--parenthood .stage-content {
    text-align: right;
    max-width: 520px;
}

.stage--parenthood .stage-activity {
    justify-content: flex-end;
}

.stage--parenthood .stage-heading {
    font-size: clamp(2.5rem, 6vw, 4rem);
    letter-spacing: 0.15em;
    margin-bottom: 40px;
}

.stage--parenthood .stage-text {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    line-height: 2;
}

.stage--parenthood .activity-tag {
    border-radius: 24px;
    padding: 10px 24px;
    border-color: rgba(26, 26, 26, 0.08);
}

/* MIDLIFE — right heading, left body, seeking balance */
.stage--midlife .stage-content {
    max-width: 800px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 80px;
}

.stage--midlife .stage-label {
    grid-column: 2;
    text-align: right;
}

.stage--midlife .stage-heading {
    grid-column: 2;
    text-align: right;
}

.stage--midlife .stage-text {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    text-align: left;
    margin-bottom: 0;
}

.stage--midlife .stage-activity {
    grid-column: 1 / -1;
    justify-content: center;
}

.stage--midlife .stage-product-trigger {
    grid-column: 1 / -1;
    text-align: center;
}

/* GOLDEN — left-aligned, fading, peaceful return */
.stage--golden {
    justify-content: flex-start;
    padding-left: 12vw;
}

.stage--golden .stage-content {
    text-align: left;
    max-width: 600px;
}

.stage--golden .stage-activity {
    justify-content: flex-start;
}

.stage--golden .stage-heading {
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    color: rgba(26, 26, 26, 0.65);
    letter-spacing: 0.15em;
    margin-bottom: 48px;
}

.stage--golden .stage-text {
    color: rgba(26, 26, 26, 0.5);
    letter-spacing: 0.04em;
}

.stage--golden .stage-label {
    color: rgba(26, 26, 26, 0.2);
}

.stage--golden .stage-activity {
    gap: 20px;
}

.stage--golden .activity-tag {
    border-color: rgba(26, 26, 26, 0.06);
    color: rgba(26, 26, 26, 0.35);
    letter-spacing: 0.12em;
}

.stage--golden .stage-product-trigger {
    opacity: 0.7;
}

/* ==========================================================================
   FINALE
   ========================================================================== */

.finale-stage {
    min-height: 80vh;
}

.finale-heading {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.4;
    letter-spacing: 0.05em;
    margin-bottom: 32px;
}

.finale-tagline {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.375rem);
    color: rgba(26, 26, 26, 0.6);
    margin-bottom: 64px;
}

/* CTA button */
.cta-button {
    display: inline-block;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 18px 48px;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button:hover {
    background: rgba(26, 26, 26, 0.85);
    letter-spacing: 0.2em;
    padding: 18px 56px;
}

@keyframes breathPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

.cta-button.breathing {
    animation: breathPulse var(--breath-cycle) cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .stage {
        padding: 80px 20px;
        min-height: 90vh;
    }

    /* Collapse asymmetric layouts to centered on mobile */
    .stage--newborn,
    .stage--childhood,
    .stage--parenthood,
    .stage--golden {
        justify-content: center;
        padding-left: 20px;
        padding-right: 20px;
    }

    .stage--newborn .stage-content,
    .stage--childhood .stage-content,
    .stage--parenthood .stage-content,
    .stage--golden .stage-content {
        text-align: center;
        max-width: 100%;
    }

    .stage--newborn .stage-activity,
    .stage--childhood .stage-activity,
    .stage--parenthood .stage-activity,
    .stage--golden .stage-activity {
        justify-content: center;
    }

    .stage--young-adult .stage-content,
    .stage--midlife .stage-content {
        display: block;
        max-width: 100%;
        text-align: center;
    }

    .stage--young-adult .stage-text,
    .stage--midlife .stage-text {
        margin-bottom: 48px;
    }

    .stage--young-adult .stage-activity {
        justify-content: center;
    }

    .stage--young-adult .stage-product-trigger {
        text-align: center;
    }

    .stage-activity {
        gap: 8px;
    }

    .activity-tag {
        font-size: 0.65rem;
        padding: 6px 14px;
    }

    .age-indicator {
        top: 70px;
        right: 20px;
    }

    .age-number {
        font-size: 2rem;
    }

    .product-drawer {
        width: 100vw;
        max-width: 100vw;
        padding: 40px 24px;
    }

    .heart-btn {
        width: 48px;
        height: 48px;
        bottom: 16px;
        left: 16px;
    }

    .heart-btn .heart-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .brand-name {
        letter-spacing: 0.25em;
        margin-right: -0.25em;
    }

    .stage-heading {
        font-size: 1.75rem;
    }
}
