/* ============================================================
   Wedding site — imported from the Canva scrapbook template
   and rebuilt as plain, editable HTML/CSS.

   Everything you are likely to want to tweak (colours, fonts,
   spacing) lives in :root below.
   ============================================================ */

/* Display face: Special Elite (SIL Open Font License) — distressed typewriter
   with full Czech coverage. The template's original Canva font had no
   ě š č ř ž ů ť ď ň, so Czech words fell back mid-word. */
@font-face {
	font-family: "Special Elite";
	src: url("assets/fonts/special-elite-latin.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
		U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Special Elite";
	src: url("assets/fonts/special-elite-latin-ext.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
	unicode-range:
		U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
		U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "The Youngest";
	src: url("assets/fonts/the-youngest-regular.woff") format("woff");
	font-weight: 400;
	font-display: swap;
}

:root {
	--paper: #f1eee3; /* page background */
	--ink: #222222; /* headings + body text */
	--muted: #646464; /* secondary text */
	--rule: #d8d3c4; /* hairlines and borders */

	--display:
		"Special Elite", "Courier New", monospace; /* typewriter headings */
	--body: "The Youngest", Georgia, serif; /* body copy */

	--page-max: 1180px;
	--gutter: clamp(20px, 5vw, 64px);
}

/* --- base ------------------------------------------------- */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 72px;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 20px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
}
.registry__text a,
.contact__value a {
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
}
.registry__text a:hover,
.contact__value a:hover {
	border-bottom-color: var(--ink);
}

p {
	margin: 0 0 1em;
}

/* --- type -------------------------------------------------- */

.display {
	font-family: var(--display);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 0.5em;
	font-size: clamp(30px, 4.4vw, 54px);
}
.display--xl {
	font-size: clamp(30px, 4.4vw, 60px);
}
.display--sm {
	font-size: clamp(22px, 2.8vw, 38px);
}
.display--center {
	text-align: center;
}

.lede {
	font-size: clamp(17px, 1.6vw, 24px);
}

.eyebrow {
	font-family: var(--display);
	font-size: clamp(12px, 1.2vw, 17px);
	letter-spacing: 0.05em;
	color: var(--muted);
	text-align: center;
	margin-bottom: 0.4em;
}

/* --- layout ------------------------------------------------ */

.section {
	position: relative;
	padding: clamp(64px, 9vw, 120px) var(--gutter);
	overflow: hidden;
}

.grid {
	max-width: var(--page-max);
	margin: 0 auto;
	display: grid;
	gap: clamp(28px, 4vw, 64px);
}

/* Torn collage strips that separate the sections. */
.strip {
	width: 100%;
	height: clamp(56px, 8vw, 110px);
	object-fit: cover;
	position: absolute;
	left: 0;
	pointer-events: none;
}
.strip--top {
	top: 0;
}
.strip--bottom {
	bottom: 0;
	object-position: 50% 22%;
}

/* --- buttons ----------------------------------------------- */

.button {
	display: inline-block;
	font-family: var(--display);
	font-size: clamp(15px, 1.5vw, 21px);
	letter-spacing: 0.06em;
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
	border: 0;
	padding: 14px 34px 16px;
	cursor: pointer;
}
.button:hover {
	opacity: 0.85;
}

/* --- 1. hero ----------------------------------------------- */

.section--hero {
	padding-top: clamp(40px, 5vw, 70px);
	padding-bottom: clamp(90px, 11vw, 150px);
}

.hero {
	max-width: var(--page-max);
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(24px, 4vw, 60px);
}

.hero__art {
	position: relative;
}
.hero__tulips {
	width: 100%;
}
.hero__couple {
	position: absolute;
	left: 9%;
	bottom: -2%;
	height: 84%;
	width: auto;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
}
.star {
	position: absolute;
	width: 16%;
}
.star--1 {
	top: -6%;
	left: 34%;
}
.star--2 {
	top: 12%;
	left: 4%;
	width: 13%;
}
.star--3 {
	top: 26%;
	right: -2%;
	width: 14%;
}

.hero__text {
	text-align: center;
}
.hero__text .lede {
	margin-bottom: 1.6em;
}

/* --- 2. story ---------------------------------------------- */

.grid--story {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	align-items: center;
}
.story__text {
	max-width: 30em;
}
.story__text .display {
	margin-bottom: 0.6em;
}

.story__photos {
	position: relative;
	min-height: clamp(320px, 38vw, 480px);
}

.polaroid {
	position: absolute;
	margin: 0;
	background: #fdfcf8;
	padding: 12px 12px 42px;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
}
.polaroid img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.polaroid--a {
	top: 0;
	right: 0;
	width: 62%;
	--rest-rot: 2.5deg;
	z-index: 2;
}
.polaroid--b {
	bottom: 0;
	left: 4%;
	width: 66%;
	--rest-rot: -3.5deg;
	z-index: 3;
}

.decor {
	position: absolute;
	pointer-events: none;
}
.decor--gingham {
	top: 18%;
	right: -6%;
	width: 55%;
	opacity: 0.9;
	z-index: 1;
}
.decor--flower {
	top: 6%;
	left: 8%;
	width: 22%;
	z-index: 4;
}
.decor--bicycle {
	bottom: -6%;
	right: 2%;
	width: 26%;
	z-index: 4;
}

/* --- 3. details -------------------------------------------- */

.section--details {
	padding-top: clamp(110px, 13vw, 180px);
}

.grid--cards {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: clamp(24px, 4vw, 56px);
}

.card {
	text-align: center;
}
.card__icon {
	height: clamp(120px, 14vw, 175px);
	width: auto;
	margin: 0 auto 18px;
	object-fit: contain;
}
.card__icon--venue {
	/* Wide building rather than a tall object — fill the icon box by width so the
     three card titles still line up. */
	width: 100%;
	max-width: 330px;
	object-fit: contain;
	/* Slight warm tone so the photo sits with the other collage cut-outs. */
	filter: sepia(0.25) saturate(0.9) contrast(1.02);
}
.card__icon--pair {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 8px;
	height: clamp(120px, 14vw, 175px);
	margin-bottom: 18px;
}
.card__icon--pair img {
	height: 100%;
	width: auto;
	object-fit: contain;
}
.card__icon--pair img:last-child {
	height: 62%;
}
.card__title {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(20px, 2.2vw, 30px);
	margin: 0 0 0.4em;
}
.card p {
	font-size: clamp(15px, 1.4vw, 20px);
	max-width: 22em;
	margin-inline: auto;
}

/* --- 4. program -------------------------------------------- */

.section--program {
	padding-top: clamp(110px, 13vw, 180px);
}

.program {
	position: relative;
	max-width: 900px;
	margin: clamp(24px, 4vw, 48px) auto 0;
}

.program__paper {
	background:
		url("assets/img/notepad.png") center / 100% 100% no-repeat,
		#efece1;
	padding: clamp(36px, 6vw, 72px) clamp(28px, 6vw, 90px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.program__row {
	display: grid;
	grid-template-columns: minmax(0, 7em) minmax(0, 1fr);
	gap: clamp(12px, 3vw, 40px);
	align-items: baseline;
	font-family: var(--display);
	font-size: clamp(14px, 1.6vw, 23px);
	padding: 0.55em 0;
}
.program__time {
	text-align: right;
	white-space: nowrap;
}

.decor--car {
	left: -10%;
	top: 8%;
	width: clamp(90px, 17%, 190px);
	z-index: 2;
}
.decor--cassette {
	right: -8%;
	bottom: 4%;
	width: clamp(90px, 18%, 200px);
	z-index: 2;
}

/* --- 5. registry ------------------------------------------- */

.section--registry {
	padding-top: clamp(110px, 13vw, 180px);
}

.grid--registry {
	grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
	align-items: start;
	margin-top: clamp(16px, 3vw, 40px);
}

.qr {
	border: 2px solid var(--ink);
	padding: 10px;
}
.qr__placeholder {
	aspect-ratio: 1;
	display: grid;
	place-content: center;
	text-align: center;
	font-family: var(--display);
	font-size: 15px;
	color: var(--muted);
	background:
		repeating-conic-gradient(#e6e1d3 0 25%, #f7f5ee 0 50%) 0 0 / 16px 16px;
}
.qr img {
	width: 100%;
}

.registry__lead {
	font-family: var(--display);
	font-size: clamp(16px, 1.8vw, 24px);
	line-height: 1.35;
	margin-bottom: 1em;
}
.registry__text p {
	font-size: clamp(16px, 1.5vw, 20px);
}

/* --- 6. rsvp ------------------------------------------------ */

.section--rsvp {
	border-top: 1px solid var(--rule);
}
.rsvp__note {
	text-align: center;
	color: var(--muted);
	margin-bottom: 2em;
}

.rsvp-form {
	max-width: 720px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 24px;
}
.rsvp-form label {
	display: grid;
	gap: 6px;
	font-family: var(--display);
	font-size: 14px;
	letter-spacing: 0.03em;
}
.rsvp-form__wide {
	grid-column: 1 / -1;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
	font-family: var(--body);
	font-size: 18px;
	padding: 10px 12px;
	border: 1px solid var(--ink);
	background: transparent;
	color: var(--ink);
	border-radius: 0;
}
.rsvp-form .button {
	grid-column: 1 / -1;
	justify-self: center;
	margin-top: 8px;
}

/* --- 7. contact --------------------------------------------- */

.section--contact {
	padding-top: clamp(110px, 13vw, 180px);
}

.grid--contact {
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.5fr);
	align-items: center;
}

.contacts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(20px, 4vw, 56px);
	margin-top: clamp(20px, 3vw, 44px);
}
.contact__name {
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(20px, 2.2vw, 30px);
	margin: 0 0 0.6em;
}
.contact__label {
	margin: 0 0 0.1em;
}
.contact__value {
	font-family: var(--display);
	font-size: clamp(14px, 1.4vw, 18px);
	margin: 0 0 1.2em;
	word-break: break-word;
}
.contact__art {
	width: 100%;
}

/* --- footer -------------------------------------------------- */

.footer {
	border-top: 1px solid var(--rule);
	padding: 26px var(--gutter);
	text-align: center;
	font-family: var(--display);
	font-size: 13px;
	letter-spacing: 0.06em;
	color: var(--muted);
}

/* ============================================================
   Entrance animation — stop-motion

   Recreated from the Canva original. There, every element sits just
   outside one of the page's edges (offset by its own width or height
   plus ~50px), tilted ±5° off its resting angle, then travels to its
   place. Direction per element is the data-fly attribute in
   index.html: l, r, t, b, or a corner: lt, rt, lb, rb. JS measures
   each piece and sets --fly-x / --fly-y so it starts just off the
   matching edge of its section.

   Where this differs from the original: nothing moves smoothly. Each
   piece is photographed in six hand-placed positions along its path
   and the frames are cut together — step-end easing means every
   keyframe is HELD until the next one snaps in, at ~9fps. The little
   ±3-5px offsets and the tilt flipping sign frame to frame are the
   point: they read as a hand nudging a paper cut-out between shots,
   not as a computer interpolating.

   Everything is on one shutter clock: --frame is the exposure, the
   animation is five of them, and each piece's delay is a whole number
   of frames, so the whole page hops on the same beat.
   ============================================================ */

:root {
	--frame: 140ms; /* one "photo" — bigger = choppier, slower */
}

[data-fly] {
	--rest-rot: 0deg; /* the element's own tilt, e.g. the polaroids */
	--fly-rot: 0deg; /* extra tilt while off-stage; JS alternates ±5deg */
	--fly-x: 0px;
	--fly-y: 0px;
	--fly-delay: 0ms;
	transform: rotate(var(--rest-rot));
}

/* Only hide things once JS is running — no JS, no blank page. */
.js [data-fly] {
	opacity: 0;
	transform: translate(var(--fly-x), var(--fly-y))
		rotate(calc(var(--rest-rot) + var(--fly-rot)));
}

.js [data-fly].is-in {
	animation: fly-in calc(var(--frame) * 5) step-end var(--fly-delay) both;
}

@keyframes fly-in {
	/* frame 1 — off the edge, tilted */
	0% {
		opacity: 1;
		transform: translate(var(--fly-x), var(--fly-y))
			rotate(calc(var(--rest-rot) + var(--fly-rot)));
	}
	/* frame 2 */
	20% {
		opacity: 1;
		transform: translate(
				calc(var(--fly-x) * 0.56 + 4px),
				calc(var(--fly-y) * 0.56 - 3px)
			)
			rotate(calc(var(--rest-rot) - var(--fly-rot) * 0.55));
	}
	/* frame 3 */
	40% {
		opacity: 1;
		transform: translate(
				calc(var(--fly-x) * 0.28 - 5px),
				calc(var(--fly-y) * 0.28 + 4px)
			)
			rotate(calc(var(--rest-rot) + var(--fly-rot) * 0.4));
	}
	/* frame 4 */
	60% {
		opacity: 1;
		transform: translate(
				calc(var(--fly-x) * 0.1 + 3px),
				calc(var(--fly-y) * 0.1 + 5px)
			)
			rotate(calc(var(--rest-rot) - var(--fly-rot) * 0.28));
	}
	/* frame 5 — nudged a touch past the mark, the way a hand overshoots */
	80% {
		opacity: 1;
		transform: translate(
				calc(var(--fly-x) * -0.03 - 2px),
				calc(var(--fly-y) * -0.03 - 3px)
			)
			rotate(calc(var(--rest-rot) + var(--fly-rot) * 0.14));
	}
	/* frame 6 — settled */
	100% {
		opacity: 1;
		transform: translate(0, 0) rotate(var(--rest-rot));
	}
}

/* Optional: keep the paper scraps twitching after they land, the way
   nothing ever sits perfectly still in a stop-motion film. Uncomment
   to switch it on. Deliberately only the cut-outs, never the text. */
/*
.js .star.is-in,
.js .decor.is-in,
.js .polaroid.is-in {
  animation:
    fly-in calc(var(--frame) * 5) step-end var(--fly-delay) both,
    boil calc(var(--frame) * 4) step-end calc(var(--fly-delay) + var(--frame) * 5) infinite;
}
@keyframes boil {
  0%   { transform: translate(0.4px, -0.5px) rotate(calc(var(--rest-rot) + 0.18deg)); }
  25%  { transform: translate(-0.5px, 0.4px) rotate(calc(var(--rest-rot) - 0.14deg)); }
  50%  { transform: translate(0.3px, 0.5px)  rotate(calc(var(--rest-rot) + 0.1deg)); }
  75%  { transform: translate(-0.3px, -0.4px) rotate(calc(var(--rest-rot) - 0.2deg)); }
}
*/

@media (prefers-reduced-motion: reduce) {
	.js [data-fly],
	.js [data-fly].is-in {
		opacity: 1;
		transform: rotate(var(--rest-rot));
		animation: none;
	}
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
	body {
		font-size: 18px;
	}

	.hero,
	.grid--story,
	.grid--cards,
	.grid--registry,
	.grid--contact {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero__art {
		max-width: 420px;
		margin: 0 auto;
	}
	.hero__text {
		margin-top: 30px;
	}

	.story__photos {
		min-height: 0;
		display: grid;
		gap: 18px;
	}
	.polaroid {
		position: static;
		width: 100%;
		--rest-rot: 0deg;
	}
	.decor--gingham,
	.decor--flower,
	.decor--bicycle {
		display: none;
	}

	.grid--cards {
		gap: 44px;
	}

	.decor--car,
	.decor--cassette {
		display: none;
	}
	.program__row {
		grid-template-columns: minmax(0, 5.5em) minmax(0, 1fr);
	}

	.qr {
		max-width: 220px;
	}

	.rsvp-form {
		grid-template-columns: minmax(0, 1fr);
	}

	.contacts {
		grid-template-columns: minmax(0, 1fr);
	}
	.contact__art {
		max-width: 300px;
		margin: 10px auto 0;
	}
}
