/*
 * Die Landingpage der App PolcherLeben (page-polcherleben.php).
 *
 * Der Aufbau kommt von der @Viedel-Landingpage (zusatz/viedel.css, Klassen vl-),
 * die Farben nicht: Das @Viedel hat sein eigenes Erscheinungsbild, die App ist
 * ein Angebot der Stadt (Hinweis von Dare Solutions, November 2026). Hier also
 * die Farben der Stadt und die Teile, die es dort nicht gibt: das Telefon im
 * Kopf, die Store-Knöpfe, die Symbole, die drei Schritte, der Datenschutz.
 * Alles hängt an .ap.
 *
 * Weiße Schrift steht nur auf --c-blau-aa oder dunkler (ab 4,5:1), auf Orange
 * und Grün steht dunkle.
 */

.ap {
	--vl-ink: var(--c-text);
	--vl-muted: var(--c-text-nav);
	--vl-paper: var(--c-weiss);
	--vl-blue: var(--c-blau);
	--vl-blue-dark: var(--c-blau-aa);
	--vl-blue-soft: var(--c-blau-band);
	--vl-slate: var(--c-violett);
	--vl-warm: var(--c-orange);
	--vl-line: #dfe7eb;
	--vl-shadow: 0 18px 50px rgba(39, 107, 140, .16);

	--ap-orange-hell: #fef3d6;
	--ap-orange-text: #8a4c00; /* 5,9:1 auf --ap-orange-hell */
	--ap-gruen-hell: #f0f5da;
	--ap-gruen-text: #4e5c00;  /* 6,8:1 auf --ap-gruen-hell */
	/* Die Spalte der Seite, für alles, was sich am Telefon ausrichtet. */
	--ap-rand: calc((100% - min(1180px, 100% - 40px)) / 2);
}

.ap .ap-ico {
	display: block;
	width: 1em;
	height: 1em;
	max-width: none;
}

/* ------------------------------------------------------------ Knöpfe */
.ap .vl-btn--primary { color: var(--c-text) !important; }
.ap .vl-btn--primary:hover { box-shadow: 0 10px 24px rgba(247, 168, 0, .32); }
.ap .vl-btn:focus-visible,
.ap .vl-quick__card:focus-visible {
	outline: var(--fokus);
	outline-offset: var(--fokus-off);
}
/* Auf den blauen Flächen sähe man den blauen Fokusring nicht. */
.ap-hero .vl-btn:focus-visible,
.ap-schutz__haupt .vl-btn:focus-visible {
	outline: 3px solid var(--c-weiss);
}

/* ------------------------------------------------------------- Kopf */
/*
 * Das Blau der Stadt, links am dunkelsten: Dort steht der Text. Rechts hinter
 * dem Telefon zwei Kreise in Grün und Orange, den Farben des Logos. Das Telefon
 * ist unten vom Rand des Kopfes angeschnitten – es steht im Kopf, nicht darauf.
 */
.ap .vl-hero { background: var(--c-blau-band-aa); }
.ap .vl-hero::before {
	background: linear-gradient(90deg, rgba(39, 107, 140, .94) 0%, rgba(39, 107, 140, .66) 55%, rgba(39, 107, 140, .12) 100%);
}
.ap .vl-hero::after { display: none; }

.ap-hero--ohne-bild {
	background: linear-gradient(100deg, var(--c-blau-band-aa) 0%, var(--c-blau-aa) 55%, var(--c-blau) 100%) !important;
}
.ap .ap-hero--ohne-bild::before,
.ap .ap-hero--ohne-bild::after {
	content: "";
	display: block;
	position: absolute;
	z-index: 1;
	border: 0;
	border-radius: 50%;
	transform: none;
	pointer-events: none;
}
.ap .ap-hero--ohne-bild::after {
	inset: -5rem calc(var(--ap-rand) - 7rem) auto auto;
	width: 25rem;
	height: 25rem;
	background: var(--c-gruen);
}
.ap .ap-hero--ohne-bild::before {
	inset: auto calc(var(--ap-rand) + 15rem) -6rem auto;
	width: 15rem;
	height: 15rem;
	background: var(--c-orange);
}

.ap .vl-kicker--hell { color: var(--c-blau-band); }
.ap .vl-hero h1 span { color: var(--c-blau-band); }
.ap .vl-lead { color: var(--c-weiss); }
.ap .vl-hero__meta { color: var(--c-weiss); }

.ap-hero__inhalt {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	column-gap: clamp(2rem, 5vw, 5rem);
}
.ap-hero__text { padding-bottom: .25rem; }
.viedel .ap-hero__hinweis {
	margin: .9rem 0 0;
	font-size: .9rem;
	color: var(--c-weiss);
}

/* Store-Knöpfe: im Violett der Wortmarke, zweizeilig – ohne die Abzeichen der
   Anbieter. */
.ap-store {
	display: inline-flex; align-items: center;
	padding: .55rem 1.25rem .6rem;
	border-radius: 14px;
	background: var(--c-violett);
	border: 1px solid rgba(255, 255, 255, .28);
	color: #fff !important;
	font-weight: var(--fw-medium);
	font-size: 1.05rem;
	line-height: 1.15;
	transition: .2s ease;
}
.ap-store small { display: block; font-size: .72rem; font-weight: var(--fw-normal); color: var(--c-weiss); }
.ap-store:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.ap-store:focus-visible { outline: 3px solid var(--c-weiss); outline-offset: 3px; }

/* ------------------------------------------------------------ Telefon */
.ap-telefon {
	position: relative;
	align-self: end;
	width: clamp(15rem, 19vw, 17.5rem);
	aspect-ratio: 9 / 18.5;
	/* Unten über den Kopf hinaus: Der Rand schneidet es an. */
	margin-bottom: calc(-1 * clamp(3.5rem, 5vw, 4.75rem) - 4.5rem);
	padding: .65rem;
	border-radius: 2.6rem;
	background: var(--c-violett);
	box-shadow: 0 30px 70px rgba(25, 60, 80, .4), inset 0 0 0 2px rgba(255, 255, 255, .1);
	transform: rotate(4deg);
	transform-origin: 50% 100%;
}
.ap-telefon::before {
	/* Die Kamera-Aussparung. */
	content: ""; position: absolute; z-index: 2;
	top: 1.15rem; left: 50%; transform: translateX(-50%);
	width: 4.6rem; height: 1.2rem; border-radius: 999px;
	background: var(--c-violett);
}
.ap-telefon__schirm {
	position: relative;
	height: 100%;
	overflow: hidden;
	border-radius: 2rem;
	background: var(--c-grau-band);
	display: flex; flex-direction: column;
}
.viedel .ap-telefon__bild { height: 100%; object-fit: cover; object-position: top; }

.ap-telefon__kopf {
	padding: 3rem 1.1rem 1.2rem;
	background: var(--c-blau-aa);
	color: #fff;
	border-radius: 0 0 1.4rem 1.4rem;
}
.ap-telefon__kopf b { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.ap-telefon__kopf small { display: block; font-size: .75rem; color: var(--c-weiss); }

.viedel .ap-telefon__kacheln {
	display: grid; grid-template-columns: 1fr 1fr;
	gap: .55rem; padding: .9rem .8rem;
}
.ap-telefon__kacheln li {
	display: flex; flex-direction: column; gap: .45rem;
	padding: .75rem .7rem .7rem;
	border-radius: .95rem;
	background: #fff;
	box-shadow: 0 2px 8px rgba(39, 107, 140, .1);
	font-size: .72rem; font-weight: var(--fw-medium); line-height: 1.2;
	color: var(--vl-ink);
}
.ap-telefon__kacheln .ap-ico,
.ap-telefon__kacheln .ico {
	width: 1.5rem; height: 1.5rem; max-width: none;
	color: var(--c-blau-aa);
}
.ap-telefon__kacheln li:nth-child(4n+1) :is(.ap-ico, .ico) { color: var(--ap-orange-text); }
.ap-telefon__kacheln li:nth-child(4n+3) :is(.ap-ico, .ico) { color: var(--ap-gruen-text); }
.ap-telefon__kacheln li:nth-child(4n) :is(.ap-ico, .ico) { color: var(--c-cyan-aa); }
.ap-telefon__leiste {
	margin-top: auto;
	display: flex; justify-content: space-around;
	padding: .8rem 1rem 1.1rem;
	background: #fff;
}
.ap-telefon__leiste span { width: 1.1rem; height: 1.1rem; border-radius: 6px; background: var(--c-blau-band); }
.ap-telefon__leiste span:first-child { background: var(--c-blau-aa); }

/* ---------------------------------------------------- Schnelleinstieg */
.ap .vl-icon .ap-ico,
.ap .vl-icon .ico { width: 1.45rem; height: 1.45rem; max-width: none; }
.ap .vl-quick__grid > li:nth-child(3n+1) .vl-icon { background: var(--ap-orange-hell); color: var(--ap-orange-text); }
.ap .vl-quick__grid > li:nth-child(3n+2) .vl-icon { background: var(--ap-gruen-hell); color: var(--ap-gruen-text); }
.ap .vl-quick__grid > li:nth-child(3n) .vl-icon { background: var(--c-blau-band); color: var(--c-blau-aa); }

/* ---------------------------------------------------------- Funktionen */
/* Alle zu dritt – sechs Funktionen sind zwei volle Reihen. Ist die letzte
   Reihe nicht voll (acht Karten wie im Flyer, 12. November 2026), werden
   ihre Karten breiter, statt eine Lücke zu lassen. */
@media (min-width: 901px) {
	.ap .ap-funktionen .vl-offer,
	.ap .ap-funktionen .vl-offer:nth-child(-n+3) { grid-column: span 4; }
	.ap .ap-funktionen .vl-offer:nth-child(3n+1):nth-last-child(2),
	.ap .ap-funktionen .vl-offer:nth-child(3n+2):nth-last-child(1) { grid-column: span 6; }
	.ap .ap-funktionen .vl-offer:nth-child(3n+1):nth-last-child(1) { grid-column: span 12; }
}
.ap .ap-funktionen .vl-offer { min-height: 0; border-color: var(--vl-line); }
.ap .vl-offer:hover { box-shadow: 0 16px 38px rgba(39, 107, 140, .12); }
.ap-symbol {
	display: grid; place-items: center;
	width: 3rem; height: 3rem; margin-bottom: 1.1rem;
	border-radius: 14px;
	background: var(--c-blau-aa);
	color: var(--c-weiss);
}
/* Die Farben der Karten auf der Startseite, reihum. */
.ap .vl-offer:nth-child(4n+1) .ap-symbol { background: var(--c-orange); color: var(--c-text); }
.ap .vl-offer:nth-child(4n+3) .ap-symbol { background: var(--c-gruen); color: var(--c-text); }
.ap .vl-offer:nth-child(4n) .ap-symbol { background: var(--c-cyan-aa); color: var(--c-weiss); }
.ap-symbol .ap-ico,
.ap-symbol .ico { width: 1.6rem; height: 1.6rem; max-width: none; }
.ap .ap-funktionen p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------- Drei Schritte */
.ap-schritte-abschnitt { background: var(--c-blau-band); }
.viedel .ap-schritte {
	display: grid;
	grid-template-columns: repeat(var(--ap-schritte, 3), minmax(0, 1fr));
	gap: 24px;
	counter-reset: ap-schritt;
	position: relative;
}
/* Die Linie hinter den Nummern: von der ersten zur letzten. */
.viedel .ap-schritte::before {
	content: ""; position: absolute;
	top: 1.6rem; height: 2px;
	left: calc(100% / var(--ap-schritte, 3) / 2);
	right: calc(100% / var(--ap-schritte, 3) / 2);
	background: repeating-linear-gradient(90deg, var(--c-linie) 0 10px, transparent 10px 18px);
}
.ap-schritt {
	position: relative;
	display: flex; flex-direction: column; align-items: center;
	text-align: center;
	counter-increment: ap-schritt;
}
.ap-schritt::before {
	content: counter(ap-schritt);
	display: grid; place-items: center;
	width: 3.2rem; height: 3.2rem; margin-bottom: 1.1rem;
	border-radius: 50%;
	background: var(--c-orange);
	box-shadow: 0 0 0 8px var(--c-blau-band);
	color: var(--c-text);
	font-size: 1.25rem; font-weight: var(--fw-bold);
	position: relative; z-index: 1;
}
.ap-schritt b { font-size: 1.2rem; }
.viedel .ap-schritt p { color: var(--vl-muted); max-width: 22rem; margin: .4rem auto 0; }

/* ------------------------------------------------------------ Datenschutz */
.ap-schutz {
	display: grid;
	grid-template-columns: .95fr 1.05fr;
	gap: 24px;
}
.ap-schutz__haupt {
	position: relative; overflow: hidden;
	background: var(--c-blau-aa); color: #fff;
	border-radius: 24px;
	padding: clamp(2rem, 4vw, 3.5rem);
	display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
}
.ap-schutz__haupt h2 { color: #fff; }
.viedel .ap-schutz__haupt p { color: var(--c-weiss); max-width: 34rem; }
.ap-schutz__haupt .vl-btn { margin-top: .5rem; }
.ap .ap-schutz__schild {
	position: absolute; right: -1.5rem; bottom: -2rem;
	width: 13rem; height: 13rem;
	color: rgba(255, 255, 255, .1);
	pointer-events: none;
}
.viedel .ap-schutz__liste {
	background: #fff;
	border: 1px solid var(--vl-line);
	border-radius: 24px;
	padding: .75rem clamp(1.5rem, 3vw, 2.25rem);
}
.ap-schutz__liste li {
	display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 1rem;
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--vl-line);
}
.ap-schutz__liste li:last-child { border-bottom: 0; }
.ap .ap-schutz__haken {
	width: 2rem; height: 2rem; padding: .4rem;
	border-radius: 50%;
	background: var(--ap-gruen-hell); color: var(--ap-gruen-text);
}
.ap-schutz__liste b { display: block; margin-bottom: .15rem; }
.viedel .ap-schutz__liste p { margin: 0; color: var(--vl-muted); font-size: .95rem; }

/* ---------------------------------------------------------------- Kontakt */
.ap .vl-contact__box { background: var(--c-blau-band); }
.ap .vl-contact__copy p { color: var(--c-text-nav); }
.ap .vl-contact__card { background: var(--c-blau-aa); }
.ap .vl-contact__row { border-bottom-color: rgba(255, 255, 255, .28); }
.ap .vl-contact__row dt { color: var(--c-weiss); }

/* --------------------------------------------------------------- Schmaler */
/* Die Kreise brauchen das Telefon: Sie stehen dahinter, nicht hinter dem Text. */
@media (max-width: 1180px) {
	.ap .ap-hero--ohne-bild::before { display: none; }
}
@media (max-width: 900px) {
	/* Das Telefon nur, wo es neben dem Text Platz hat. */
	.ap-telefon { display: none; }
	.ap .ap-hero--ohne-bild::after { display: none; }
	.ap-hero__inhalt { grid-template-columns: minmax(0, 1fr); }
	.ap-schutz { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
	.viedel .ap-schritte { grid-template-columns: 1fr; gap: 1.75rem; }
	.viedel .ap-schritte::before { display: none; }
	.ap-schritt { flex-direction: row; align-items: flex-start; text-align: left; gap: .2rem 1rem; flex-wrap: wrap; }
	.ap-schritt::before { margin: 0; flex: 0 0 auto; width: 2.6rem; height: 2.6rem; font-size: 1.05rem; box-shadow: none; }
	.ap-schritt > * { flex: 1 1 calc(100% - 3.6rem); }
	.ap-schritt b { align-self: center; }
	.viedel .ap-schritt p { margin: 0 0 0 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
	.ap-store:hover { transform: none; }
}
