/*
 * HAC Digitale Visitenkarte – Frontend
 * Farben, Schrift und Formensprache nach Head and Code Brand Manual v1.0
 */

/* Montserrat lokal (SIL OFL 1.1) – keine Verbindung zu Google */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
	/* Brand Manual – Farben */
	--hac-blauviolett: #2e2382;
	--hac-magenta: #e5007d;
	--hac-gelb: #ffdd00;
	--hac-violett-50: #9184be;
	--hac-violett-30: #bcb4da;
	--hac-violett-10: #e8e6f4;
	--hac-grau-05: #f6f6f6;
	--hac-grau-10: #ececec;
	--hac-grau-20: #dadada;
	--hac-grau-75: #626262;
	--hac-schwarz: #000000;
	--hac-weiss: #ffffff;

	--hacv-max: 1080px;
	--hacv-pad: clamp(20px, 5vw, 56px);
}

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

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

body.hacv {
	margin: 0;
	min-height: 100vh;
	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--hac-schwarz);
	background: var(--hac-grau-05);
	-webkit-font-smoothing: antialiased;
	padding-bottom: env(safe-area-inset-bottom);
}

.hacv a { color: inherit; }
.hacv img { max-width: 100%; display: block; }
.hacv h1, .hacv h2, .hacv p { margin: 0; }

.hacv :focus-visible {
	outline: 3px solid var(--hac-magenta);
	outline-offset: 3px;
}

/* ---------- Kopf mit Logo ---------- */

.hacv-top {
	max-width: var(--hacv-max);
	margin: 0 auto;
	padding: 24px var(--hacv-pad) 22px;
}
.hacv-logo { display: inline-block; }
.hacv-logo img { height: 26px; width: auto; }

/* ---------- Karte ---------- */

.hacv-card {
	max-width: var(--hacv-max);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr;
	background: var(--hac-weiss);
}

/* Identität: Blauviolett, Foto mit versetztem Quadrat aus der Bildmarke */

.hacv-id {
	background: var(--hac-blauviolett);
	color: var(--hac-weiss);
	padding: 32px var(--hacv-pad) 36px;
}
.hacv-id :focus-visible { outline-color: var(--hac-gelb); }

.hacv-photo {
	position: relative;
	width: 148px;
	aspect-ratio: 1;
	margin: 0 0 28px 0;
}
.hacv-photo::before {
	/* hellviolettes Quadrat – greift das Raster der HC-Bildmarke auf */
	content: "";
	position: absolute;
	width: 34%;
	aspect-ratio: 1;
	right: -12%;
	bottom: -12%;
	background: var(--hac-violett-30);
}
.hacv-photo img,
.hacv-initials {
	position: relative;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 20%;
	background: var(--hac-violett-10);
}
.hacv-initials {
	display: grid;
	place-items: center;
	background: var(--hac-violett-50);
	font-weight: 800;
	font-size: 2.6rem;
	letter-spacing: 0.04em;
	color: var(--hac-weiss);
}

.hacv-name {
	font-weight: 800;
	font-size: clamp(1.75rem, 6.5vw, 2.5rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
}
.hacv-role {
	margin-top: 12px !important;
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-weight: 600;
	font-size: 1.0625rem;
	color: var(--hac-violett-30);
}
.hacv-role span:first-child { color: var(--hac-weiss); }
.hacv-company {
	margin-top: 24px !important;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 0.9375rem;
	color: var(--hac-violett-30);
}

/* Kontaktliste */

.hacv-details {
	padding: 12px var(--hacv-pad) 40px;
	display: flex;
	flex-direction: column;
}

.hacv-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.hacv-list li + li { border-top: 1px solid var(--hac-grau-10); }

.hacv-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	text-decoration: none;
	min-height: 72px;
}
.hacv-tile {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	background: var(--hac-violett-10);
	color: var(--hac-blauviolett);
	transition: background-color 0.15s ease, color 0.15s ease;
}
.hacv-icon { width: 18px; height: 18px; }
.hacv-row-text { display: flex; flex-direction: column; min-width: 0; }
.hacv-row-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--hac-grau-75);
}
.hacv-row-value {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--hac-blauviolett);
	overflow-wrap: anywhere;
}
.hacv-row:hover .hacv-tile {
	background: var(--hac-blauviolett);
	color: var(--hac-weiss);
}
.hacv-row:hover .hacv-row-value { color: var(--hac-magenta); }

/* Kontakt speichern: QR + Buttons */

.hacv-save {
	margin-top: 24px;
	padding-top: 32px;
	border-top: 2px solid var(--hac-blauviolett);
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	justify-items: center;
	text-align: center;
}
.hacv-qr {
	width: min(240px, 70vw);
	aspect-ratio: 1;
	padding: 12px;
	background: var(--hac-weiss);
	border: 1px solid var(--hac-grau-20);
}
.hacv-qr svg { display: block; width: 100%; height: 100%; }
.hacv-qr noscript p { font-size: 0.8125rem; color: var(--hac-grau-75); }

.hacv-save-text h2 {
	font-weight: 800;
	font-size: 1.375rem;
	line-height: 1.2;
	color: var(--hac-blauviolett);
}
.hacv-save-text p {
	margin-top: 8px;
	max-width: 36ch;
	color: var(--hac-grau-75);
	font-size: 0.9375rem;
}

.hacv-actions {
	margin-top: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}
.hacv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 22px;
	font: inherit;
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	border: 2px solid var(--hac-blauviolett);
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hacv-btn .hacv-icon { width: 18px; height: 18px; }
.hacv-btn--primary { background: var(--hac-blauviolett); color: var(--hac-weiss) !important; }
.hacv-btn--primary:hover { background: var(--hac-magenta); border-color: var(--hac-magenta); }
.hacv-btn--ghost { background: transparent; color: var(--hac-blauviolett); }
.hacv-btn--ghost:hover { border-color: var(--hac-magenta); color: var(--hac-magenta); }
.hacv-btn[hidden] { display: none; }

@media (max-width: 599px) {
	.hacv-actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Tablet / Desktop ---------- */

@media (min-width: 600px) {
	.hacv-photo { width: 180px; }
	.hacv-save {
		grid-template-columns: auto 1fr;
		justify-items: start;
		align-items: center;
		text-align: left;
		gap: 32px;
	}
	.hacv-qr { width: 200px; }
	.hacv-actions { justify-content: flex-start; }
}

@media (min-width: 900px) {
	.hacv-top { padding: 40px 48px 36px; }
	.hacv-logo img { height: 34px; }
	.hacv-card {
		grid-template-columns: minmax(320px, 400px) 1fr;
		margin-bottom: 64px;
	}
	.hacv-id { padding: 48px 48px 52px; }
	.hacv-photo { width: 100%; max-width: 304px; margin-bottom: 40px; }
	.hacv-details { padding: 24px 56px 48px; }
	.hacv-list { margin-bottom: 32px; }
	.hacv-save { margin-top: auto; padding-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
	.hacv * { transition: none !important; }
}

@media print {
	body.hacv { background: #fff; }
	.hacv-actions { display: none; }
}
