/* ==========================================================================
   GNZ Immobilien-Komplettservice
   base.css – Design-Tokens, Reset, Typografie, Buttons, Icons
   Gestaltungsidee: "Pflasterfläche" – Karten sind Steine, der Abstand ist die Fuge.
   ========================================================================== */

:root {
  /* Materialpalette */
  --basalt: #14181c;
  --basalt-2: #0d1013;
  --schiefer: #1d2429;
  --granit: #2b343b;
  --stahl: #4a5760;
  --nebel: #4a555e;
  --kalk: #f7f2e8;
  --sand: #eee5d1;
  --fuge: #d8cdb7;
  --fuge-d: #c4b79d;
  --weiss: #fffdf8;

  /* Akzente */
  --signal: #ffb400;
  --signal-d: #e39d00;
  --signal-l: #ffd35f;
  --klinker: #983520;
  --moos: #3d7324;
  --field-line: #857c68;
  --aqua: #1f9fc8;

  --ink: #161b1f;
  --ink-2: #39444c;
  --line: rgba(20, 24, 28, .14);
  --line-l: rgba(255, 255, 255, .16);

  /* Formen */
  --radius: 14px;
  --radius-s: 9px;
  --radius-l: 22px;
  --shadow-s: 0 1px 2px rgba(20, 24, 28, .12), 0 8px 16px -10px rgba(20, 24, 28, .3);
  --shadow-m: 0 2px 4px rgba(20, 24, 28, .1), 0 22px 38px -20px rgba(20, 24, 28, .5);
  --slab-edge: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -3px 0 rgba(20, 24, 28, .07);

  /* Typografie – nur Systemschriften (kein Google-Fonts-Abruf, DSGVO-freundlich) */
  --font-display: "Bahnschrift", "DIN Condensed", "DIN Alternate", "Franklin Gothic Medium", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 72px;

  /* Körnung – Basalt-/Kalk-Textur ohne Bilddatei */
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .16 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .12 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Läuferverband als Linienmuster (Pflaster-Motiv für dunkle Flächen) */
  --bond-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48'%3E%3Cpath d='M0 .75H96M0 24.75H96M.75 0V24M48.75 24V48' fill='none' stroke='%23fff' stroke-opacity='.07' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--kalk);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
figure { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
[hidden] { display: none !important; }
::selection { background: var(--signal); color: var(--basalt); }

/* Fokus: doppelter Ring, auf hellem wie dunklem Grund sichtbar */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--basalt);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--signal);
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--signal); color: var(--basalt); padding: .7rem 1rem; border-radius: var(--radius-s);
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  margin: 0 0 .55em;
  letter-spacing: .005em;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
}
h1, h2 { text-transform: uppercase; font-stretch: 75%; }
h3, h4 { font-stretch: 85%; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 1.2rem + 5.4vw, 5.4rem); line-height: .96; }
h2 { font-size: clamp(2rem, 1.1rem + 3.2vw, 3.6rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); }
h4 { font-size: 1.15rem; }
.lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.band--dark .lead, .hero .lead, .page-hero .lead { color: rgba(245, 242, 235, .86); }
.muted { color: var(--nebel); }
.band--dark .muted { color: rgba(245, 242, 235, .66); }
.small { font-size: .92rem; }
.tnum { font-variant-numeric: tabular-nums; }
.hl { color: var(--signal); }
.nowrap { white-space: nowrap; }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--klinker); font-weight: 600; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-display); font-stretch: 85%; font-weight: 700;
  font-size: .95rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--klinker); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 34px; height: 5px; border-radius: 2px; background: var(--signal); }
.band--dark .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--signal); }

/* ---------- Layout-Helfer ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section--tight { padding-block: clamp(2.2rem, 4.5vw, 3.8rem); }
.band--dark { background: var(--basalt) var(--grain-light); color: var(--kalk); position: relative; }
.band--sand { background: var(--sand) var(--grain-dark); }
.band--fuge { background: var(--fuge) var(--grain-dark); }
.sec-head { max-width: 46rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .eyebrow { justify-content: center; }
.sec-head--center .lead { margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; }
.split { display: grid; gap: clamp(1.8rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.15fr .85fr; }
  .split--wide-right { grid-template-columns: .85fr 1.15fr; }
  .split--top { align-items: start; }
}
/* Rasterkinder dürfen schrumpfen – verhindert Überlauf bei langen Wörtern / breiten Ersatzschriften */
.split > *, .cols > *, .grid-2 > * { min-width: 0; }
.cols { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cols--2, .cols--3, .cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Icons ---------- */
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i--lg { width: 1.9rem; height: 1.9rem; }
.i--xl { width: 2.4rem; height: 2.4rem; }
.icon-badge {
  display: grid; place-items: center; flex: none;
  width: 3rem; height: 3rem; border-radius: 12px;
  background: var(--signal); color: var(--basalt);
  box-shadow: inset 0 -3px 0 rgba(20, 24, 28, .16), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.icon-badge--dark { background: var(--basalt); color: var(--signal); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35); }
.icon-badge--line { background: transparent; color: var(--signal); box-shadow: inset 0 0 0 2px var(--signal); }

/* ---------- Buttons – wie dicke Pflastersteine ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3rem; padding: .85rem 1.45rem;
  border: 2px solid transparent; border-radius: 12px;
  font-family: var(--font-display); font-stretch: 85%; font-weight: 700;
  font-size: 1.05rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1.1;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
}
.btn .i { width: 1.2em; height: 1.2em; }
.btn--primary { background: var(--signal); color: var(--basalt); box-shadow: 0 4px 0 var(--signal-d), 0 16px 24px -14px rgba(227, 157, 0, .9); }
.btn--primary:hover { background: var(--signal-l); transform: translateY(-1px); box-shadow: 0 5px 0 var(--signal-d), 0 20px 28px -14px rgba(227, 157, 0, .9); }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--signal-d); }
.btn--dark { background: var(--basalt); color: var(--kalk); box-shadow: 0 4px 0 #000; }
.btn--dark:hover { background: var(--granit); transform: translateY(-1px); }
.btn--dark:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--kalk); }
.btn--ghost-light { background: transparent; color: var(--kalk); border-color: rgba(245, 242, 235, .55); }
.btn--ghost-light:hover { background: var(--kalk); color: var(--basalt); border-color: var(--kalk); }
.btn--sm { min-height: 2.5rem; padding: .55rem 1rem; font-size: .95rem; }
.btn--lg { min-height: 3.5rem; padding: 1rem 1.9rem; font-size: 1.15rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none;
  font-family: var(--font-display); font-stretch: 85%; letter-spacing: .05em; text-transform: uppercase; font-size: 1rem;
}
.link-arrow .i { transition: transform .2s; }
.link-arrow:hover .i { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: .3em; }

/* ---------- Kleine Bausteine ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .28rem .7rem; border-radius: 999px;
  background: var(--signal); color: var(--basalt);
  font-family: var(--font-display); font-stretch: 85%; font-weight: 700;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
}
.badge--dark { background: var(--basalt); color: var(--signal); }
.badge--line { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; color: inherit; }
.checks { list-style: none; display: grid; gap: .55rem; }
.checks li { display: flex; gap: .65rem; align-items: flex-start; }
.checks .i { width: 1.2em; height: 1.2em; margin-top: .22em; color: var(--moos); stroke-width: 2.4; }
.band--dark .checks .i, .poster .checks .i, .hero .checks .i { color: var(--signal); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Sanfte Seitenübergänge zwischen den Unterseiten (Chrome/Edge/Safari 18+, sonst ohne Effekt) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
