/* ==========================================================================
   NART München – Basis: Tokens, Schrift, Reset, gemeinsame Bausteine
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Basis */
  --c-dark: #111110;
  --c-soft-dark: #1a1917;
  --c-ivory: #f5f3ee;
  --c-stone: #e7e4dd;
  --c-ink: #181817;
  --c-muted: #8a8984;
  --c-line: #d5d2ca;
  /* Textvarianten für ausreichenden Kontrast auf hellen Flächen */
  --c-muted-on-ivory: #686762;
  --c-muted-on-stone: #5f5e59;
  --c-bronze-on-light: #7b5937;
  --c-line-dark: #2a2926;

  /* Akzent */
  --c-bronze: #9a7254;
  --c-champagne: #c59a76;
  --c-glow: #e6c7a8;
  --c-copper: #d08a5b;
  --c-copper-hover: #dc9a6c;
  --c-pressed: #a77e5c;

  /* Schrift */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --fs-body: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-label: 0.75rem;
  --fs-display: clamp(2.5rem, 1.2rem + 4.4vw, 5.5rem);

  /* Raum */
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 3rem);
  --shell: min(88rem, 100vw - 2 * var(--gutter));
  --space-section: clamp(7rem, 4rem + 12vw, 13rem);
  /* enger Section-Abschluss bzw. -Auftakt (Ansatz → Leistungen) */
  --space-section-tight: clamp(4.5rem, 3rem + 5vw, 8rem);
  --header-h: 4rem;
  --header-top: clamp(0.75rem, 0.5rem + 0.6vw, 1.25rem);

  /* Bewegung */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: dark light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #3a3833 var(--c-dark);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--c-dark);
  color: var(--c-ivory);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--c-champagne); color: var(--c-dark); }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--c-bronze);
  outline-offset: 3px;
  border-radius: 2px;
}
[data-tone="dark"] :focus-visible { outline-color: var(--c-champagne); }

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

.skip-link {
  position: fixed;
  left: 1rem; top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--c-ivory);
  color: var(--c-ink);
  border-radius: 999px;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* ---------- Typo-Bausteine ---------- */

.kicker {
  font-size: var(--fs-label);
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--c-muted);
}
[data-tone="light"] .kicker { color: var(--c-muted-on-ivory); }
.kicker--center { text-align: center; }
.kicker--bronze { color: var(--c-champagne); }
.kicker__sep { color: var(--c-bronze); margin-inline: 0.5em; }

.display {
  font-size: var(--fs-display);
  font-weight: 450;
  font-stretch: 92%;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  max-width: 38rem;
  text-wrap: pretty;
}

.marker {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font-size: 0.6875rem;
  font-weight: 500;
  font-stretch: 115%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-top: 0.9rem;
  border-top: 1px solid currentColor;
  color: var(--c-muted-on-stone);
}
.marker__sep { color: var(--c-bronze-on-light); }

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-bronze);
  flex: none;
}

/* Zeilen-Masken für Headline-Reveals */
.line { display: block; overflow: clip; overflow-clip-margin: 0.12em; padding-bottom: 0.04em; }
.line__inner { display: block; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--c-champagne);
  --btn-fg: var(--c-dark);
  --btn-bg-hover: var(--c-glow);
  --btn-bg-active: var(--c-pressed);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition:
    background-color 0.25s ease,
    box-shadow 0.35s ease,
    transform 0.14s var(--ease-out);
}
.btn__icon {
  width: 1.15rem; height: 1.15rem;
  flex: none;
  transition: transform 0.3s var(--ease-out);
}
.btn:active {
  background: var(--btn-bg-active);
  transform: scale(0.98);
}

/* Lichtreflex über die Oberfläche */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgb(255 246 234 / 0.45) 48%, transparent 64%);
  transform: translateX(-120%);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--btn-bg-hover);
    box-shadow: 0 10px 34px -12px rgb(230 199 168 / 0.45);
  }
  .btn:hover .btn__icon:not(.btn__icon--lead, .btn__icon--morph) { transform: translateX(6px); }
  .btn:hover::after {
    transform: translateX(120%);
    transition: transform 0.9s var(--ease-out);
  }
}

/* Pfeil → aufsteigender Diagramm-Pfeil (Hover): der Pfeil zeichnet sich
   nach vorne aus, danach zeichnet sich die Trendlinie ein – und zurück. */
.btn__icon--morph { overflow: visible; }
.btn__icon--morph path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 3;
}
.icon-arrow {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.24s var(--ease-out) 0.14s, opacity 0s linear 0.14s;
}
.icon-trend {
  stroke-dashoffset: 1.02;
  opacity: 0;
  transition: stroke-dashoffset 0.2s var(--ease-out), opacity 0s linear 0.2s;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover .icon-arrow {
    stroke-dashoffset: -1.02;
    opacity: 0;
    transition: stroke-dashoffset 0.2s var(--ease-out), opacity 0s linear 0.2s;
  }
  .btn:hover .icon-trend {
    stroke-dashoffset: 0;
    opacity: 1;
    transition: stroke-dashoffset 0.34s var(--ease-out) 0.08s, opacity 0s linear 0.08s;
  }
}
/* Tastatur: gleicher Zustand bei Fokus */
.btn:focus-visible .icon-arrow { stroke-dashoffset: -1.02; opacity: 0; }
.btn:focus-visible .icon-trend { stroke-dashoffset: 0; opacity: 1; }

.btn--sm { min-height: 2.5rem; padding: 0.55rem 1.05rem; font-size: 0.875rem; gap: 0.5rem; }
.btn--sm .btn__icon { width: 1rem; height: 1rem; }
.btn--lg { min-height: 3.5rem; padding: 1rem 1.7rem; font-size: 1rem; }

/* Warmer Primär-CTA (#D08A5B), moderat gerundet */
.btn--primary {
  --btn-bg: var(--c-copper);
  --btn-bg-hover: var(--c-copper-hover);
  --btn-bg-active: var(--c-pressed);
  border-radius: 13px;
  padding: 1rem 1.6rem;
}
.btn--xl {
  padding: 18px 28px;
  font-size: 1.0625rem;
  min-height: 3.75rem;
}
.btn--dark {
  --btn-bg: var(--c-ink);
  --btn-fg: var(--c-ivory);
  --btn-bg-hover: #2b2a27;
  --btn-bg-active: #000;
  border-radius: 13px;
}
.btn--dark::after { background: linear-gradient(105deg, transparent 30%, rgb(230 199 168 / 0.22) 48%, transparent 64%); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1rem;
}
.text-link svg { width: 1rem; height: 1rem; transition: transform 0.3s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover svg { transform: translateY(4px); }
}

.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.cta-stack--left { align-items: flex-start; }
.cta-note {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  color: var(--c-muted);
  letter-spacing: 0.01em;
}

/* Reveal-Grundzustand: Inhalte sind ohne JS sichtbar */
.motion [data-reveal] { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .btn::after { display: none; }
}

/* Wort-Masken (per JS erzeugt) */
.w {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: 0.1em;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.w__i { display: inline-block; }

/* Dunkle Fläche, die sich beim Scrollen nach oben zurückzieht (Lichtwechsel).
   Die obere Kante bleibt dunkel, solange sie sichtbar ist. */
.dusk {
  --dy: 0;
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  display: none;
}
.motion .dusk { display: block; }
.dusk::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 170svh;
  background: linear-gradient(to bottom, var(--c-dark) 0%, var(--c-dark) 62%, rgb(17 17 16 / 0.6) 78%, rgb(17 17 16 / 0) 100%);
  transform: translateY(calc(var(--dy) * -1%));
}

/* kürzerer Lichtwechsel auf kleinen Ansichten: die Überschrift wird schneller lesbar */
@media (max-width: 860px) {
  .dusk::before {
    height: 62svh;
    background: linear-gradient(to bottom, var(--c-dark) 0%, var(--c-dark) 28%, rgb(17 17 16 / 0.5) 55%, rgb(17 17 16 / 0) 100%);
  }
}
