:root {
    --bg: #05070c;
    --overlay: rgba(4, 7, 12, 0.52);
    --card: rgba(9, 14, 25, 0.78);
    --text-main: #f5f4ef;
    --text-soft: #d4d5d8;
    --accent: #ffb468;
    --line: #ffd8ad;
    --radius: 1.4rem;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(1200px 500px at 8% 8%, #1f2b42 0%, transparent 60%),
        radial-gradient(900px 420px at 95% 86%, #2d1a11 0%, transparent 58%),
        var(--bg);
    color: var(--text-main);
    font-family: "Manrope", "Trebuchet MS", sans-serif;
}

html,
body {
    height: 100%;
}

html {
    font-size: clamp(16px, 0.2vw + 13px, 20px);
}

.story {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
}

.site-footer {
    position: fixed;
    left: 50%;
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    z-index: 40;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    max-width: min(92vw, 56ch);
    font-size: clamp(0.72rem, 0.2vw + 0.65rem, 0.92rem);
    line-height: 1.25;
    letter-spacing: 0.02em;
    color: rgba(245, 244, 239, 0.82);
    background: rgba(4, 7, 12, 0.42);
    backdrop-filter: blur(4px);
    text-align: center;
    pointer-events: none;
}

.panel {
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.02);
    animation: settle 1.15s ease-out both;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(95deg, rgba(4, 8, 16, 0.88) 0%, rgba(4, 8, 16, 0.68) 38%, rgba(4, 8, 16, 0.22) 66%, rgba(4, 8, 16, 0.46) 100%),
        var(--overlay);
}

.hero__intro {
    position: absolute;
    z-index: 2;
    top: 10vh;
    left: clamp(1rem, 3.6vw, 3.2rem);
    width: min(50vw, 640px);
    padding: clamp(1.1rem, 2vw, 1.7rem);
    
    animation: rise 0.8s ease-out 0.2s both;
}

.hero__kicker {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16rem;
    text-transform: uppercase;
    color: var(--accent);
}

.hero__intro h1 {
    margin: 0.4rem 0 0.55rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2rem, 4.4vw, 4.3rem);
    line-height: 0.96;
    text-wrap: balance;
}

.hero__intro p {
    margin: 0;
    max-width: 35ch;
    font-size: clamp(0.98rem, 1.6vw, 1.18rem);
    line-height: 1.58;
    color: var(--text-soft);
}

.wife-callout {
    position: absolute;
    left: clamp(1rem, 4vw, 3rem);
    bottom: clamp(1rem, 4.2vw, 2.8rem);
    z-index: 3;
    width: min(44vw, 420px);
    display: flex;
    align-items: end;
    gap: 0.7rem;
    animation: rise 0.85s ease-out 0.44s both;
}

.wife-callout__content {
    display: grid;
    gap: 0.35rem;
}

.wife-callout__media {
    position: relative;
    display: grid;
    justify-items: end;
}

.wife-callout__text {
    position: absolute;
    right: -50px;
    bottom: calc(100% + 3.9rem);
    z-index: 2;
    margin: 0;
    padding: 0.6rem 0.8rem;
   
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: right;
    max-width: 19ch;
}

.wife-callout__arrow {
    position: absolute;
    right: -0.25rem;
    bottom: calc(100% - 0.35rem);
    width: min(22vw, 190px);
    height: auto;
    animation: arrowPulse 1.9s ease-in-out infinite;
}

.wife-callout__arrow path {
    fill: none;
    stroke: var(--line);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wife-callout__photo {
    width: clamp(16rem, 22vw, 25rem);
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f4efe4;
    box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.4);
    transform-origin: center;
    animation: heartbeat 1.25s ease-in-out infinite;
}

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

@keyframes settle {
    from {
        transform: scale(1.06);
    }
    to {
        transform: scale(1.02);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.07);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.09);
    }
    70% {
        transform: scale(1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes arrowPulse {
    0% {
        opacity: 0.15;
    }
    35% {
        opacity: 1;
    }
    70% {
        opacity: 0.2;
    }
    100% {
        opacity: 0.15;
    }
}

.chapter {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.chapter__visual {
    position: absolute;
    inset: 0;
}

.chapter__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.9) contrast(1.05);
    transform: scale(1.04);
}

.chapter__photo--base {
    object-position: center 22%;
    filter: saturate(0.95) contrast(1.03) brightness(0.94);
}

.chapter__photo--cut {
    object-position: center 42%;
    clip-path: polygon(60% 0, 100% 0, 100% 100%, 34% 100%);
    opacity: 0.78;
    filter: saturate(0.8) contrast(1.01) brightness(0.88);
}

.chapter__splitline {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.chapter__splitline::before {
    content: "";
    position: absolute;
    left: 60%;
    top: -12%;
    width: 3px;
    height: 128%;
    background: linear-gradient(180deg, rgba(255, 232, 198, 0.16), rgba(255, 232, 198, 0.92), rgba(255, 232, 198, 0.16));
    transform: rotate(18deg);
    box-shadow: 0 0 20px rgba(255, 214, 168, 0.35);
}

.chapter__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(112deg, rgba(6, 7, 11, 0.72) 8%, rgba(6, 7, 11, 0.28) 44%, rgba(6, 7, 11, 0.64) 100%);
}

.chapter__note {
    position: absolute;
    z-index: 1;
    width: min(42ch, calc(100% - 2rem));
    padding: clamp(1rem, 2.2vw, 1.6rem);
    
}

.chapter__note--top-left {
    top: clamp(1rem, 4vw, 3rem);
    left: clamp(1rem, 4vw, 3rem);
}

.chapter__note--bottom-right {
    right: clamp(1rem, 4vw, 3rem);
    bottom: clamp(1rem, 4vw, 3rem);
}

.chapter__center-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    transform: translate(-50%, -50%);
    width: min(28ch, calc(100% - 2.2rem));
    padding: 0.85rem 0.95rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 223, 176, 0.9);
    color: #281b10;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0.6rem 1.5rem rgba(0, 0, 0, 0.22);
}

.chapter__center-badge svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
    flex: 0 0 auto;
}

.chapter__center-badge p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.3;
    font-weight: 700;
}

.chapter__note h2,
.chapter__note h3 {
    margin: 0.45rem 0 0.65rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.7rem, 4vw, 3.1rem);
    line-height: 0.98;
}

.chapter__kicker {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    color: #ffd29b;
}

.chapter__note p {
    margin: 0;
    font-size: clamp(0.98rem, 1.3vw, 1.1rem);
    line-height: 1.5;
    color: #e2e5ec;
}

@media (prefers-reduced-motion: reduce) {
    .story {
        scroll-behavior: auto;
    }

    .wife-callout__photo,
    .wife-callout__arrow {
        animation: none;
    }
}

@media (min-width: 1600px) {
    html {
        font-size: clamp(17px, 0.28vw + 13px, 22px);
    }

    .hero__intro {
        top: 8vh;
        width: min(46vw, 52rem);
    }

    .hero__intro p {
        max-width: 40ch;
    }

    .hero__kicker {
        font-size: 1.2rem;
    }

    .wife-callout__text {
        font-size: 1.425rem;
    }

    .chapter__note {
        width: min(46ch, 38vw);
        padding: 1.15em 1.3em;
    }

    .chapter__kicker {
        font-size: 1.2rem;
    }

    .chapter__note p {
        font-size: 1.545rem;
        line-height: 1.58;
    }

    .chapter__center-badge {
        width: min(34ch, 34vw);
        padding: 0.9em 1.05em;
        gap: 0.7em;
    }

    .chapter__center-badge p {
        font-size: 1.32rem;
    }

    .wife-callout__photo {
        width: clamp(20rem, 24vw, 30rem);
    }
}

@media (min-width: 2300px) {
    html {
        font-size: clamp(19px, 0.42vw + 12px, 28px);
    }

    .hero__intro {
        width: min(44vw, 56rem);
    }

    .hero__intro h1 {
        font-size: clamp(3.9rem, 5.4vw, 8.4rem);
    }

    .hero__intro p {
        font-size: clamp(1.77rem, 1.575vw, 2.55rem);
        line-height: 1.62;
    }

    .chapter__note {
        width: min(52ch, 38vw);
        padding: 1.25em 1.45em;
    }

    .chapter__center-badge {
        width: min(42ch, 34vw);
        padding: 1em 1.15em;
    }

    .chapter__note h2,
    .chapter__note h3 {
        font-size: clamp(3.15rem, 4.35vw, 6.3rem);
    }

    .chapter__note p {
        font-size: clamp(1.62rem, 1.35vw, 2.25rem);
        line-height: 1.64;
    }

    .chapter__center-badge p {
        font-size: clamp(1.35rem, 1.05vw, 1.8rem);
        line-height: 1.35;
    }

    .wife-callout__photo {
        width: clamp(24rem, 26vw, 36rem);
    }
}

@media (min-width: 3000px) {
    html {
        font-size: clamp(21px, 0.5vw + 12px, 32px);
    }

    .hero__intro {
        width: min(42vw, 62rem);
    }

    .hero__intro p {
        max-width: 44ch;
    }

    .chapter__note {
        width: min(56ch, 40vw);
    }

    .chapter__center-badge {
        width: min(46ch, 36vw);
    }

    .wife-callout__photo {
        width: clamp(28rem, 26vw, 40rem);
    }
}

@media (max-width: 900px) {
    .hero__intro {
        width: min(76vw, 600px);
        top: 1.1rem;
    }

    .wife-callout {
        width: min(64vw, 420px);
        bottom: 1.2rem;
    }
}

@media (max-width: 640px) {
    .hero__overlay {
        background:
            linear-gradient(180deg, rgba(4, 8, 16, 0.85) 0%, rgba(4, 8, 16, 0.4) 53%, rgba(4, 8, 16, 0.72) 100%),
            var(--overlay);
    }

    .hero__intro {
        width: calc(100% - 1.2rem);
        left: 0.6rem;
        top: 0.6rem;
        padding: 1rem;
    }

    .hero__intro p {
        max-width: 100%;
    }

    .wife-callout {
        left: 0.6rem;
        bottom: 0.7rem;
        width: min(82vw, 320px);
        gap: 0.45rem;
    }

    .wife-callout__text {
        bottom: calc(100% + 3rem);
        font-size: 0.82rem;
        padding: 0.42rem 0.56rem;
    }

    .wife-callout__arrow {
        width: min(34vw, 150px);
        right: -0.15rem;
        bottom: calc(100% - 0.25rem);
    }

    .wife-callout__photo {
        width: clamp(164px, 52vw, 240px);
        border-width: 3px;
    }

    .chapter__note {
        position: relative;
        inset: auto;
        width: calc(100% - 1.3rem);
        margin: 0.65rem;
    }

    .chapter__note--top-left {
        margin-top: 0.65rem;
    }

    .chapter__note--bottom-right {
        margin-top: 0;
    }

    .chapter__center-badge {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: calc(100% - 1.3rem);
        margin: 0.2rem 0.65rem 0.65rem;
        border-radius: 1rem;
    }

    .chapter__photo--cut {
        clip-path: polygon(52% 0, 100% 0, 100% 100%, 24% 100%);
    }

    .chapter__splitline::before {
        left: 52%;
        transform: rotate(16deg);
    }

    .site-footer {
        max-width: 95vw;
        font-size: 0.72rem;
        padding: 0.32rem 0.58rem;
    }
}
