/* ContForm — Basis: Fonts, Tokens, Reset, Bausteine */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-var-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+20AC;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/bricolage-var-latinext.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/figtree-var-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+20AC;
}
@font-face {
  font-family: 'Figtree';
  src: url('fonts/figtree-var-latinext.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/plexmono-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/plexmono-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #F6F5F1;
  --card: #FFFFFF;
  --ink: #1B201D;
  --ink-soft: #5C635E;
  --green: #0E5B49;
  --green-deep: #0A4237;
  --green-tint: #E3EDE8;
  --marker: #FFE14D;
  --marker-soft: #FFF3B8;
  --line: #DEDCD2;
  --line-strong: #C6C4B8;
  --red: #B4443C;
  --red-tint: #F7E7E5;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
  --font-body: 'Figtree', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;

  /* Schatten in drei Lagen: harte Kontaktkante, weiche Nähe, weite Tiefe.
     Eine einzelne Lage wirkt aufgeklebt — drei lassen die Karte aufliegen. */
  --shadow-card:
    0 0 0 1px rgba(27, 32, 29, .04),
    0 1px 2px rgba(27, 32, 29, .05),
    0 6px 16px -6px rgba(27, 32, 29, .08),
    0 20px 40px -24px rgba(27, 32, 29, .14);
  --shadow-pop:
    0 0 0 1px rgba(27, 32, 29, .05),
    0 4px 10px rgba(27, 32, 29, .09),
    0 16px 32px -12px rgba(27, 32, 29, .14),
    0 36px 70px -30px rgba(27, 32, 29, .22);
  /* Lichtkante oben auf Karten — wie die angeschnittene Faser einer Papierkante */
  --kante: inset 0 1px 0 rgba(255, 255, 255, .7);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* Papier ist nie ganz glatt: eine sehr feine Körnung nimmt der Fläche das
   Digitale, ohne als Muster aufzufallen. Rein aus Verläufen gebaut, damit
   keine Bilddatei nötig ist. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(circle at 17% 23%, rgba(27, 32, 29, .022) .5px, transparent .5px),
    radial-gradient(circle at 63% 71%, rgba(27, 32, 29, .018) .5px, transparent .5px),
    radial-gradient(circle at 89% 41%, rgba(27, 32, 29, .015) .5px, transparent .5px);
  background-size: 37px 37px, 53px 53px, 71px 71px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 .5em;
  /* Große Schrift wirkt bei gleicher Laufweite luftiger als kleine — enger
     setzen, damit Überschriften als geschlossene Form lesen. */
  letter-spacing: -.015em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

/* Zahlen in Tabellen und Metadaten untereinander bündig */
.table td, .table th, .mono, time { font-variant-numeric: tabular-nums; }
a { color: var(--green); }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--marker); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--marker);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Leuchtmarker-Unterlegung (Signatur) */
.marker {
  background-image: linear-gradient(104deg, transparent 1.5%, var(--marker) 2.5%, var(--marker) 96%, transparent 97%);
  background-size: 100% .55em;
  background-position: 0 78%;
  background-repeat: no-repeat;
  padding: 0 .08em;
}

/* Eyebrow im Formular-Duktus */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 .9em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font: 600 1rem/1.2 var(--font-body);
  padding: .72em 1.35em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn--danger:hover { background: var(--red-tint); }
.btn--marker { background: var(--marker); color: var(--ink); }
.btn--marker:hover { background: #F6D63A; }
.btn--sm { font-size: .87rem; padding: .5em 1em; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* App-Eingabefelder (Login, Einstellungen …) */
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: .35rem;
}
.field input, .field textarea, .field select {
  width: 100%;
  font: 400 1rem/1.4 var(--font-body);
  color: var(--ink);
  background: #FBFAF7;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: .62em .8em;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}
.field .hint { font-size: .82rem; color: var(--ink-soft); margin: .3rem 0 0; }

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