/* Segelschule Stansstad – Stylesheet */

@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
	--base: #ffffff;
	--surface: #f2f6fa;
	--sand: #f7f1e6;
	--line: #dbe4ee;
	--muted: #55687a;
	--text: #17222e;
	--primary: #1c4f86;
	--primary-dark: #0f2d4d;
	--accent: #0e8a73;
	--font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
	--gutter: clamp(1rem, 4vw, 2rem);
	--wide: 1200px;
	--narrow: 760px;
	--band: clamp(3rem, 7vw, 5.5rem);
	--radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--base);
	color: var(--text);
	font: 400 1.0625rem/1.65 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--accent); }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	color: var(--primary-dark);
	line-height: 1.15;
	margin: 1.6em 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.45rem; font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }
p, ul, ol { margin: 0 0 1em; }

.visually-hidden, .hp {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary-dark); color: #fff; padding: 0.6rem 1rem; z-index: 200; }
.skip-link:focus { left: 1rem; }

.wrap { max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.accent { color: var(--accent); }
.strong { font-weight: 600; }
.strong-link { font-weight: 600; }

/* Buttons */
.btn {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	font: 600 1.05rem/1 var(--font-head);
	letter-spacing: 0.02em;
	padding: 0.8em 1.6em;
	border: 2px solid var(--accent);
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-small { font-size: 0.95rem; padding: 0.55em 1.2em; }
.btn-outline-light { background: transparent; border-color: #fff; }
.btn-light { background: #fff; color: var(--primary-dark); border-color: #fff; }
.btn-light:hover { background: var(--sand); border-color: var(--sand); color: var(--primary-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }

/* Kopfzeile */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: color-mix(in srgb, #fff 92%, transparent);
	backdrop-filter: saturate(160%) blur(8px);
	-webkit-backdrop-filter: saturate(160%) blur(8px);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.logo img { width: 84px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav > ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { font: 600 1.08rem var(--font-head); color: var(--primary-dark); text-decoration: none; }
.main-nav a:hover, .main-nav .is-active > a { color: var(--accent); }
.main-nav .header-cta { color: #fff; }
.has-sub { position: relative; }
.has-sub > a::after { content: ""; display: inline-block; width: 0.38em; height: 0.38em; margin-left: 0.4em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-0.2em) rotate(45deg); }
.sub {
	position: absolute; top: 100%; left: -1rem;
	min-width: 250px; list-style: none; margin: 0; padding: 0.5rem 0;
	background: #fff; border: 1px solid var(--line); border-radius: 10px;
	box-shadow: 0 12px 32px rgba(15, 45, 80, 0.12);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.sub a { display: block; padding: 0.45rem 1.1rem; font-weight: 500; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }

.nav-toggle { display: none; background: none; border: 0; padding: 0.6rem; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 24px; height: 2px; background: var(--primary-dark); position: relative; transition: transform 0.2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1020px) {
	.nav-toggle { display: block; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 0;
		background: #fff; border-bottom: 1px solid var(--line);
		max-height: calc(100vh - 76px); overflow-y: auto;
		padding: 0.5rem var(--gutter) 1.5rem;
	}
	.main-nav.is-open { display: flex; }
	.main-nav > ul { flex-direction: column; gap: 0; }
	.main-nav > ul > li { border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
	.has-sub > a::after { display: none; }
	.sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0.3rem 0 0 0.8rem; min-width: 0; }
	.sub li:first-child { display: none; }
	.sub a { padding: 0.3rem 0; color: var(--muted); }
	.header-cta { margin-top: 1rem; align-self: flex-start; }
	body.nav-open { overflow: hidden; }
}

/* Titelbilder */
.hero, .page-cover {
	position: relative; display: flex; align-items: flex-end;
	background: var(--primary-dark); color: #fff; overflow: hidden;
}
.hero { min-height: min(82vh, 900px); padding: 8rem 0 var(--band); }
.page-cover { min-height: min(46vh, 480px); padding: 6rem 0 2.5rem; }
.cover-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after, .page-cover::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(15, 45, 77, 0.15) 30%, rgba(15, 45, 77, 0.7));
}
.page-cover.no-image::after { display: none; }
.hero-inner, .cover-inner { position: relative; z-index: 1; width: 100%; }
.hero h1, .page-cover h1 { color: #fff; margin: 0; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.hero-intro { font-size: clamp(1.15rem, 2vw, 1.3rem); max-width: 40rem; margin-top: 1rem; }
.eyebrow { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.6rem; }
.eyebrow-accent { color: var(--accent); }

/* Bänder */
.band { padding-block: var(--band); }
.band > .wrap > h2:first-child { margin-top: 0; }
.band-surface { background: var(--surface); }
.band-sand { background: var(--sand); }
.band-primary { background: var(--primary); color: #fff; }
.band-primary h2, .band-primary a:not(.btn) { color: #fff; }
.cta { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.cta > div { max-width: 46rem; }
.cta h2 { margin-top: 0; }

.split-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.split-head h2 { margin: 0; }
.reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 2rem; margin-top: 2rem; }
.reason { border-top: 3px solid var(--accent); padding-top: 1rem; }
.reason h3 { margin: 0 0 0.4rem; font-size: 1.25rem; }

/* Karten */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 1.5rem; margin-top: 2rem; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.card {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	color: inherit; text-decoration: none;
	transition: box-shadow 0.2s, transform 0.2s;
}
a.card:hover { box-shadow: 0 14px 34px rgba(15, 45, 80, 0.1); transform: translateY(-2px); color: inherit; }
.card > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.2rem 1.4rem 1.5rem; flex: 1; }
.card-padded { padding: 1.5rem; }
.card-title { font: 700 1.4rem/1.2 var(--font-head); color: var(--primary-dark); margin: 0; }
.card-text { color: var(--muted); }
.card-link { margin-top: auto; font-weight: 600; color: var(--primary); text-decoration: underline; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 1.5rem; padding-bottom: var(--band); }
.team-grid .card > img, .photo-placeholder { aspect-ratio: 4 / 3; }
.photo-placeholder { display: grid; place-items: center; background: var(--surface); color: var(--muted); }
.member-head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-bottom: 2rem; }
.member-head img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; }
.member-head h1 { margin: 0; }
.back { margin: 0 0 1rem; }

/* Inhaltsbereich */
.content { padding-block: clamp(2rem, 4vw, 3rem) var(--band); }
.content > :first-child { margin-top: 0; }
.page-plain { padding-top: clamp(2rem, 5vw, 4rem); }
.content figure { margin: 2rem 0; }
.content figure img { border-radius: 12px; }
.content figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }
.content blockquote { border-left: 4px solid var(--accent); margin: 2rem 0; padding-left: 1.25rem; font-size: 1.2rem; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.content ul, .content ol { padding-left: 1.2em; }
.content .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; list-style: none; padding: 0; }
.article-image { border-radius: 12px; margin-bottom: 2rem; }

.course-info {
	border-left: 4px solid var(--accent);
	background: var(--surface);
	border-radius: 0 12px 12px 0;
	padding: 1.5rem 1.75rem;
	margin: 1.5rem 0;
}
.course-info h3 { margin-top: 0; }
.course-details p { margin-bottom: 0.6em; }
.course-info .btn { margin-top: 0.6rem; }

.map { margin: 2rem 0; }
.map iframe { width: 100%; height: 420px; border: 0; border-radius: 12px; }

/* Formulare */
.form { margin-top: 2rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 0 1.25rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
	width: 100%; font: inherit; color: inherit;
	padding: 0.65rem 0.8rem; border: 1px solid #b9c7d6; border-radius: 8px; background: #fff;
}
.field-error { color: #b42318; font-size: 0.9rem; margin: 0.3rem 0 0; }
.notice { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.5rem; }
.notice-success { background: #e6f5f1; border: 1px solid #9fd8c9; }
.notice-error { background: #fdecea; border: 1px solid #f3b5ad; }

/* Fusszeile */
.site-footer { background: var(--primary-dark); color: #fff; padding-top: var(--band); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-claim { font: 700 1.9rem/1.1 var(--font-head); margin: 0 0 0.8rem; }
.footer-title { font: 700 1.1rem var(--font-head); color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.8rem; }
.muted-light, .footer-bottom { color: #c9d6e4; }
.footer-links { list-style: none; padding: 0; line-height: 2; }
.social { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; font-size: 0.9rem; border-top: 1px solid #2b4a6b; margin-top: 2.5rem; padding-block: 1.2rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.card, .sub, .nav-toggle-bars { transition: none; }
	a.card:hover { transform: none; }
}

@media print {
	.site-header, .site-footer, .hero::after, .page-cover::after, .btn { display: none; }
	.page-cover, .hero { background: none; color: #000; min-height: 0; padding: 0; }
	.cover-bg { display: none; }
	.page-cover h1 { color: #000; }
}
