/* vomrauberweiher.de — warm earthy palette, mobile-first */
:root {
	--cream: #f5efe6;        /* page background */
	--paper: #fdfaf5;        /* panels */
	--ink: #2b2118;          /* main text */
	--ink-soft: #5a4a3a;     /* secondary text */
	--tan: #c8965a;          /* accent — lapphund tan */
	--tan-deep: #a5713a;     /* accent hover / headings */
	--bark: #3d2e1f;         /* dark brown (footer, header text) */
	--line: #e5d9c8;         /* hairlines */
	--radius: 0.9rem;
	--shadow: 0 0.4rem 1.4rem #3d2e1f14;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	font-size: 1.05rem;
	line-height: 1.6;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

img { max-width: 100%; }

/* ---------- header / nav ---------- */

header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--cream) 88%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
	padding-top: env(safe-area-inset-top);
}

nav.content {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0.55rem max(1rem, env(safe-area-inset-left)) 0.55rem max(1rem, env(safe-area-inset-right));
}

.logo {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: var(--bark);
	line-height: 1.15;
	margin-right: auto;
}
.logo-main {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.logo-sub {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--tan-deep);
}

.navlinks {
	display: flex;
	align-items: center;
	gap: 0.2rem;
}
.navlinks a {
	color: var(--bark);
	text-decoration: none;
	padding: 0.65rem 0.7rem;
	border-radius: 0.5rem;
	font-size: 0.95rem;
	white-space: nowrap;
}
.navlinks a:hover, .navlinks a.pageActive { background: #c8965a22; color: var(--tan-deep); }

.extendable { position: relative; }
.extendable > a::after { content: " ▾"; font-size: 0.7em; }
.extendable .sub {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 0.6rem;
	box-shadow: var(--shadow);
	min-width: 11rem;
	padding: 0.3rem;
	flex-direction: column;
}
.extendable:hover .sub, .extendable:focus-within .sub { display: flex; }
.extendable .sub a { display: block; }

.iglink { display: inline-flex; align-items: center; }

.hamburger {
	display: none;
	background: none;
	border: none;
	font-size: 1.5rem;
	color: var(--bark);
	padding: 0.4rem 0.7rem;
	cursor: pointer;
}

/* mobile nav */
@media (max-width: 920px) {
	.hamburger { display: block; }
	.navlinks {
		display: none;
		position: fixed;
		inset: 0;
		top: calc(3.4rem + env(safe-area-inset-top));
		/* explicit height: as a flex child of nav (align-items:center) the
		   top/bottom stretch is ignored (align-self != stretch) */
		height: calc(100dvh - 3.4rem - env(safe-area-inset-top));
		background: var(--cream);
		flex-direction: column;
		align-items: stretch;
		padding: 1rem max(1.2rem, env(safe-area-inset-left));
		gap: 0.1rem;
		overflow-y: auto;
		z-index: 99;
	}
	body.menu-open .navlinks { display: flex; }
	body.menu-open { overflow: hidden; }
	.navlinks a { font-size: 1.15rem; padding: 0.85rem 0.8rem; }
	.extendable .sub {
		display: flex;
		position: static;
		border: none;
		box-shadow: none;
		background: transparent;
		padding-left: 1.2rem;
	}
	.extendable > a::after { content: ""; }
}

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

div[role="main"] { flex: 1; }

.content {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.25rem max(1rem, env(safe-area-inset-left)) 2rem max(1rem, env(safe-area-inset-right));
}

.panel {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.4rem;
	margin-bottom: 1.4rem;
}

.lytHead h1 { margin: 0.5rem 0 1.2rem; color: var(--bark); }

.prose h1, .prose h2, .prose h3 {
	color: var(--bark);
	line-height: 1.25;
	font-family: Georgia, 'Times New Roman', serif;
}
.prose h1 { font-size: 1.7rem; margin-top: 0; }
.prose h2 { font-size: 1.35rem; }
.prose h3 { font-size: 1.12rem; color: var(--tan-deep); }
.prose a { color: var(--tan-deep); }
.prose blockquote {
	border-left: 3px solid var(--tan);
	margin: 1rem 0;
	padding: 0.2rem 0 0.2rem 1rem;
	color: var(--ink-soft);
}

/* draft warning box — any paragraph starting with ⚠️ */
.notice-draft {
	background: #fff3cd;
	border: 1px solid #e6c34a;
	border-left: 6px solid #e0a800;
	border-radius: 0.6rem;
	padding: 0.8rem 1rem;
	color: #6b5312;
	font-size: 0.95rem;
}
.prose em:first-child { color: var(--ink-soft); }

/* ---------- hero ---------- */

.hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	align-items: center;
	overflow: hidden;
	padding: 0;
}
.hero-img {
	width: 100%;
	height: 100%;
	min-height: 280px;
	object-fit: cover;
	display: block;
}
.hero-text { padding: 1.5rem 1.7rem 1.5rem 0.2rem; }
.hero-text h1 {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 1.65rem;
	line-height: 1.3;
	color: var(--bark);
	margin: 0 0 0.8rem;
}

@media (max-width: 780px) {
	.hero { grid-template-columns: 1fr; gap: 0; }
	.hero-img { max-height: 44dvh; }
	.hero-text { padding: 1.2rem 1.3rem 1.5rem; }
	.hero-text h1 { font-size: 1.35rem; }
}

/* ---------- teasers ---------- */

.teasers {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.2rem;
	margin-bottom: 1.4rem;
}
.teaser {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	padding: 0;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.teaser:hover { transform: translateY(-3px); box-shadow: 0 0.6rem 2rem #3d2e1f22; }
.teaser img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.teaser div { padding: 0.9rem 1.1rem 1.1rem; }
.teaser h3 { margin: 0 0 0.3rem; color: var(--tan-deep); }
.teaser p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- gallery (deck + tiles) ---------- */

.gallery-mount { display: block; margin-top: 1rem; }

lmnt-deck { height: min(62dvh, 560px); color: var(--tan); display: block; }
lmnt-deck slide { gap: 1rem; border-radius: var(--radius); }

.uas-tiles-heading {
	margin: 1.4rem 0 0.7rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--tan-deep);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.5rem;
}
@media (max-width: 600px) {
	.gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
}

.gallery-tile {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 0.6rem;
	background: #3d2e1f0d;
	cursor: pointer;
}
.gallery-tile picture, .gallery-tile img {
	width: 100%; height: 100%; object-fit: cover; display: block;
}
.gallery-tile .gallery-caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 0.35rem 0.55rem;
	background: linear-gradient(0deg, #000b, transparent);
	color: #fff; font-size: 0.8rem;
	opacity: 0; transition: opacity 0.2s;
}
.gallery-tile:hover .gallery-caption { opacity: 1; }

.gallery-tile .uas-tile-del,
.gallery-tile .uas-tile-edit {
	position: absolute;
	width: 2.2rem; height: 2.2rem; border-radius: 50%;
	border: none;
	background: #000a;
	color: #fff;
	font-size: 1.05rem; line-height: 1;
	cursor: pointer;
	display: none;
	z-index: 2;
	align-items: center; justify-content: center;
}
.gallery-tile .uas-tile-del  { top: 0.35rem; right: 0.35rem; }
.gallery-tile .uas-tile-edit { top: 0.35rem; right: 2.9rem; }
.gallery-tile .uas-tile-del:active  { background: #c0392b; }
body.vrw-edit .gallery-tile .uas-tile-del,
body.vrw-edit .gallery-tile .uas-tile-edit { display: flex; }
.gallery-tile.dragging { opacity: 0.4; }
.gallery-tile.drag-over { outline: 3px dashed var(--tan); outline-offset: -3px; }

.uas-toolbar {
	display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap;
	margin: 0.9rem 0 0.3rem;
	padding: 0.8rem 1rem;
	background: #c8965a1a;
	border-radius: 0.7rem;
}
.uas-toolbar[hidden] { display: none; }
.uas-toolbar .uas-upload-btn {
	padding: 0.7rem 1.2rem;
	background: var(--tan-deep);
	color: #fff;
	border: none; border-radius: 0.5rem;
	font: inherit; font-size: 1rem;
	cursor: pointer;
}
.uas-toolbar .uas-hint { opacity: 0.7; font-size: 0.82rem; }
.uas-toolbar .uas-status { font-style: italic; }
.uas-empty { opacity: 0.6; padding: 1.5rem; text-align: center; }

/* ---------- contact form ---------- */

#contactForm label { display: block; margin: 0 0 0.9rem; }
#contactForm label span { display: block; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 0.25rem; }
#contactForm input, #contactForm textarea {
	width: 100%;
	padding: 0.8rem 0.9rem;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom-on-focus */
	border: 1px solid var(--line);
	border-radius: 0.55rem;
	background: #fff;
	color: var(--ink);
}
#contactForm input:focus, #contactForm textarea:focus {
	outline: 2px solid var(--tan);
	border-color: var(--tan);
}
#contactForm .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-privacy { font-size: 0.82rem; color: var(--ink-soft); }
.form-status { font-weight: 600; }
.form-status.ok { color: #2e7d43; }
.form-status.err { color: #c0392b; }

.btn-primary {
	padding: 0.85rem 1.6rem;
	background: var(--tan-deep);
	color: #fff;
	border: none;
	border-radius: 0.55rem;
	font: inherit;
	font-size: 1.05rem;
	cursor: pointer;
	min-height: 44px;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary[disabled] { opacity: 0.6; }

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

footer {
	background: var(--bark);
	color: #d9cdbd;
	padding-bottom: env(safe-area-inset-bottom);
	margin-top: 2rem;
}
footer .content {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.5rem;
	justify-content: space-between;
	align-items: center;
	padding-top: 1.1rem;
	padding-bottom: 1.1rem;
	font-size: 0.88rem;
}
footer a { color: #e8ddcb; text-decoration: none; padding: 0.4rem 0.2rem; }
footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { display: flex; gap: 1.2rem; }

/* ---------- editor UI ---------- */

.vrw-edit-btn {
	display: none;
	position: absolute;
	top: 0.2rem; right: 0.2rem;
	width: 2.4rem; height: 2.4rem;
	border-radius: 50%;
	border: none;
	background: var(--tan-deep);
	color: #fff;
	font-size: 1.1rem;
	cursor: pointer;
	z-index: 50;
	box-shadow: 0 2px 8px #0004;
	align-items: center; justify-content: center;
}
body.vrw-edit [textid]:not(title):not(span):not(.no-edit) { position: relative; }
body.vrw-edit .vrw-edit-btn { display: flex; }

.vrw-dialog {
	border: none;
	border-radius: 0.9rem;
	padding: 0;
	box-shadow: 0 1rem 3rem #0006;
	width: min(680px, calc(100vw - 2rem));
	max-height: 85dvh;
	background: var(--paper);
	color: var(--ink);
}
.vrw-dialog::backdrop { background: #0008; }
.vrw-dialog form {
	display: flex; flex-direction: column;
	max-height: 85dvh;
	padding: 1.2rem;
	gap: 0.8rem;
}
.vrw-dialog h3 { margin: 0; color: var(--bark); }
.vrw-dialog textarea {
	flex: 1;
	min-height: 38dvh;
	padding: 0.8rem;
	font: inherit;
	font-size: 16px;
	border: 1px solid var(--line);
	border-radius: 0.55rem;
	resize: vertical;
}
.vrw-dialog input[type="password"], .vrw-dialog input[type="text"] {
	padding: 0.8rem;
	font: inherit;
	font-size: 16px;
	border: 1px solid var(--line);
	border-radius: 0.55rem;
}
.vrw-dialog menu {
	display: flex; justify-content: flex-end; gap: 0.6rem;
	margin: 0; padding: 0; list-style: none;
}
.vrw-dialog button {
	padding: 0.7rem 1.3rem;
	border: 1px solid var(--line);
	background: #fff;
	border-radius: 0.55rem;
	font: inherit;
	cursor: pointer;
	min-height: 44px;
}
.vrw-dialog button.primary { background: var(--tan-deep); color: #fff; border-color: var(--tan-deep); }
.vrw-dialog .vrw-error { color: #c0392b; font-size: 0.85rem; margin: 0; }
.vrw-hint { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }

#vrw-logout-btn {
	position: fixed;
	bottom: calc(1rem + env(safe-area-inset-bottom));
	right: 1rem;
	padding: 0.7rem 1.1rem;
	background: var(--tan-deep);
	color: #fff;
	border: none;
	border-radius: 2rem;
	font: inherit;
	cursor: pointer;
	z-index: 999;
	box-shadow: 0 4px 14px #0005;
}
