/* ==========================================================
   artpunkt – Sarah Wruss
   ========================================================== */

/* ---------- Dunkler Modus ---------- */
html[data-theme="dark"] {
	--wp--preset--color--paper: #0F0F0F;
	--wp--preset--color--ink: #ECE9E3;
	--wp--preset--color--muted: #A9A49C;
	--wp--preset--color--line: #3A3835;
}
html[data-theme="dark"] body { color-scheme: dark; }
body { transition: background-color .3s ease, color .3s ease; }

/* ---------- Körnung über der ganzen Seite ---------- */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 50;
	pointer-events: none;
	opacity: .12;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .09; filter: invert(1); }
.editor-styles-wrapper::before { display: none; }

/* ---------- Kleine Helfer ---------- */
.aw-kicker {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.aw-muted { color: var(--wp--preset--color--muted); }
.aw-lead {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
	letter-spacing: -.02em;
	max-width: 24ch;
}
.aw-placeholder {
	border: 1.5px dashed var(--wp--preset--color--muted);
	padding: 2rem 1.2rem;
	text-align: center;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.aw-display {
	font-size: clamp(3rem, 14vw, 6rem) !important;
	line-height: .92 !important;
	letter-spacing: -.035em !important;
}
.aw-section { padding-top: clamp(3rem, 8vw, 5.5rem); padding-bottom: 1rem; }
.aw-pagehead { padding-top: 2.2rem; }
.aw-main { padding-bottom: 3rem; }

/* ---------- Header ---------- */
.aw-header {
	max-width: 1180px;
	margin: 0 auto !important;
	padding: 14px 18px !important;
	box-sizing: border-box;
	align-items: center;
}
.aw-logo { margin: 0; }
.aw-logo a {
	display: inline-flex;
	align-items: flex-end;
	border: 2.5px solid currentColor;
	padding: 14px 6px 2px 10px;
	font-weight: 700;
	font-size: 17px;
	line-height: 1;
	text-decoration: none;
	transform: rotate(-1.5deg);
}
.aw-nav { gap: 14px !important; align-items: center; }
.aw-menu { font-size: 13px; text-transform: lowercase; gap: 16px !important; }
.aw-menu a { text-decoration: none; }
.aw-menu .current-menu-item a, .aw-menu a[aria-current] { text-decoration: underline; }
.aw-theme-toggle {
	width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	background: transparent; border: 0; padding: 0;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}

/* ---------- Footer ---------- */
.aw-footer {
	max-width: 1180px;
	margin: 0 auto !important;
	padding: 36px 18px 48px !important;
	box-sizing: border-box;
	font-size: 13px;
}
.aw-footer p { margin: 0; }

/* ---------- Video ganz oben (grauer Schleier) ---------- */
.aw-hero { color: #F1EEE8; overflow: hidden; }
.aw-hero .wp-block-cover__video-background { filter: saturate(.6) contrast(.9) brightness(.95); }
.aw-hero::after {
	content: "";
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%);
}
.aw-hero .wp-block-cover__inner-container { z-index: 2; max-width: 1180px; margin: 0 auto; }
.aw-hero .wp-block-cover__inner-container * { color: #F1EEE8; }
.aw-hero .aw-kicker { color: #F1EEE8; }
.aw-hero p:not(.aw-kicker) { max-width: 32ch; }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-torn .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-ink) !important;
	padding: 16px 26px 16px 22px;
	transform: rotate(-1.2deg);
	clip-path: polygon(0 6%,6% 0,14% 5%,23% 1%,31% 6%,42% 0,51% 4%,60% 1%,70% 6%,79% 0,88% 5%,96% 1%,100% 8%,99% 40%,100% 72%,97% 100%,88% 95%,77% 100%,66% 94%,55% 100%,44% 95%,33% 100%,22% 94%,12% 100%,3% 95%,0 70%,1% 38%);
	text-decoration: none;
}
.wp-block-button.aw-invert .wp-block-button__link {
	background: var(--wp--preset--color--accent-ink);
	color: var(--wp--preset--color--accent) !important;
}
.wp-block-button__link { min-height: 44px; }

/* ---------- Anfrage-Band mit gerissener Kante ---------- */
.is-style-torn-band {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-ink);
	padding-top: 64px !important;
	padding-bottom: 56px !important;
	margin-top: 4rem !important;
	clip-path: polygon(0 10px,4% 3px,7% 12px,11% 5px,15% 14px,19% 2px,23% 9px,27% 4px,31% 13px,36% 6px,40% 11px,44% 1px,48% 8px,53% 14px,57% 5px,61% 10px,65% 2px,70% 12px,74% 6px,78% 13px,83% 3px,87% 10px,91% 4px,95% 12px,100% 6px,100% 100%,0 100%);
}
.is-style-torn-band, .is-style-torn-band * { color: var(--wp--preset--color--accent-ink); }
.is-style-torn-band h2 { font-size: clamp(2rem, 8vw, 3rem); }

/* ---------- Papier-Videos ---------- */
.aw-paper-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 32px;
}
.aw-paper-grid > * { margin: 0 !important; }
.wp-block-video.is-style-paper-reveal { margin: 0; }
.wp-block-video.is-style-paper-reveal video {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: #111;
	display: block;
	cursor: pointer;
}
.aw-paper-grid > *:nth-child(1) video { transform: rotate(-.6deg); }
.aw-paper-grid > *:nth-child(2) video { transform: rotate(.5deg); }
.aw-paper-grid > *:nth-child(3) video { transform: rotate(-.3deg); }
.wp-block-video.is-style-paper-reveal figcaption { text-align: left; margin-top: 10px; }

/* ---------- Klebestreifen ---------- */
.aw-tape-host { position: relative; }
.is-style-collage .wp-block-image:nth-child(3n+1)::after,
.is-style-stack > .wp-block-image:nth-child(odd)::after,
.wp-block-image.is-style-taped::after {
	content: "";
	position: absolute;
	top: -10px; left: 50%;
	width: 62px; height: 20px;
	margin-left: -31px;
	background: rgba(236, 230, 214, .82);
	box-shadow: 0 1px 2px rgba(0,0,0,.12);
	transform: rotate(-5deg);
	z-index: 2;
	pointer-events: none;
}
.is-style-collage .wp-block-image:nth-child(6n+4)::after { transform: rotate(4deg); }

/* ---------- Collage (Startseite) ---------- */
.wp-block-gallery.is-style-collage.has-nested-images {
	display: block !important;
	column-width: 150px;
	column-gap: 14px;
}
.wp-block-gallery.is-style-collage.has-nested-images figure.wp-block-image:not(#individual-image) {
	--tilt: -1.4deg;
	position: relative;
	display: block;
	width: 100% !important;
	margin: 0 0 18px !important;
	break-inside: avoid;
	transform: rotate(var(--tilt));
	box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.is-style-collage figure.wp-block-image:nth-child(8n+2) { --tilt: .9deg; }
.is-style-collage figure.wp-block-image:nth-child(8n+3) { --tilt: -.5deg; }
.is-style-collage figure.wp-block-image:nth-child(8n+4) { --tilt: 1.3deg; }
.is-style-collage figure.wp-block-image:nth-child(8n+5) { --tilt: -.9deg; }
.is-style-collage figure.wp-block-image:nth-child(8n+6) { --tilt: .5deg; }
.is-style-collage figure.wp-block-image:nth-child(8n+7) { --tilt: 1.1deg; }
.is-style-collage figure.wp-block-image:nth-child(8n+8) { --tilt: -1.1deg; }
.wp-block-gallery.is-style-collage.has-nested-images figure.wp-block-image img {
	width: 100% !important;
	height: auto !important;
	object-fit: initial !important;
}

/* ---------- Galerie groß ---------- */
.is-style-stack { display: flex; flex-direction: column; gap: 56px; }
.is-style-stack > .wp-block-image { position: relative; margin: 0 !important; }
.is-style-stack > .wp-block-image img { width: 100%; height: auto; box-shadow: 0 10px 28px rgba(0,0,0,.16); }
.is-style-stack > .wp-block-image:nth-child(4n+3)::after { left: 22%; transform: rotate(3deg); }
.wp-block-image.is-style-taped { position: relative; }
.wp-block-image.is-style-taped img { transform: rotate(-.8deg); box-shadow: 0 10px 28px rgba(0,0,0,.18); filter: saturate(.75); }

/* ---------- Über-mich-Liste ---------- */
.aw-facts { list-style: none; padding: 0 !important; border-top: 1px solid var(--wp--preset--color--ink); }
.aw-facts li {
	display: grid;
	grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.aw-facts strong { font-weight: 400; color: var(--wp--preset--color--muted); }

/* ---------- Verschwimm-Effekt beim Scrollen ---------- */
.aw-js .is-style-collage figure.wp-block-image,
.aw-js .is-style-stack > .wp-block-image {
	opacity: .06;
	filter: blur(6px) grayscale(1);
	transition: opacity .9s ease, transform .9s ease, filter .9s ease;
}
.aw-js .is-style-stack > .wp-block-image { transform: translateY(40px) scale(.98); }
.aw-js .wp-block-gallery.is-style-collage.has-nested-images figure.wp-block-image:not(#individual-image) {
	transform: rotate(var(--tilt)) translateY(30px) scale(.97);
}
.aw-js .is-style-collage figure.wp-block-image.is-in,
.aw-js .is-style-stack > .wp-block-image.is-in { opacity: 1; filter: none; }
.aw-js .is-style-stack > .wp-block-image.is-in { transform: none; }
.aw-js .wp-block-gallery.is-style-collage.has-nested-images figure.wp-block-image.is-in:not(#individual-image) {
	transform: rotate(var(--tilt));
}

/* Im Editor und bei „weniger Bewegung“ alles sofort zeigen */
.editor-styles-wrapper .is-style-collage figure.wp-block-image,
.editor-styles-wrapper .is-style-stack > .wp-block-image { opacity: 1 !important; filter: none !important; }
@media (prefers-reduced-motion: reduce) {
	.aw-js .is-style-collage figure.wp-block-image,
	.aw-js .is-style-stack > .wp-block-image { opacity: 1; filter: none; transition: none; }
	.aw-js .is-style-stack > .wp-block-image { transform: none; }
}

/* ---------- Wanna-dos ---------- */
.wp-block-gallery.is-style-collage.has-nested-images figure.wp-block-image figcaption {
	position: static !important;
	background: none !important;
	color: var(--wp--preset--color--muted) !important;
	text-shadow: none !important;
	padding: 8px 2px 0 !important;
	max-height: none !important;
	overflow: visible !important;
	font-size: 12px;
	text-align: left;
	-webkit-mask-image: none !important;
	mask-image: none !important;
	backdrop-filter: none !important;
}
.wp-block-gallery.is-style-collage.has-nested-images figure.wp-block-image:has(figcaption) {
	background: var(--wp--preset--color--paper);
	padding: 8px 8px 10px;
	box-sizing: border-box;
}
.aw-wannados.has-nested-images { column-width: 220px !important; column-gap: 22px !important; }
.wp-block-image.is-style-taken { position: relative; }
.wp-block-image.is-style-taken img { filter: grayscale(1) opacity(.55); }
.wp-block-image.is-style-taken::before,
.editor-styles-wrapper .wp-block-image.is-style-taken::before {
	content: "vergeben" !important;
	position: absolute !important;
	top: 40% !important; left: 50% !important; right: auto !important; bottom: auto !important;
	width: auto !important; height: auto !important;
	display: block !important;
	white-space: nowrap;
	line-height: 1.2;
	transform: translate(-50%, -50%) rotate(-12deg) !important;
	z-index: 3;
	padding: 6px 14px !important;
	border: 3px solid #C0392B !important;
	color: #C0392B;
	font-family: "IBM Plex Mono", monospace;
	font-weight: 700;
	font-size: 20px;
	letter-spacing: .08em;
	text-transform: uppercase;
	background: rgba(236, 233, 227, .75) !important;
	box-shadow: none !important;
	pointer-events: none;
}
.aw-steps { padding-left: 1.4em; }
.aw-steps li { margin-bottom: .5em; }

/* ---------- Collage als ein Paket (Spalten per JS) ---------- */
.wp-block-gallery.is-style-collage.has-nested-images {
	max-width: 900px;
	margin-left: auto !important;
	margin-right: auto !important;
}
.wp-block-gallery.is-style-collage.aw-wannados.has-nested-images { max-width: 1000px; }
.wp-block-gallery.is-style-collage.has-nested-images.aw-masonry {
	display: flex !important;
	align-items: flex-start;
	gap: 14px;
	column-width: auto !important;
}
.aw-wannados.aw-masonry { gap: 22px !important; }
.aw-masonry > .aw-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.aw-masonry .aw-col:nth-child(even) { padding-top: 22px; }
/* Klebestreifen in der JS-Collage nach Reihenfolge statt Spalte */
.wp-block-gallery.is-style-collage.aw-masonry figure.wp-block-image:not(.aw-tape)::after { content: none; }
.aw-masonry figure.wp-block-image.aw-tape::after {
	content: "";
	position: absolute; top: -10px; left: 50%;
	width: 62px; height: 20px; margin-left: -31px;
	background: rgba(236, 230, 214, .82);
	box-shadow: 0 1px 2px rgba(0,0,0,.12);
	transform: rotate(-5deg); z-index: 2; pointer-events: none;
}
.aw-masonry figure.wp-block-image.aw-tape-r::after { transform: rotate(4deg); }

/* Im Editor: Collage einfach als Spalten zeigen (die Sortierung passiert erst auf der Website) */
.editor-styles-wrapper .wp-block-gallery.is-style-collage.has-nested-images figure.wp-block-image { transform: rotate(var(--tilt, 0deg)) !important; }

/* ---------- Menü + Sprachschalter ---------- */
.aw-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.aw-menu a { text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.aw-menu a[aria-current="page"] { text-decoration: underline; }
.aw-lang { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--wp--preset--color--muted); }
.aw-lang a { text-decoration: none; color: var(--wp--preset--color--muted); min-height: 32px; display: inline-flex; align-items: center; padding: 0 2px; }
.aw-lang a:hover { color: var(--wp--preset--color--ink); }
.aw-lang .is-current { color: var(--wp--preset--color--ink); text-decoration: underline; }
html[lang^="en"] .wp-block-image.is-style-taken::before,
html[lang^="en"] .editor-styles-wrapper .wp-block-image.is-style-taken::before { content: "taken" !important; }

/* ---------- Logo im dunklen Modus hell ---------- */
html[data-theme="dark"] .wp-block-site-logo img,
html[data-theme="dark"] .aw-header .wp-block-image img,
html[data-theme="dark"] .aw-header > a img { filter: invert(1); }
.wp-block-site-logo img { transition: filter .3s ease; }

/* ---------- Handy: Menü neben dem Logo ---------- */
@media (max-width: 700px) {
	.aw-header {
		flex-wrap: nowrap !important;
		align-items: flex-start !important;
		gap: 14px !important;
		padding-top: 12px !important;
		padding-bottom: 8px !important;
	}
	.aw-header > .wp-block-site-logo,
	.aw-header > .aw-logo,
	.aw-header > figure,
	.aw-header > .wp-block-image { flex: 0 0 auto; margin: 0 !important; }
	.aw-header .wp-block-site-logo img,
	.aw-header > figure img,
	.aw-header > .wp-block-image img { width: 58px !important; height: auto !important; max-width: none; }
	.aw-header .aw-logo a { font-size: 14px; padding: 11px 5px 2px 8px; }
	.aw-nav {
		flex: 1 1 auto !important;
		min-width: 0;
		justify-content: flex-end !important;
		align-items: center !important;
		row-gap: 2px !important;
		column-gap: 12px !important;
	}
	.aw-nav > .aw-menu { flex: 1 0 100%; }
	.aw-menu ul { justify-content: flex-end; gap: 0 13px; font-size: 13px; }
	.aw-menu a { min-height: 30px; }
	.aw-lang { font-size: 12px; gap: 4px; }
	.aw-lang a, .aw-lang .is-current { min-height: 30px; display: inline-flex; align-items: center; }
	.aw-theme-toggle { width: 34px; height: 34px; }
	.aw-theme-toggle svg { width: 19px; height: 19px; }
}


/* ==========================================================
   1.4 – Hover, Fokus, Raster, Pause-Knopf
   ========================================================== */

/* Menü + Links: Hover */
.aw-menu a, .aw-lang a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.aw-menu a:hover, .aw-lang a:hover { text-decoration: underline; }

/* Buttons: Hover – leicht dunkler, minimal verrutscht wie Papier */
.wp-block-button__link { transition: filter .2s ease, transform .2s ease; }
.wp-block-button__link:hover { filter: brightness(.9); }
.wp-block-button.is-style-torn .wp-block-button__link:hover { transform: rotate(-.4deg) translate(-1px, -2px); }
.aw-theme-toggle:hover, .aw-hero-pause:hover { opacity: .75; }

/* Tastatur-Fokus: sichtbarer Rahmen (nur bei Tastatur, nicht beim Tippen) */
:where(a, button, input, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
	border-radius: 1px;
}
/* Papier-Buttons: der Riss schneidet den Rahmen ab – deshalb Rahmen um den äußeren Block */
.wp-block-button.is-style-torn .wp-block-button__link:focus-visible { outline: none; }
.wp-block-button.is-style-torn:has(.wp-block-button__link:focus-visible) {
	outline: 2px dashed var(--wp--preset--color--ink);
	outline-offset: 6px;
}
.is-style-torn-band :where(a, button):focus-visible,
.is-style-torn-band .wp-block-button.is-style-torn:has(.wp-block-button__link:focus-visible) { outline-color: var(--wp--preset--color--accent-ink); }
.aw-hero :where(a, button):focus-visible,
.aw-hero .wp-block-button.is-style-torn:has(.wp-block-button__link:focus-visible) { outline-color: #F1EEE8; }
.is-style-collage a:focus-visible img, .is-style-stack a:focus-visible img { outline: 2px solid var(--wp--preset--color--ink); outline-offset: 4px; }

/* Pause-Knopf im Video oben: unsichtbar, solange das Video läuft.
   Erscheint, wenn angehalten (▶) oder per Tastatur angesprungen. Antippen des Videos hält es an. */
.aw-hero { cursor: pointer; }
.aw-hero .wp-block-cover__inner-container { cursor: auto; }
.aw-hero-pause {
	position: absolute;
	right: 14px; bottom: 14px;
	z-index: 3;
	width: 44px; height: 44px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%;
	background: rgba(20, 20, 20, .35);
	color: #F1EEE8;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
}
.aw-hero.is-paused .aw-hero-pause { opacity: .8; pointer-events: auto; }
.aw-hero-pause:focus-visible { opacity: 1; pointer-events: auto; }

/* Gestaltungsraster: Texte immer auf der Textbreite, Galerien breit, Video ganz breit */
.aw-section.alignwide > :where(h1, h2, h3, p, ul, ol, .wp-block-buttons),
.is-style-torn-band > * {
	max-width: var(--wp--style--global--content-size, 760px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
.wp-block-gallery.is-style-collage.has-nested-images { max-width: var(--wp--style--global--wide-size, 1180px); }
.aw-hero .wp-block-cover__inner-container { max-width: var(--wp--style--global--content-size, 760px); }
.aw-hero .wp-block-cover__inner-container > * { margin-left: 0; }

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link, .aw-hero-pause, body { transition: none !important; }
	.wp-block-button.is-style-torn .wp-block-button__link:hover { transform: rotate(-1.2deg); }
}
