/*
Theme Name: Svatba
Description: Jednoduchý svatební web s anketou pro hosty (účast, doprovod, děti, pití). Odpovědi se ukládají do administrace (menu „Odpovědi hostů") s možností exportu do CSV.
Author: Digital Depo
Version: 1.2.0
Requires PHP: 7.4
Text Domain: svatba
*/

:root {
	--ink: #26302a;          /* hlavní text – tmavá šalvějová */
	--ink-soft: #4a554d;     /* sekundární text (kontrast > 7:1 na ivory) */
	--sage: #5f7361;         /* šalvějová */
	--sage-dark: #3f5242;
	--rose: #a45a66;         /* pudrová růže – akcent */
	--rose-dark: #86434f;
	--rose-soft: #f3e3e3;
	--ivory: #fbf8f2;        /* pozadí */
	--paper: #ffffff;
	--line: #e3ddd0;
	--radius: 14px;
	--radius-lg: 22px;
	--maxw: 1120px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--serif: "Jost", "Segoe UI", Arial, sans-serif;
	--sans: "Jost", "Segoe UI", Arial, sans-serif;
	--shadow: 0 18px 50px -24px rgba(38, 48, 42, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ivory);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 19px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-dark); }
a:hover { color: var(--rose); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- Hlavička ---------- */
.site-header {
	position: absolute; inset: 0 0 auto 0; z-index: 10;
	padding: 24px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.monogram {
	display: inline-flex; align-items: center; gap: 12px;
	font-family: var(--sans); font-size: 24px; font-weight: 400; letter-spacing: .18em;
	color: var(--ink); text-decoration: none; line-height: 1;
}
.mono-bar { width: 1.5px; height: 24px; background: var(--rose); }
.site-nav {
	display: flex; gap: 26px; padding: 10px 22px; border-radius: 999px;
	background: rgba(251, 248, 242, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: 0 8px 24px -14px rgba(38, 48, 42, .4);
}
.header-link { padding-bottom: 2px; }
.header-link {
	font-size: 15px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
	color: var(--ink); text-decoration: none; border-bottom: 1.5px solid transparent; padding-bottom: 3px;
	transition: border-color .2s;
}
.header-link:hover, .header-link.is-cta { border-color: var(--rose); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
	position: relative; min-height: 100vh; min-height: 100svh;
	display: flex; align-items: center; overflow: hidden; isolation: isolate;
	padding: 120px 0 90px; background: #cfdcc4;
}
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -2;
	background-image: url("assets/img/hero.jpg?v=3");
	background-image: image-set(url("assets/img/hero.webp?v=3") type("image/webp"), url("assets/img/hero.jpg?v=3") type("image/jpeg"));
	background-size: cover; background-position: 70% 40%;
	animation: heroZoom 18s var(--ease) both;
}
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(90deg, rgba(251, 248, 242, .95) 0%, rgba(251, 248, 242, .88) 30%, rgba(251, 248, 242, .55) 46%, rgba(251, 248, 242, 0) 62%);
}
@keyframes heroZoom { from { transform: scale(1.05); } to { transform: scale(1); } }
.hero-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hero-text { max-width: 560px; }
.kicker {
	display: inline-block; font-size: 15px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
	color: var(--sage-dark); margin: 0 0 22px;
}
.hero h1 {
	font-family: var(--serif); font-weight: 300; text-transform: uppercase; letter-spacing: .14em;
	font-size: clamp(46px, 6vw, 80px); line-height: 1.05; margin: 0 0 26px; color: var(--ink);
}
.hero h1 .n1, .hero h1 .n2 { display: block; }
.hero h1 .join { display: flex; align-items: center; gap: 16px; width: min(260px, 60%); margin: 14px 0; }
.hero h1 .join i { flex: 1; height: 1px; background: var(--ink); opacity: .35; }
.hero h1 .join b { color: var(--rose); display: grid; }
.hero h1 .join svg { width: 18px; height: 18px; }
.hero-date {
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); font-weight: 400; letter-spacing: .06em; margin: 0 0 6px;
}
.hero-date::before { content: ""; width: 48px; height: 1.5px; background: var(--rose); }
.hero-place { margin: 0 0 22px 64px; font-size: 18px; letter-spacing: .04em; color: var(--ink-soft); }
.hero-place a { color: inherit; text-decoration-color: var(--rose); text-underline-offset: 4px; }
.hero-lead { font-size: 19px; color: var(--ink-soft); margin: 0 0 34px; max-width: 470px; }

.btn {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--sans); font-size: 17px; font-weight: 500; letter-spacing: .06em;
	background: var(--rose); color: #fff; border: 0; border-radius: 999px;
	padding: 17px 32px; text-decoration: none; cursor: pointer;
	box-shadow: 0 12px 26px -12px rgba(164, 90, 102, .8);
	transition: background .25s var(--ease), transform .25s var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--rose-dark); color: #fff; transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; }

.scroll-hint {
	position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
	width: 30px; height: 48px; border: 2px solid rgba(38, 48, 42, .45); border-radius: 20px;
}
.scroll-hint::after {
	content: ""; position: absolute; left: 50%; top: 9px; width: 4px; height: 9px; margin-left: -2px;
	background: var(--ink); border-radius: 2px; animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sekce ---------- */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head h2 {
	font-family: var(--serif); font-weight: 300; letter-spacing: .06em; font-size: clamp(36px, 4.6vw, 54px); line-height: 1.15; margin: 0 0 14px;
}
.section-head p { color: var(--ink-soft); margin: 0; font-size: 20px; }
.flourish { display: block; width: 90px; height: 18px; margin: 0 auto 14px; color: var(--rose); }

/* Informace o dni */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.info-card {
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
	padding: 34px 30px; text-align: center; box-shadow: var(--shadow);
	transition: transform .3s var(--ease);
}
.info-card:hover { transform: translateY(-4px); }
.info-card .ico { width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-dark); display: grid; place-items: center; }
.info-card .ico svg { width: 26px; height: 26px; }
.info-card h3 { font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: .04em; margin: 0 0 8px; }
.info-card p { margin: 0; color: var(--ink-soft); }
.info-card strong { color: var(--ink); }

.timeline { list-style: none; padding: 0; margin: 56px auto 0; max-width: 620px; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: .04em; color: var(--rose-dark); line-height: 1.35; }

/* ---------- Místo konání + mapa ---------- */
.place { background: #f2efe6; }
.place-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: stretch; }
.map-frame {
	position: relative; width: 100%; height: 100%; min-height: 420px; border-radius: var(--radius-lg); overflow: hidden;
	border: 1px solid var(--line); box-shadow: var(--shadow); background: #e6e8df;
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.place-info { display: flex; flex-direction: column; gap: 18px; }
.place-card {
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px;
	display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start;
}
.place-card .ico { width: 46px; height: 46px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-dark); display: grid; place-items: center; }
.place-card .ico svg { width: 22px; height: 22px; }
.place-card h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: .04em; margin: 2px 0 4px; }
.place-card p { margin: 0; color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.place-card address { font-style: normal; color: var(--ink); font-size: 18px; }
.map-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-ghost {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
	border: 1.5px solid var(--rose); color: var(--rose-dark); text-decoration: none; font-weight: 500; font-size: 16px; letter-spacing: .03em;
	transition: background .2s, color .2s;
}
.btn-ghost:hover { background: var(--rose); color: #fff; }
.btn-ghost svg { width: 16px; height: 16px; }

/* ---------- Anketa ---------- */
.rsvp { background: linear-gradient(180deg, var(--ivory) 0%, #f2efe6 100%); }
.rsvp-card {
	max-width: 780px; margin: 0 auto; background: var(--paper); border-radius: var(--radius-lg);
	border: 1px solid var(--line); box-shadow: var(--shadow); padding: 54px 56px;
}
.field { margin: 0 0 34px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend {
	display: block; font-weight: 700; font-size: 19px; margin: 0 0 12px; padding: 0; color: var(--ink);
}
.field .hint { display: block; font-weight: 400; font-size: 16px; color: var(--ink-soft); margin-top: 2px; }
.req { color: var(--rose-dark); }
input[type=text], input[type=email], input[type=number], textarea {
	width: 100%; font: inherit; font-size: 19px; color: var(--ink);
	background: var(--ivory); border: 1.5px solid #cfc7b6; border-radius: var(--radius);
	padding: 14px 18px; transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--sage); background: #fff; box-shadow: 0 0 0 4px rgba(95, 115, 97, .18); }
textarea { min-height: 120px; resize: vertical; }
input[type=number] { max-width: 140px; }

.choices { display: grid; gap: 12px; }
.choices.cols-2 { grid-template-columns: repeat(2, 1fr); }
.choices.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choices.cols-5 { grid-template-columns: repeat(5, 1fr); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
	display: flex; align-items: center; gap: 12px; height: 100%;
	border: 1.5px solid #cfc7b6; border-radius: var(--radius); background: var(--ivory);
	padding: 14px 18px; font-size: 18px; line-height: 1.35;
	transition: border-color .2s, background .2s, box-shadow .2s;
}
.choice span::before {
	content: ""; flex: 0 0 22px; height: 22px; border: 2px solid #9c9483; border-radius: 50%; background: #fff;
	transition: all .2s;
}
.choice input[type=checkbox] + span::before { border-radius: 6px; }
.choice:hover span { border-color: var(--sage); }
.choice input:checked + span { border-color: var(--rose); background: var(--rose-soft); font-weight: 700; }
.choice input:checked + span::before { border-color: var(--rose); background: var(--rose); box-shadow: inset 0 0 0 4px #fff; }
.choice input[type=checkbox]:checked + span::before {
	box-shadow: none;
	background: var(--rose) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/16px no-repeat;
}
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(95, 115, 97, .25); }

/* Pití – dlaždice s ikonou */
.drinks .choice span { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 18px 10px 16px; }
.drinks .choice span::before { display: none; }
.drinks .choice svg { width: 34px; height: 34px; color: var(--sage-dark); }
.drinks .choice input:checked + span svg { color: var(--rose-dark); }

.sub-field { margin-top: 16px; padding: 20px 22px; background: #f6f2ea; border-radius: var(--radius); border-left: 3px solid var(--rose); }
.sub-field label { display: block; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.sub-field .row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; }
.sub-field .row > div + div label { margin-top: 0; }
[hidden] { display: none !important; }
.only-attending[hidden] { display: none !important; }

.is-missing > legend::after, .is-missing > label::after { content: " – vyplňte prosím"; color: var(--rose-dark); font-weight: 600; font-size: 16px; }
.is-missing .choice span, .is-missing input[type=text], .is-missing input[type=number] { border-color: var(--rose); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.form-foot small { color: var(--ink-soft); font-size: 15px; }

.notice { border-radius: var(--radius); padding: 18px 22px; margin: 0 0 28px; font-size: 18px; }
.notice-error { background: #fbe9e9; border: 1px solid #e3b4b4; color: #7a2630; }
.thanks { text-align: center; padding: 24px 0 8px; }
.thanks .flourish { width: 120px; }
.thanks h3 { font-family: var(--serif); font-size: 40px; font-weight: 300; letter-spacing: .04em; margin: 0 0 10px; }
.thanks p { color: var(--ink-soft); margin: 0 auto 22px; max-width: 460px; }
.link-btn { background: none; border: 0; color: var(--rose-dark); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- Patička ---------- */
.site-footer { padding: 54px 0 60px; text-align: center; color: var(--ink-soft); font-size: 17px; }
.site-footer .monogram { font-size: 26px; margin-bottom: 14px; }
.site-footer p { margin: 0; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	.hero::before { animation: none; }
	html { scroll-behavior: auto; }
}

/* ---------- Responzivita ---------- */
@media (max-width: 900px) {
	.place-grid { grid-template-columns: 1fr; }
	.map-frame { min-height: 0; height: auto; aspect-ratio: 16 / 11; }
	.info-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
	.choices.cols-3, .choices.cols-5 { grid-template-columns: repeat(2, 1fr); }
	.choices.cols-5 .choice:last-child { grid-column: span 2; }
}
@media (max-width: 900px) {
	.hero::after { background: linear-gradient(90deg, rgba(251, 248, 242, .95) 0%, rgba(251, 248, 242, .82) 45%, rgba(251, 248, 242, .2) 75%, rgba(251, 248, 242, 0) 90%); }
	.site-nav .header-link:not(.is-cta) { display: none; }
	.site-header .monogram { padding: 11px 18px; border-radius: 999px; background: rgba(251, 248, 242, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 8px 24px -14px rgba(38, 48, 42, .4); font-size: 20px; }
	.site-header .mono-bar { height: 20px; }
}
@media (max-width: 640px) {
	body { font-size: 18px; }
	.hero { display: block; min-height: 0; padding: calc(64svh - 40px) 0 52px; background: var(--ivory); }
	.hero::before { bottom: auto; height: 64svh; background-position: 80% 35%; }
	.hero#uvod::after {
		bottom: auto; height: calc(64svh + 2px);
		background: linear-gradient(180deg, rgba(251, 248, 242, .55) 0%, rgba(251, 248, 242, 0) 18%, rgba(251, 248, 242, 0) 72%, rgba(251, 248, 242, 1) 100%);
	}
	.hero h1 { font-size: clamp(36px, 11vw, 52px); }
	.hero-place { margin-left: 64px; font-size: 17px; }
	.hero-lead { font-size: 18px; }
	.btn { width: 100%; justify-content: center; }
	.section { padding: 70px 0; }
	.rsvp-card { padding: 34px 22px; border-radius: 18px; }
	.choices.cols-2, .choices.cols-3 { grid-template-columns: 1fr; }
	.sub-field .row { grid-template-columns: 1fr; }
	.timeline li { grid-template-columns: 76px 1fr; gap: 14px; }
	.timeline time { font-size: 21px; }
	.scroll-hint { display: none; }
	.place-grid { grid-template-columns: 1fr; }
	.map-frame { aspect-ratio: 4 / 3.4; }
}
