/* ==========================================================================
   Südtirol Stein – Basis: Tokens, Reset, Typografie, Buttons, Fokus
   Tokens 1:1 aus Figma (SST · Farben, SST · Theme, SST · Abstände, Textstile)
   ========================================================================== */

:root {
	/* Primitive */
	--fuz-c-basalt-950: #0b0b0a;
	--fuz-c-basalt-900: #151514;
	--fuz-c-basalt-800: #22221f;
	--fuz-c-basalt-700: #2e2e2b;
	--fuz-c-graphit-600: #515151;
	--fuz-c-granit-400: #8c8c87;
	--fuz-c-granit-300: #b4b3ae;
	--fuz-c-stein-200: #d9d9d9;
	--fuz-c-kalk-100: #efede8;
	--fuz-c-kalk-50: #f7f6f3;
	--fuz-c-weiss: #fff;
	--fuz-c-porphyr-500: #ea4c47; /* nur Flächen, Icons, große Schrift */
	--fuz-c-porphyr-600: #d23f3a; /* Text, Links, Buttons – 4,65:1 auf Weiß */
	--fuz-c-porphyr-700: #b8302b; /* Hover */

	/* Schrift */
	--fuz-font: Grift, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--fuz-fs-display-xl: clamp(3.25rem, 1.6rem + 6.6vw, 8.5rem);
	--fuz-fs-display: clamp(2.75rem, 1.6rem + 4.4vw, 6rem);
	--fuz-fs-titel-l: clamp(2.25rem, 1.5rem + 2.6vw, 4rem);
	--fuz-fs-titel-m: clamp(1.875rem, 1.45rem + 1.4vw, 2.625rem);
	--fuz-fs-titel-s: clamp(1.5rem, 1.3rem + .8vw, 2rem);
	--fuz-fs-titel-xs: clamp(1.1875rem, 1.1rem + .3vw, 1.375rem);
	--fuz-fs-lead: clamp(1.1875rem, 1.1rem + .3vw, 1.375rem);
	--fuz-fs-body-l: clamp(1.125rem, 1.08rem + .2vw, 1.25rem);
	--fuz-fs-body: 1.0625rem;
	--fuz-fs-body-s: .9375rem;
	--fuz-fs-kennzahl: clamp(3rem, 2.3rem + 2.4vw, 4.5rem);
	--fuz-fs-label: .8125rem;
	--fuz-fs-caption: .8125rem;
	--fuz-fs-button: .9375rem;

	/* Abstände */
	--fuz-space-1: 4px;
	--fuz-space-2: 8px;
	--fuz-space-3: 12px;
	--fuz-space-4: 16px;
	--fuz-space-5: clamp(20px, 1.6vw, 24px);
	--fuz-space-6: clamp(24px, 2.2vw, 32px);
	--fuz-space-7: clamp(32px, 3.3vw, 48px);
	--fuz-space-8: clamp(40px, 4.4vw, 64px);
	--fuz-space-9: clamp(48px, 5.5vw, 80px);
	--fuz-space-10: clamp(64px, 8.3vw, 120px);
	--fuz-space-11: clamp(80px, 11vw, 160px);
	--fuz-space-12: clamp(120px, 16.6vw, 240px);

	/* Layout */
	--fuz-content: 1300px;
	--fuz-text: 860px;
	--fuz-gutter: clamp(16px, 1.4vw, 20px);
	--fuz-rand: clamp(20px, 5.5vw, 80px);
	--fuz-header-h: 88px;

	/* Radius */
	--fuz-radius-s: 3px;
	--fuz-radius-m: 6px;
	--fuz-radius-rund: 999px;

	/* Bewegung */
	--fuz-ease: cubic-bezier(.2, .7, .2, 1);
	--fuz-dur: .25s;

	color-scheme: light;
}

/* Theme-Modi pro Section (Figma: SST · Theme) */
:root,
[data-fuz-theme="hell"] {
	--fuz-bg-section: var(--fuz-c-weiss);
	--fuz-bg-surface: var(--fuz-c-kalk-50);
	--fuz-bg-raised: var(--fuz-c-kalk-100);
	--fuz-text-primary: var(--fuz-c-basalt-950);
	--fuz-text-secondary: var(--fuz-c-graphit-600);
	--fuz-text-muted: #6f6f6b; /* granit-400 abgedunkelt: 4,9:1 auf Weiß, für kleine Schrift */
	--fuz-line: var(--fuz-c-stein-200);
	--fuz-line-strong: var(--fuz-c-basalt-950);
	--fuz-accent: var(--fuz-c-porphyr-600);
	--fuz-accent-hover: var(--fuz-c-porphyr-700);
	--fuz-btn-bg: var(--fuz-c-basalt-950);
	--fuz-btn-text: var(--fuz-c-weiss);
	--fuz-btn-bg-hover: var(--fuz-c-basalt-800);
	--fuz-focus: var(--fuz-c-porphyr-600);
	--fuz-placeholder: var(--fuz-c-stein-200);
}

[data-fuz-theme="kalk"] {
	--fuz-bg-section: var(--fuz-c-kalk-100);
	--fuz-bg-surface: var(--fuz-c-weiss);
	--fuz-bg-raised: var(--fuz-c-kalk-50);
	--fuz-text-muted: #66665f;
}

[data-fuz-theme="dunkel"] {
	--fuz-bg-section: var(--fuz-c-basalt-950);
	--fuz-bg-surface: var(--fuz-c-basalt-900);
	--fuz-bg-raised: var(--fuz-c-basalt-800);
	--fuz-text-primary: var(--fuz-c-weiss);
	--fuz-text-secondary: var(--fuz-c-granit-300);
	--fuz-text-muted: var(--fuz-c-granit-400);
	--fuz-line: var(--fuz-c-basalt-700);
	--fuz-line-strong: var(--fuz-c-weiss);
	--fuz-accent: var(--fuz-c-porphyr-500);
	--fuz-accent-hover: var(--fuz-c-porphyr-600);
	--fuz-btn-bg: var(--fuz-c-weiss);
	--fuz-btn-text: var(--fuz-c-basalt-950);
	--fuz-btn-bg-hover: var(--fuz-c-kalk-100);
	--fuz-focus: var(--fuz-c-porphyr-500);
	--fuz-placeholder: var(--fuz-c-basalt-800);
	color-scheme: dark;
}

[data-fuz-theme] {
	background-color: var(--fuz-bg-section);
	color: var(--fuz-text-primary);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--fuz-header-h) + 16px); }
body { margin: 0; min-height: 100vh; font-family: var(--fuz-font); font-size: var(--fuz-fs-body); line-height: 1.65; font-weight: 400; color: var(--fuz-text-primary); background: var(--fuz-bg-section); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-kerning: normal; hyphens: auto; overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg, video, picture { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
address { font-style: normal; }
abbr[title] { text-decoration: none; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

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

/* ---------- Fokus (WCAG 2.4.7 / 2.4.11) ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--fuz-focus); outline-offset: 3px; border-radius: 2px; }
.fuz-main:focus { outline: none; }

/* ---------- Typografie ---------- */
.fuz-display-xl, .fuz-display, .fuz-titel-l { font-weight: 700; text-transform: uppercase; hyphens: manual; }
.fuz-display-xl { font-size: var(--fuz-fs-display-xl); line-height: .95; letter-spacing: -.02em; }
.fuz-display { font-size: var(--fuz-fs-display); line-height: 1; letter-spacing: -.01em; }
.fuz-titel-l, h1 { font-size: var(--fuz-fs-titel-l); line-height: 1.08; letter-spacing: -.005em; font-weight: 700; }
h1 { text-transform: uppercase; hyphens: manual; }
.fuz-titel-m, h2 { font-size: var(--fuz-fs-titel-m); line-height: 1.2; letter-spacing: -.005em; font-weight: 700; }
.fuz-titel-s, h3 { font-size: var(--fuz-fs-titel-s); line-height: 1.25; font-weight: 700; }
.fuz-titel-xs, h4, h5, h6 { font-size: var(--fuz-fs-titel-xs); line-height: 1.3; font-weight: 700; }
.fuz-lead { font-size: var(--fuz-fs-lead); line-height: 1.5; font-weight: 500; }
.fuz-body-l { font-size: var(--fuz-fs-body-l); line-height: 1.6; }
.fuz-body-s { font-size: var(--fuz-fs-body-s); line-height: 1.5; }
.fuz-label { font-size: var(--fuz-fs-label); line-height: 1.2; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fuz-caption { font-size: var(--fuz-fs-caption); line-height: 1.4; font-weight: 500; color: var(--fuz-text-secondary); }
.fuz-kennzahl__zahl { font-size: var(--fuz-fs-kennzahl); line-height: 1; font-weight: 800; letter-spacing: -.01em; }
.fuz-muted { color: var(--fuz-text-secondary); }

/* ---------- Buttons (Figma: SST Button) ---------- */
.fuz-button {
	--_bg: var(--fuz-btn-bg);
	--_fg: var(--fuz-btn-text);
	--_bd: var(--fuz-btn-bg);
	display: inline-flex; align-items: center; justify-content: center; gap: var(--fuz-space-3);
	min-height: 48px; padding: 18px 32px;
	font-size: var(--fuz-fs-button); font-weight: 700; line-height: 1; letter-spacing: .02em;
	color: var(--_fg); background: var(--_bg); border: 1px solid var(--_bd); border-radius: var(--fuz-radius-s);
	text-decoration: none; white-space: nowrap;
	transition: background-color var(--fuz-dur) var(--fuz-ease), color var(--fuz-dur) var(--fuz-ease), border-color var(--fuz-dur) var(--fuz-ease);
}
.fuz-button:hover { --_bg: var(--fuz-btn-bg-hover); --_bd: var(--fuz-btn-bg-hover); }
.fuz-button--secondary { --_bg: transparent; --_fg: var(--fuz-text-primary); --_bd: var(--fuz-line-strong); }
.fuz-button--secondary:hover { --_bg: var(--fuz-text-primary); --_fg: var(--fuz-bg-section); --_bd: var(--fuz-text-primary); }
.fuz-button--text { --_bg: transparent; --_bd: transparent; --_fg: var(--fuz-text-primary); padding: 6px 0; min-height: 24px; border-radius: 0; border-width: 0 0 1px; border-bottom-color: var(--fuz-line-strong); }
.fuz-button--text:hover { --_bg: transparent; --_fg: var(--fuz-accent); border-bottom-color: var(--fuz-accent); }
.fuz-button--arrow { width: 64px; height: 64px; padding: 0; border-radius: var(--fuz-radius-rund); --_bg: transparent; --_fg: var(--fuz-text-primary); --_bd: var(--fuz-line-strong); }
.fuz-button--arrow:hover { --_bg: var(--fuz-accent); --_bd: var(--fuz-accent); --_fg: var(--fuz-c-weiss); }
.fuz-button[aria-disabled="true"], .fuz-button:disabled { opacity: .4; pointer-events: none; }
.fuz-button-row { display: flex; flex-wrap: wrap; gap: var(--fuz-space-4); align-items: center; }

.fuz-icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* Fließtext-Links */
.fuz-prose a:not(.fuz-button), .fuz-link { color: var(--fuz-accent); text-decoration: underline; }
.fuz-prose a:not(.fuz-button):hover, .fuz-link:hover { color: var(--fuz-accent-hover); }

/* ---------- Utilities ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.fuz-skip { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 12px 20px; background: var(--fuz-c-basalt-950); color: var(--fuz-c-weiss); font-weight: 700; border-radius: var(--fuz-radius-s); transform: translateY(-200%); }
.fuz-skip:focus-visible { transform: none; }
.fuz-cover { width: 100%; height: 100%; object-fit: cover; }

/* Ganze Card klickbar, ein Link pro Card (kein doppelter Tab-Stopp) */
.fuz-stretched { text-decoration: none; }
.fuz-stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
:where(.fuz-story-card, .fuz-project-card, .fuz-stone-card, .fuz-service-card) { position: relative; }
:where(.fuz-story-card, .fuz-project-card, .fuz-stone-card, .fuz-service-card):has(.fuz-stretched:focus-visible) { outline: 2px solid var(--fuz-focus); outline-offset: 4px; }
.fuz-stretched:focus-visible { outline: none; }
