/* === Immersive Storytelling Page === */
:root {
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Backgrounds */
    --bg-deep: #66745f;
    --bg-medium: #8ea08a;
    --bg-warm: #d8b7b0;
    --bg-cream: #f3e5dc;

    /* Accent */
    --rose: #d6a7aa;
    --rose-light: #efcfd1;
    --rose-dark: #b98590;
    --leaf: #aebd9a;
    --leaf-light: #d8e1c8;
    --cocoa: #b89f93;

    /* Text */
    --text-light: #fbf5f1;
    --text-muted: rgba(251, 245, 241, 0.72);
    --text-dark: #4f5848;
    --partner-brand: var(--rose);
}

body.theme-neutral {
    --bg-deep: #66745f;
    --bg-medium: #8ea08a;
    --bg-warm: #d8b7b0;
    --bg-cream: #f3e5dc;
    --rose: #d6a7aa;
    --rose-light: #efcfd1;
    --rose-dark: #b98590;
    --leaf: #aebd9a;
    --leaf-light: #d8e1c8;
    --cocoa: #b89f93;
    --text-light: #fbf5f1;
    --text-muted: rgba(251, 245, 241, 0.72);
    --text-dark: #4f5848;
}

body.theme-pink {
    --bg-deep: #8b6c72;
    --bg-medium: #b89aa4;
    --bg-warm: #edc9ce;
    --bg-cream: #fbefeb;
    --rose: #f0bcc6;
    --rose-light: #fde0df;
    --rose-dark: #cc8c99;
    --leaf: #c9d4b3;
    --leaf-light: #e7edd8;
    --cocoa: #d2b2ab;
    --text-light: #fff7f4;
    --text-muted: rgba(255, 247, 244, 0.76);
    --text-dark: #6b5860;
}

body.theme-blue {
    --bg-deep: #667989;
    --bg-medium: #93a7b8;
    --bg-warm: #dbe2e7;
    --bg-cream: #f4f3ef;
    --rose: #b8cddd;
    --rose-light: #dbe8f2;
    --rose-dark: #8ca6bc;
    --leaf: #c2d3c4;
    --leaf-light: #e7efe4;
    --cocoa: #c6cfcf;
    --text-light: #f8fbfd;
    --text-muted: rgba(248, 251, 253, 0.75);
    --text-dark: #4d5d69;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === Cover / Hero === */
.cover {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cover-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: coverZoom 20s ease-in-out infinite alternate;
}

.cover-bg--gradient {
    background: linear-gradient(160deg, #d8b7b0 0%, #efcfd1 40%, #aebd9a 100%);
}

.story-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: hidden;
}

.story-media-blur {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.12);
    filter: blur(18px);
    opacity: 0.55;
}

.story-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(247, 239, 232, 0.14), transparent 60%);
}

.story-media-img {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 1100px);
    max-height: min(72dvh, 820px);
    object-fit: contain;
    object-position: center;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.story-media--hero {
    padding: 108px 24px 24px;
}

.story-media-img--hero {
    max-height: min(82dvh, 920px);
}

@keyframes coverZoom {
    from { transform: scale(1.0); }
    to { transform: scale(1.08); }
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(32, 24, 28, 0.08) 0%, rgba(32, 24, 28, 0.18) 45%, rgba(32, 24, 28, 0.34) 100%),
        linear-gradient(
            to bottom,
            rgba(102, 116, 95, 0.18) 0%,
            rgba(102, 116, 95, 0.08) 26%,
            rgba(64, 51, 58, 0.32) 54%,
            rgba(52, 43, 48, 0.72) 78%,
            rgba(42, 35, 39, 0.88) 100%
        );
}

.cover-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 32px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.cover-content::before {
    content: "";
    position: absolute;
    inset: -28px -34px;
    z-index: -1;
    border-radius: 34px;
    background: linear-gradient(
        180deg,
        rgba(39, 31, 35, 0.08) 0%,
        rgba(39, 31, 35, 0.18) 30%,
        rgba(39, 31, 35, 0.32) 100%
    );
    backdrop-filter: blur(6px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
}

.cover-content.active {
    opacity: 1;
    transform: translateY(0);
}

.cover-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--rose);
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(24, 17, 20, 0.28);
}

.cover-branding-shell {
    position: absolute;
    top: 26px;
    left: 50%;
    z-index: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.cover-branding {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    max-width: min(92vw, 360px);
    border: 1px solid color-mix(in srgb, var(--partner-brand) 32%, white);
    border-radius: 18px;
    background: rgba(32, 24, 28, 0.22);
    backdrop-filter: blur(6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    pointer-events: auto;
}

.cover-branding__kicker {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--rose-light);
}

.cover-branding__logo,
.footer-branding__logo {
    display: block;
    flex: 0 0 auto;
    width: 56px;
    min-width: 56px;
    max-width: 56px;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    border-radius: 999px;
    object-fit: cover;
    object-position: center;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.14);
    overflow: hidden;
}

.cover-branding strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

.cover-branding__tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.cover-branding a,
.footer-branding a {
    color: var(--leaf-light);
    text-decoration: none;
}

.cover-branding a:hover,
.footer-branding a:hover {
    text-decoration: underline;
}

.cover-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-light);
    margin-bottom: 12px;
    text-shadow: 0 8px 28px rgba(20, 15, 18, 0.42);
}

.cover-name {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-style: italic;
    color: var(--rose-light);
    font-weight: 400;
    text-shadow: 0 4px 20px rgba(20, 15, 18, 0.32);
}

.footer-branding {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 10px 14px;
    max-width: min(92vw, 560px);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--rose-light);
    font-size: 0.88rem;
    overflow: hidden;
}

.footer-branding__logo {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
}

.footer-branding em {
    font-style: normal;
    color: color-mix(in srgb, var(--partner-brand) 70%, white);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* === Fullscreen Sections === */
.fullsection {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
}

.section-nav {
    position: absolute;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
    min-width: 112px;
    height: 48px;
    border: 1px solid rgba(247, 239, 232, 0.34);
    border-radius: 999px;
    background: rgba(77, 60, 55, 0.22);
    color: var(--text-light);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    gap: 10px;
    padding: 0 18px;
}

.section-nav--down {
    bottom: 22px;
    animation: bounce 2s ease-in-out infinite;
}

.section-nav--up {
    top: 22px;
}

.section-nav:hover {
    transform: translateX(-50%) translateY(-2px);
    background: rgba(77, 60, 55, 0.34);
    border-color: rgba(247, 239, 232, 0.5);
}

.section-nav__text {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.section-nav__icon {
    font-size: 1rem;
    line-height: 1;
}

.section-inner {
    text-align: center;
    padding: 48px 32px;
    max-width: 600px;
}

/* === Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

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

/* === Counter Section === */
.section-counter {
    background: var(--bg-deep);
}

.counter-pre {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.counter-number {
    font-family: var(--font-display);
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 700;
    line-height: 1;
    color: var(--rose);
    margin-bottom: 8px;
}

.counter-post {
    font-family: var(--font-display);
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-style: italic;
    color: var(--rose-light);
}

.counter-note {
    margin-top: 18px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* === Message Section === */
.section-message {
    background: linear-gradient(160deg, var(--bg-medium) 0%, var(--bg-deep) 100%);
}

.quote-mark {
    font-family: var(--font-display);
    font-size: 6rem;
    line-height: 1;
    color: var(--rose);
    opacity: 0.25;
    margin-bottom: -24px;
}

.message-text {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    font-style: italic;
    line-height: 1.9;
    color: var(--text-light);
    max-width: 500px;
}

/* === Moment Sections === */
.moment-section {
    background: var(--bg-deep);
}

.moment-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(102, 116, 95, 0.06) 0%,
        rgba(102, 116, 95, 0.02) 30%,
        rgba(102, 116, 95, 0.56) 65%,
        rgba(102, 116, 95, 0.9) 100%
    );
}

.moment-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 48px 32px;
    max-width: 600px;
}

.moment-content--over {
    align-self: flex-end;
    padding: 28px 28px 64px;
    max-width: min(92vw, 720px);
}

.moment-content--over::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(
        to bottom,
        rgba(76, 88, 72, 0.2) 0%,
        rgba(76, 88, 72, 0.68) 38%,
        rgba(76, 88, 72, 0.9) 100%
    );
    backdrop-filter: blur(8px);
    box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.2);
}

.moment-date {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #eef3df;
    margin-bottom: 16px;
    padding: 5px 16px;
    border: 1px solid rgba(239, 246, 201, 0.4);
    border-radius: 20px;
    background: rgba(76, 88, 72, 0.22);
}

.moment-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    font-weight: 400;
    line-height: 1.3;
    color: #fff8f4;
    margin-bottom: 16px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.moment-desc {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    line-height: 1.9;
    color: rgba(255, 248, 244, 0.9);
    font-weight: 400;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

.moment-icon {
    font-size: 3rem;
    margin-top: 24px;
    opacity: 0.5;
}

/* Alternating bg for moments without photo */
.moment-section:nth-child(even):not(:has(.moment-bg)) {
    background: var(--bg-medium);
}

/* === Phase Dividers === */
.section-phase-divider {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 246, 241, 0.2), transparent 32%),
        linear-gradient(180deg, rgba(255, 247, 244, 0.12) 0%, rgba(255, 247, 244, 0) 18%),
        linear-gradient(160deg, var(--bg-warm) 0%, var(--bg-medium) 48%, var(--bg-deep) 100%);
}

.section-phase-divider::before,
.section-phase-divider::after {
    content: "";
    position: absolute;
    left: -5%;
    width: 110%;
    height: 90px;
    pointer-events: none;
}

.section-phase-divider::before {
    top: -36px;
    background: radial-gradient(60% 100% at 50% 100%, rgba(255, 245, 240, 0.16), transparent 70%);
}

.section-phase-divider::after {
    bottom: -42px;
    background: radial-gradient(60% 100% at 50% 0%, rgba(49, 40, 45, 0.26), transparent 70%);
}

.section-phase-divider .section-inner {
    max-width: 100%;
    width: 100%;
}

.section-phase-divider--milestones {
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 246, 241, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(255, 244, 232, 0.14) 0%, rgba(255, 244, 232, 0.02) 22%),
        linear-gradient(160deg, #a58879 0%, #8f7e7d 42%, #6f7c74 100%);
}

.phase-panel--milestones {
    background:
        linear-gradient(180deg, rgba(255, 250, 242, 0.16), rgba(255, 250, 242, 0.08)),
        rgba(86, 66, 60, 0.16);
}

.phase-panel--milestones .phase-title {
    color: #ffd8cc;
}

.phase-panel--milestones .phase-subtitle,
.phase-panel--milestones .phase-kicker {
    color: rgba(255, 247, 244, 0.82);
}

.phase-panel {
    position: relative;
    max-width: min(90vw, 660px);
    margin: 0 auto;
    padding: 42px 38px;
    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(255, 247, 244, 0.14), rgba(255, 247, 244, 0.08)),
        rgba(81, 62, 67, 0.16);
    border: 1px solid rgba(255, 244, 239, 0.2);
    backdrop-filter: blur(14px);
    box-shadow: 0 26px 70px rgba(49, 40, 45, 0.16);
}

.phase-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
}

.phase-kicker {
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 245, 241, 0.72);
    margin-bottom: 14px;
}

.phase-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 400;
    font-style: italic;
    color: var(--rose);
    margin-bottom: 12px;
}

.phase-subtitle {
    max-width: 34rem;
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    line-height: 1.8;
    color: rgba(255, 247, 244, 0.86);
}

/* === Gestational Info === */
.gestational-info {
    margin-bottom: 48px;
}

.gestational-info + #milestone-counter {
    padding-top: 32px;
    border-top: 1px solid rgba(214, 167, 170, 0.18);
}

/* === Extra sections === */
.section-extra {
    background: var(--bg-deep);
}

/* === Footer === */
.section-footer {
    min-height: 40vh;
    background: var(--bg-deep);
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--rose);
    margin-bottom: 8px;
}

.footer-sub {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* === Responsive === */
@media (max-width: 480px) {
    .cover-content {
        padding: 0 24px;
    }

    .section-inner,
    .moment-content {
        padding: 40px 24px;
    }

    .cover-branding-shell {
        top: 18px;
    }

    .cover-branding {
        max-width: min(86vw, 320px);
    }

    .phase-panel {
        padding: 34px 24px;
        border-radius: 26px;
    }

    .moment-content--over {
        padding: 22px 18px 48px;
    }

    .moment-content--over::before {
        border-radius: 22px 22px 0 0;
    }

    .story-media {
        padding: 20px;
    }

    .story-media--hero {
        padding: 96px 20px 20px;
    }

    .story-media-img {
        width: 100%;
        max-height: min(60dvh, 520px);
        border-radius: 20px;
    }

    .story-media-img--hero {
        max-height: min(68dvh, 620px);
    }

    .section-nav {
        min-width: 42px;
        height: 42px;
        padding: 0;
    }

    .section-nav--up {
        top: 16px;
    }

    .section-nav--down {
        bottom: 16px;
    }

    .section-nav__text {
        display: none;
    }

    .quote-mark {
        font-size: 4rem;
    }
}

/* Parallax for photos on desktop */
@media (min-width: 769px) {
    .story-media-blur {
        background-attachment: fixed;
    }
}
