/* =========================================================
   W-ISSUE — "The Wedding Issue"
   A wedding invitation art-directed as a limited-edition
   editorial magazine. Monochrome proofs + one spot ink.
   ========================================================= */

:root {
    --paper: #f6f5f1; /* «Ճենապակի» */
    --paper-2: #fcfcfa;
    --backdrop: #e6e3dc; /* desktop table under the cover */
    --ink: #15120f;
    --ink-2: #2b2723;
    --muted: #6f675e;
    --rule: rgba(21, 18, 15, 0.18);
    --spot: #74222f;
    --spot-light: #c7848d;

    --f-display: "Noto Serif Armenian", Georgia, serif;
    --f-text: "Noto Serif Armenian", Georgia, serif;
    --f-num: "DM Serif Display", "Noto Serif Armenian", Georgia, serif;
    --f-label: "Montserratarm", "Montserrat", Arial, sans-serif;
    --f-hand: "ArmenianDecorativeU", "Noto Serif Armenian", cursive;

    --gutter: clamp(1rem, 5vw, 4.5rem);
    --max: 82.5rem;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: auto;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--f-text);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

/* Uncoated-stock grain over the whole issue */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.07;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1,
h2,
h3,
p,
figure,
blockquote,
ol,
ul {
    margin: 0;
}

ol,
ul {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 0.125rem solid var(--spot);
    outline-offset: 0.1875rem;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 0.0625rem;
    height: 0.0625rem;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -3.75rem;
    z-index: 200;
    padding: 0.625rem 0.875rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-label);
    font-size: 0.875rem;
}

.skip-link:focus {
    top: 0.75rem;
}

html.is-locked,
html.is-locked body {
    overflow: hidden;
}

/* ---------- Shared editorial parts ---------- */

.page {
    position: relative;
    overflow-x: clip; /* nothing may widen the page (iOS sizes frames to content) */
    padding: clamp(3rem, 9vw, 7.5rem) var(--gutter) clamp(3.5rem, 9vw, 7.5rem);
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
}

.page--ink {
    max-width: none;
    overflow: hidden;
    background: var(--ink);
    color: var(--paper);
}

.kicker-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.875rem;
    margin-bottom: clamp(1.75rem, 5vw, 3.5rem);
    border-bottom: 0.0625rem solid var(--rule);
}

.page--ink .kicker-row {
    border-color: rgba(243, 238, 229, 0.2);
}

.kicker {
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.kicker--light {
    color: var(--paper);
}

.folio-mark {
    font-family: var(--f-num);
    font-style: italic;
    font-size: 0.9375rem;
    color: var(--spot);
}

.page--ink .folio-mark {
    color: var(--spot-light);
}

.display {
    font-family: var(--f-display);
    font-weight: 800;
    font-stretch: 62.5%;
    text-transform: uppercase;
    line-height: 0.88;
    letter-spacing: -0.01em;
    font-size: clamp(2.75rem, 12.6vw, 11.75rem);
}

.line {
    display: block;
    overflow: hidden;
    /* room for Armenian descenders inside the mask */
    padding-bottom: 0.06em;
    margin-bottom: -0.06em;
}

.line > span {
    display: block;
}

.frame {
    overflow: hidden;
}


.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2.75rem;
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.625rem) / 100% 0.0625rem no-repeat;
    transition: color 0.3s;
}

.map-link:hover {
    color: var(--spot);
}

.page--ink .map-link:hover {
    color: var(--spot-light);
}

/* Barcode (generated from data-code) */
.barcode {
    display: flex;
    align-items: stretch;
    height: 2.375rem;
    gap: 0;
}

.barcode i {
    display: block;
    background: var(--ink);
}

.barcode b {
    display: block;
}

.barcode--light i {
    background: var(--paper);
}

/* =========================================================
   COVER
   ========================================================= */

.cover {
    display: none;
}

.js .cover {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--paper);
    perspective: 137.5rem;
    overflow: hidden; /* keep the 3D page-turn inside the screen */
}

.cover__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover__mag {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #efefee;
    color: var(--ink);
    container-type: inline-size;
    transform-origin: left center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Photo is dropped below the first masthead line so faces stay
   clear; its top edge melts into the matching studio backdrop. */
.cover__photo {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 15%;
    width: 100%;
    height: 85%;
    object-fit: cover;
    object-position: 50% 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%);
    mask-image: linear-gradient(180deg, transparent 0, #000 9%);
}

.cover__top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    padding: max(1.125rem, env(safe-area-inset-top)) 5cqw 0;
}

.cover__dateline {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: var(--f-label);
    font-weight: 500;
    font-size: max(0.5625rem, 2.6cqw);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding-bottom: 1.6cqw;
    border-bottom: 0.0625rem solid currentColor;
}

/* Masthead sits "behind" the couple: multiply lets dark hair
   and wardrobe swallow the spot ink, like a printed cover. */
.cover__masthead {
    margin-top: 2cqw;
    font-family: var(--f-display);
    font-weight: 900;
    font-stretch: 62.5%;
    text-transform: uppercase;
    font-size: 24cqw; /* refined by fitMasthead() */
    line-height: 0.84;
    letter-spacing: -0.02em;
    color: var(--spot);
    mix-blend-mode: multiply;
}

.cover__masthead-line {
    display: block;
    width: max-content;
    white-space: nowrap;
}

.cover__masthead-line--2 {
    margin-left: auto;
}

/* Bodoni italic bold "&" as SVG, placed by fitMasthead() in the
   largest free space beside the names */
.cover__masthead {
    position: relative;
}

.cover__amp {
    position: absolute;
    left: 0;
    top: 0;
    width: 0.6em;
    height: auto;
    overflow: visible;
    fill: currentColor;
    color: var(--ink);
}

.cover__shade {
    position: absolute;
    inset: 62% 0 0;
    background: linear-gradient(180deg, rgba(10, 8, 7, 0) 0%, rgba(10, 8, 7, 0.55) 100%);
    pointer-events: none;
}

/* one quiet footer: the date, then the places */
.cover__foot {
    position: absolute;
    left: 5cqw;
    right: 40cqw;
    bottom: max(6cqw, env(safe-area-inset-bottom));
    color: var(--paper);
}

.cover__kicker {
    display: inline-block;
    margin-bottom: 3cqw;
    padding: 0.5em 0.7em 0.4em;
    background: var(--spot);
    color: var(--paper);
    font-family: var(--f-label);
    font-weight: 500;
    font-size: max(0.625rem, 2.5cqw);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.cover__date {
    font-family: var(--f-num);
    font-weight: 500;
    font-size: 11cqw;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: lining-nums;
}

.cover__place {
    margin-top: 2cqw;
    font-family: var(--f-label);
    font-weight: 500;
    font-size: max(0.625rem, 2.5cqw);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1.6;
}

/* the "open" sticker */
.sticker {
    position: absolute;
    right: 4cqw;
    bottom: 6cqw;
    width: 31cqw;
    height: 31cqw;
    min-width: 6.5rem;
    min-height: 6.5rem;
    max-width: 10.5rem;
    max-height: 10.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--spot);
    color: var(--paper);
    display: grid;
    place-items: center;
    box-shadow: 0 0.625rem 1.875rem -0.625rem rgba(60, 10, 20, 0.6);
    transition: transform 0.4s var(--ease-out);
}

.sticker:hover {
    transform: scale(1.04) rotate(-4deg);
}

.sticker__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: spin 18s linear infinite;
}

.sticker__ring text {
    fill: currentColor;
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.8438rem;
    letter-spacing: 0.04em;
}

.sticker__label {
    position: relative;
    font-family: var(--f-hand);
    font-style: italic;
    font-size: clamp(1.0625rem, 5cqw, 1.625rem);
    line-height: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* press loader */
.press {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: var(--paper);
    pointer-events: none;
}

.press__mark {
    width: 3.5rem;
    height: 3.5rem;
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.2;
}

/* =========================================================
   MUSIC
   ========================================================= */

/* music: one round button in the corner — a note when paused,
   moving sound bars while the song plays */
.music {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0));
    bottom: calc(env(safe-area-inset-bottom, 0) + 1rem);
    z-index: 80;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    border: 0.0625rem solid rgba(243, 238, 229, 0.35);
    border-radius: 50%;
    background: var(--spot);
    color: var(--paper);
    box-shadow: 0 0.625rem 1.5rem -0.625rem rgba(60, 10, 20, 0.6);
    transition: transform 0.3s var(--ease-out);
}

.music:hover {
    transform: scale(1.06);
}

.music > * {
    grid-area: 1 / 1;
}

.music__note {
    width: 1.375rem;
    height: 1.375rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.25s, transform 0.25s;
}

.music__bars {
    display: flex;
    align-items: flex-end;
    gap: 0.1875rem;
    height: 1.125rem;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.25s, transform 0.25s;
}

.music__bars i {
    width: 0.1875rem;
    height: 100%;
    border-radius: 0.125rem;
    background: currentColor;
    transform-origin: bottom;
    transform: scaleY(0.35);
}

.music[aria-pressed="true"] .music__note {
    opacity: 0;
    transform: scale(0.6);
}

.music[aria-pressed="true"] .music__bars {
    opacity: 1;
    transform: none;
}

.music[aria-pressed="true"] .music__bars i {
    animation: soundbar 0.9s ease-in-out infinite alternate;
}

.music__bars i:nth-child(2) { animation-delay: -0.3s !important; }
.music__bars i:nth-child(3) { animation-delay: -0.6s !important; }
.music__bars i:nth-child(4) { animation-delay: -0.15s !important; }

@keyframes soundbar {
    from { transform: scaleY(0.25); }
    to { transform: scaleY(1); }
}

/* =========================================================
   02 · EDITOR'S LETTER
   ========================================================= */

.letter {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0 1.5rem;
}

.letter .kicker-row {
    grid-column: 1 / -1;
}

.letter__title {
    color: var(--ink);
}

.letter__title .line:nth-child(2) > span {
    color: var(--spot);
}

.letter__body {
    margin-top: clamp(2rem, 6vw, 4rem);
    max-width: 34em;
}

.letter__body p + p {
    margin-top: 1em;
}

.dropcap::first-letter {
    float: left;
    margin: 0.06em 0.1em 0 0;
    font-family: var(--f-display);
    font-weight: 900;
    font-stretch: 62.5%;
    font-size: 4.6em;
    line-height: 0.8;
    color: var(--spot);
}

.signature {
    margin-top: 1.4em !important;
    font-family: var(--f-hand);
    font-style: italic;
    font-size: clamp(2.125rem, 8vw, 3.25rem);
    line-height: 1.1;
    color: var(--spot);
    transform: rotate(-4deg);
    transform-origin: left center;
}

.letter__figure {
    width: 100%;
    margin-bottom: clamp(2.25rem, 7vw, 3.5rem);
}

.letter__figure .frame {
    aspect-ratio: 4 / 5;
}

.letter__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}


/* end-of-article mark closing the letter */
.endmark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: clamp(2rem, 6vw, 3rem);
}

.endmark__rule {
    flex: 1;
    height: 0.0625rem;
    background: var(--rule);
}

.endmark__rule:first-child {
    transform-origin: right center;
}

.endmark__rule:last-child {
    transform-origin: left center;
}

.endmark__heart {
    flex: none;
    width: 0.6875rem;
    height: 0.625rem;
    fill: var(--spot);
    transform-origin: 50% 60%;
    animation: heartbeat 1.6s ease-in-out infinite;
}

/* a soft double beat, then rest */
@keyframes heartbeat {
    0%, 40%, 100% { transform: scale(1); }
    12% { transform: scale(1.32); }
    24% { transform: scale(1.08); }
    32% { transform: scale(1.26); }
}

.letter {
    padding-top: clamp(1.75rem, 5vw, 4rem);
    padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.letter + .date {
    padding-top: clamp(2.5rem, 7vw, 6rem);
}
figcaption {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.625rem;
    font-family: var(--f-label);
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

figcaption b {
    font-weight: 500;
    color: var(--spot);
}

/* =========================================================
   03 · THE DATE
   ========================================================= */

.date__hero {
    position: relative;
}

.date__day {
    font-family: var(--f-num);
    font-weight: 400;
    font-size: clamp(12.5rem, 72vw, 32.5rem);
    line-height: 0.8;
    letter-spacing: -0.03em;
    font-variant-numeric: lining-nums;
    margin-left: -0.04em;
}

/* the month, written large in the spot-ink script */
.date__month {
    margin-top: 0.06em;
    text-align: right;
    font-family: var(--f-hand);
    font-style: italic;
    font-size: clamp(3.5rem, 15vw, 9.375rem);
    line-height: 1;
    color: var(--spot);
}

.date__meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1.125rem;
    padding-top: 0.75rem;
    border-top: 0.0625rem solid var(--ink);
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.date__grid {
    display: grid;
    gap: 3.5rem;
    margin-top: 3.5rem;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 0.375rem;
    font-family: var(--f-num);
    font-size: 1.0625rem;
    text-align: center;
}

.calendar__head {
    padding-bottom: 0.625rem;
    font-family: var(--f-label);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.calendar__day {
    position: relative;
    display: grid;
    place-items: center;
    height: 2.625rem;
    color: var(--ink-2);
}

.calendar__day--weekend {
    color: var(--muted);
}

.calendar__day--selected {
    color: var(--spot);
    font-weight: 700;
}

.calendar__ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4rem;
    height: 3.375rem;
    transform: translate(-50%, -50%) rotate(-8deg);
    overflow: visible;
    fill: none;
    stroke: var(--spot);
    stroke-width: 1.6;
    stroke-linecap: round;
    pointer-events: none;
}

.countdown__label {
    font-family: var(--f-hand);
    font-style: italic;
    font-size: 1.625rem;
    color: var(--spot);
    margin-bottom: 0.5rem;
}

.countdown__row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    border-top: 0.0625rem solid var(--ink);
}

.countdown__cell {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0 0;
    border-left: 0.0625rem solid var(--rule);
    padding-left: 0.625rem;
}

.countdown__cell:first-child {
    border-left: 0;
    padding-left: 0;
}

.countdown__num {
    font-family: var(--f-num);
    font-weight: 500;
    font-size: clamp(2.5rem, 11vw, 5.25rem);
    line-height: 1;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -0.02em;
}

.countdown__cell--days .countdown__num {
    font-style: italic;
    color: var(--spot);
}

.countdown__unit {
    margin-top: 0.375rem;
    font-family: var(--f-label);
    font-size: 0.625rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

/* =========================================================
   04 · FEATURE SPREAD
   ========================================================= */

/* framed photo on the paper, pull quote beneath it */
.feature {
    position: relative;
    overflow: hidden;
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: clamp(2rem, 7vw, 6rem) var(--gutter) clamp(3rem, 8vw, 6.875rem);
    background: var(--paper);
    color: var(--ink);
}

.feature__media {
    position: relative;
    aspect-ratio: 4 / 5;
    max-width: 100%;
    max-height: 82svh;
    overflow: hidden;
}

.feature__media img {
    position: absolute;
    inset: -6% 0;
    width: 100%;
    height: 112%;
    object-fit: cover;
    object-position: 50% 20%;
}

/* hanging quote mark: « in its own column, text beside it */
.feature__quote {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: clamp(0.625rem, 3vw, 1.25rem);
    margin-top: clamp(1.5rem, 5vw, 2.5rem);
    max-width: 36em;
}

.feature__mark {
    grid-row: 1 / span 2;
    align-self: start;
    font-family: var(--f-num);
    font-style: italic;
    font-size: clamp(4rem, 17vw, 7.5rem);
    line-height: 0.62;
    color: var(--spot);
}

.feature__quote p,
.feature__quote cite {
    grid-column: 2;
}

.feature__quote p {
    font-family: var(--f-display);
    font-weight: 500;
    font-stretch: 75%;
    font-size: clamp(1.5rem, 6.2vw, 2.75rem);
    line-height: 1.16;
    text-wrap: balance;
}

.feature__quote cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--f-label);
    font-style: normal;
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--spot);
}

/* =========================================================
   05 · CONTENTS (programme)
   ========================================================= */

.contents__title .line:nth-child(2) > span {
    padding-left: 0.6em;
}

.toc {
    position: relative;
    margin-top: clamp(2.5rem, 7vw, 5rem);
    padding-left: 1.375rem;
}

.toc__rule {
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 0.0625rem;
    background: var(--rule);
}

.toc__rule-fill {
    position: absolute;
    inset: 0;
    background: var(--spot);
    transform-origin: top;
}

.toc__rule-dot {
    position: absolute;
    left: -0.25rem;
    top: 0;
    width: 0.5625rem;
    height: 0.5625rem;
    border-radius: 50%;
    background: var(--spot);
}

.toc__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
    padding: 1.375rem 0 1.625rem;
    border-bottom: 0.0625rem solid var(--rule);
}

.toc__item:first-child {
    padding-top: 0;
}

.toc__time {
    font-family: var(--f-num);
    font-weight: 500;
    font-size: clamp(3.375rem, 15vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    font-variant-numeric: lining-nums;
}

.toc__item--key .toc__time {
    font-style: italic;
    color: var(--spot);
}

.toc__body {
    position: relative;
    align-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.toc__num {
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.toc__name {
    font-family: var(--f-display);
    font-weight: 700;
    font-stretch: 75%;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    line-height: 1.02;
}

.toc__place {
    line-height: 1.3;
    color: var(--ink-2);
}

/* =========================================================
   06 · VENUES
   ========================================================= */

.venues {
    padding-top: clamp(2.5rem, 7vw, 5.5rem);
}

.venue {
    position: relative;
    margin-top: clamp(2.5rem, 7vw, 4rem);
}

/* photos sit off-centre — left, then right — in a shared, shorter
   5:4 frame, leaving open space on the other side */
.venue__figure {
    position: relative;
    width: 82%;
}

.venue--b .venue__figure {
    margin-left: auto;
}

.venue__figure .frame {
    aspect-ratio: 5 / 4;
}

.venue__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

/* "Fig." label printed on the photo */
.venue__fig {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.5rem 0.3125rem;
    background: var(--spot);
    color: var(--paper);
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.625rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.venue--b .venue__fig {
    left: auto;
    right: 0.75rem;
}

.venue__text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
}

.venue--b .venue__text {
    align-items: flex-end;
    text-align: right;
}

/* the big time rises over the bottom edge of the photo */
.venue__time {
    margin-top: -0.42em;
    margin-bottom: 0.125rem;
    font-family: var(--f-num);
    font-style: italic;
    font-size: clamp(4rem, 18vw, 8.25rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-shadow: 0 0.375rem 1.875rem rgba(0, 0, 0, 0.45);
}

.venue__name {
    font-family: var(--f-display);
    font-weight: 700;
    font-stretch: 75%;
    text-transform: uppercase;
    font-size: clamp(1.375rem, 5.6vw, 2rem);
    line-height: 1.05;
}

.venue__place {
    line-height: 1.3;
    color: rgba(243, 238, 229, 0.72);
}

/* equal rhythm: the link sits on the same 0.625rem gap as the lines above */
.venue .map-link,
.toc .map-link {
    min-height: 0;
    padding: 0.125rem 0 0.25rem;
    line-height: 1.3;
    background-position: 0 100%;
}
/* =========================================================
   07 · STYLE NOTES
   ========================================================= */

.style__title .line:nth-child(2) > span {
    padding-left: 0.9em;
}

.style__lead {
    margin-top: clamp(1.75rem, 5vw, 3rem);
    max-width: 30em;
}

.colorbar {
    position: relative;
    display: grid;
    grid-template-columns: 1.375rem 1fr 1.375rem;
    align-items: start;
    gap: 0.625rem;
    margin: clamp(2.5rem, 7vw, 4.5rem) calc(-1 * var(--gutter)) 0;
    padding: 0 0.375rem;
}

.colorbar__list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.1875rem;
}

.swatch {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.swatch__ink {
    position: relative;
    display: block;
    height: clamp(10.625rem, 46vw, 20rem);
    background: var(--c);
    transform-origin: top;
}

/* names set vertically inside each strip, like a press colour bar */
.swatch__name {
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    writing-mode: vertical-rl;
    transform: translateX(-50%) rotate(180deg);
    white-space: nowrap;
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--t, var(--paper));
}

.swatch__code {
    margin-top: 0.5rem;
    font-family: var(--f-num);
    font-style: italic;
    font-size: 0.875rem;
    color: var(--muted);
}

/* registration targets at both ends of the bar */
.reg {
    position: relative;
    width: 1.375rem;
    height: 1.375rem;
    margin-top: calc(clamp(10.625rem, 46vw, 20rem) / 2 - 0.6875rem);
    border: 0.0625rem solid var(--ink);
    border-radius: 50%;
}

.reg::before,
.reg::after {
    content: "";
    position: absolute;
    background: var(--ink);
}

.reg::before {
    left: 50%;
    top: -0.3125rem;
    bottom: -0.3125rem;
    width: 0.0625rem;
}

.reg::after {
    top: 50%;
    left: -0.3125rem;
    right: -0.3125rem;
    height: 0.0625rem;
}

.note {
    position: relative;
    margin-top: clamp(3rem, 8vw, 5.5rem);
    margin-left: auto;
    max-width: 26em;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 0.125rem solid var(--spot);
    font-size: 1rem;
}

.note__title {
    margin-bottom: 0.375rem;
    font-family: var(--f-hand);
    font-style: italic;
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--spot);
}

/* =========================================================
   08 · REPLY CARD
   ========================================================= */

.reply {
    overflow-x: clip;
}

.reply__lead {
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 26em;
}

.card {
    position: relative;
    margin-top: clamp(2.5rem, 7vw, 4.5rem);
    padding: 2.5rem 1.25rem 1.75rem;
    background: var(--paper-2);
    box-shadow: 0 0.0625rem 0 rgba(21, 18, 15, 0.06), 0 1.5rem 3.75rem -1.875rem rgba(21, 18, 15, 0.35);
}

.card__perf {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 0;
    border-top: 0.125rem dashed rgba(21, 18, 15, 0.35);
}

.card__perf span {
    position: absolute;
    left: 1.25rem;
    top: -0.5625rem;
    padding: 0 0.5rem;
    background: var(--paper);
    font-family: var(--f-label);
    font-size: 0.5625rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.stamp {
    position: absolute;
    right: 1rem;
    top: 1.375rem;
    width: 4.875rem;
    padding: 0.3125rem;
    background: var(--paper-2);
    transform: rotate(4deg);
    /* solid centre + perforation bites only around the edge */
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        radial-gradient(circle, transparent 0.15rem, #000 0.1812rem) -0.25rem -0.25rem / 0.5rem 0.5rem;
    mask:
        linear-gradient(#000 0 0) content-box,
        radial-gradient(circle, transparent 0.15rem, #000 0.1812rem) -0.25rem -0.25rem / 0.5rem 0.5rem;
}

.stamp::before {
    content: "";
    position: absolute;
    inset: 0.3125rem;
    border: 0.0625rem solid var(--spot);
    pointer-events: none;
}

.stamp img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 15%;
}

.stamp span {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5625rem;
    font-family: var(--f-num);
    font-style: italic;
    font-size: 0.8125rem;
    color: #fff;
    mix-blend-mode: difference;
}

.card__heading {
    font-family: var(--f-hand);
    font-style: italic;
    font-size: 1.875rem;
    line-height: 1.1;
    color: var(--spot);
    margin-bottom: 1.125rem;
    padding-right: 6rem;
}

.choice {
    margin: 0 0 1.375rem;
    padding: 0;
    border: 0;
    min-width: 0;
}

.choice legend {
    margin-bottom: 0.5rem;
    padding: 0;
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.choice--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.75rem;
}

.choice--inline legend {
    width: 100%;
}

.tick {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.3;
}

.tick input {
    position: absolute;
    opacity: 0;
    width: 0.0625rem;
    height: 0.0625rem;
}

.tick__box {
    position: relative;
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    border: 0.0625rem solid var(--ink);
}

/* hand-drawn tick in spot ink */
.tick__box::after {
    content: "";
    position: absolute;
    left: 0.125rem;
    top: -0.5625rem;
    width: 1.625rem;
    height: 1.625rem;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M3 15.5c2.2 1.4 4 3.4 5.4 6.2C11.8 13.6 16.4 7 23.5 2.5' fill='none' stroke='%2374222f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.35s var(--ease-out);
}

.tick input:checked + .tick__box::after {
    clip-path: inset(0 0 0 0);
}

.tick input:focus-visible + .tick__box {
    outline: 0.125rem solid var(--spot);
    outline-offset: 0.1875rem;
}

.card__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem 1.5rem;
}

.field {
    display: flex;
    flex-direction: column;
}

.field.is-hidden {
    display: none;
}

.field__label {
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 0.625rem;
}

.field input {
    width: 100%;
    min-height: 2.875rem;
    padding: 0.375rem 0;
    border: 0;
    border-bottom: 0.0625rem solid var(--ink);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--f-text);
    font-size: 1.125rem;
    -moz-appearance: textfield;
    appearance: none;
}


/* guest count: − value + (never below 1) */
.stepper {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.375rem;
    min-height: 2.875rem;
    margin-top: 0.25rem;
}

.field .stepper input {
    flex: none;
    width: 2.75rem;
    min-height: 2.75rem;
    border: 0;
    text-align: center;
    font-family: var(--f-num);
    font-size: 1.5rem;
}

.field .stepper input:focus {
    border: 0;
    outline: 0.125rem solid var(--spot);
    outline-offset: -0.125rem;
}

.stepper__btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0.0625rem solid var(--ink);
    border-radius: 50%;
    background: none;
    font-family: var(--f-label);
    font-size: 1.25rem;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.stepper__btn:hover:not(:disabled) {
    background: var(--ink);
    color: var(--paper);
}

.stepper__btn:disabled {
    opacity: 0.3;
    cursor: default;
}
.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.field input:focus {
    outline: none;
    border-bottom: 0.125rem solid var(--spot);
}

.field.is-invalid input {
    border-bottom-color: var(--spot);
    background: linear-gradient(transparent 70%, rgba(116, 34, 47, 0.08) 70%);
}

.card__submit {
    position: relative;
    width: 100%;
    min-height: 3.5rem;
    margin-top: 1.75rem;
    border: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-label);
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    overflow: hidden;
    transition: background 0.35s;
}

.card__submit:hover {
    background: var(--spot);
}

.card__submit[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.card__status {
    min-height: 1.6em;
    margin-top: 0.875rem;
    font-size: 1rem;
}

.card__status.is-error {
    color: var(--spot);
}

.card__status.is-success {
    font-family: var(--f-hand);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--spot);
}

/* =========================================================
   09 · BACK COVER
   ========================================================= */

.back {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--ink);
    color: var(--paper);
}

.back__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

.back::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(21, 18, 15, 0) 35%, rgba(21, 18, 15, 0.82) 100%);
}

.back__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(2rem, 6vw, 4.5rem);
}

.back__title {
    margin-top: 0.875rem;
    font-family: var(--f-display);
    font-weight: 900;
    font-stretch: 62.5%;
    text-transform: uppercase;
    font-size: clamp(3.25rem, 15.5vw, 14.375rem);
    line-height: 0.86;
}

.back__title .line:nth-child(2) > span {
    color: var(--spot);
}

.back__colophon {
    display: flex;
    align-items: flex-end;
    gap: 1.125rem;
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 0.0625rem solid rgba(243, 238, 229, 0.35);
}

.back__colophon p {
    white-space: nowrap;
    font-family: var(--f-label);
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1.8;
}

.back__colophon .barcode {
    flex: none;
    width: 7.5rem;
    height: 2.125rem;
}

/* =========================================================
   FOOTER (Invito standard)
   ========================================================= */

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    padding: 2rem 1rem 2.5rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--f-label);
    font-size: 0.875rem;
    border-top: 0.0625rem solid rgba(243, 238, 229, 0.12);
}

.footer__row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.footer__row a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    text-decoration: none;
}

.footer__logo {
    height: 1.375rem;
    width: auto;
}

/* =========================================================
   BREAKPOINTS
   ========================================================= */

@media (min-width: 43.75rem) {
    .card {
        padding: 3.5rem 3rem 2.5rem;
    }

    .card__fields {
        grid-template-columns: 2fr 1fr;
    }

    .field--comment {
        grid-column: 1 / -1;
    }

    .stamp {
        width: 6.5rem;
        right: 2rem;
        top: 2rem;
    }

    .card__submit {
        width: auto;
        padding: 0 2.5rem;
    }

    .toc__item {
        grid-template-columns: minmax(12.5rem, 36%) 1fr;
        gap: 1.5rem;
        align-items: end;
    }
}

/* Desktop: the cover becomes a physical magazine on the table */
@media (min-width: 56.25rem) and (min-aspect-ratio: 1/1) {
    .js .cover {
        background:
            radial-gradient(120% 90% at 50% 40%, var(--paper-2) 0%, var(--backdrop) 100%);
    }

    .cover__mag {
        width: auto;
        height: min(90vh, 68.75rem);
        aspect-ratio: 3 / 4;
        box-shadow:
            0 0.125rem 0.1875rem rgba(21, 18, 15, 0.12),
            0 2.5rem 5rem -1.875rem rgba(21, 18, 15, 0.45),
            -1.125rem 0 2.5rem -1.875rem rgba(21, 18, 15, 0.4);
    }

    /* spine highlight */
    .cover__mag::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 0.875rem;
        z-index: 2;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.18) 40%, rgba(0, 0, 0, 0));
        pointer-events: none;
    }

}

/* Any roughly 3:4 cover (tablet portrait, desktop magazine): photo sits lower */
@media (min-aspect-ratio: 5/8) {
    .cover__photo {
        top: 21%;
        height: 79%;
        object-position: 50% 0;
    }

    .cover__date {
        font-size: 8cqw;
    }

    .cover__dateline,
    .cover__kicker,
    .cover__place {
        font-size: max(0.625rem, 1.8cqw);
    }

    .sticker {
        right: 5cqw;
        bottom: 5cqw;
        width: 22cqw;
        height: 22cqw;
    }
}

@media (min-width: 64rem) {
    body {
        font-size: 1.125rem;
    }

    .letter {
        grid-template-columns: repeat(12, 1fr);
        gap: 0 2rem;
        align-items: start;
    }

    .page {
        padding-top: clamp(4rem, 6vw, 6.5rem);
        padding-bottom: clamp(4rem, 6vw, 6rem);
    }

    .display {
        font-size: min(10.4vw, 9.375rem);
    }

    /* desktop: photo left, quote beside it */
    .feature {
        display: grid;
        grid-template-columns: 6fr 5fr;
        gap: 0 4rem;
        align-items: end;
    }

    .feature__quote {
        margin-top: 0;
        padding-bottom: 6%;
    }

    .back__photo {
        object-position: 50% 30%;
    }

    .back__content {
        display: grid;
        grid-template-columns: 7fr 5fr;
        align-items: end;
        gap: 0 3rem;
    }

    .back__content .kicker {
        grid-column: 1 / -1;
    }

    .back__title {
        font-size: min(9vw, 9.375rem);
    }

    .back__colophon {
        margin-top: 0;
    }

    .letter__title {
        grid-column: 1 / 9;
        grid-row: 2;
        font-size: min(8.4vw, 8rem);
    }

    .reply__title {
        font-size: min(6.2vw, 6rem);
    }

    .letter__body {
        grid-column: 2 / 8;
        grid-row: 3;
        max-width: 34em;
    }

    .letter__figure {
        grid-column: 9 / 13;
        grid-row: 2 / 4;
        width: 100%;
        margin-bottom: 0;
    }

    .endmark {
        grid-column: 1 / -1;
        grid-row: 4;
        margin-inline: 0;
    }

    .date__grid {
        grid-template-columns: 5fr 7fr;
        gap: 5rem;
        align-items: end;
    }

    .calendar {
        font-size: 1.1875rem;
    }

    .calendar__day {
        height: 3.125rem;
    }

    .contents {
        display: grid;
        grid-template-columns: 5fr 7fr;
        gap: 0 3.5rem;
        align-items: start;
    }

    .contents .kicker-row {
        grid-column: 1 / -1;
    }

    .contents__title {
        position: sticky;
        top: 6.875rem;
        font-size: min(6.6vw, 6.5rem);
    }

    .toc {
        margin-top: 0;
        padding-left: 2.5rem;
    }

    .toc__item {
        grid-template-columns: 46% minmax(0, 1fr);
    }

    .toc__time {
        font-size: min(6.4vw, 6.25rem);
    }

    /* the two addresses sit side by side */
    .venues {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 3rem;
        padding-bottom: clamp(4rem, 6vw, 6rem);
    }

    .venues .kicker-row,
    .venues__title {
        grid-column: 1 / -1;
    }

    .venue {
        margin-top: clamp(2.5rem, 4vw, 3.5rem);
    }

    .colorbar {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
    }

    .style__lead {
        margin-left: 30%;
    }

    .reply {
        display: grid;
        grid-template-columns: 5fr 7fr;
        gap: 0 4rem;
        align-items: start;
    }

    .reply .kicker-row {
        grid-column: 1 / -1;
    }

    .reply__intro {
        position: sticky;
        top: 7.5rem;
    }

    .card {
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sticker__ring,
    .endmark__heart,
    .music[aria-pressed="true"] .music__bars i {
        animation: none;
    }

    .tick__box::after {
        transition: none;
    }
}

/* =========================================================
   COVER VARIANT — full-bleed photo with its own background
   (add .cover__mag--full when the couple's photo is not a
   light studio shot)
   ========================================================= */

.cover__mag--full {
    background: #1b2526;
    color: var(--paper);
}

.cover__mag--full .cover__photo {
    top: 0;
    height: 100%;
    object-position: 50% 30%;
    -webkit-mask-image: none;
    mask-image: none;
}

.cover__mag--full .cover__shade {
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 8, 7, 0.62) 0%, rgba(10, 8, 7, 0.18) 30%, rgba(10, 8, 7, 0) 45%),
        linear-gradient(0deg, rgba(10, 8, 7, 0.7) 0%, rgba(10, 8, 7, 0) 38%);
}

.cover__mag--full .cover__masthead {
    color: var(--paper);
    mix-blend-mode: normal;
    text-shadow: 0 0.125rem 1.5rem rgba(0, 0, 0, 0.25);
}

.cover__mag--full .cover__amp {
    color: var(--spot-light);
}

@media (min-aspect-ratio: 5/8) {
    .cover__mag--full .cover__photo {
        object-position: 50% 0;
    }
}

/* =========================================================
   LANGUAGE SWITCHER (Invito standard — rendered by
   layouts/header.php only when $langs has more than one entry)
   ========================================================= */

.languages-list {
    display: flex;
    position: fixed;
    top: 3rem;
    right: 3rem;
    z-index: 9999;
    padding: 0.5rem;
}

.languages-list a {
    text-decoration: none;
}

.languages-list .lang-item .lang-img {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    box-shadow: 0 0 0.875rem #838383;
    border-radius: 50%;
}
