/* ==========================================================================
   Eva & Juš — theme styles
   Look and feel taken from the printed invite: ivory paper, hairlines,
   letter-spaced capitals, italic accents, one ink colour (#493125).
   ========================================================================== */

:root {
	--ink: #493125;
	--ink-soft: rgba(73, 49, 37, 0.74);
	--ink-faint: rgba(73, 49, 37, 0.5);
	--line: rgba(73, 49, 37, 0.2);
	--line-strong: rgba(73, 49, 37, 0.4);
	--paper: #faf6f0;
	--paper-deep: #f2eadf;
	--card: #fffdf9;
	--error: #9b3b2a;

	/* Inset of the hairline frame around the hero */
	--frame: clamp(0.6rem, 1.5vw, 1.1rem);

	/* Light text used over photos */
	--on-photo: #faf6f0;
	--on-photo-soft: rgba(250, 246, 240, 0.86);
	--on-photo-faint: rgba(250, 246, 240, 0.62);
	--on-photo-line: rgba(250, 246, 240, 0.35);

	--font: "Playfair Display", Georgia, "Times New Roman", serif;
	--tracking: 0.28em;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--section: clamp(4.5rem, 11vw, 8.5rem);
	--wrap: 70rem;
	--narrow: 38rem;
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reset ------------------------------------------------------------------ */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 4.5rem;
}

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4,
p,
figure,
fieldset {
	margin: 0;
}

h1,
h2,
h3,
h4 {
	font-weight: 400;
	line-height: 1.2;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

::selection {
	background: var(--ink);
	color: var(--paper);
}

:focus-visible {
	outline: 1px solid var(--ink);
	outline-offset: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	top: 1rem;
	left: 1rem;
	z-index: 100;
	padding: 0.75rem 1.25rem;
	background: var(--card);
	border: 1px solid var(--ink);
}

/* Type helpers ----------------------------------------------------------- */

.eyebrow {
	display: block;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: var(--tracking);
	text-transform: uppercase;
	color: var(--ink-soft);
}

.caps {
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.italic {
	font-style: italic;
}

.title {
	font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.lead {
	font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
	font-style: italic;
	color: var(--ink-soft);
}

.date {
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
	letter-spacing: 0.32em;
	/* trailing letter-spacing would push centred text off-centre */
	margin-right: -0.32em;
}

/* Ornament: hairline – diamond – hairline */
.ornament {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.9rem;
	width: min(14rem, 60%);
	margin-inline: auto;
	color: var(--line-strong);
}

.ornament::before,
.ornament::after {
	content: "";
	flex: 1;
	height: 1px;
	background: currentColor;
}

.ornament span {
	width: 0.4rem;
	height: 0.4rem;
	border: 1px solid var(--ink-faint);
	transform: rotate(45deg);
}

/* Layout ----------------------------------------------------------------- */

.wrap {
	width: min(100% - 2 * var(--gutter), var(--wrap));
	margin-inline: auto;
}

.wrap--narrow {
	width: min(100% - 2 * var(--gutter), var(--narrow));
}

.section {
	padding-block: var(--section);
}

.section--deep {
	background: var(--paper-deep);
}

.section-head {
	display: grid;
	gap: 1rem;
	justify-items: center;
	text-align: center;
	margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* Buttons ---------------------------------------------------------------- */

.btn,
.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3.4rem;
	padding: 0.8rem 2.8rem;
	border: 1px solid var(--ink);
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	font-size: 0.86rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn:hover,
.wpcf7-submit:hover {
	background: transparent;
	color: var(--ink);
}

.btn--ghost {
	background: transparent;
	color: var(--ink);
}

.btn--ghost:hover {
	background: var(--ink);
	color: var(--paper);
}

/* Header ----------------------------------------------------------------- */

.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 50;
}

/* The scrolled background lives on its own layer: a backdrop-filter (or transform)
   on the header itself would trap the fixed full-screen mobile menu inside it */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(250, 246, 240, 0.94);
	box-shadow: 0 1px 0 var(--line);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.4s var(--ease);
}

.site-header.is-scrolled::before {
	opacity: 1;
}

/* Over the hero photo: light monogram (and mobile toggle, which sits on the photo) */
.home .site-header:not(.is-scrolled):not(.is-open) .monogram {
	color: var(--paper);
}

@media (max-width: 52rem) {
	.home .site-header:not(.is-scrolled):not(.is-open) .nav-toggle {
		color: var(--paper);
	}
}

.site-header__inner {
	position: relative;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4.5rem;
	/* Always transitioned, so moving in and out of the hero frame is smooth both ways.
	   Offset with top (not transform) so the fixed mobile menu still covers the screen. */
	transition: top 0.45s var(--ease), padding 0.45s var(--ease);
}

/* Over the hero, keep the logo and menu inside the hairline frame
   (also while the menu is open, so the logo doesn't move when it opens) */
.home .site-header:not(.is-scrolled) .site-header__inner {
	padding-inline: var(--frame);
	top: calc(var(--frame) + 0.4rem);
}

.monogram {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	color: var(--ink);
	transition: color 0.3s var(--ease);
}

.monogram__logo {
	width: auto;
	height: 3rem;
}

.nav-toggle {
	position: relative;
	z-index: 2;
	display: none;
	align-items: center;
	color: var(--ink);
	transition: color 0.3s var(--ease);
	gap: 0.7rem;
	padding: 0.5rem 0;
	border: 0;
	background: none;
	font-size: 0.72rem;
	letter-spacing: var(--tracking);
	text-transform: uppercase;
	cursor: pointer;
}

.nav-toggle__icon {
	position: relative;
	width: 1.5rem;
	height: 1px;
	background: currentColor;
	transition: background-color 0.2s;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transition: transform 0.3s var(--ease);
}

.nav-toggle__icon::before {
	transform: translateY(-6px);
}

.nav-toggle__icon::after {
	transform: translateY(6px);
}

.is-open .nav-toggle__icon {
	background: transparent;
}

.is-open .nav-toggle__icon::before {
	transform: rotate(45deg);
}

.is-open .nav-toggle__icon::after {
	transform: rotate(-45deg);
}

.site-nav ul {
	display: flex;
	gap: clamp(1.25rem, 3vw, 2.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	font-size: 0.74rem;
	letter-spacing: var(--tracking);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ink-soft);
	transition: color 0.2s;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
	color: var(--ink);
}

@media (max-width: 52rem) {
	.nav-toggle {
		display: inline-flex;
	}

	/* Full-screen overlay; logo and toggle stay above it */
	.site-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		background: var(--paper);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
	}

	.is-open .site-nav {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.4s var(--ease), visibility 0s;
	}

	.site-nav ul {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2.25rem;
		height: 100%;
	}

	.site-nav li {
		opacity: 0;
		transform: translateY(0.75rem);
		transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
	}

	.is-open .site-nav li {
		opacity: 1;
		transform: none;
	}

	.is-open .site-nav li:nth-child(2) { transition-delay: 0.06s; }
	.is-open .site-nav li:nth-child(3) { transition-delay: 0.12s; }
	.is-open .site-nav li:nth-child(4) { transition-delay: 0.18s; }

	.site-nav a {
		font-size: 0.95rem;
	}
}

/* Hero: full-width photo, couple offset to the side, text centred --------- */

.invite {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	/* Text block sits a little above centre, above the railing */
	grid-template-rows: 0.7fr auto auto 1fr;
	min-height: 100svh;
	overflow: hidden;
	background: #2a1d16;
	color: var(--on-photo);
	text-align: center;
	text-shadow: 0 1px 14px rgba(20, 13, 9, 0.4);
}

.invite__media {
	grid-area: 1 / 1 / -1 / -1;
	position: relative;
	overflow: hidden;
}

.invite__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 40%;
	/* Enlarge from the left edge: the couple (centre of the photo) moves into the right third */
	transform: scale(1.6);
	transform-origin: 0% 14%;
}

/* Soft darkening behind the centred text, and under the header */
.invite__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(rgba(20, 13, 9, 0.45), transparent 9rem),
		radial-gradient(ellipse 42% 60% at 50% 50%, rgba(20, 13, 9, 0.55), rgba(20, 13, 9, 0.25) 70%, transparent),
		rgba(20, 13, 9, 0.12);
}

/* Hairline frame, like the edge of the printed card */
.invite::after {
	content: "";
	position: absolute;
	inset: var(--frame);
	border: 1px solid var(--on-photo-line);
	pointer-events: none;
}

.invite__intro,
.invite__meta {
	position: relative;
	z-index: 1;
	grid-column: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	gap: clamp(0.75rem, 2svh, 1.25rem);
	min-width: 0;
	padding-inline: var(--gutter);
}

.invite__intro {
	grid-row: 2;
	padding-top: 4.5rem;
}

.invite__meta {
	grid-row: 3;
	padding-top: clamp(0.75rem, 2svh, 1.25rem);
	padding-bottom: 2rem;
}

.invite .eyebrow,
.invite .countdown span,
.invite .gate-form__hint {
	color: var(--on-photo-soft);
}

/* Entry screen (no header): centre the text block vertically */
@media (min-width: 52.01rem) {
	.is-locked .invite {
		grid-template-rows: 1fr auto auto 1fr;
	}

	.is-locked .invite__intro {
		padding-top: 0;
	}

	.is-locked .invite__meta {
		padding-bottom: 0;
	}
}

/* Monogram on the entry screen (there is no header there) */
.invite__monogram {
	width: auto;
	height: clamp(3.25rem, 7svh, 4.5rem);
	margin-bottom: 0.25rem;
	color: var(--on-photo);
	filter: drop-shadow(0 1px 10px rgba(20, 13, 9, 0.35));
}

.invite__lettering {
	width: min(26rem, 80vw, 44svh);
	color: var(--on-photo);
}

.invite__tagline {
	font-size: clamp(1rem, 0.9rem + 0.45vw, 1.25rem);
	font-style: italic;
	color: var(--on-photo-soft);
}

.invite .countdown {
	margin-top: 0;
}

.invite .countdown li + li::before {
	background: var(--on-photo-line);
}

.invite .scroll-cue {
	margin-top: 0.25rem;
}

.invite .scroll-cue::after {
	height: 2rem;
	background: linear-gradient(var(--on-photo-faint), transparent);
}

.invite .gate-form {
	margin-top: 0;
}

.invite .gate-form__error {
	color: #f3c2b5;
}

/* Desktop: keep the text block narrow and just left of centre, clear of the couple */
@media (min-width: 52.01rem) {
	.invite__lettering {
		width: min(26rem, 30vw, 44svh);
	}

	.invite .countdown {
		gap: clamp(1.25rem, 2vw, 2rem);
	}

	.invite .countdown li + li::before {
		left: calc(clamp(1.25rem, 2vw, 2rem) / -2);
	}
}

/* Phones and tablets: the fountain photo (couple sits low in the frame),
   enlarged downwards so the couple is at the bottom with the text above them */
@media (max-width: 52rem) {
	/* Free space split 1 : 2 above / below the text, so it sits a little
	   above the middle, clear of the couple at the bottom */
	.invite {
		grid-template-rows: 1fr auto auto 2fr;
	}

	.invite__media img {
		object-position: 50% 62%;
		transform: scale(1.3);
		transform-origin: 50% 0%;
	}

	.invite__media::after {
		background:
			linear-gradient(rgba(20, 13, 9, 0.62), rgba(20, 13, 9, 0.4) 55%, transparent 75%),
			rgba(20, 13, 9, 0.1);
	}

	.invite__intro,
	.invite__meta {
		padding-inline: calc(var(--frame) + 1.5rem);
	}

	.invite__intro {
		grid-row: 2;
		padding-top: 5rem;
	}

	.is-locked .invite__intro {
		padding-top: 2rem;
	}

	.invite__meta {
		grid-row: 3;
	}

	.invite__lettering {
		width: min(22rem, 80vw);
	}
}

/* Short phones: tighten the block so it stays above the couple */
@media (max-width: 52rem) and (max-height: 720px) {
	.invite__intro,
	.invite__meta {
		gap: 0.6rem;
	}

	.invite__intro {
		padding-top: 4.25rem;
	}

	.is-locked .invite__intro {
		padding-top: 1.25rem;
	}

	.invite__lettering {
		width: min(17.5rem, 72vw);
	}

	.invite__monogram {
		height: 2.75rem;
	}

	.invite .countdown strong {
		font-size: 1.6rem;
	}
}

/* Header links sit on the photo too */
@media (min-width: 52.01rem) {
	.home .site-header:not(.is-scrolled) .site-nav a {
		color: var(--on-photo-soft);
	}

	.home .site-header:not(.is-scrolled) .site-nav a:hover {
		color: var(--on-photo);
	}
}

.scroll-cue {
	display: grid;
	justify-items: center;
	gap: 0.6rem;
	margin-top: 1.25rem;
	text-decoration: none;
}

.scroll-cue::after {
	content: "";
	width: 1px;
	height: 2.75rem;
	background: linear-gradient(var(--ink-faint), transparent);
	animation: cue 2.4s var(--ease) infinite;
	transform-origin: top;
}

@keyframes cue {
	0% {
		transform: scaleY(0);
		opacity: 1;
	}
	60% {
		transform: scaleY(1);
		opacity: 1;
	}
	100% {
		transform: scaleY(1);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.scroll-cue::after {
		animation: none;
	}
}

/* Countdown -------------------------------------------------------------- */

.countdown {
	display: flex;
	justify-content: center;
	gap: clamp(1.25rem, 5vw, 3rem);
	margin-top: 0.5rem;
	padding: 0;
	list-style: none;
}

.countdown li {
	display: grid;
	justify-items: center;
	min-width: 3.5rem;
}

.countdown strong {
	font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem);
	font-weight: 400;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.countdown span {
	font-size: 0.68rem;
	letter-spacing: var(--tracking);
	text-transform: uppercase;
	color: var(--ink-faint);
}

.countdown li + li {
	position: relative;
}

.countdown li + li::before {
	content: "";
	position: absolute;
	left: calc(clamp(1.25rem, 5vw, 3rem) / -2);
	top: 20%;
	height: 45%;
	width: 1px;
	background: var(--line);
}

/* Entry gate (password) --------------------------------------------------- */

.gate-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	gap: 0.85rem;
	width: min(100%, 24rem);
	margin-top: 0.75rem;
}

.gate-form__row {
	display: flex;
	width: 100%;
	padding: 0.25rem;
	border: 1px solid var(--ink);
	border-radius: 999px;
	background: var(--card);
}

.gate-form input {
	flex: 1;
	color: var(--ink);
	text-shadow: none;
	min-width: 0;
	padding: 0.6rem 1.25rem;
	border: 0;
	background: transparent;
	font-size: 1.05rem;
	letter-spacing: 0.3em;
	text-align: center;
}

.gate-form input:focus {
	outline: none;
}

.gate-form__row:focus-within {
	box-shadow: 0 0 0 3px rgba(73, 49, 37, 0.12);
}

.gate-form .btn {
	min-height: 0;
	padding-inline: 1.6rem;
}

.gate-form__hint {
	font-size: 0.92rem;
	font-style: italic;
	color: var(--ink-soft);
}

.gate-form__error {
	font-size: 0.92rem;
	color: var(--error);
}

/* Story ------------------------------------------------------------------- */

.story {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(2.5rem, 7vw, 6rem);
}

.story__photo {
	position: relative;
	display: block;
}

/* Offset hairline frame behind the portrait */
.story__photo::before {
	content: "";
	position: absolute;
	inset: 1.1rem -1.1rem -1.1rem 1.1rem;
	border: 1px solid var(--line-strong);
}

.story__photo img {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
}

.story__text {
	display: grid;
	gap: 1.4rem;
	text-align: center;
}

.story__text p {
	color: var(--ink-soft);
}

@media (max-width: 48rem) {
	.story {
		grid-template-columns: 1fr;
	}

	.story__photo {
		width: min(100% - 1.1rem, 24rem);
		margin-inline: auto;
	}

	/* The bridge photo is shown here on phones: crop around the couple */
	.story__photo img {
		aspect-ratio: 4 / 5;
		object-position: 52% 50%;
	}
}

/* Programme: vertical timeline ------------------------------------------- */

.programme {
	max-width: 36rem;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.programme li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(2.5rem, 8vw, 4rem) minmax(0, 1fr);
	grid-template-areas:
		"time dot label"
		"time dot place";
	align-items: center;
	row-gap: 0.35rem;
	position: relative;
	padding-block: clamp(1.75rem, 4vw, 2.5rem);
}

/* The line: drawn per item in the marker column, so it is centred exactly like
   the diamond (both odd pixel widths, both centred by the same grid column).
   No grid-row is set, so it spans the item's full height including padding. */
.programme li::after {
	content: "";
	position: absolute;
	grid-column: 2 / 3;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	width: 1px;
	margin-inline: auto;
	background: var(--line-strong);
}

.programme li:first-child::after {
	background: linear-gradient(transparent, var(--line-strong) 45%);
}

.programme li:last-child::after {
	background: linear-gradient(var(--line-strong) 55%, transparent);
}

.programme li:only-child::after {
	background: linear-gradient(transparent, var(--line-strong) 45%, var(--line-strong) 55%, transparent);
}

/* Diamond marker on the line, same as the ornament */
.programme li::before {
	content: "";
	grid-area: dot;
	justify-self: center;
	position: relative;
	z-index: 1;
	width: 11px;
	height: 11px;
	border: 1px solid var(--ink);
	background: var(--paper);
	transform: rotate(45deg);
}

.programme time {
	grid-area: time;
	justify-self: end;
	font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.8rem);
	line-height: 1;
}

.programme .eyebrow {
	grid-area: label;
	align-self: end;
	color: var(--ink);
}

.programme .italic {
	grid-area: place;
	align-self: start;
	color: var(--ink-soft);
}

/* Location: castle drawing as a faint full-bleed background ---------------- */

.venue {
	position: relative;
	display: grid;
	place-items: center;
	align-content: center;
	gap: clamp(3rem, 7vw, 4.5rem);
	min-height: clamp(30rem, 44vw, 56rem);
	padding: var(--section) var(--gutter);
	overflow: hidden;
	isolation: isolate;
	text-align: center;
}

.venue__castle {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
	opacity: 0.13;
	pointer-events: none;
	user-select: none;
}

.venue__content {
	display: grid;
	justify-items: center;
	gap: clamp(1rem, 2vw, 1.5rem);
}

.venue__content .eyebrow {
	font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.98rem);
	color: var(--ink);
}

.venue__name {
	font-size: clamp(1.8rem, 1.2rem + 2.4vw, 3.25rem);
	letter-spacing: 0.12em;
	margin-right: -0.12em;
	text-transform: uppercase;
}

.venue__address {
	font-size: clamp(1rem, 0.92rem + 0.35vw, 1.2rem);
	letter-spacing: 0.16em;
	margin-right: -0.16em;
}

.venue__content .btn {
	margin-top: 0.5rem;
}

.stay {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	width: 100%;
	max-width: 52rem;
	margin: 0 auto;
	background: var(--line);
	border: 1px solid var(--line);
}

.stay > div {
	display: grid;
	align-content: start;
	gap: 0.75rem;
	padding: clamp(1.75rem, 4vw, 2.5rem);
	background: rgba(255, 253, 249, 0.92);
	text-align: center;
}

.stay h3 {
	font-size: 1.35rem;
}

.stay p {
	font-size: 0.96rem;
	color: var(--ink-soft);
}

@media (max-width: 40rem) {
	.stay {
		grid-template-columns: 1fr;
	}
}

/* RSVP + Contact Form 7 ---------------------------------------------------- */

/* Lace (cipka) overlay on the section background, fading out at the edges */
.rsvp-section {
	position: relative;
	isolation: isolate;
}

.rsvp-section::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url("../cipka-tile.webp") center top / 600px repeat;
	opacity: 0.08;
	-webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
	pointer-events: none;
}

@media (max-width: 40rem) {
	.rsvp-section::before {
		background-size: 420px;
	}
}

.rsvp-card {
	position: relative;
	padding: clamp(1.75rem, 5vw, 3.25rem);
	background: var(--card);
	border: 1px solid var(--line);
}

.rsvp-card::before {
	content: "";
	position: absolute;
	inset: 0.45rem;
	border: 1px solid var(--line);
	pointer-events: none;
}

.wpcf7 form {
	position: relative;
	display: grid;
	gap: 1.6rem;
}

.field {
	display: grid;
	gap: 0.5rem;
	min-width: 0;
	padding: 0;
	border: 0;
}

.field > label,
.field > legend {
	padding: 0;
	font-size: 0.74rem;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.field > legend {
	margin-bottom: 0.6rem;
}

.field__note {
	font-size: 0.9rem;
	font-style: italic;
	line-height: 1.55;
	color: var(--ink-soft);
}

.wpcf7-form-control-wrap {
	display: block;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
	width: 100%;
	padding: 0.55rem 0;
	border: 0;
	border-bottom: 1px solid var(--line-strong);
	border-radius: 0;
	background: transparent;
	font-size: 1.05rem;
	transition: border-color 0.2s;
}

.wpcf7 select {
	width: auto;
	min-width: 5rem;
	padding-right: 1.75rem;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23493125'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.25rem center;
	cursor: pointer;
}

.wpcf7 textarea {
	height: 6.5rem;
	resize: vertical;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
	outline: none;
	border-bottom-color: var(--ink);
}

.wpcf7 ::placeholder {
	color: var(--ink-faint);
	font-style: italic;
}

/* Radio / checkbox choices */
.wpcf7-radio,
.wpcf7-checkbox {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.wpcf7-list-item {
	margin: 0;
}

.wpcf7-radio .wpcf7-list-item label {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 2.9rem;
	padding: 0.55rem 1.5rem;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	line-height: 1.35;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.wpcf7-radio .wpcf7-list-item input {
	position: absolute;
	opacity: 0;
	inset: 0;
	margin: 0;
	cursor: pointer;
}

.wpcf7-radio .wpcf7-list-item label:hover {
	border-color: var(--ink);
}

.wpcf7-radio .wpcf7-list-item label:has(input:checked) {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

.wpcf7-radio .wpcf7-list-item label:has(input:focus-visible) {
	outline: 1px solid var(--ink);
	outline-offset: 3px;
}

.wpcf7-checkbox .wpcf7-list-item label {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.7rem;
	cursor: pointer;
}

.wpcf7-checkbox input {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	margin: 0.3rem 0 0;
	accent-color: var(--ink);
}

.field--inline {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
}

.field--inline > label {
	font-size: 0.98rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	font-style: italic;
}

.field--inline .wpcf7-form-control-wrap {
	display: inline-block;
}

/* Conditional groups (cf7-conditional-fields). The plugin's show animation
   sets display:block inline, so space children with margins, not grid gap. */
[data-class="wpcf7cf_group"] > * + * {
	margin-top: 1.6rem;
}

.gifts {
	display: grid;
	gap: 0.6rem;
	padding-top: 1.6rem;
	border-top: 1px solid var(--line);
	text-align: center;
}

.gifts p {
	font-size: 0.95rem;
	font-style: italic;
	color: var(--ink-soft);
}

.form-submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

/* Keep the submit button centred: the spinner sits beside it, outside the flow */
.form-submit {
	position: relative;
}

.wpcf7-spinner {
	position: absolute;
	left: calc(50% + 9rem);
	background-color: var(--ink-faint);
	margin: 0;
}

@media (max-width: 30rem) {
	.wpcf7-spinner {
		left: auto;
		right: 0;
	}
}

.wpcf7-not-valid-tip {
	margin-top: 0.4rem;
	font-size: 0.85rem;
	font-style: italic;
	color: var(--error);
}

.wpcf7 .wpcf7-not-valid {
	border-color: var(--error);
}

.wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: 1rem 1.25rem;
	border: 1px solid var(--line-strong);
	font-style: italic;
	text-align: center;
}

.wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--ink);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
	border-color: var(--error);
	color: var(--error);
}

/* Gallery teaser ---------------------------------------------------------- */

.gallery-teaser {
	position: relative;
	display: grid;
	place-items: center;
	min-height: clamp(22rem, 55vw, 38rem);
	overflow: hidden;
	color: var(--paper);
	text-align: center;
	text-decoration: none;
}

.gallery-teaser img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 65%;
	transition: transform 1.2s var(--ease);
}

.gallery-teaser::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(36, 24, 18, 0.45);
}

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

.gallery-teaser__text {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 1rem;
	justify-items: center;
	padding: 2rem;
}

.gallery-teaser .eyebrow {
	color: rgba(250, 246, 240, 0.8);
}

.gallery-teaser .btn {
	border-color: var(--paper);
	background: transparent;
	color: var(--paper);
}

.gallery-teaser:hover .btn {
	background: var(--paper);
	color: var(--ink);
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
	padding: clamp(4rem, 9vw, 6rem) var(--gutter) 2.5rem;
	border-top: 1px solid var(--line);
	text-align: center;
}

.site-footer__inner {
	display: grid;
	justify-items: center;
	gap: 1.25rem;
}

.site-footer__monogram {
	width: auto;
	height: 4.5rem;
	color: var(--ink);
}

.site-footer small {
	margin-top: 1.5rem;
	font-size: 0.75rem;
	color: var(--ink-faint);
}

/* Inner pages ------------------------------------------------------------- */

.page-shell {
	padding: 9rem 0 var(--section);
}

.page-shell__head {
	display: grid;
	gap: 1rem;
	justify-items: center;
	margin-bottom: clamp(2.5rem, 6vw, 4rem);
	text-align: center;
}

.entry-content > * + * {
	margin-top: 1.25em;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 2em;
}

.entry-content .wp-block-image img,
.entry-content .wp-block-gallery img {
	width: 100%;
}

.entry-content .gate-form {
	margin-inline: auto;
}

/* Reveal on scroll (only when JS is running and motion is OK) ------------- */

@media (prefers-reduced-motion: no-preference) {
	.js .reveal {
		opacity: 0;
		transform: translateY(1.5rem);
		transition: opacity 1s var(--ease), transform 1s var(--ease);
	}

	.js .reveal.is-visible {
		opacity: 1;
		transform: none;
	}

	.js .invite__intro > *,
	.js .invite__meta {
		animation: rise 1.2s var(--ease) both;
	}

	.js .invite__intro > :nth-child(2) {
		animation-delay: 0.15s;
	}

	.js .invite__intro > :nth-child(3) {
		animation-delay: 0.3s;
	}

	.js .invite__intro > :nth-child(4) {
		animation-delay: 0.45s;
	}

	.js .invite__meta {
		animation-delay: 0.6s;
	}
}

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