/* Startseite von tamonky.software („Werkstatt am Abend“) */
@import url("base.css");

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding-left: max(20px, env(safe-area-inset-left, 0px));
	padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Kopfzeile: klebt oben, wird beim Scrollen zur Glasleiste */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-top: env(safe-area-inset-top, 0px);
	background: rgba(31, 24, 20, 0);
	border-bottom: 1px solid transparent;
	transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
	background: rgba(31, 24, 20, 0.78);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border-bottom-color: var(--line);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.site-header .wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px 24px;
	padding-block: 18px;
}


.site-header nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.site-header nav a {
	position: relative;
	color: var(--muted);
	font-weight: 700;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 999px;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.site-header nav a:hover { color: var(--fg); background: rgba(244, 232, 219, 0.06); }

.site-header nav a.is-active { color: var(--fg); }

.site-header nav a.is-active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 2px;
	width: 5px;
	height: 5px;
	margin-left: -2.5px;
	border-radius: 50%;
	background: var(--amber);
}

.site-header nav a.nav-cta {
	color: var(--bg);
	background: var(--amber);
	margin-left: 8px;
	font-weight: 800;
}

.site-header nav a.nav-cta:hover { background: #f6b964; color: var(--bg); }

.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: 12px;
	background: transparent;
	cursor: pointer;
	position: relative;
}

.menu-toggle span {
	position: absolute;
	left: 12px;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--fg);
	transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }

.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Abschnitte nicht unter der Kopfzeile verstecken */
section[id] { scroll-margin-top: 72px; }

@media (max-width: 760px) {
	.site-header .wrap { flex-wrap: wrap; }

	.menu-toggle { display: block; }

	.site-header nav {
		display: none;
		flex-basis: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 4px;
		padding-block: 8px 6px;
	}

	.menu-open nav { display: flex; }

	.site-header.menu-open { background: rgba(31, 24, 20, 0.97); }

	.site-header nav a { padding: 12px 14px; border-radius: 12px; }

	.site-header nav a.is-active::after { left: auto; right: 16px; bottom: 50%; margin: 0 0 -2.5px; }

	.site-header nav a.nav-cta { margin: 6px 0 0; text-align: center; }
}

/* Hero */
.hero .wrap {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	gap: 40px;
	align-items: center;
	padding-block: 32px 72px;
}

.eyebrow {
	color: var(--amber);
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	font-size: 0.8rem;
	margin: 0;
}

.hero h1 {
	font-size: clamp(2.4rem, 5.6vw, 4rem);
	font-weight: 800;
	margin: 12px 0 18px;
}

.hero h1 em { font-style: normal; color: var(--amber); }

.lead {
	color: var(--muted);
	font-size: 1.15rem;
	max-width: 46ch;
	margin: 0 0 28px;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--amber);
	color: var(--bg);
	font-weight: 800;
	padding: 13px 24px;
	border-radius: 14px;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(242, 168, 75, 0.3); }

/* Noch nicht veröffentlicht: sieht aus wie ein Button, ist aber kein Link */
.btn.is-soon { background: transparent; color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber); padding: 13px 22px; cursor: default; opacity: 0.85; }
.btn.is-soon:hover { transform: none; box-shadow: inset 0 0 0 2px var(--amber); }

.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--fg);
	font-weight: 800;
	padding: 11px 20px;
	border: 2px solid var(--line-strong);
	border-radius: 14px;
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.btn-ghost:hover { border-color: var(--amber); }

.btn svg, .btn-ghost svg { width: 18px; height: 18px; flex: none; }

.text-link {
	color: var(--fg);
	font-weight: 800;
	text-decoration: none;
	border-bottom: 2px solid var(--amber);
}

/* Werkstatt-Haus (wird von house.js gezeichnet) */
.house { margin: 0; min-width: 0; }

.house-stage { position: relative; }

.house-svg { display: block; width: 100%; height: auto; }

/* Info-Zeile unter dem Haus: feste Höhe, damit nichts springt */
.house figcaption {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px 10px;
	min-height: 3.2em;
	margin-top: 10px;
	text-align: center;
	color: var(--muted);
	font-size: 0.92rem;
}

.house figcaption b { font-family: var(--font-display); color: var(--fg); font-size: 1rem; }

.house figcaption em { font-style: normal; font-weight: 800; color: var(--amber); }

.house figcaption span {
	font-size: 0.75rem;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 5px;
	background: rgba(244, 232, 219, 0.08);
	color: var(--fg);
}

.house .star { animation: twinkle 5s ease-in-out infinite; }

@keyframes twinkle {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.3; }
}

/* Rauch: weiche Wölkchen, die langsam aufsteigen und nach rechts abziehen */
.house .puff {
	transform-box: fill-box;
	transform-origin: center;
	opacity: 0;
	animation-name: smoke;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

@keyframes smoke {
	0%   { opacity: 0;    transform: translate(0, 4px) scale(0.35); }
	8%   { opacity: 0.75; transform: translate(0, -6px) scale(0.55); }
	30%  { opacity: 0.6;  transform: translate(5px, -26px) scale(0.95); }
	55%  { opacity: 0.4;  transform: translate(16px, -48px) scale(1.4); }
	80%  { opacity: 0.18; transform: translate(32px, -70px) scale(1.9); }
	100% { opacity: 0;    transform: translate(48px, -90px) scale(2.4); }
}

/* Fenster: ruhige Übergänge, nichts wackelt */
.house .win { cursor: pointer; outline: none; }

.house .win-glow,
.house .leak {
	animation: window-pulse 4s ease-in-out infinite;
	transition: filter 0.6s ease;
}

.house .leak { animation-duration: 3.2s; }

@keyframes window-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

/* hideaway: Blick ins Zimmer und dampfende Tasse */
.house .room { transition: filter 0.6s ease; }

.house .lamp-light { animation: window-pulse 5s ease-in-out infinite; }

.house .win:hover .room,
.house .win:focus-visible .room { filter: brightness(1.18); }

.house .wisp {
	opacity: 0;
	animation: wisp 3.2s ease-out infinite;
}

.house .wisp-2 { animation-delay: 1.6s; }

@keyframes wisp {
	0% { opacity: 0; transform: translateY(2px); }
	30% { opacity: 0.7; }
	100% { opacity: 0; transform: translateY(-6px); }
}

/* beim Überfahren etwas heller, das Pulsieren läuft ruhig weiter */
.house .win:hover .win-glow,
.house .win:focus-visible .win-glow,
.house .win:hover .leak,
.house .win:focus-visible .leak { filter: brightness(1.35) saturate(1.1); }

.house-tip {
	position: absolute;
	z-index: 5;
	left: 0;
	top: 0;
	width: max-content;
	max-width: 240px;
	padding: 10px 14px;
	background: rgba(42, 33, 27, 0.96);
	border: 1px solid var(--line-strong);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	pointer-events: none;
	text-align: left;
	font-size: 0.85rem;
	opacity: 0;
	transform: translate(-50%, calc(-100% - 6px));
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.house-tip.is-visible { opacity: 1; transform: translate(-50%, calc(-100% - 10px)); }

.house-tip b { display: block; font-family: var(--font-display); font-size: 1rem; }

.house-tip em { font-style: normal; color: var(--amber); font-weight: 700; }

.house-tip div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

.house-tip span {
	font-size: 0.72rem;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 5px;
	background: rgba(244, 232, 219, 0.1);
	color: var(--fg);
}

.house .shutter { transition: transform 0.6s ease; }

.house .win-closed:hover .shutter-l,
.house .win-closed:focus-visible .shutter-l { transform: translateX(-5px); }

.house .win-closed:hover .shutter-r,
.house .win-closed:focus-visible .shutter-r { transform: translateX(5px); }

.house .focus-ring { stroke: transparent; stroke-width: 2.5; }

.house .win:focus-visible .focus-ring { stroke: var(--amber); }

/* Haustür: der Affe schaut beim Überfahren kurz durchs Türfenster */
.house .door { cursor: default; }

.house .monkey {
	transform: translateY(17px);
	transition: transform 0.6s ease;
}

.house .door.is-peeking .monkey { transform: translateY(2px); }

.house .win-logo { opacity: 0.85; }

/* Garage: Licht wird per Skript gesteuert, hier nur weiche Übergänge */
.house .warm { transition: opacity 0.5s ease; }

.house .weld { opacity: 0; }

/* Abschnitte */
.section .wrap {
	padding-block: 64px;
	border-top: 1px solid var(--line);
}

.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); margin: 0 0 8px; }

.section-intro { color: var(--muted); margin: 0 0 28px; max-width: 60ch; }

/* Projekt-Kachel */
.project {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 24px;
	overflow: hidden;
}

.project-art {
	position: relative;
	min-height: 240px;
	background: #2f231c;
	overflow: hidden;
}

.project-art img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 0% 50%;
}

/* Bilder aus dem Spiel */
.shots {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 12px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.shots a {
	position: relative;
	display: block;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--line);
	text-decoration: none;
}

.shots img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 0.4s ease;
}

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

.shots span {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px 12px 8px;
	font-weight: 800;
	font-size: 0.9rem;
	color: var(--fg);
	background: linear-gradient(transparent, rgba(24, 18, 15, 0.85));
}

.project-body {
	display: grid;
	gap: 14px;
	align-content: center;
	padding: clamp(24px, 4vw, 40px);
	min-width: 0;
}

.project-body h3 { font-size: 1.8rem; margin: 0; }

.project-body p { color: var(--muted); margin: 0; }

.status {
	display: inline-block;
	width: max-content;
	font-size: 0.75rem;
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bg);
	background: var(--sage);
	border-radius: 6px;
	padding: 3px 9px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.chips li {
	font-size: 0.88rem;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 5px 12px;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

.tags li {
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	padding: 3px 10px;
	border-radius: 6px;
	background: var(--amber-soft);
	color: var(--amber);
}

.subhead {
	font-size: 1.25rem;
	margin: 44px 0 16px;
	color: var(--muted);
}

.upcoming {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
	gap: 16px;
}

.upcoming-card {
	display: grid;
	gap: 10px;
	align-content: start;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 22px 24px;
	background: linear-gradient(180deg, rgba(42, 33, 27, 0.7), rgba(31, 24, 20, 0.7));
	min-width: 0;
}

.upcoming-card h3 { margin: 0; font-size: 1.2rem; }

.upcoming-card p { margin: 0; color: var(--muted); }

.upcoming-card .tags li { background: color-mix(in srgb, var(--c, var(--amber)) 16%, transparent); color: var(--c, var(--amber)); }

.upcoming-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.shutters { display: flex; gap: 2px; padding: 3px; border-radius: 6px; background: var(--c, var(--amber)); box-shadow: 0 0 14px color-mix(in srgb, var(--c, var(--amber)) 45%, transparent); }

.shutters i {
	display: block;
	width: 14px;
	height: 22px;
	border-radius: 2px;
	background: repeating-linear-gradient(180deg, #4a3628 0 4px, #3b2f26 4px 5px);
}

.status-building { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }

.project, .upcoming-card { scroll-margin-top: 90px; }

.is-highlight { animation: highlight 1.6s ease-out; }

@keyframes highlight {
	0% { box-shadow: 0 0 0 0 rgba(242, 168, 75, 0); }
	25% { box-shadow: 0 0 0 4px rgba(242, 168, 75, 0.7), 0 0 40px rgba(242, 168, 75, 0.3); }
	100% { box-shadow: 0 0 0 0 rgba(242, 168, 75, 0); }
}

/* Grundsätze */
.values {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 28px;
}

.value-icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: var(--amber-soft);
	color: var(--amber);
	margin-bottom: 14px;
}

.value-icon svg { width: 22px; height: 22px; }

.values h3 { font-size: 1.2rem; margin: 0 0 6px; }

.values p { color: var(--muted); margin: 0; }

/* Kontakt */
.contact {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(22px, 4vw, 36px);
}

.contact h2 { margin: 0 0 4px; }

.contact p { color: var(--muted); margin: 0; }

.contact-mail {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.2rem;
	color: var(--amber);
	overflow-wrap: anywhere;
}

/* Bildansicht */
.shots a { cursor: zoom-in; }

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
	background: rgba(18, 13, 10, 0.92);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.lightbox[hidden] { display: none; }

.lightbox.is-visible { opacity: 1; }

html.lb-open { overflow: hidden; }

.lb-figure {
	margin: 0;
	display: grid;
	justify-items: center;
	gap: 12px;
	min-width: 0;
	height: 100%;
	align-content: center;
}

.lb-img {
	max-width: 100%;
	max-height: calc(100vh - 140px);
	width: auto;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	opacity: 0;
	transform: scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.lb-img.is-loaded { opacity: 1; transform: none; }

.lb-caption { color: var(--muted); font-weight: 700; white-space: pre; }

.lb-nav, .lb-close {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--line-strong);
	background: rgba(42, 33, 27, 0.85);
	color: var(--fg);
	font: 700 1.8rem/1 var(--font-display);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.lb-nav:hover, .lb-close:hover { border-color: var(--amber); color: var(--amber); }

.lb-close {
	position: absolute;
	top: max(16px, env(safe-area-inset-top, 0px));
	right: max(16px, env(safe-area-inset-right, 0px));
	z-index: 1;
}

@media (max-width: 640px) {
	.lightbox { grid-template-columns: minmax(0, 1fr); }
	.lb-nav { position: absolute; bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
	.lb-prev { left: max(16px, env(safe-area-inset-left, 0px)); }
	.lb-next { right: max(16px, env(safe-area-inset-right, 0px)); }
}

/* Fußzeile */
.site-footer .wrap {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 24px;
	padding-block: 26px 36px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9rem;
}

.site-footer nav { display: flex; gap: 20px; }

.site-footer a { color: var(--muted); }

.site-footer a:hover { color: var(--fg); }
