/*
Theme Name: what-a-great.day
Theme URI: https://what-a-great.day
Author: Katrin & Julian
Description: Hochzeitswebsite von Katrin & Julian: Intro-Video, Galerien beider Hochzeitstage, Lesung und Kontaktformular. Alle Inhalte sind im Customizer unter „Hochzeit“ bearbeitbar.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: what-a-great-day
*/

/* ---------- Schriften (lokal, aus Google Fonts) ---------- */

@font-face {
	font-family: "Gilda Display";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/gilda-display-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Gilda Display";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/gilda-display-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Jost ist eine variable Schrift: eine Datei deckt 300–500 ab. */
@font-face {
	font-family: "Jost";
	font-style: normal;
	font-weight: 300 500;
	font-display: swap;
	src: url("assets/fonts/jost-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Jost";
	font-style: normal;
	font-weight: 300 500;
	font-display: swap;
	src: url("assets/fonts/jost-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design-Tokens ---------- */

:root {
	--c-accent: #76bc21;
	--c-accent-dark: #3f6b12;
	--c-bg: #f8f7f2;
	--c-bg-alt: #eef0e6;
	--c-text: #2b2f26;
	--c-muted: #5b6152;
	--c-muted-2: #6b7062;
	--c-line: #d9dbd0;
	--c-field: #c9cbbf;
	--c-placeholder: #e6e7df;
	--c-hero: #1d2118;
	--c-error: #a33;

	--f-display: "Gilda Display", Georgia, serif;
	--f-ui: "Jost", system-ui, sans-serif;

	--gutter: clamp(20px, 4vw, 56px);
	--section-y: clamp(72px, 10vw, 128px);
	--logo-h: 64px;
}

/* ---------- Grundlagen ---------- */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--f-ui);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--c-accent-dark);
	text-decoration: none;
}

a:hover {
	color: var(--c-accent);
}

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

input,
textarea,
button {
	font-family: inherit;
}

:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 3px;
}

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

.skip-link:focus {
	z-index: 100;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	background: var(--c-bg);
	color: var(--c-text);
}

.kicker {
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--c-accent-dark);
}

.btn {
	border: 0;
	border-radius: 0;
	background: var(--c-text);
	color: var(--c-bg);
	font-size: 13px;
	letter-spacing: .16em;
	text-transform: uppercase;
	cursor: pointer;
}

.btn:hover {
	background: var(--c-accent-dark);
}

.btn:disabled {
	opacity: .6;
	cursor: progress;
}

.field {
	width: 100%;
	padding: 15px 16px;
	border: 1px solid var(--c-field);
	border-radius: 0;
	background: #fff;
	color: var(--c-text);
	font-size: 15px;
	outline: none;
}

.field:focus {
	border-color: var(--c-accent);
}

/* Ankerziele nicht unter dem fixierten Header verstecken (mobil relevant). */
main > section[id] {
	scroll-margin-top: max(0px, calc(var(--logo-h) + 36px - var(--section-y) + 16px));
}

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

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px var(--gutter);
	background: transparent;
	color: #fff;
	transition: background .4s, box-shadow .4s;
}

.site-header.is-solid,
.no-js .site-header {
	background: rgba(248, 247, 242, .96);
	box-shadow: 0 1px 0 var(--c-line);
	color: var(--c-text);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__brand {
	display: flex;
	color: #fff;
}

.site-header__brand:hover {
	color: inherit;
}

.is-solid .site-header__brand,
.no-js .site-header__brand {
	color: var(--c-accent);
}

.brand-logo {
	height: var(--logo-h);
	width: auto;
	aspect-ratio: 425 / 375;
}

.brand-logo--dark,
.is-solid .brand-logo--light {
	display: none;
}

.is-solid .brand-logo--dark {
	display: block;
}

.site-nav {
	display: flex;
	gap: clamp(16px, 3vw, 40px);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.site-nav a {
	color: inherit;
	white-space: nowrap;
}

/* ---------- Intro ---------- */

.hero {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	overflow: hidden;
	background: var(--c-hero);
}

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

.hero__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 24, 16, .45) 0%, rgba(20, 24, 16, .1) 35%, rgba(20, 24, 16, .55) 100%);
}

.hero__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(32px, 7vh, 72px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 0 24px;
	color: #fff;
	text-align: center;
}

.hero__ornament {
	width: min(340px, 70vw);
	height: auto;
}

.hero__dates {
	margin: 0;
	font-family: var(--f-display);
	font-size: clamp(18px, 2vw, 22px);
	letter-spacing: .08em;
}

.hero__download {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	max-width: 100%;
	padding-bottom: 3px;
	white-space: nowrap;
	border-bottom: 1px solid rgba(255, 255, 255, .45);
	color: rgba(255, 255, 255, .88);
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	transition: color .3s, border-color .3s;
}

.hero__download:hover {
	border-color: var(--c-accent);
	color: #fff;
}

.hero__download-size {
	letter-spacing: .08em;
	opacity: .7;
}

.sound-toggle {
	position: absolute;
	right: var(--gutter);
	bottom: clamp(32px, 7vh, 72px);
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 0;
	background: rgba(20, 24, 16, .25);
	color: #fff;
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.sound-toggle:hover {
	background: rgba(20, 24, 16, .5);
}

.sound-toggle__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .5);
}

.sound-toggle.is-on .sound-toggle__dot {
	background: var(--c-accent);
}

.no-js .sound-toggle {
	display: none;
}

/* ---------- Tage ---------- */

.days {
	max-width: 1360px;
	margin: 0 auto;
	padding: var(--section-y) var(--gutter) clamp(56px, 8vw, 96px);
}

.section-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head__ornament,
.reading__ornament,
.contact-thanks__ornament {
	height: auto;
	color: var(--c-accent);
}

.section-head__ornament {
	width: 220px;
}

.days__title,
.reading__title,
.contact__title {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 400;
	text-align: center;
}

.days__title {
	font-size: clamp(34px, 4.4vw, 56px);
}

.day-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: clamp(32px, 5vw, 56px);
	border-top: 1px solid var(--c-line);
	border-bottom: 1px solid var(--c-line);
}

.day-tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* Daten bündig, auch wenn eine Bezeichnung mehr Zeilen braucht. */
	justify-content: flex-end;
	gap: 8px;
	padding: 28px 12px;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	background: transparent;
	color: var(--c-text);
	text-align: center;
	cursor: pointer;
	opacity: .45;
	transition: opacity .3s;
}

.day-tab:hover,
.day-tab[aria-selected="true"] {
	opacity: 1;
}

.day-tab[aria-selected="true"] {
	border-bottom-color: var(--c-accent);
}

.day-tab__date {
	font-family: var(--f-display);
	font-size: clamp(22px, 2.6vw, 32px);
}

/* Ohne JS beide Galerien zeigen. */
.no-js .day-panel[hidden] {
	display: block;
	margin-top: 12px;
}

.day-panel:focus-visible {
	outline-offset: 8px;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gallery__tile {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--c-placeholder);
	cursor: zoom-in;
}

.gallery__tile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s;
}

.gallery__tile:hover img {
	transform: scale(1.04);
}

.gallery-empty {
	margin: 0;
	padding: 40px 24px;
	border: 1px dashed var(--c-field);
	color: var(--c-muted-2);
	font-size: 15px;
	text-align: center;
}

/* ---------- Lightbox ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 5vw, 72px);
	background: rgba(18, 21, 15, .94);
	outline: none;
}

.lightbox[hidden] {
	display: none;
}

.lightbox__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.lightbox__nav,
.lightbox__close {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	color: #fff;
	line-height: 1;
	cursor: pointer;
}

.lightbox__nav {
	top: 50%;
	width: 52px;
	height: 52px;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 50%;
	font-size: 22px;
	transform: translateY(-50%);
}

.lightbox__nav--prev {
	left: 12px;
}

.lightbox__nav--next {
	right: 12px;
}

.lightbox__close {
	top: 12px;
	right: 16px;
	width: 44px;
	height: 44px;
	border: 0;
	font-size: 28px;
}

.lightbox__count {
	position: absolute;
	top: 20px;
	left: 0;
	right: 0;
	margin: 0;
	color: #fff;
	font-size: 12px;
	letter-spacing: .2em;
	text-align: center;
	pointer-events: none;
}

/* ---------- Lesung ---------- */

.reading {
	padding: var(--section-y) 24px;
	background: var(--c-bg-alt);
}

.reading__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	max-width: 660px;
	margin: 0 auto;
}

.reading__title {
	font-size: clamp(30px, 4vw, 48px);
	line-height: 1.15;
	text-wrap: balance;
}

.reading__ornament {
	width: 200px;
	margin: 8px 0 16px;
}

.reading__body {
	display: flex;
	flex-direction: column;
	gap: 22px;
	width: 100%;
	font-family: var(--f-display);
	font-size: clamp(18px, 1.6vw, 21px);
	line-height: 1.7;
	text-wrap: pretty;
}

.reading__body > * {
	margin: 0;
}

/* ---------- Kontakt ---------- */

.contact {
	padding: var(--section-y) 24px;
}

.contact__inner {
	display: flex;
	flex-direction: column;
	gap: 32px;
	max-width: 560px;
	margin: 0 auto;
}

.contact__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.contact__title {
	font-size: clamp(30px, 4vw, 48px);
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.contact-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
}

.contact-form textarea {
	resize: vertical;
}

.contact-form__submit {
	align-self: center;
	margin-top: 10px;
	padding: 16px 40px;
}

.contact-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form__privacy {
	margin: 0;
	color: var(--c-muted-2);
	font-size: 13px;
	line-height: 1.6;
	text-align: center;
}

.form-error {
	margin: 0;
	color: var(--c-error);
	font-size: 14px;
	text-align: center;
}

.form-error[hidden] {
	display: none;
}

.contact-thanks {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 40px 0;
	text-align: center;
	outline: none;
}

.contact-thanks__ornament {
	width: 180px;
}

.contact-thanks p {
	margin: 0;
	font-family: var(--f-display);
	font-size: 22px;
}

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

.site-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 48px 24px;
	border-top: 1px solid var(--c-line);
}

.site-footer__logo {
	width: 120px;
	height: auto;
	color: var(--c-accent);
}

.site-footer__domain,
.site-footer__links a,
.gate__legal a {
	color: var(--c-muted-2);
	font-size: 12px;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.site-footer__links a:hover,
.gate__legal a:hover {
	color: var(--c-accent);
}

.site-footer__links,
.gate__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */

.page-main {
	max-width: 760px;
	margin: 0 auto;
	padding: calc(var(--logo-h) + 36px + clamp(48px, 8vw, 96px)) 24px var(--section-y);
}

.page-title {
	margin: 0 0 32px;
	font-family: var(--f-display);
	font-size: clamp(30px, 4vw, 48px);
	font-weight: 400;
	line-height: 1.15;
	text-wrap: balance;
}

.entry-content {
	font-size: 17px;
	line-height: 1.7;
}

.entry-content h2,
.entry-content h3 {
	margin: 1.8em 0 .6em;
	font-family: var(--f-display);
	font-weight: 400;
	line-height: 1.25;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Passwortseite ---------- */

.gate {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	min-height: 100vh;
	min-height: 100svh;
	padding: 24px;
	background: var(--c-bg);
}

.gate__logo-wrap {
	margin: 0;
	line-height: 0;
}

.gate__logo {
	width: min(300px, 70vw);
	height: auto;
	color: var(--c-accent);
}

.gate__ornament {
	width: min(260px, 60vw);
	height: auto;
	color: var(--c-text);
	opacity: .7;
}

.gate__text {
	margin: 0;
	color: var(--c-muted);
	font-size: 15px;
	letter-spacing: .04em;
	text-align: center;
}

.gate__form {
	display: flex;
	gap: 8px;
	width: min(360px, 100%);
}

.gate__input {
	flex: 1;
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid var(--c-field);
	border-radius: 0;
	background: #fff;
	color: var(--c-text);
	font-size: 15px;
	outline: none;
}

.gate__input:focus {
	border-color: var(--c-accent);
}

.gate__submit {
	padding: 14px 22px;
	letter-spacing: .14em;
}

.gate__error {
	margin: -12px 0 0;
	color: var(--c-error);
	font-size: 14px;
	text-align: center;
}

.gate__legal {
	margin-top: 12px;
}

/* ---------- Mobil ---------- */

@media (max-width: 899px) {
	/* Datumszeile, Download-Link und Ton-Button nicht nebeneinander quetschen. */
	.hero__content {
		bottom: calc(clamp(32px, 7vh, 72px) + 64px);
	}

	.sound-toggle {
		right: 50%;
		transform: translateX(50%);
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 639px) {
	:root {
		--logo-h: 48px;
	}

	.site-nav {
		gap: 14px;
		font-size: 12px;
		letter-spacing: .12em;
	}

	.day-tab__label {
		display: flex;
		flex-direction: column;
		gap: 2px;
	}

	.day-tab__sep {
		display: none;
	}
}

@media (max-width: 419px) {
	.hero__download {
		letter-spacing: .12em;
	}

	.hero__download-size {
		display: none;
	}
}

@media (max-width: 379px) {
	.site-nav {
		gap: 10px;
		letter-spacing: .08em;
	}
}

/* ---------- Bewegung reduzieren ---------- */

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

	*,
	*::before,
	*::after {
		transition-duration: .01ms !important;
	}

	.gallery__tile:hover img {
		transform: none;
	}
}
