/* ==========================================================================
   VISARO — Basis
   --------------------------------------------------------------------------
   Reset, Elementgrundlagen, Typografie und Accessibility.
   Enthält keine Komponenten — die entstehen ab Phase 3B.
   Sämtliche Werte kommen aus tokens.css.
   ========================================================================== */

/* ══ RESET ══════════════════════════════════════════════════════════════ */

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

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

/* ══════════════════════════════════════════════════════════════════════════
   `hidden` heißt versteckt

   Der Browser setzt für `[hidden]` ein `display: none` — aber mit der
   Stärke einer Grundregel. Jede Angabe im Stylesheet schlägt sie, und
   zwar unabhängig davon, ob sie früher oder später steht: `.vis-sizes {
   display: flex }` gewinnt gegen `[hidden]`, weil eine Klasse mehr wiegt
   als ein Attribut in der Browservorgabe.

   Das ist an einem Tag **viermal** passiert: Größenreihe, Hinweiszeile,
   Zurücksetzen-Link und zuletzt die ganze Teamansicht, die sichtbar unter
   der Einzelbestellung stand, obwohl `hidden` am Element hing.

   Jedes Mal war die Ursache dieselbe und die Suche neu. Deshalb steht die
   Regel jetzt einmal hier — mit `!important`, weil genau das der Punkt
   ist: `hidden` soll sich nicht überstimmen lassen.

   Wer etwas ein- und ausblenden und dabei animieren will, nimmt das
   Attribut **vor** der Animation weg; so arbeiten Drawer und Lightbox
   ohnehin schon.
   ══════════════════════════════════════════════════════════════════════════ */

[hidden] { display: none !important; }

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

body {
	margin: 0;
	background: var(--vis-bg);
	color: var(--vis-text);
	font-family: var(--vis-font-sans);
	font-size: var(--vis-fs-body);
	font-weight: var(--vis-fw-regular);
	line-height: var(--vis-lh-body);
	font-synthesis-weight: none;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
	margin: 0;
}

ul[class], ol[class] {
	margin: 0;
	padding: 0;
	list-style: none;
}

img, picture, video, canvas, svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input, button, textarea, select {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: 0;
	cursor: pointer;
}

table {
	border-collapse: collapse;
	width: 100%;
}

hr {
	border: 0;
	border-block-start: var(--vis-border-width) solid var(--vis-border);
	margin-block: var(--vis-space-8);
}

/* ══ TYPOGRAFIE ═════════════════════════════════════════════════════════
   Groß denken, kurz schreiben. Überschriften stehen eng, Fließtext luftig.
   Deutsche Typografie: Silbentrennung an, keine Waisenkinder.          */

h1, h2, h3, h4, h5, h6 {
	font-weight: var(--vis-fw-bold);
	line-height: var(--vis-lh-heading);
	letter-spacing: var(--vis-ls-heading);
	text-wrap: balance;
}

h1 { font-size: var(--vis-fs-h1); }
h2 { font-size: var(--vis-fs-h2); }
h3 { font-size: var(--vis-fs-h3); }
h4 { font-size: var(--vis-fs-h4); }
h5, h6 { font-size: var(--vis-fs-body-l); }

p {
	text-wrap: pretty;
	hyphens: auto;
}

p + p { margin-top: var(--vis-space-4); }

strong, b { font-weight: var(--vis-fw-bold); }

small { font-size: var(--vis-fs-body-s); }

code, kbd, pre, samp {
	font-family: var(--vis-font-mono);
	font-size: 0.9375em;
}

/* Zahlen, Maße und Spec-Zeilen stehen in DM Mono (Design Concept Kap. 27). */
.vis-mono,
.vis-numeric {
	font-family: var(--vis-font-mono);
	font-variant-numeric: tabular-nums;
}

.vis-label {
	font-family: var(--vis-font-mono);
	font-size: var(--vis-fs-label);
	font-weight: var(--vis-fw-medium);
	letter-spacing: var(--vis-ls-label);
	text-transform: uppercase;
	color: var(--vis-text-3);
}

/* ══ LINKS ══════════════════════════════════════════════════════════════ */

a {
	color: var(--vis-accent-text);
	text-decoration-thickness: var(--vis-border-width);
	text-underline-offset: 0.2em;
	transition: color var(--vis-duration-micro) var(--vis-ease-out);
}

a:hover { color: var(--vis-text); }

/* ══ AUSWAHL ════════════════════════════════════════════════════════════ */

::selection {
	background: var(--vis-purple-100);
	color: var(--vis-ink-950);
}

/* ══ ACCESSIBILITY ══════════════════════════════════════════════════════
   Design Concept Kap. 24: Fokus immer sichtbar, Tastaturbedienung
   vollständig, Berührungsziele mindestens 44 px.                      */

:focus-visible {
	outline: var(--vis-focus-width) solid var(--vis-accent);
	outline-offset: var(--vis-focus-offset);
	border-radius: var(--vis-radius-xs);
}

/* Auf dunklem Grund braucht der Fokus einen hellen Ring. */
.vis-on-dark :focus-visible {
	outline-color: var(--vis-white);
}

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

.visaro-skip-link:focus-visible {
	position: fixed !important;
	inset: var(--vis-space-2) auto auto var(--vis-space-2);
	z-index: var(--vis-z-skiplink);
	width: auto;
	height: auto;
	padding: var(--vis-space-3) var(--vis-space-4);
	clip-path: none;
	background: var(--vis-bg-dark);
	color: var(--vis-text-on-dark);
	text-decoration: none;
	border-radius: var(--vis-radius-sm);
}

/* ══ MOTION ═════════════════════════════════════════════════════════════
   Die Dauern stehen bei reduzierter Bewegung bereits auf 1 ms (tokens.css).
   Hier bleibt nur das Sicherheitsnetz für alles, was feste Werte
   mitbringt — etwa Plugin-CSS.                                        */

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

/* ══ DRUCK ══════════════════════════════════════════════════════════════ */

@media print {
	/* Reines Schwarz auf Weiß ist im Druck richtig — hier gelten bewusst
	   nicht die Bildschirm-Tokens. Die einzige Ausnahme im Projekt. */
	.visaro-header,
	.visaro-footer,
	.visaro-skip-link { display: none; }

	body {
		color: #000;
		background: #fff;
	}
}

/* ══════════════════════════════════════════════════════════════════════════
   ENTWICKLUNGSANGABEN AN BILDPLÄTZEN

   Ein Bildplatz ohne Foto trägt Kennung, Motivbeschreibung und teilweise
   „Foto folgt". Das ist die Aufnahmeliste an der Stelle, an der das Foto
   später steht (Non-Negotiable 13) — und für den Besucher Innenleben.

   Wo es darauf ankommt, entscheidet das Template (`shows_specs()`); dort
   entsteht der Text gar nicht erst. Diese Regel ist das **Netz** für die
   übrigen Bausteine: Sie greift ohne weitere Pflege auch für Platzhalter,
   die erst später wieder sichtbar werden, weil jemand ein Feld leert.

   Die Fläche selbst bleibt stehen — sie hält das Seitenverhältnis, und
   ohne sie sprängen die Abschnitte beim Einsetzen echter Fotos.
   ══════════════════════════════════════════════════════════════════════════ */

body:not(.visaro-specs) [class$="__placeholder-id"],
body:not(.visaro-specs) [class$="__placeholder-motif"],
body:not(.visaro-specs) [class$="__placeholder-note"],
body:not(.visaro-specs) [class$="__ph-id"],
body:not(.visaro-specs) [class$="__ph-motif"],
body:not(.visaro-specs) [class$="__ph-ratio"],
body:not(.visaro-specs) [class$="__photo-id"],
body:not(.visaro-specs) [class$="__photo-motif"] {
	display: none;
}

/* ══ EINWILLIGUNG (Complianz) ═══════════════════════════════════════════════
   Das Banner gehört zur Seite, nicht zum Plugin: Navy statt Weiß, kompakt,
   und **Ablehnen so sichtbar wie Akzeptieren** — gleich groß, nebeneinander,
   damit keine Wahl leichter fällt als die andere. Auf dem Telefon eine
   Leiste am unteren Rand statt drei Viertel des Bildschirms.

   Die `!important` sind keine Gewohnheit: In den Complianz-Einstellungen
   von visaro.at liegt eigenes CSS aus der alten Seite, das jede Angabe mit
   `!important` setzt (weiß, eigenes Logo als ::before). Dagegen kommt nur
   dieselbe Stärke an. Texte, Kategorien und Logik bleiben bei Complianz. */

body .cmplz-cookiebanner.cmplz-cookiebanner {
	--cmplz_slider_active_color: var(--vis-purple-500);
	--cmplz_text_color: var(--vis-ink-200);

	font-family: var(--vis-font-sans) !important;
	color: var(--vis-ink-200) !important;
	background: var(--vis-ink-950) !important;
	border: var(--vis-border-width) solid var(--vis-ink-700) !important;
	border-radius: var(--vis-radius-md) !important;
	box-shadow: var(--vis-shadow-modal) !important;
	padding: var(--vis-space-6) !important;
	gap: var(--vis-space-3);
	max-inline-size: 440px !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner::before { content: none !important; display: none !important; }
body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-logo { display: none !important; }

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-header {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	margin: 0 !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-title {
	grid-column: 1;
	text-align: start !important;
	justify-self: start;
	margin: 0 !important;
	color: var(--vis-white) !important;
	font-family: var(--vis-font-sans) !important;
	font-size: var(--vis-fs-body) !important;
	font-weight: var(--vis-fw-bold) !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-close { color: var(--vis-ink-300); }

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-message,
body .cmplz-cookiebanner.cmplz-cookiebanner p {
	color: var(--vis-ink-200) !important;
	font-size: var(--vis-fs-body-s) !important;
	line-height: 1.5 !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner a {
	color: var(--vis-purple-200) !important;
	font-weight: var(--vis-fw-medium) !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner a:hover { color: var(--vis-white) !important; }

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: var(--vis-space-2) !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn {
	inline-size: 100% !important;
	min-block-size: 44px;
	margin: 0 !important;
	padding: var(--vis-space-2) var(--vis-space-4) !important;
	border-radius: var(--vis-radius-sm) !important;
	font-family: var(--vis-font-sans) !important;
	font-size: var(--vis-fs-body-s) !important;
	font-weight: var(--vis-fw-medium) !important;
	transform: none !important;
}

/* Akzeptieren und Ablehnen: gleiche Größe, gleiche Kontur, nur die
   Füllung unterscheidet sich. */
/* Weiß auf #A259FF erreicht nur 3,9:1 — wie jeder Hauptknopf (E243) auf
   der textsicheren Füllung. */
body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn.cmplz-accept {
	background: var(--vis-accent-fill) !important;
	border: var(--vis-border-width) solid var(--vis-accent-fill) !important;
	color: var(--vis-white) !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn.cmplz-accept:hover { background: var(--vis-purple-700) !important; }

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn.cmplz-deny {
	background: transparent !important;
	border: var(--vis-border-width) solid var(--vis-ink-400) !important;
	color: var(--vis-white) !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn.cmplz-deny:hover { border-color: var(--vis-white) !important; }

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences,
body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences {
	grid-column: 1 / -1;
	min-block-size: 36px;
	background: transparent !important;
	border: 0 !important;
	color: var(--vis-ink-300) !important;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences {
	border: var(--vis-border-width) solid var(--vis-ink-400) !important;
	color: var(--vis-white) !important;
	text-decoration: none;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-category {
	background: var(--vis-ink-900) !important;
	color: var(--vis-ink-200) !important;
}

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-category-title { color: var(--vis-white) !important; }

body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-documents a,
body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-links a { font-size: var(--vis-fs-label) !important; }

body .cmplz-cookiebanner.cmplz-cookiebanner :focus-visible {
	outline: 2px solid var(--vis-purple-400) !important;
	outline-offset: 2px;
}

@media (max-width: 767.98px) {
	body .cmplz-cookiebanner.cmplz-cookiebanner {
		inset: auto 0 0 0 !important;
		inline-size: 100% !important;
		max-inline-size: none !important;
		margin: 0 !important;
		border-radius: var(--vis-radius-md) var(--vis-radius-md) 0 0 !important;
		padding: var(--vis-space-5) var(--vis-space-4) !important;
		transform: none !important;
	}

	body .cmplz-cookiebanner.cmplz-cookiebanner .cmplz-message {
		max-block-size: 6em;
		overflow-y: auto;
	}
}

/* „Cookie-Einstellungen" im Fuß: ein Knopf, weil er etwas öffnet und nicht
   wohin führt — aussehen soll er wie die Links daneben. */
.vis-consent-open {
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-decoration: inherit;
	cursor: pointer;
}

.vis-consent-open:hover { text-decoration: underline; }
