:root {
    --cream: #f7f0e4;
    --cream-light: #fdf8f2;
    --cream-warm: #f4e8d8;
    --cream-dark: #efe0ca;
    --cream-deep: #e6d3b4;
    --gold: #c8a96a;
    --gold-deep: #9e7a44;
    --gold-soft: rgba(200, 169, 106, 0.18);
    --navy: #14233b;
    --navy-soft: #30405d;
    --white: #ffffff;
    --border: rgba(20, 35, 59, 0.12);
    --shadow: 0 24px 60px rgba(20, 35, 59, 0.12);
    --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-fast: 240ms;
    --duration-base: 280ms;
    --duration-slow: 340ms;
    --gallery-gap: 1.8rem;
    --header-height: 108px;
    --container: 1120px;
    --hero-image: url("images/hero-petit-saguenay-01.webp");
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
    color-scheme: light;
}

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

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    background: var(--cream);
    color: var(--navy);
    line-height: 1.7;
    overflow-x: hidden;
}

body.lightbox-open {
    position: fixed;
    left: 0;
    right: 0;
    overflow: hidden;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a,
button {
    -webkit-tap-highlight-color: rgba(200, 169, 106, 0.18);
}

:focus-visible {
    outline: 2px solid rgba(158, 122, 68, 0.72);
    outline-offset: 4px;
}

/* Utilitaires */

.container {
    width: min(calc(100% - 2.5rem), var(--container));
    margin: 0 auto;
}

.narrow {
    width: min(calc(100% - 2.5rem), 760px);
}

.section-padding {
    padding: 6.5rem 0;
}

.section-label {
    margin: 0 0 0.75rem;
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.section-heading {
    max-width: 640px;
    margin-bottom: 2.5rem;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0;
}

h1 {
    font-size: 6.3rem;
}

h2 {
    font-size: 3.6rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.7rem;
    margin-bottom: 0.9rem;
}

p {
    margin: 0 0 1.25rem;
    color: var(--navy-soft);
}

/* Header */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    background: rgba(247, 241, 231, 0.67);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 22px rgba(104, 84, 56, 0.045);
}

.header-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1.45rem;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    isolation: isolate;
    overflow: hidden;
    min-height: 44px;
    padding: 0.35rem 0.12rem 0.55rem;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(20, 35, 59, 0.92);
    transition:
        color var(--duration-base) var(--ease-premium),
        transform var(--duration-base) var(--ease-premium);
}

.site-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0.35rem;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(158, 122, 68, 0.86), transparent);
    opacity: 0;
    transform: scaleX(0.25);
    transform-origin: center;
    transition:
        opacity var(--duration-base) var(--ease-premium),
        transform var(--duration-base) var(--ease-premium);
    pointer-events: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--gold-deep);
    transform: translateY(-1px);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Hero */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background-image:
        linear-gradient(rgba(10, 18, 30, 0.18), rgba(10, 18, 30, 0.18)),
        var(--hero-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--white);
}

@supports (min-height: 100svh) {
    .hero {
        min-height: 100svh;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(11, 18, 28, 0.78), rgba(11, 18, 28, 0.48)),
        linear-gradient(180deg, rgba(11, 18, 28, 0.18), rgba(11, 18, 28, 0.64));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 4rem 0;
}

.hero-kicker {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.hero-text {
    max-width: 560px;
    margin: 1.5rem 0 2rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.button-primary {
    display: inline-flex;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: rgba(200, 169, 106, 0.9);
    color: var(--navy);
    font-weight: 700;
    transition:
        transform var(--duration-base) var(--ease-premium),
        background var(--duration-base) var(--ease-premium),
        box-shadow var(--duration-base) var(--ease-premium);
}

.button-primary::after {
    content: "";
    position: absolute;
    inset: 0.08rem;
    border-radius: inherit;
    background: linear-gradient(
        112deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 36%,
        rgba(255, 255, 255, 0.34) 49%,
        rgba(255, 255, 255, 0.12) 53%,
        rgba(255, 255, 255, 0) 68%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transform: translateX(-155%) skewX(-18deg);
    transition:
        opacity var(--duration-fast) var(--ease-premium),
        transform var(--duration-slow) var(--ease-premium);
    pointer-events: none;
}

.button-primary:hover,
.button-primary:focus-visible {
    transform: translateY(-2px);
    background: #d8b77b;
    box-shadow: 0 12px 30px rgba(16, 28, 45, 0.2);
}

.button-primary:hover::after,
.button-primary:focus-visible::after {
    opacity: 1;
    transform: translateX(155%) skewX(-18deg);
}

.button-primary:active {
    transform: translateY(0) scale(0.99);
}

/* Un mot */

.letter-section {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0)),
        var(--cream);
}

.letter-section p {
    font-size: 1.04rem;
}

/* Souvenirs */

.memories-section {
    background: var(--cream-light);
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.memory-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: var(--shadow);
}

.memory-card > * {
    position: relative;
    z-index: 1;
}

.memory-card--birthday {
    min-height: 265px;
    padding-bottom: 7.2rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 240, 228, 0.92)),
        rgba(255, 255, 255, 0.66);
}

.memory-card--birthday::before {
    content: "";
    position: absolute;
    right: 0.35rem;
    bottom: 0.75rem;
    width: 9.4rem;
    height: 9.4rem;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(230, 211, 180, 0.54) 0%,
        rgba(230, 211, 180, 0.22) 44%,
        rgba(230, 211, 180, 0) 76%
    );
    opacity: 0.9;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

.memory-card--birthday::after {
    content: "";
    position: absolute;
    right: -0.6rem;
    bottom: -0.7rem;
    width: 9.6rem;
    height: 9.6rem;
    background: url("images/gateau50.webp") center / contain no-repeat;
    opacity: 0.46;
    filter: saturate(0.95) brightness(1.01) drop-shadow(0 14px 24px rgba(20, 35, 59, 0.07));
    transform: rotate(-4deg);
    transform-origin: bottom right;
    pointer-events: none;
    z-index: 0;
}

.memory-card--birthday p {
    max-width: 8.6rem;
    margin-bottom: 0;
}

.memory-year {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.memory-card p:last-child {
    margin-bottom: 0;
}

/* Galerie */

.gallery-section {
    background: var(--cream-dark);
}

.gallery-intro {
    max-width: 620px;
    margin-bottom: 0;
}

.gallery-wrap {
    width: min(calc(100% - 2.2rem), 1760px);
    margin: 0 auto;
}

.gallery-grid {
    column-count: 5;
    column-gap: var(--gallery-gap);
}

.gallery-card {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 var(--gallery-gap);
    box-sizing: border-box;
    line-height: 0;
    vertical-align: top;
    overflow: hidden;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: var(--shadow);
    cursor: zoom-in;
    transition:
        transform var(--duration-base) var(--ease-premium),
        box-shadow var(--duration-base) var(--ease-premium),
        border-color var(--duration-base) var(--ease-premium);
}

.gallery-card::before {
    content: "";
    position: absolute;
    inset: 0.08rem;
    border-radius: inherit;
    background: linear-gradient(
        112deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 38%,
        rgba(255, 255, 255, 0.42) 50%,
        rgba(255, 255, 255, 0.12) 54%,
        rgba(255, 255, 255, 0) 67%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transform: translateX(-150%) skewX(-18deg);
    transition:
        opacity var(--duration-fast) var(--ease-premium),
        transform var(--duration-slow) var(--ease-premium);
    pointer-events: none;
    z-index: 1;
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(20, 35, 59, 0) 54%, rgba(20, 35, 59, 0.18) 100%);
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-premium);
    pointer-events: none;
}

.gallery-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-premium);
}

.gallery-card:hover,
.gallery-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 28px 60px rgba(20, 35, 59, 0.14);
}

.gallery-card:hover img {
    transform: scale(1.03);
}

.gallery-card:hover::before,
.gallery-card:focus-visible::before {
    opacity: 1;
    transform: translateX(150%) skewX(-18deg);
}

.gallery-card:hover::after,
.gallery-card:focus-visible::after {
    opacity: 1;
}

.gallery-card:active {
    transform: translateY(-1px) scale(0.995);
}

/* Lightbox */

.lightbox {
    --lightbox-image: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    align-items: center;
    padding: clamp(1rem, 2.6vw, 2rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity var(--duration-slow) var(--ease-premium),
        visibility var(--duration-slow) var(--ease-premium);
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    appearance: none;
    background:
        radial-gradient(circle at top, rgba(230, 211, 180, 0.18), transparent 34%),
        rgba(9, 16, 28, 0.82);
    -webkit-backdrop-filter: blur(18px) saturate(0.86);
    backdrop-filter: blur(18px) saturate(0.86);
    cursor: pointer;
}

.lightbox-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1420px);
    margin: 0 auto;
}

.lightbox-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.4rem 1rem;
}

.lightbox-kicker {
    margin: 0;
    color: rgba(253, 248, 242, 0.72);
    font-size: 0.74rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.lightbox-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.lightbox-counter {
    margin: 0;
    color: rgba(253, 248, 242, 0.9);
    font-size: 0.98rem;
}

.lightbox-close,
.lightbox-nav {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(247, 240, 228, 0.1);
    color: var(--cream-light);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(2, 7, 16, 0.2);
    transition:
        transform var(--duration-base) var(--ease-premium),
        background var(--duration-base) var(--ease-premium),
        border-color var(--duration-base) var(--ease-premium),
        box-shadow var(--duration-base) var(--ease-premium);
}

.lightbox-close {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    cursor: pointer;
}

.lightbox-close span {
    font-size: 1.3rem;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    transform: translateY(-1px);
    background: rgba(247, 240, 228, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 50px rgba(2, 7, 16, 0.26);
}

.lightbox-close:active,
.lightbox-nav:active {
    transform: translateY(0) scale(0.98);
}

.lightbox-stage {
    position: relative;
    min-height: min(78vh, 860px);
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 1.65rem) clamp(3.6rem, 7vw, 6.2rem);
}

.lightbox-stage::before {
    content: "";
    position: absolute;
    inset: 8% 10%;
    border-radius: 36px;
    background-image: var(--lightbox-image);
    background-position: center;
    background-size: cover;
    filter: blur(60px) saturate(0.68);
    opacity: 0.28;
    transform: scale(1.04);
    pointer-events: none;
}

.lightbox-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 38px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.lightbox-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: clamp(0.75rem, 1.5vw, 0.95rem);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    box-shadow:
        0 34px 80px rgba(5, 11, 20, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.lightbox-figure::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.18),
        transparent 28%,
        transparent 72%,
        rgba(255, 255, 255, 0.08)
    );
    opacity: 0.95;
    pointer-events: none;
}

.lightbox-figure img {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    max-width: min(100%, 1120px);
    max-height: min(72vh, 780px);
    margin: 0 auto;
    border-radius: 24px;
    background: rgba(239, 224, 202, 0.85);
    box-shadow: 0 12px 40px rgba(5, 11, 20, 0.16);
    opacity: 0;
    transform: scale(0.985);
    transition:
        opacity var(--duration-slow) var(--ease-premium),
        transform var(--duration-slow) var(--ease-premium);
}

.lightbox.is-image-ready .lightbox-figure img {
    opacity: 1;
    transform: scale(1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    transform: translateY(-50%);
}

.lightbox-nav span {
    font-size: 1.3rem;
    line-height: 1;
}

.lightbox-nav--prev {
    left: clamp(0.4rem, 1.6vw, 1rem);
}

.lightbox-nav--next {
    right: clamp(0.4rem, 1.6vw, 1rem);
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
    transform: translateY(-50%) scale(1.03);
    background: rgba(247, 240, 228, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 50px rgba(2, 7, 16, 0.26);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.98);
}

/* Messages */

.quotes-section {
    background:
        radial-gradient(circle at top left, rgba(200, 169, 106, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(200, 169, 106, 0.14), rgba(200, 169, 106, 0.03)),
        #faf4eb;
}

.quotes-intro {
    max-width: 600px;
    margin-bottom: 0;
}

.quote-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.quote-card {
    margin: 0;
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: var(--shadow);
}

.quote-card--featured {
    padding: 1.75rem;
}

.quote-card--soft {
    background: rgba(255, 255, 255, 0.62);
}

.quote-tag {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.quote-card h3 {
    margin-bottom: 0.9rem;
    font-size: 1.7rem;
    color: var(--navy);
}

.quote-card--featured h3 {
    font-size: 1.7rem;
}

.quote-card p {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--navy-soft);
}

.quote-card--soft p {
    max-width: none;
    font-size: 1rem;
}

/* Formulaire */

.form-section {
    background: var(--cream-light);
}

.form-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow);
}

.form-copy p:last-child {
    margin-bottom: 0;
}

.tribute-form {
    display: grid;
    gap: 0.95rem;
}

.form-status {
    display: none;
    margin: 0 0 0.25rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.form-status:target {
    display: block;
}

.form-status--success {
    border-color: rgba(97, 130, 89, 0.22);
    background: rgba(247, 252, 245, 0.95);
    color: #36533a;
}

.form-status--error {
    border-color: rgba(154, 102, 79, 0.2);
    background: rgba(255, 247, 244, 0.96);
    color: #7f4432;
}

.form-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.tribute-form label {
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 700;
}

.tribute-form input,
.tribute-form textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(20, 35, 59, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    box-sizing: border-box;
    transition:
        border-color var(--duration-base) var(--ease-premium),
        box-shadow var(--duration-base) var(--ease-premium),
        background var(--duration-base) var(--ease-premium);
}

.tribute-form input:focus-visible,
.tribute-form textarea:focus-visible {
    border-color: rgba(158, 122, 68, 0.42);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(200, 169, 106, 0.14);
}

.tribute-form input::placeholder,
.tribute-form textarea::placeholder {
    color: rgba(48, 64, 93, 0.6);
}

.tribute-form textarea {
    resize: vertical;
    min-height: 150px;
}

.tribute-form .button-primary {
    margin-top: 0.25rem;
    border-color: transparent;
    cursor: pointer;
}

/* Footer */

.site-footer {
    padding: 1.5rem 0 2.5rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: var(--navy-soft);
    font-size: 0.95rem;
}

/* Responsive */

@media (max-width: 1400px) {
    .gallery-grid {
        column-count: 4;
    }
}

@media (max-width: 1080px) {
    h1 {
        font-size: 5.2rem;
    }

    h2 {
        font-size: 3.2rem;
    }

    .memory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .memory-card--birthday {
        min-height: 240px;
        padding-bottom: 6.5rem;
    }

    .memory-card--birthday p {
        max-width: 12.5rem;
    }

    .quote-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quote-card,
    .quote-card--featured,
    .quote-card--soft {
        grid-column: span 1;
    }

    .gallery-grid {
        column-count: 3;
    }

    .lightbox-stage {
        padding-inline: clamp(1rem, 4vw, 1.8rem);
    }
}

@media (max-width: 780px) {
    :root {
        --header-height: 112px;
    }

    .section-padding {
        padding: 5rem 0;
    }

    .header-inner {
        padding: 1rem 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        gap: 0.9rem 1.05rem;
        justify-content: flex-start;
    }

    .site-nav a {
        padding: 0.25rem 0.25rem 0.45rem;
        font-size: 0.96rem;
    }

    .hero-content {
        padding: 3rem 0;
    }

    h1 {
        font-size: 4.2rem;
    }

    h2 {
        font-size: 2.85rem;
    }

    .quote-grid,
    .form-shell {
        grid-template-columns: 1fr;
    }

    .quote-card,
    .quote-card--featured,
    .quote-card--soft {
        grid-column: auto;
        padding: 1.75rem;
    }

    .memory-card--birthday {
        min-height: 220px;
        padding-bottom: 6rem;
    }

    .memory-card--birthday::before {
        right: 0;
        bottom: 0.5rem;
        width: 8.5rem;
        height: 8.5rem;
    }

    .memory-card--birthday::after {
        right: -0.68rem;
        bottom: -0.8rem;
        width: 8.15rem;
        height: 8.15rem;
    }

    .memory-card--birthday p {
        max-width: 100%;
        padding-right: 5.2rem;
    }

    .gallery-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: clamp(15rem, 78vw, 21rem);
        column-count: initial;
        column-gap: 0;
        gap: var(--gallery-gap);
        overflow-x: auto;
        overflow-y: visible;
        padding: 0 0.15rem 0.5rem;
        scroll-padding-inline: 0.15rem;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-card {
        margin: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .lightbox {
        padding: 0.85rem;
    }

    .lightbox-shell {
        max-height: calc(100vh - 1.7rem);
        display: flex;
        flex-direction: column;
    }

    .lightbox-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.65rem;
        padding-bottom: 0.8rem;
    }

    .lightbox-meta {
        width: 100%;
        justify-content: space-between;
    }

    .lightbox-stage {
        flex: 1;
        min-height: 0;
        min-height: auto;
        padding: 0.85rem 0.8rem 4.05rem;
    }

    .lightbox-stage::before {
        inset: 12% 4% 23%;
    }

    .lightbox-figure img {
        max-height: min(calc(100vh - 14.5rem), 560px);
    }

    .lightbox-nav {
        top: auto;
        bottom: 0.65rem;
        width: 2.95rem;
        height: 2.95rem;
        transform: none;
    }

    .lightbox-nav:hover,
    .lightbox-nav:focus-visible {
        transform: scale(1.03);
    }

    .lightbox-nav:active {
        transform: scale(0.98);
    }

    .lightbox-nav--prev {
        left: calc(50% - 4rem);
    }

    .lightbox-nav--next {
        right: calc(50% - 4rem);
    }
}

@media (max-width: 640px) {
    .container,
    .narrow {
        width: min(calc(100% - 1.5rem), var(--container));
    }

    .gallery-wrap {
        width: min(calc(100% - 1rem), 1760px);
    }

    h1 {
        font-size: 3.25rem;
    }

    h2 {
        font-size: 2.35rem;
    }

    .memory-grid,
    .quote-grid {
        grid-template-columns: 1fr;
    }

    .memory-card--birthday {
        min-height: 205px;
        padding-bottom: 5.8rem;
    }

    .memory-card--birthday p {
        padding-right: 4.8rem;
    }

    .quote-card,
    .quote-card--featured,
    .quote-card--soft {
        padding: 1.55rem;
        border-radius: 24px;
    }

    .quote-tag {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }

    .quote-card h3,
    .quote-card--featured h3 {
        font-size: 1.7rem;
    }

    .gallery-grid {
        grid-auto-columns: clamp(14rem, 82vw, 19rem);
        padding-inline: 0.05rem;
        scroll-padding-inline: 0.05rem;
    }

    .lightbox-close {
        padding: 0.72rem 0.95rem;
    }

    .lightbox-counter {
        font-size: 0.92rem;
    }

    .form-shell {
        padding: 1.5rem;
        border-radius: 24px;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 2.85rem;
    }

    h2 {
        font-size: 2.1rem;
    }

    .site-nav {
        gap: 0.55rem 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
