/*
Theme Name: Fahrradtermine Nachtfahrt
Description: Dunkles Kalender-Theme für Fahrradtermine Hamburg. Benötigt das Plugin „Fahrradtermine Hamburg“.
Version: 0.2.0
Requires at least: 6.9
Requires PHP: 8.1
Text Domain: fahrradtermine-nachtfahrt
*/

@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}
@font-face {
	font-family: "Space Grotesk";
	src: url("assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
	font-weight: 300 700;
	font-display: swap;
}

:root {
	--bg: #12151a;
	--surface: #1c2129;
	--hero: #1a1f27;
	--line: #2c333d;
	--line-strong: #4a5563;
	--ink: #eef1f4;
	--ink-soft: #c9d1d9;
	--muted: #a3adb8;
	--accent: #ff6b5e;
	--accent-soft: #ff8a80;
	--accent-hover: #ffa198;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
	--gutter: 5%;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.5 var(--font-body);
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip-path: none;
	background: var(--accent); color: var(--bg); padding: 10px 16px; font-weight: 600;
}

/* Kopfzeile */
.site-header {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 12px 24px; padding: 18px var(--gutter);
}
.brand {
	display: flex; align-items: center; gap: 12px;
	color: var(--ink); text-decoration: none;
	font-family: var(--font-head); font-weight: 700; font-size: 20px;
}
.brand:hover { color: var(--ink); }
.brand svg { stroke: var(--accent); flex: none; }
.brand__tld { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 15px; }
.site-nav ul { display: contents; list-style: none; margin: 0; padding: 0; }
.site-nav li { display: contents; }
.site-nav a { color: var(--ink-soft); text-decoration: none; padding: 12px 0; }
.site-nav a:hover { color: var(--accent); }
.site-nav a.button,
.button {
	display: inline-block; background: var(--accent); color: var(--bg);
	text-decoration: none; font-weight: 600; padding: 11px 20px; border-radius: 999px; border: 0;
	font: 600 15px/1.5 var(--font-body); cursor: pointer;
}
.site-nav a.button:hover, .button:hover { background: var(--accent-hover); color: var(--bg); }

/* Hero */
.hero {
	position: relative; isolation: isolate;
	padding: 56px var(--gutter) 64px;
	display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
	background: var(--hero) repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px);
}
.hero__photo {
	position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
	object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.38);
}
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; color: var(--accent); }
.hero__lead { margin: 0; max-width: 620px; color: var(--ink-soft); font-size: 18px; }

.search {
	display: flex; align-items: center; gap: 12px;
	width: 100%; max-width: 680px;
	background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 16px;
}
.search:focus-within { border-color: var(--accent); }
.search svg { stroke: var(--muted); flex: none; }
.search input {
	flex: 1; min-width: 0; height: 52px;
	background: transparent; border: 0; outline: 0; color: var(--ink); font: inherit;
}
.search input::placeholder { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; margin: 0; padding: 0; list-style: none; }
.chip {
	display: block; border: 1px solid var(--accent); border-radius: 4px; padding: 11px 14px;
	font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
}
.chip:hover, .chip[aria-current] { background: var(--accent); color: var(--bg); }

/* Kalender */
.calendar {
	position: relative; width: 100%; max-width: 680px;
	background: var(--bg); border-radius: 8px; padding: 20px 24px; text-align: left;
}
.calendar__months { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; }
.calendar__nav { position: absolute; top: 10px; right: 12px; display: flex; }
.calendar__nav button {
	width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink);
	cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.calendar__nav button:hover { color: var(--accent); }
.calendar[aria-busy="true"] .calendar__months { opacity: .5; }
.fthh-month { flex: 1 1 260px; max-width: 300px; }
.fthh-month__title { margin: 0 0 8px; font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.fthh-month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 13px; text-align: center; }
.fthh-month__weekday { color: var(--muted); font-weight: 600; padding: 4px 0; }
.fthh-month__weekday abbr { text-decoration: none; }
.fthh-day {
	position: relative; height: 36px; display: flex; align-items: flex-start; justify-content: center;
	padding-top: 4px; color: var(--ink); text-decoration: none;
}
.fthh-day > span {
	width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
	border: 2px solid transparent; border-radius: 50%;
}
.fthh-day--today > span { border-color: var(--accent); font-weight: 600; }
.fthh-day--events::after {
	content: ""; position: absolute; bottom: 1px; left: 50%; margin-left: -2.5px;
	width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
a.fthh-day:hover > span { background: var(--accent); color: var(--bg); }

/* Inhalt */
.site-main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px var(--gutter) 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: 0 0 20px; }
.section-head h2 { margin: 0; font-size: 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card__media { display: block; height: 168px; overflow: hidden; text-decoration: none; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__media--plain { display: flex; align-items: flex-end; padding: 16px; }
.card__media--plain span { font-family: var(--font-head); font-weight: 700; font-size: 30px; line-height: 1; color: var(--bg); }
.card__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.card__title { margin: 0; font: 500 19px/1.3 var(--font-body); }
.card__title a { text-decoration: none; }
.card__row { margin: 0; display: flex; align-items: flex-start; gap: 10px; }
.card__row svg { stroke: var(--muted); flex: none; margin-top: 3px; }
.card__row--place { color: var(--accent); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.tag {
	display: block; border: 1px solid var(--accent); color: var(--accent-soft);
	border-radius: 4px; padding: 3px 10px; font-size: 13px; text-decoration: none;
}
.tag:hover { background: var(--accent); color: var(--bg); }
.more { margin: 28px 0 0; text-align: center; }

/* Liegende Karte in den Terminübersichten */
.card--row { flex-direction: row; }
.card--row .card__media { flex: 0 0 220px; height: auto; min-height: 132px; }
.card--row .card__media--plain span { font-size: 22px; overflow-wrap: anywhere; }
.card--row .card__body { flex: 1; min-width: 0; }
@media (max-width: 600px) {
	.card--row { flex-direction: column; }
	.card--row .card__media { flex-basis: auto; height: 132px; }
}

/* Einzelner Termin */
.event { max-width: 760px; margin: 0 auto; padding: 8px 0 40px; }
.event__back { margin: 0 0 24px; font-size: 15px; }
.event__back a { text-decoration: none; }
.event__head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.event__head h1 { margin: 0 0 6px; font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; color: var(--accent); }
.event__cats { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.event__cats a { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.event__when { font-size: 18px; }
.event__address { display: block; color: var(--ink-soft); }
.event__flyer { display: block; margin: 0 0 28px; border: 1px solid var(--line); }
.event__flyer img { display: block; width: 100%; }
.event__content { margin-bottom: 24px; font-size: 17px; }
.event__content > :first-child { margin-top: 0; }
.event__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; }
.empty { color: var(--muted); padding: 24px 0; }

/* Seiten */
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(30px, 4vw, 42px); color: var(--accent); margin: 0 0 20px; }
.prose h2 { font-size: 24px; margin: 36px 0 12px; }
.prose p, .prose li { color: var(--ink-soft); }

/* Fußzeile */
.site-footer {
	border-top: 1px solid var(--line); padding: 24px var(--gutter);
	display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
	color: var(--muted); font-size: 14px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer ul { display: contents; list-style: none; }
.site-footer li { display: contents; }

@media (prefers-reduced-motion: no-preference) {
	.calendar__months { transition: opacity .15s; }
}

/* Terminübersicht: Kopf, Suche, Monatsüberschriften, Blättern */
.listing { max-width: 960px; margin: 0 auto; }
.listing__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.listing__head h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); color: var(--accent); }
.listing__head p { margin: 6px 0 0; color: var(--muted); }
.listing .search { max-width: 360px; }
.listing .search input { height: 44px; }
.listing__filters { margin-bottom: 28px; }
.listing__filters .chips { justify-content: flex-start; max-width: none; }
.listing__month {
	display: flex; align-items: center; gap: 16px; margin: 32px 0 14px;
	font: 600 15px/1.2 var(--font-head); color: var(--ink-soft);
}
.listing__month::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.listing__month:first-child { margin-top: 0; }
.listing__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.listing__pager { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0 0; }
.listing__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.card__repeat { color: var(--muted); font-size: 14px; }
.event__notice { margin: 8px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--ink-soft); }
.event__series { margin: 28px 0 0; }
.event__series h2 { font-size: 18px; margin: 0 0 10px; }
.event__series ul { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.event__series li { margin: 4px 0; }
