/* ==========================================================================
   LAYOUT — page frame, containers, section rhythm, footer
   --------------------------------------------------------------------------
   Rhythm: every block section breathes with the same --section-y; inner
   spacing uses the --space-* scale only. Nothing here knows about colour
   modes (tokens do).
   ========================================================================== */

/* The fixed header floats over the hero on the front page; everywhere else
   the page starts below it. `clip` (not hidden) keeps position: sticky alive. */
.sac-site {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	padding-top: var(--header-h);
	overflow-x: clip;
}

.home .sac-site {
	padding-top: 0;
}

.sac-main {
	flex: 1 0 auto;
	outline: 0;
}

/* --- Containers --------------------------------------------------------- */
.sac-container {
	width: min(var(--container), 100% - var(--gutter) * 2);
	margin-inline: auto;
}

.sac-container--narrow {
	width: min(var(--content-width), 100% - var(--gutter) * 2);
}

/* --- Sections ----------------------------------------------------------- */
.sac-section {
	position: relative;
	padding-block: var(--section-y);
	isolation: isolate;
}

/* A quiet tinted band (alternating rhythm). */
.sac-section--tint {
	background: var(--c-section);
}

/* Contour field drifting in from a section corner. */
.sac-section__topo {
	position: absolute;
	z-index: -1;
	top: 0;
	right: 0;
	width: min(70rem, 120%);
	height: auto;
	aspect-ratio: 16 / 10;
	color: var(--c-topo);
	--topo-minor: 0.42;
	-webkit-mask-image: radial-gradient(closest-side at 70% 35%, #000 30%, transparent);
	mask-image: radial-gradient(closest-side at 70% 35%, #000 30%, transparent);
}

/* Anchor target after the hero (cue link). */
.sac-anchor {
	display: block;
	height: 0;
}

/* ==========================================================================
   FOOTER — a night map
   ========================================================================== */

.sac-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--c-bg);
	padding-top: var(--section-y);
}

.sac-footer__topo {
	position: absolute;
	z-index: -1;
	inset: 0;
	width: 100%;
	height: 100%;
	color: var(--c-topo);
	--topo-minor: 0.5;
	-webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%);
	mask-image: linear-gradient(to bottom, transparent, #000 45%);
}

.sac-footer__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-7) var(--space-6);
}

.sac-footer__statement {
	min-width: 0;
}

.sac-footer__statement .sac-eyebrow {
	margin-bottom: var(--space-4);
}

/* Wordmark — the section name, set large. */
.sac-footer__wordmark {
	margin: 0;
	font-size: clamp(2.6rem, 1rem + 8.5vw, 9rem);
	font-weight: 700;
	line-height: 0.86;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: var(--c-heading);
	overflow-wrap: anywhere;
}

/* "Zurück zum Gipfel" — a round button that climbs on hover. */
.sac-totop {
	display: inline-flex;
	align-items: center;
	gap: var(--space-4);
	color: var(--c-text);
	text-decoration: none;
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: var(--ls-mono);
	text-transform: uppercase;
}

.sac-totop__icon {
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	border: 1px solid var(--c-border-strong);
	border-radius: 50%;
	transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease, color var(--dur-1) ease;
}

.sac-totop__icon svg {
	width: 1.25rem;
	transition: transform var(--dur-2) var(--ease-out);
}

.sac-totop:hover {
	color: var(--c-heading);
}

.sac-totop:hover .sac-totop__icon {
	color: var(--c-accent-text);
	border-color: var(--c-accent);
	box-shadow: var(--ring-hover);
}

.sac-totop:hover .sac-totop__icon svg {
	transform: translateY(-3px);
}

/* Widget columns. */
.sac-footer__widgets {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-7);
	margin-top: var(--space-9);
	padding-top: var(--space-7);
	border-top: 1px solid var(--c-border);
	font-size: var(--fs-sm);
}

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

.sac-footer__widget + .sac-footer__widget {
	margin-top: var(--space-6);
}

.sac-footer__widget-title {
	margin-bottom: var(--space-4);
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	font-weight: 400;
	letter-spacing: var(--ls-mono);
	text-transform: uppercase;
	color: var(--c-text-muted);
}

.sac-footer__widget ul {
	list-style: none;
	padding: 0;
}

.sac-footer__widget li + li {
	margin-top: var(--space-2);
}

.sac-footer a {
	color: var(--c-text);
	text-decoration-color: transparent;
	transition: color var(--dur-1) ease, text-decoration-color var(--dur-1) ease;
}

.sac-footer a:hover {
	color: var(--c-heading);
	text-decoration-color: var(--c-accent);
}

/* Legal row. */
.sac-footer__bar {
	margin-top: var(--space-8);
	border-top: 1px solid var(--c-border);
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.08em;
	color: var(--c-text-muted);
}

.sac-footer__bar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3) var(--space-6);
	padding-block: var(--space-5);
}

.sac-footer__bar p {
	margin: 0;
}

.sac-footer__legal-menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sac-footer__bar .sac-footer__coords {
	margin-left: auto;
}
