/* =========================================================================
   BJJ Amberg - Variante 2 "Mat Black"
   Dunkel, sportlich, hoher Kontrast. Grosse Versal-Headlines, Signalfarbe.

   Bewusst ohne externe Schriften (keine Google Fonts) - die
   Datenschutzerklaerung sagt zu, dass nichts von Dritt-Servern nachgeladen
   wird. Alle Farben liegen als Custom Properties oben.
   ========================================================================= */

:root {
	--bg:       #0b0b0d;
	--surface:  #15151a;
	--surface-2:#1e1e25;
	--ink:      #f5f5f7;
	--ink-soft: #b6b6c0;
	--muted:    #76767f;
	--line:     #2a2a33;
	--accent:   #ff4d3d;
	--accent-dk:#e03a2b;

	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--wrap: 72rem;
	--header-h: 70px;
	--r: 4px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink-soft);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
	color: var(--ink);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.8rem, 8.5vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

.eyebrow {
	font-size: 0.72rem; font-weight: 800; letter-spacing: 0.22em;
	text-transform: uppercase; color: var(--accent); margin: 0 0 1.2rem;
}

.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }

/* ---------------------------------------------------------------- Header */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(11, 11, 13, 0.82);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1rem; min-height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand span {
	font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.05rem;
}
.nav { display: flex; gap: 1.8rem; }
.nav a {
	color: var(--ink-soft); font-size: 0.78rem; font-weight: 700;
	letter-spacing: 0.12em; text-transform: uppercase;
}
.nav a:hover { color: var(--accent); }

@media (max-width: 680px) {
	.nav { gap: 1rem; }
	.nav a { font-size: 0.7rem; letter-spacing: 0.08em; }
	.brand span { display: none; }
}

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

.hero {
	position: relative;
	/* Die Hoehe ergibt sich aus dem Inhalt, nicht aus einem vh-Wert. Die
	   40vh sind nur eine Untergrenze.
	   Grund: Bei fester Hoehe und align-items: flex-end klebte der Text auf
	   hohen Bildschirmen am unteren Rand und darueber stand eine grosse
	   leere Bildflaeche. Inhaltsgesteuert sieht der Hero auf jeder
	   Fenstergroesse gleich aus - der Text beginnt immer kurz unter der
	   Kopfzeile, die Kennzahlen folgen direkt darunter.
	   svh wegen der ein- und ausfahrenden Browserleiste auf dem Handy; die
	   vh-Zeile davor bleibt als Rueckfall fuer aeltere Browser. */
	min-height: 40vh;
	min-height: 40svh;
	display: flex; align-items: center;
	padding: clamp(3rem, 7vh, 4.5rem) 0 clamp(2.75rem, 6vh, 4rem);
	overflow: hidden;
}
.hero::before {
	content: ""; position: absolute; inset: 0;
	/* Tiefer ansetzen: oben ist nur Decke, die Mattenflaeche liegt unten. */
	background: url("images/halle.jpg") center 68% / cover no-repeat;
	filter: grayscale(0.35) brightness(0.58);
}
.hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(11,11,13,0.45) 0%, rgba(11,11,13,0.78) 55%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 1; }

/* Im Hero traegt die Zeile die Ortsangabe - darf nicht Kleingedrucktes sein. */
.hero .eyebrow {
	font-size: clamp(0.95rem, 2.2vw, 1.35rem);
	letter-spacing: 0.26em;
	margin-bottom: 1.4rem;
}
.hero h1 { max-width: 20ch; font-size: clamp(2.3rem, 6.4vw, 4.4rem); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }

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

.btn {
	display: inline-block; border: 0; cursor: pointer;
	padding: 0.95rem 1.9rem; border-radius: var(--r);
	font-family: var(--sans); font-size: 0.8rem; font-weight: 800;
	letter-spacing: 0.12em; text-transform: uppercase;
	transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

/* ---------------------------------------------------------------- Stats */

.stats { border-bottom: 1px solid var(--line); }
.stats .wrap {
	display: grid; grid-template-columns: repeat(3, 1fr);
	gap: 1px; background: var(--line);
	border-left: 1px solid var(--line); border-right: 1px solid var(--line);
	padding: 0;
}
.stat { background: var(--bg); padding: 2.2rem 1.5rem; text-align: center; }
.stat b {
	display: block; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800;
	color: var(--ink); letter-spacing: -0.03em; line-height: 1;
}
.stat span {
	display: block; margin-top: 0.6rem; font-size: 0.72rem; font-weight: 700;
	letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 620px) {
	.stats .wrap { grid-template-columns: 1fr; }
	.stat { padding: 1.5rem 1rem; }
}

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

section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

/* Etwas mehr Luft zwischen der Kennzahlen-Leiste und "Wer wir sind". */
#ueber-uns { padding-top: clamp(5rem, 11vw, 9.5rem); }

.section-head { max-width: 48ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* Ueber uns: breite Wechselzeilen statt schmaler Karten. Gibt den Bildern
   deutlich mehr Flaeche und laesst laengeren Text zu. */
.about-rows { display: flex; flex-direction: column; gap: clamp(3rem, 7vw, 5.5rem); }

.about-row {
	display: grid; grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.about-row:nth-child(even) .about-media { order: 2; }

@media (max-width: 860px) {
	.about-row { grid-template-columns: 1fr; gap: 1.7rem; }
	.about-row:nth-child(even) .about-media { order: 0; }
}

.about-media img {
	width: 100%; display: block;
	border-radius: var(--r); border: 1px solid var(--line);
	height: clamp(280px, 36vw, 440px); object-fit: cover;
	filter: grayscale(0.2);
}

/* halle.jpg zeigt oben vor allem Decke - Ausschnitt nach unten schieben,
   damit die Mattenflaeche im Bild ist. */
.about-media img.pos-lower { object-position: center 70%; }

/* Trainer_Bild.jpeg ist Hochformat (1276x2048). In einem breiten Rahmen
   schneidet cover die Koepfe ab, deshalb hier ein hochkanter Rahmen mit
   Ausrichtung auf das obere Drittel. */
.about-media.is-portrait img {
	height: clamp(420px, 56vw, 620px);
	object-position: center 20%;
}

/* verein.jpg ist ein sehr breites Gruppenfoto (1024x490). Jeder Zuschnitt
   wuerde Leute am Rand abschneiden - also natuerliches Seitenverhaeltnis
   stehen lassen und gar nicht beschneiden. */
.about-media.is-wide img { height: auto; object-fit: contain; }

.row-kicker {
	font-size: 0.72rem; font-weight: 800; letter-spacing: 0.2em;
	text-transform: uppercase; color: var(--accent); margin-bottom: 0.7rem;
}
.about-text h3 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.9rem; }
.about-text p { font-size: 1rem; }
.about-text p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------- Trainingszeiten */

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

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.schedule-table { width: 100%; min-width: 34rem; border-collapse: collapse; }
.schedule-table th, .schedule-table td {
	text-align: left; padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line);
}
.schedule-table thead th {
	font-size: 0.68rem; font-weight: 800; letter-spacing: 0.16em;
	text-transform: uppercase; color: var(--muted);
}
.schedule-table tbody tr:last-child td { border-bottom: 0; }
.schedule-table td:first-child {
	font-weight: 800; color: var(--ink); text-transform: uppercase;
	letter-spacing: 0.02em; white-space: nowrap;
}
.schedule-table tr.is-off td,
.schedule-table tr.is-off td:first-child { color: var(--muted); font-weight: 600; }
.schedule-table tr.is-main td { background: rgba(255, 77, 61, 0.05); }

.tag {
	display: inline-block; padding: 0.2rem 0.7rem; border-radius: var(--r);
	font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.tag-regular { background: var(--accent); color: #fff; }
.tag-optional { background: var(--surface-2); color: var(--ink-soft); }

.note { margin-top: 1.3rem; font-size: 0.88rem; color: var(--muted); }

/* -------------------------------------------------------------- Galerie */

/* 4:3 entspricht dem Seitenverhaeltnis der Fotos - so wird nichts
   beschnitten, egal was spaeter in images/galerie/ landet. */
.gallery-grid {
	/* min(280px, 100%) statt 280px: Auf Displays, die schmaler als 280px
	   Inhaltsbreite sind, waere die Spalte sonst breiter als der Container
	   und die Seite liesse sich seitlich schieben. */
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 0.8rem;
}
.gallery-grid img {
	width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
	border-radius: var(--r); filter: grayscale(0.3) brightness(0.9);
	transition: filter 0.2s ease;
}
.gallery-grid img:hover { filter: none; }

/* -------------------------------------------------------------- Kontakt */

.contact-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.1rem; }
.field label {
	display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em;
	text-transform: uppercase; color: var(--muted); margin-bottom: 0.45rem;
}
.field input, .field textarea {
	width: 100%; padding: 0.85rem 1rem;
	font-family: inherit; font-size: 1rem; color: var(--ink);
	background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
}
.field input:focus, .field textarea:focus {
	outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.field textarea { resize: vertical; min-height: 9rem; }

.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 1rem; }

.info-block { margin-bottom: 1.8rem; }
.info-block h3 {
	font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em;
	text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem;
}
.info-block p { color: var(--ink); margin-bottom: 0; }
.info-block a { color: var(--ink); }
.info-block a:hover { color: var(--accent); }

.social { display: flex; gap: 0.6rem; }
.social a {
	display: inline-block; padding: 0.55rem 1.1rem;
	border: 1px solid var(--line); border-radius: var(--r);
	font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em;
	text-transform: uppercase; color: var(--ink);
}
.social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Honeypot: fuer Menschen unsichtbar, Bots fuellen ihn aus. */
.hp-field { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

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

.site-footer { padding: 2.5rem 0; font-size: 0.85rem; color: var(--muted); }
.site-footer .wrap {
	display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
	align-items: center; justify-content: space-between;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1.5rem; }

/* --------------------------------------------------- Impressum/Datenschutz */

.legal { padding: clamp(3rem, 7vw, 5rem) 0; }
.legal .wrap { max-width: 48rem; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 0.3em; }
.legal h2 {
	font-size: 1.35rem; margin-top: 3rem; padding-top: 1.8rem;
	border-top: 1px solid var(--line);
}
.legal h3 { font-size: 0.95rem; margin-top: 1.8rem; color: var(--ink); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.5rem; }
.legal strong { color: var(--ink); }
.legal a { word-break: break-word; }
.legal-meta { color: var(--muted); font-size: 0.9rem; }
.legal-seal { margin-top: 3rem; font-size: 0.8rem; color: var(--muted); }
.back-link {
	display: inline-block; margin-bottom: 2rem;
	font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}

/* Platzhalter, die noch ausgefuellt werden muessen - faellt bewusst auf. */
.legal-todo {
	display: inline-block; padding: 0.1em 0.5em;
	background: #ffd54f; color: #000; font-weight: 800; border-radius: var(--r);
}

/* --------------------------------------------------- Sprachumschaltung */

/* Beide Sprachen stehen im HTML; ausgeblendet wird per CSS. Weil das CSS
   und nicht JavaScript umschaltet, steht schon beim ersten Bildaufbau die
   richtige Sprache da - es blitzt nichts auf.
   Im HTML steht fest data-lang="de", damit die Seite auch ohne JavaScript
   lesbar bleibt (dann eben auf Deutsch). */
html[data-lang="de"] [lang="en"] { display: none; }
html[data-lang="en"] [lang="de"] { display: none; }

.lang-switch {
	display: flex; gap: 3px; margin-left: 1.4rem;
	flex-shrink: 0;
}
.lang-switch button {
	border: 1px solid var(--line); background: transparent; color: var(--muted);
	font-family: var(--sans); font-size: 0.7rem; font-weight: 800;
	letter-spacing: 0.08em; text-transform: uppercase;
	padding: 0.35rem 0.6rem; border-radius: var(--r); cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.lang-switch button:hover { color: var(--ink); border-color: var(--muted); }
.lang-switch button.is-active {
	background: var(--accent); border-color: var(--accent); color: #fff;
}

@media (max-width: 680px) {
	.lang-switch { margin-left: 0.7rem; gap: 2px; }
	.lang-switch button { padding: 0.3rem 0.45rem; font-size: 0.65rem; }
}

/* Die Kopfzeile traegt jetzt Navigation und Umschalter - auf schmalen
   Displays darf sie umbrechen statt zu ueberlaufen. */
.site-header .wrap { flex-wrap: wrap; row-gap: 0.5rem; }
/* Navigation und Sprachumschalter zusammen sind auf schmalen Displays
   breiter als der Platz - deshalb umbrechen lassen statt ueberlaufen. */
.header-right {
	display: flex; align-items: center; flex-wrap: wrap;
	justify-content: flex-end; gap: 0.4rem 0;
}

/* Hinweis auf die massgebliche Sprachfassung in den Rechtstexten. */
.legal-note {
	border-left: 3px solid var(--accent);
	background: var(--surface-2);
	padding: 0.9rem 1.1rem;
	font-size: 0.9rem;
	color: var(--ink-soft);
	border-radius: 0 var(--r) var(--r) 0;
}
.legal-note a { color: var(--accent); }

/* Praktischer Hinweis unter dem Kontaktformular. Hebt sich bewusst vom
   grauen Kleingedruckten darueber ab - das ist Rechtstext, das hier ist
   eine Information, die man tatsaechlich lesen soll. */
.bring-note {
	margin-top: 1.7rem;
	padding: 1rem 1.2rem;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-left: 3px solid var(--accent);
	border-radius: 0 var(--r) var(--r) 0;
	font-size: 0.94rem;
	color: var(--ink-soft);
}
.bring-note strong {
	display: block;
	margin-bottom: 0.3rem;
	color: var(--ink);
	font-size: 0.72rem; font-weight: 800;
	letter-spacing: 0.14em; text-transform: uppercase;
}

/* ------------------------------ Trainingszeiten auf schmalen Displays ---- */

/* Vier Spalten passen auf kein Telefon - die Tabelle musste bisher seitlich
   geschoben werden. Stattdessen wird jede Zeile zu einer Karte, und die
   Spaltenueberschrift wandert als Beschriftung in die Zelle. Sie kommt aus
   den Attributen data-label-de / data-label-en, damit sie die
   Sprachumschaltung mitmacht. */
@media (max-width: 680px) {

	.table-scroll { overflow-x: visible; }

	table.schedule-table { min-width: 0; }

	/* Die Kopfzeile wird je Zelle wiederholt, die echte wird nicht mehr
	   gebraucht. Nicht display:none, damit Screenreader sie behalten. */
	.schedule-table thead {
		position: absolute; width: 1px; height: 1px;
		overflow: hidden; clip-path: inset(50%);
	}

	.schedule-table tr {
		display: block;
		border: 1px solid var(--line);
		border-radius: var(--r);
		margin-bottom: 0.7rem;
		padding: 0.35rem 0;
		background: var(--bg);
	}
	.schedule-table tr.is-main { background: rgba(255, 77, 61, 0.05); }
	.schedule-table tr:last-child { margin-bottom: 0; }

	.schedule-table td {
		display: flex; align-items: baseline;
		justify-content: space-between; gap: 1rem;
		border: 0; padding: 0.4rem 1rem; text-align: right;
	}

	.schedule-table td::before {
		content: attr(data-label-de);
		flex: 0 0 auto; text-align: left;
		color: var(--muted);
		font-size: 0.66rem; font-weight: 800;
		letter-spacing: 0.14em; text-transform: uppercase;
	}
	html[data-lang="en"] .schedule-table td::before { content: attr(data-label-en); }

	/* Die erste Zelle ist der Wochentag und ueberschreibt die Karte. */
	.schedule-table td:first-child {
		display: block; text-align: left;
		padding: 0.5rem 1rem 0.6rem;
		margin-bottom: 0.2rem;
		border-bottom: 1px solid var(--line);
		font-size: 1rem;
	}
	.schedule-table td:first-child::before { content: none; }
}

/* Auf den gaengigen Telefonbreiten (375-430px) sollen Navigation und
   Sprachumschalter zusammen noch in eine Zeile passen. Darunter bricht die
   Kopfzeile um - das faengt .header-right mit flex-wrap ab. */
@media (max-width: 420px) {
	.nav { gap: 0.75rem; }
	.nav a { font-size: 0.66rem; letter-spacing: 0.06em; }
	.wrap { padding: 0 1.1rem; }
}
