/*
Theme Name: Achtermeier One-Pager
Theme URI: https://achtermeier.com/
Author: Die Achtermeiers
Description: Schlanke One-Page-Seite für „Die Achtermeiers“: neueste YouTube-Videos und Shorts (lokal gecacht, ohne Einbettungen) und Follow-Buttons für YouTube, Instagram und TikTok. DSGVO-freundlich: keine externen Requests aus dem Browser.
Version: 1.0.1
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: achtermeier-onepager
*/

/* Archivo, SIL Open Font License 1.1 (assets/fonts/OFL-Archivo.txt). */
@font-face {
	font-family: "Archivo";
	src: url("assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #f6f1e8;
	--surface: #fff;
	--ink: #1b1d21;
	--muted: #575c63;
	--line: #e2d9c9;
	--accent: #a4441a;
	--night: #17191c;
	--night-text: #f6f1e8;
	--night-muted: #b9b4ab;
	--hero-soft: #efe9df;
	--youtube: #c00;
	--instagram: linear-gradient(120deg, #7232bd 0%, #b8287a 55%, #c4214b 100%);
	--tiktok: #111;
	--facebook: #0866ff;
	--font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wrap: 1180px;
	--gutter: clamp(16px, 4vw, 32px);
	--radius: 14px;
	--focus: 3px solid var(--ink);
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: inherit;
}

:focus-visible {
	outline: var(--focus);
	outline-offset: 3px;
}

.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 16px;
	background: var(--ink);
	color: #fff;
	font-weight: 700;
	border-radius: 8px;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wrap--narrow {
	max-width: calc(760px + 2 * var(--gutter));
}

.icon {
	width: 24px;
	height: 24px;
	flex: none;
}

/* ---------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------ */

.follow {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.follow li {
	display: flex;
}

.follow .btn {
	flex: 1;
}

.btn {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 60px;
	padding: 10px 20px;
	border-radius: 12px;
	border: 0;
	color: #fff;
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.2;
	text-decoration: none;
	transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
}

.btn__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.btn__handle {
	font-weight: 500;
	font-size: 0.875rem;
}

.btn--youtube {
	background: var(--youtube);
}

.btn--instagram {
	background: var(--instagram);
}

.btn--tiktok {
	background: var(--tiktok);
}

.btn--facebook {
	background: var(--facebook);
}

.btn--tiktok .icon {
	filter: drop-shadow(-1.5px -1px 0 #25f4ee) drop-shadow(1.5px 1px 0 #fe2c55);
}

.btn--inline {
	display: inline-flex;
	min-height: 52px;
	padding-inline: 24px;
}

.btn--ghost {
	background: transparent;
	color: inherit;
	box-shadow: inset 0 0 0 2px currentColor;
}

.btn--ghost:hover {
	box-shadow: inset 0 0 0 2px currentColor;
	filter: none;
}

/* Four buttons: 2x2 (YouTube | TikTok, Instagram Andre | Instagram Tina). */
@media (min-width: 720px) {
	.follow {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 680px;
	}
}

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------ */

/*
 * Austin skyline behind a dark scrim. The scrim is at least 70% opaque behind
 * all text, so even a pure-white photo pixel stays dark enough for WCAG AAA
 * (7:1) with the light hero text; it only opens up on the right on desktop,
 * where there is no text.
 */
.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(48px, 10vw, 120px) clamp(56px, 10vw, 112px);
	background: var(--night);
	color: #fff;
}

.hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 65% 40%;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(13, 14, 17, 0.8) 0%, rgba(13, 14, 17, 0.72) 45%, rgba(13, 14, 17, 0.85) 100%);
}

@media (min-width: 900px) {
	.hero::after {
		/* Dark up to where the text column can end, then opens up. */
		background: linear-gradient(90deg, rgba(13, 14, 17, 0.88) 0, rgba(13, 14, 17, 0.74) calc(50% + 300px), rgba(13, 14, 17, 0.3) 100%);
	}
}

.hero__inner {
	position: relative;
	z-index: 2;
}

.hero :focus-visible {
	outline-color: #fff;
}

.hero .btn--tiktok {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.hero__text {
	max-width: 1000px;
}

.hero__kicker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	color: var(--hero-soft);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hero__kicker .flag {
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.hero__kicker .icon {
	width: 16px;
	height: 16px;
	color: #f2a86f;
}

.hero__kicker .flag + span:not(.sr-only) {
	margin-left: 4px;
}

.hero__title {
	margin: 0 0 16px;
	font-size: clamp(2.375rem, 8.5vw, 4.75rem);
	font-weight: 800;
	font-stretch: 112%;
	line-height: 1;
	letter-spacing: -0.015em;
	text-wrap: balance;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero__sub {
	max-width: 36em;
	margin: 0 0 32px;
	color: var(--hero-soft);
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
	font-size: clamp(1.125rem, 2.6vw, 1.375rem);
	line-height: 1.45;
	text-wrap: pretty;
}

.hero__photo {
	width: 112px;
	height: 112px;
	margin-bottom: 24px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 20%;
	box-shadow: 0 0 0 4px var(--surface), 0 12px 30px -12px rgba(0, 0, 0, 0.4);
}

@media (min-width: 900px) {
	.hero--photo .hero__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 360px;
		align-items: center;
		gap: 56px;
	}

	.hero--photo .hero__title {
		font-size: clamp(2.5rem, 5vw, 4rem);
	}

	.hero--photo .hero__photo {
		order: 2;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 5;
		margin: 0;
		border-radius: 24px;
		box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.45);
	}

	.hero--photo .follow {
		grid-template-columns: 1fr;
		max-width: 420px;
	}
}

@media (min-width: 1100px) {
	.hero--photo .follow {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: none;
	}
}

/* ---------------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------------ */

.section {
	padding-block: clamp(48px, 8vw, 88px);
}

#videos {
	background: var(--surface);
}

.section__title {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 28px;
	font-size: clamp(1.75rem, 5vw, 2.5rem);
	font-weight: 800;
	font-stretch: 112%;
	line-height: 1.1;
}

.section__title::before {
	content: "";
	width: 36px;
	height: 5px;
	border-radius: 3px;
	background: var(--accent);
}

.section__cta {
	margin: 36px 0 0;
}

/* Long-form videos */

.video-grid {
	display: grid;
	gap: 32px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 600px) {
	.video-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.video-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.card__link {
	display: block;
	text-decoration: none;
	border-radius: var(--radius);
}

.card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: #d9d2c5;
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.card__link:hover img,
.short__link:hover img {
	transform: scale(1.04);
}

.card__play {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	transition: background 0.15s ease;
}

.card__link:hover .card__play {
	background: var(--youtube);
}

.card__placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #3a3d42, var(--night));
	color: #fff;
}

.card__title {
	display: -webkit-box;
	margin-top: 14px;
	overflow: hidden;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.3;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.card__link:hover .card__title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.card__date {
	display: block;
	margin-top: 6px;
	color: var(--muted);
	font-size: 0.875rem;
}

/* Shorts */

.section--shorts {
	background: var(--night);
	color: var(--night-text);
}

.section--shorts :focus-visible {
	outline-color: var(--night-text);
}

.shorts-row {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 44%;
	gap: 12px;
	margin: 0 calc(-1 * var(--gutter));
	padding: 4px var(--gutter) 12px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	scrollbar-width: thin;
}

.short {
	scroll-snap-align: start;
}

@media (min-width: 600px) {
	.shorts-row {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
		margin: 0;
		padding: 0;
		overflow: visible;
	}
}

@media (min-width: 1024px) {
	.shorts-row {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 16px;
	}
}

.short__link {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: var(--radius);
	background: #2b2e33;
	color: #fff;
	text-decoration: none;
}

.short__link img,
.short__link .card__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.short__title {
	position: absolute;
	inset: auto 0 0;
	display: -webkit-box;
	padding: 48px 12px 12px;
	overflow: hidden;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0));
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.25;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
}

.section--shorts .btn--ghost {
	color: var(--night-text);
}

/* Follow */

.follow-box {
	max-width: calc(940px + 2 * var(--gutter));
	text-align: center;
}

.follow-box .section__title {
	justify-content: center;
	margin-bottom: 12px;
}

.follow-box__text {
	max-width: 34em;
	margin: 0 auto 32px;
	color: var(--muted);
	font-size: 1.125rem;
}

.follow--follow .btn {
	justify-content: center;
	text-align: left;
}

@media (min-width: 720px) {
	.follow--follow {
		margin-inline: auto;
	}

	/* Odd last button (Facebook): centred below the 2x2 grid, same width. */
	.follow--follow li:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		justify-self: center;
		width: calc(50% - 6px);
	}
}

/* Community (follower counts) */

.section--community {
	background: var(--surface);
	text-align: center;
}

.section--community .section__title {
	justify-content: center;
	margin-bottom: 8px;
	font-size: clamp(1.5rem, 7vw, 2.5rem);
}

.community__total {
	margin: 0 auto 32px;
	color: var(--muted);
	font-size: 1.125rem;
}

/* Flex rather than grid so an incomplete last row is centred. */
.stats {
	--cols: 2;
	--gap: 12px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.stat {
	flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
}

@media (min-width: 720px) {
	.stats {
		--cols: 3;
		--gap: 16px;
	}
}

@media (min-width: 1024px) {
	.stats {
		--cols: 5;
	}
}

.stat__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	height: 100%;
	padding: 20px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.35);
}

.stat__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 6px;
	border-radius: 50%;
	color: #fff;
}

.stat--youtube .stat__icon {
	background: var(--youtube);
}

.stat--instagram .stat__icon {
	background: var(--instagram);
}

.stat--tiktok .stat__icon {
	background: var(--tiktok);
}

.stat--facebook .stat__icon {
	background: var(--facebook);
}

.stat__count {
	font-size: clamp(1.375rem, 6vw, 2.25rem);
	white-space: nowrap;
	font-weight: 800;
	font-stretch: 112%;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.stat__label {
	font-size: 0.9375rem;
	font-weight: 600;
}

.stat__owner {
	color: var(--muted);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}

.community__asof {
	margin: 20px 0 0;
	color: var(--muted);
	font-size: 0.8125rem;
}

/* ---------------------------------------------------------------------------
 * Sticky follow bar (shown by main.js between hero and the "Folge uns" block)
 * ------------------------------------------------------------------------ */

.sticky-cta {
	position: fixed;
	inset: auto 0 0;
	z-index: 50;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 6px;
	padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
	background: rgba(246, 241, 232, 0.95);
	border-top: 1px solid var(--line);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transform: translateY(110%);
	visibility: hidden;
	transition: transform 0.25s ease, visibility 0s linear 0.25s;
}

.sticky-cta.is-visible {
	transform: none;
	visibility: visible;
	transition: transform 0.25s ease;
}

/* Four buttons on a phone: icon above a short label so all fit at 360px. */
.sticky-cta__btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 52px;
	padding: 6px 4px;
	border-radius: 10px;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

@media (min-width: 600px) and (max-width: 1023px) {
	.sticky-cta__btn {
		flex-direction: row;
		gap: 8px;
		font-size: 0.875rem;
	}
}

.sticky-cta__btn .icon {
	width: 20px;
	height: 20px;
}

@media (min-width: 1024px) {
	.sticky-cta {
		inset: auto 24px 24px auto;
		grid-template-columns: repeat(4, 48px);
		padding: 8px;
		border: 1px solid var(--line);
		border-radius: 999px;
		box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.35);
		transform: translateY(calc(100% + 32px));
	}

	.sticky-cta__btn {
		width: 48px;
		min-height: 48px;
		padding: 0;
		border-radius: 50%;
	}

	.sticky-cta__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */

.site-footer {
	padding-block: 24px 32px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9375rem;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__links a {
	display: inline-block;
	padding-block: 12px;
	color: var(--ink);
	text-underline-offset: 3px;
}

.site-footer__copy {
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * Fallback pages (Impressum, Datenschutz, posts)
 * ------------------------------------------------------------------------ */

.site-bar {
	border-bottom: 1px solid var(--line);
	background: var(--surface);
}

.site-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
}

.site-bar__home {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	font-weight: 800;
	font-stretch: 112%;
	font-size: 1.125rem;
	white-space: nowrap;
	text-decoration: none;
}

@media (max-width: 380px) {
	.site-bar__inner {
		gap: 8px;
	}

	.site-bar__home {
		font-size: 1rem;
		font-stretch: 100%;
	}

	.site-bar__home .icon {
		width: 20px;
		height: 20px;
	}

	.site-bar__social {
		gap: 0;
	}
}

.site-bar__home .icon {
	color: var(--accent);
}

.site-bar__social {
	display: flex;
	gap: 4px;
}

.icon-btn {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
}

.icon-btn:hover {
	background: var(--bg);
}

.icon-btn--youtube {
	color: var(--youtube);
}

.icon-btn--instagram {
	color: #b8287a;
}

.icon-btn--tiktok {
	color: var(--tiktok);
}

.page-main {
	padding-block: clamp(32px, 6vw, 64px) clamp(48px, 8vw, 96px);
}

.page__title,
.prose h1 {
	margin: 0 0 16px;
	font-size: clamp(2rem, 6vw, 3rem);
	font-weight: 800;
	font-stretch: 112%;
	line-height: 1.1;
	overflow-wrap: break-word;
	hyphens: auto;
}

.page__meta {
	margin: 0 0 24px;
	color: var(--muted);
	font-size: 0.9375rem;
}

.prose {
	font-size: 1.0625rem;
	line-height: 1.7;
	overflow-wrap: break-word;
}

.prose h2,
.prose h3 {
	margin: 2em 0 0.5em;
	line-height: 1.2;
	font-stretch: 106%;
}

.prose a {
	color: var(--accent);
	text-underline-offset: 3px;
}

.prose img,
.prose figure {
	margin-block: 24px;
	border-radius: 10px;
}

.prose figure {
	margin-inline: 0;
}

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

.prose th,
.prose td {
	padding: 8px;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.post-list__item {
	padding-block: 24px;
	border-bottom: 1px solid var(--line);
}

.post-list__item h2 {
	margin: 0 0 4px;
	font-size: 1.375rem;
	line-height: 1.25;
}

.post-list__item h2 a {
	text-decoration: none;
}

.post-list__item h2 a:hover {
	text-decoration: underline;
}

.post-list__item .page__meta {
	margin-bottom: 8px;
}

.post-list__item p:last-child {
	margin: 0;
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 32px;
}

.nav-links a {
	display: inline-block;
	padding-block: 12px;
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * Motion
 * ------------------------------------------------------------------------ */

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

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}

	.btn:hover,
	.stat__link:hover,
	.card__link:hover img,
	.short__link:hover img {
		transform: none;
	}
}
