:root {
    --ink: #2f201c;
    --muted: #765f58;
    --paper: #fffaf6;
    --paper-soft: #fff1ea;
    --rose: #cf5d86;
    --rose-dark: #81314b;
    --sari: #dd3f86;
    --leaf: #345d44;
    --leaf-soft: #e3ecdf;
    --gold: #bf8540;
    --line: rgba(91, 58, 51, 0.14);
    --shadow: 0 24px 60px rgba(61, 38, 32, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, var(--paper-soft) 0%, #fffaf6 34%, #edf4ef 68%, #fff4ee 100%);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.25rem;
    padding: 0.9rem 1.5rem;
    color: #fffaf6;
    background: linear-gradient(180deg, rgba(39, 22, 19, 0.76), rgba(39, 22, 19, 0));
}

.brand {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
}

.nav-links a {
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    transition: background-color 180ms ease, color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: rgba(255, 250, 246, 0.18);
    outline: none;
}

.hero {
    position: relative;
    display: grid;
    min-height: 92svh;
    overflow: hidden;
    isolation: isolate;
    background: #291815;
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-image {
    z-index: -2;
    background-color: #291815;
    background-image: url("/assets/photo-hero.webp");
    background-position: right 48% center;
    background-repeat: no-repeat;
    background-size: min(58rem, 62vw) auto;
    filter: brightness(1.02) contrast(1.03) saturate(1.08);
}

.hero-overlay {
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(35, 20, 17, 0.94), rgba(35, 20, 17, 0.74) 38%, rgba(35, 20, 17, 0.28) 67%, rgba(35, 20, 17, 0.08)),
        linear-gradient(180deg, rgba(35, 20, 17, 0.18), rgba(35, 20, 17, 0.42));
}

.hero-content {
    width: min(42rem, calc(100% - 3rem));
    align-self: center;
    margin: 5.5rem 0 4rem;
    padding-left: max(1.5rem, calc((100vw - 72rem) / 2));
    color: #fffaf6;
    text-shadow: 0 2px 24px rgba(20, 12, 10, 0.42);
}

.kicker,
.section-label {
    margin: 0 0 0.75rem;
    color: var(--rose-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .kicker {
    color: #ffd3dc;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.08;
}

h1 {
    font-size: 5rem;
    font-weight: 400;
}

h2 {
    font-size: 2.25rem;
    font-weight: 400;
}

h3 {
    font-size: 1.35rem;
    font-weight: 400;
}

.hero-copy {
    max-width: 36rem;
    margin: 1.35rem 0 0;
    color: rgba(255, 250, 246, 0.9);
    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.78rem 1.1rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.button.primary {
    color: #fffaf6;
    background: linear-gradient(135deg, var(--rose-dark), var(--sari));
    box-shadow: 0 14px 32px rgba(90, 25, 48, 0.3);
}

.button.secondary {
    color: #fffaf6;
    border-color: rgba(255, 250, 246, 0.55);
    background: rgba(255, 250, 246, 0.12);
}

.intro-section,
.promises-section,
.closing-section {
    width: min(72rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 5rem 0;
}

.letter-section,
.promises-section,
.closing-section {
    scroll-margin-top: 4.5rem;
}

.intro-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.78fr);
    gap: 3rem;
    align-items: center;
}

.intro-copy p:not(.section-label),
.closing-copy p,
.letter-paper p,
.promise-card p {
    color: var(--muted);
    font-size: 1.08rem;
}

.intro-copy p:not(.section-label) {
    max-width: 42rem;
    margin: 1rem 0 0;
}

.memory-photo {
    position: relative;
    min-height: 30rem;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(52, 93, 68, 0.18);
    border-radius: 0.5rem;
    background: var(--leaf-soft);
    box-shadow: 0 18px 42px rgba(52, 93, 68, 0.16);
}

.memory-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 52% center;
}

.memory-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(47, 32, 28, 0), rgba(47, 32, 28, 0.16));
    pointer-events: none;
}

.letter-section {
    padding: 5rem 1rem;
    background:
        linear-gradient(90deg, rgba(255, 250, 246, 0.92), rgba(255, 250, 246, 0.74) 52%, rgba(255, 241, 234, 0.88)),
        url("/assets/photo-ring.webp") center / cover no-repeat;
}

.letter-paper {
    width: min(52rem, 100%);
    margin: 0 auto;
    border: 1px solid rgba(125, 50, 67, 0.14);
    border-radius: 0.5rem;
    padding: 3rem;
    background: rgba(255, 250, 246, 0.93);
    box-shadow: var(--shadow);
}

.letter-paper p {
    margin: 1.2rem 0 0;
}

.letter-paper .signature {
    color: var(--ink);
    font-size: 1.25rem;
}

.section-heading {
    max-width: 48rem;
}

.section-heading h2 {
    margin-bottom: 1.5rem;
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
}

.promise-card {
    min-height: 15rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 250, 246, 0.9), rgba(255, 241, 234, 0.78));
    box-shadow: 0 14px 34px rgba(61, 38, 32, 0.08);
}

.promise-card h3 {
    color: var(--rose-dark);
}

.promise-card:nth-child(2) h3 {
    color: var(--leaf);
}

.promise-card:nth-child(3) h3 {
    color: var(--gold);
}

.promise-card p {
    margin: 1rem 0 0;
}

.closing-section {
    display: grid;
    min-height: 68svh;
    place-items: center;
    text-align: center;
}

.closing-copy {
    max-width: 48rem;
}

.closing-copy p {
    margin: 1.2rem auto 2rem;
}

.site-footer {
    padding: 1.5rem;
    color: var(--muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

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

.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 700ms ease, transform 700ms ease;
}

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

    .button,
    .js .reveal,
    .js .reveal.is-visible {
        transform: none;
        transition: none;
    }
}

@media (max-width: 760px) {
    .site-header {
        min-height: 3.85rem;
        padding: 0.75rem 1rem;
    }

    .brand {
        font-size: 0.88rem;
    }

    .nav-links {
        gap: 0.1rem;
        font-size: 0.82rem;
    }

    .nav-links a {
        padding: 0.4rem 0.48rem;
    }

    .hero {
        min-height: 88svh;
    }

    .hero-image {
        background-position: 52% center;
        background-size: cover;
        filter: brightness(1.07) contrast(1.06) saturate(1.06);
    }

    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(37, 23, 20, 0.28), rgba(37, 23, 20, 0.14) 44%, rgba(37, 23, 20, 0.78)),
            linear-gradient(90deg, rgba(37, 23, 20, 0.22), rgba(37, 23, 20, 0.04));
    }

    .hero-content {
        width: min(100% - 2rem, 34rem);
        align-self: end;
        margin: 5rem 0 2.75rem;
        padding-left: 1rem;
        text-shadow:
            0 2px 14px rgba(20, 12, 10, 0.78),
            0 1px 2px rgba(20, 12, 10, 0.9);
    }

    h1 {
        font-size: 3.65rem;
    }

    h2 {
        font-size: 1.85rem;
    }

    .hero-copy {
        font-size: 1.08rem;
    }

    .button {
        width: 100%;
    }

    .intro-section,
    .promises-section,
    .closing-section {
        width: min(100% - 2rem, 42rem);
        padding: 3.5rem 0;
    }

    .intro-section,
    .promise-grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .memory-photo {
        min-height: auto;
        aspect-ratio: 4 / 5;
    }

    .letter-section {
        padding: 3.5rem 1rem;
        background:
            linear-gradient(180deg, rgba(255, 250, 246, 0.9), rgba(255, 250, 246, 0.78)),
            url("/assets/photo-ring.webp") center / cover no-repeat;
    }

    .letter-paper {
        padding: 1.5rem;
    }

    .promise-card {
        min-height: auto;
    }
}

@media (max-width: 390px) {
    .nav-links a {
        padding: 0.35rem;
    }

    h1 {
        font-size: 3.1rem;
    }
}
