/**
 * Base: aliases for theme.json tokens, element defaults, buttons, focus, motion.
 * Design tokens are defined in theme.json; this file only references them.
 */

:root {
	--c-paper: var(--wp--preset--color--paper);
	--c-sand: var(--wp--preset--color--sand);
	--c-line: var(--wp--preset--color--line);
	--c-ink: var(--wp--preset--color--ink);
	--c-ink-muted: var(--wp--preset--color--ink-muted);
	--c-forest: var(--wp--preset--color--forest);
	--c-forest-2: var(--wp--preset--color--forest-2);
	--c-moss: var(--wp--preset--color--moss);
	--c-wood: var(--wp--preset--color--wood);
	--c-wood-light: var(--wp--preset--color--wood-light);
	--c-white: var(--wp--preset--color--white);

	--f-display: var(--wp--preset--font-family--display);
	--f-body: var(--wp--preset--font-family--body);

	--fs-x-small: var(--wp--preset--font-size--x-small);
	--fs-small: var(--wp--preset--font-size--small);
	--fs-base: var(--wp--preset--font-size--base);
	--fs-medium: var(--wp--preset--font-size--medium);
	--fs-large: var(--wp--preset--font-size--large);
	--fs-x-large: var(--wp--preset--font-size--x-large);

	/* Same value as theme.json styles.spacing.padding (root gutter). */
	--gutter: var(--wp--style--root--padding-left, clamp(1.25rem, 4vw, 3rem));
	--wide: var(--wp--style--global--wide-size, 1280px);
	--section: var(--wp--preset--spacing--60, clamp(4rem, 9vw, 9rem));

	--header-h: 4.25rem;
	--sticky-cta-h: 4.5rem;
	--radius: 0;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--dur: 220ms;

	/* Design line „ruhiger alpiner Luxus“: hairlines instead of boxes, one soft shadow. */
	--hairline: 1px solid var(--c-line);
	--hairline-dark: 1px solid rgb(247 243 236 / 0.16);
	--shadow-soft: 0 1.75rem 3.5rem -2rem rgb(20 28 23 / 0.45);
	--measure: 38rem;
	--tracking-caps: 0.16em;
}

@media (min-width: 1024px) {
	:root {
		--header-h: 5.25rem;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	overflow-x: clip;
	/* Cormorant defaults to old-style figures; prices, years and "1’560 m" read better lining. */
	font-variant-numeric: lining-nums;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

:where(h1, h2, h3, h4, h5, h6) {
	margin-block: 0 0.5em;
	text-wrap: balance;
}

:where(p, li) {
	text-wrap: pretty;
}

/* Long German compounds on narrow screens: hyphenate headings instead of overflowing. */
@media (max-width: 480px) {
	:where(h1, h2, h3) {
		-webkit-hyphens: auto;
		hyphens: auto;
	}
}

::selection {
	background: var(--c-wood-light);
	color: var(--c-ink);
}

:where(a) {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
	transition: color var(--dur) var(--ease);
}

address {
	font-style: normal;
}

.icon {
	display: inline-block;
	flex-shrink: 0;
	width: 1.25em;
	height: 1.25em;
	vertical-align: -0.25em;
}

/* ── Accessibility ──────────────────────────────────────────── */

:focus-visible {
	outline: 2px solid var(--c-wood);
	outline-offset: 3px;
}

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

.skip-link {
	position: fixed;
	z-index: 1000;
	top: 0.75rem;
	left: 0.75rem;
	padding: 0.75rem 1.25rem;
	background: var(--c-forest);
	color: var(--c-white);
	font-weight: 500;
	transform: translateY(-200%);
}

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

/* ── Typography helpers ─────────────────────────────────────── */

.eyebrow {
	margin: 0 0 1rem;
	color: var(--c-wood);
	font-family: var(--f-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* ── Buttons (theme.json styles .wp-element-button; these are variants) ── */

.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	min-height: 3rem;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.wp-element-button .icon {
	width: 1.1em;
	height: 1.1em;
	vertical-align: 0;
}

.wp-element-button.button--pill {
	padding-inline: 1.5em;
}

.wp-element-button:active {
	transform: translateY(1px);
}

.wp-element-button.button--light {
	background: var(--c-white);
	color: var(--c-forest);
}

.wp-element-button.button--light:hover {
	background: var(--c-sand);
	color: var(--c-forest);
}

/* ── Motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
