/*
Theme Name:   Aurora
Theme URI:    https://example.com/aurora
Description:  Eigenständiges Theme für eine Ferienwohnung. Bringt alles mit: Kopfzeile mit Menü, Fußzeile, Seitenvorlagen, Schriften (Fraunces und Open Sans, lokal eingebunden) und die komplette Farbpalette. Kein Eltern-Theme, keine Abhängigkeit von einem Baukasten — mit Elementor lässt es sich trotzdem bearbeiten.
Author:       Aurora
Version:      1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  aurora
Tags:         custom-menu, featured-images, translation-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   1. DIE PALETTE

   Diese Werte sind die einzige Stelle, an der Farben und Schriftgrößen
   definiert sind. Wer die ganze Website umfärben will, ändert hier fünf
   Zeilen — nicht fünfzig Elementor-Widgets.
   ========================================================================== */

:root {
	--aurora-cream: #f6f1e7;
	--aurora-cream-tint: #efe9db;
	--aurora-paper: #fdfaf3;
	--aurora-ink: #29251d;
	--aurora-ink-soft: #6f6656;

	/* Der Akzent: helles, warmes Braun. */
	--aurora-accent: #9c7a54;
	--aurora-accent-deep: #7a5c3d;
	--aurora-ivory: #f6f2e8;

	--aurora-line: rgba(41, 37, 29, 0.14);
	--aurora-line-soft: rgba(41, 37, 29, 0.08);

	--aurora-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--aurora-sans: 'Open Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

	--aurora-fs-h1: clamp(2.6rem, 6.5vw, 5.2rem);
	--aurora-fs-h2: clamp(2rem, 3.8vw, 3.1rem);
	--aurora-fs-statement: clamp(1.9rem, 3.6vw, 3.2rem);
	--aurora-fs-label: 0.72rem;

	--aurora-gutter: clamp(1.35rem, 4.5vw, 4rem);
	--aurora-max: 1280px;
	--aurora-pad: clamp(5rem, 11vh, 8.5rem);

	--aurora-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--aurora-radius: 6px;
}

@media (max-width: 900px) {
	:root { --aurora-pad: clamp(3.8rem, 8vh, 5.5rem); }
}

/* ==========================================================================
   2. GRUNDLAGEN
   ========================================================================== */

/* Ohne diesen Reset zählt der Innenabstand ZUSÄTZLICH zur max-width: eine
   Spalte mit max-width:1280px und 58px Polsterung je Seite wird 1396px breit
   und schiebt die Seite auf einem 1280er-Bildschirm nach rechts hinaus.
   Auf 1440 fällt das nicht auf — genau deshalb steht es hier. */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	overflow-x: hidden;
	background: var(--aurora-cream);
	color: var(--aurora-ink);
	font-family: var(--aurora-sans);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title {
	font-family: var(--aurora-serif);
	font-weight: 300;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: var(--aurora-ink);
	text-wrap: balance;
}

h1, .elementor-widget-heading h1.elementor-heading-title { font-size: var(--aurora-fs-h1); }
h2, .elementor-widget-heading h2.elementor-heading-title { font-size: var(--aurora-fs-h2); }

p { text-wrap: pretty; }

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

::selection { background: var(--aurora-accent); color: var(--aurora-ivory); }

:focus-visible {
	outline: 1.5px solid var(--aurora-accent);
	outline-offset: 4px;
}

img { height: auto; }

/* ==========================================================================
   3. BAUSTEINE

   Diese Klassen trägt man in Elementor unter „Erweitert → CSS-Klassen“ ein.
   Damit sieht ein von Hand gebauter Abschnitt aus wie der Rest der Seite.
   ========================================================================== */

/* Das kleine Label über einer Überschrift. */
.aurora-eyebrow {
	font-family: var(--aurora-sans);
	font-size: var(--aurora-fs-label);
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--aurora-accent);
	line-height: 1.8;
}

/* Ein großer, ruhiger Satz in der Serifenschrift. */
.aurora-statement {
	font-family: var(--aurora-serif);
	font-weight: 300;
	font-size: var(--aurora-fs-statement);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.aurora-lead {
	max-width: 54ch;
	color: var(--aurora-ink-soft);
	font-size: 1.05rem;
}

.aurora-lead--center { margin-inline: auto; }

/* Ein Abschnitt mit dem großzügigen Standardabstand der Website.

   Der seitliche Abstand steht hier und nicht am Seitenrahmen: die Abschnitte
   laufen über die volle Fensterbreite, und ohne eigene Polsterung klebte der
   Text auf dem Handy am Displayrand. */
.aurora-section {
	padding-block: var(--aurora-pad);
	padding-inline: var(--aurora-gutter);
}

.aurora-section--tight { padding-block: calc(var(--aurora-pad) * 0.55); }

/* Fließtext bleibt lesbar schmal, auch wenn der Abschnitt 1280px breit ist.
   Zeilen über etwa 75 Zeichen verliert das Auge beim Rücksprung. */
.aurora-section > p:not(.has-text-align-center),
.aurora-section > .wp-block-group > p:not(.has-text-align-center) { max-width: 68ch; }

.aurora-section > p.has-text-align-center { max-width: 62ch; margin-inline: auto; }

.aurora-paper { background: var(--aurora-paper); }
.aurora-tint { background: var(--aurora-cream-tint); }

.aurora-ink-bg {
	background: var(--aurora-ink);
	color: var(--aurora-ivory);
}

.aurora-ink-bg h1,
.aurora-ink-bg h2,
.aurora-ink-bg h3,
.aurora-ink-bg .elementor-heading-title { color: var(--aurora-ivory); }

/* Eine Haarlinie als Trenner. */
.aurora-rule {
	border: 0;
	border-top: 1px solid var(--aurora-line);
	margin-block: 2rem;
}

/* --- Das Titelbild ---------------------------------------------------------

   Zwei Dinge müssen hier stimmen, und beide fallen erst auf dem Handy auf:
   der Text darf nicht unter der klebenden Kopfzeile beginnen, und er muss auch
   auf einem hellen Foto lesbar bleiben. Eine gleichmäßige Abdunklung allein
   genügt dafür nicht — ein Verlauf verdunkelt dort, wo Text steht, und lässt
   die Bildmitte hell. */

.entry__content > .wp-block-cover:first-child .wp-block-cover__inner-container {
	padding-top: clamp(3rem, 8vh, 5rem);
}

.entry__content > .wp-block-cover:first-child::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(41, 37, 29, 0.55) 0%,
		rgba(41, 37, 29, 0.15) 45%,
		rgba(41, 37, 29, 0.6) 100%
	);
}

.wp-block-cover .wp-block-cover__inner-container > * { color: var(--aurora-ivory); }

.wp-block-cover .aurora-eyebrow { color: color-mix(in srgb, var(--aurora-ivory) 82%, transparent); }

/* Der Button der Website.

   Drei Schreibweisen, weil derselbe Knopf an drei Stellen entsteht: als
   Gutenberg-Baustein (die Klasse sitzt dann am umgebenden div, nicht am Link),
   als Elementor-Widget und als einfacher Link im Text. */
.aurora-button .wp-block-button__link,
.aurora-button .elementor-button,
a.aurora-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.7em;
	padding: 1em 2.2em;
	font-family: var(--aurora-sans);
	font-size: var(--aurora-fs-label);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--aurora-ivory);
	background: var(--aurora-accent);
	border: 1px solid var(--aurora-accent);
	border-radius: var(--aurora-radius);
	text-decoration: none;
	transition: background-color 0.3s var(--aurora-ease), border-color 0.3s var(--aurora-ease);
}

.aurora-button .wp-block-button__link:hover,
.aurora-button .elementor-button:hover,
a.aurora-button:hover {
	background: var(--aurora-accent-deep);
	border-color: var(--aurora-accent-deep);
	color: var(--aurora-ivory);
}

.aurora-button--ghost .wp-block-button__link,
.aurora-button--ghost .elementor-button,
a.aurora-button--ghost {
	color: var(--aurora-ink);
	background: transparent;
	border-color: var(--aurora-line);
}

.aurora-button--ghost .wp-block-button__link:hover,
.aurora-button--ghost .elementor-button:hover,
a.aurora-button--ghost:hover {
	color: var(--aurora-accent);
	background: transparent;
	border-color: var(--aurora-accent);
}

/* Eine Zahl mit Beschriftung, wie in der Bewertungs-Sektion. */
.aurora-figure { text-align: center; }

.aurora-figure__value {
	display: block;
	font-family: var(--aurora-serif);
	font-weight: 300;
	font-size: clamp(2.2rem, 4vw, 3.4rem);
	line-height: 1;
	color: var(--aurora-accent);
}

.aurora-figure__label {
	display: block;
	margin-top: 0.5rem;
	font-size: var(--aurora-fs-label);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--aurora-ink-soft);
}

/* Ein Bild, das die volle Breite des Fensters einnimmt. */
.aurora-fullbleed img {
	width: 100%;
	object-fit: cover;
}

/* Ein Bild, das erst grau ist und beim Scrollen Farbe annimmt. */
.aurora-desaturate img {
	filter: grayscale(1);
	transition: filter 1.2s var(--aurora-ease);
}

.aurora-desaturate:hover img,
.aurora-desaturate.is-visible img { filter: grayscale(0); }

/* ==========================================================================
   3b. KOPFZEILE, MENÜ UND FUSSZEILE

   Das Theme bringt beides selbst mit — es soll ohne Baukasten eine fertige
   Website ergeben.
   ========================================================================== */

.aurora-skip {
	position: fixed;
	top: 0;
	left: 50%;
	translate: -50% -130%;
	z-index: 300;
	padding: 0.9em 1.8em;
	background: var(--aurora-ink);
	color: var(--aurora-ivory);
	font-size: var(--aurora-fs-label);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	transition: translate 0.35s var(--aurora-ease);
}

.aurora-skip:focus { translate: -50% 0; color: var(--aurora-ivory); }

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--aurora-cream) 88%, transparent);
	backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.4s var(--aurora-ease), background-color 0.4s var(--aurora-ease);
}

.site-header.is-scrolled {
	border-bottom-color: var(--aurora-line-soft);
	background: color-mix(in srgb, var(--aurora-cream) 96%, transparent);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	width: 100%;
	max-width: var(--aurora-max);
	margin-inline: auto;
	padding: 0.9rem var(--aurora-gutter);
}

.site-brand {
	font-family: var(--aurora-serif);
	font-weight: 300;
	font-size: 1.45rem;
	letter-spacing: 0.02em;
	line-height: 1;
	text-decoration: none;
	color: var(--aurora-ink);
}

.site-brand:hover { color: var(--aurora-accent); }
.site-brand img { max-height: 46px; width: auto; }

.site-brand__tagline {
	display: block;
	margin-top: 0.3rem;
	font-family: var(--aurora-sans);
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--aurora-ink-soft);
}

.site-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.2vw, 2.2rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	position: relative;
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--aurora-ink);
	padding-block: 0.4rem;
}

/* Die Linie wächst aus der Mitte — dezenter als ein Farbwechsel. */
.site-nav a::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: var(--aurora-accent);
	scale: 0 1;
	transition: scale 0.35s var(--aurora-ease);
}

.site-nav a:hover::after,
.site-nav .current-menu-item > a::after { scale: 1 1; }

.site-nav__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.6rem;
	height: 2.6rem;
	padding: 0;
	background: none;
	border: 1px solid var(--aurora-line);
	border-radius: 50%;
	cursor: pointer;
}

.site-nav__toggle span {
	display: block;
	width: 1.05rem;
	height: 1px;
	margin-inline: auto;
	background: var(--aurora-ink);
	transition: translate 0.3s var(--aurora-ease), rotate 0.3s var(--aurora-ease), opacity 0.2s;
}

.site-nav__toggle[aria-expanded="true"] span:nth-child(1) { translate: 0 6px; rotate: 45deg; }
.site-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav__toggle[aria-expanded="true"] span:nth-child(3) { translate: 0 -6px; rotate: -45deg; }

@media (max-width: 860px) {
	.site-nav__toggle { display: flex; }

	.site-nav {
		position: fixed;
		inset: 0;
		display: grid;
		place-items: center;
		background: var(--aurora-cream);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.4s var(--aurora-ease), visibility 0.4s;
	}

	.site-nav.is-open { opacity: 1; visibility: visible; }

	.site-nav ul {
		flex-direction: column;
		gap: 1.6rem;
		text-align: center;
	}

	.site-nav a { font-size: 0.95rem; letter-spacing: 0.2em; }
}

.site-main { min-height: 50vh; }

.site-footer {
	padding-block: clamp(3rem, 7vh, 5rem);
	background: var(--aurora-ink);
	color: color-mix(in srgb, var(--aurora-ivory) 78%, transparent);
	font-size: 0.9rem;
}

.site-footer__inner {
	width: 100%;
	max-width: var(--aurora-max);
	margin-inline: auto;
	padding-inline: var(--aurora-gutter);
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.site-footer h2,
.site-footer h3 {
	font-size: var(--aurora-fs-label);
	font-family: var(--aurora-sans);
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--aurora-ivory);
	margin-bottom: 0.9rem;
}

.site-footer a { color: var(--aurora-ivory); text-decoration: none; }
.site-footer a:hover { color: var(--aurora-accent); }

.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }

.site-footer__brand {
	font-family: var(--aurora-serif);
	font-weight: 300;
	font-size: 1.6rem;
	color: var(--aurora-ivory);
	line-height: 1.2;
	margin-bottom: 0.6rem;
}

.site-footer__bottom {
	max-width: var(--aurora-max);
	margin: 2.5rem auto 0;
	padding: 1.4rem var(--aurora-gutter) 0;
	border-top: 1px solid rgba(246, 242, 232, 0.14);
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.6rem;
	justify-content: space-between;
	font-size: 0.8rem;
}

/* --- Seiteninhalt ---------------------------------------------------------- */

.entry {
	width: 100%;
	max-width: var(--aurora-max);
	margin-inline: auto;
	padding: var(--aurora-pad) var(--aurora-gutter);
}

/* Eine reine Textseite liest sich schmaler besser. */
.entry--narrow { max-width: 72ch; }

/* Eine Seite aus vollbreiten Abschnitten braucht gar keinen Rahmen — sonst
   begrenzen sich Wrapper und Baustein gegenseitig, und die vollbreiten
   Abschnitte enden mitten im Bild. Die Abschnitte polstern sich selbst. */
.entry--full {
	max-width: none;
	padding: 0;
}

.entry__title { margin-bottom: 1.6rem; }

.entry__content > * + * { margin-top: 1.1em; }
.entry__content h2 { margin-top: 2.4em; }
.entry__content h3 { margin-top: 1.8em; }
.entry__content ul,
.entry__content ol { padding-left: 1.4em; list-style: revert; }
.entry__content a { color: var(--aurora-accent); text-decoration: underline; text-underline-offset: 0.2em; }

.entry__content .alignwide { max-width: min(1600px, 92vw); margin-inline: calc(50% - min(800px, 46vw)); }
.entry__content .alignfull { max-width: 100vw; margin-inline: calc(50% - 50vw); }

.entry__content img { border-radius: var(--aurora-radius); }
.entry__content .alignfull img { border-radius: 0; }

.aurora-404 { text-align: center; }

/* ==========================================================================
   4. ELEMENTOR-ANPASSUNGEN

   Optional: das Theme funktioniert ohne Elementor vollständig. Wer mag, baut
   Seiten trotzdem damit — dann greifen diese Anpassungen.
   ========================================================================== */

.elementor-widget-text-editor { color: var(--aurora-ink-soft); }

.elementor-section.elementor-section-boxed > .elementor-container { max-width: var(--aurora-max); }

/* Das Buchungs-Widget erbt die Palette der Seite. */
.aurora-book,
.aurora-prices {
	--aurora-sans: 'Open Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
	--aurora-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* ==========================================================================
   5. BEWEGUNG

   Zurückhaltend, und nie gegen den erklärten Wunsch des Gastes.
   ========================================================================== */

.aurora-reveal {
	opacity: 0;
	translate: 0 1.6rem;
	transition: opacity 0.9s var(--aurora-ease), translate 0.9s var(--aurora-ease);
}

.aurora-reveal.is-visible {
	opacity: 1;
	translate: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.aurora-reveal { opacity: 1; translate: none; }
}
