/* ==========================================================================
   Griply — Design-System (Tokens, Reset, Basis, geteilte Komponenten)
   Look: premium minimalist / precision (Vorbilder Linear & Stripe).
   Eine zentrale Quelle für Farben/Spacing/Typo — leicht verfeinerbar.
   ========================================================================== */

:root {
  /* Farben — warm-neutraler Grund, tiefes Emerald als einziger Akzent */
  --bg: #fbfbf9;
  --bg-elevated: #ffffff;
  --bg-subtle: #f4f3ef;
  --ink: #14161a;
  --ink-soft: #383b42;
  --ink-muted: #6a6e77;
  --ink-faint: #9b9ea6;
  --line: #e9e7e1;
  --line-strong: #dcd9d1;
  --accent: #0f7a5a;
  --accent-strong: #0b6147;
  --accent-soft: #e9f3ee;
  --accent-ink: #ffffff;
  --danger: #b23b2e;
  --danger-soft: #fbecea;

  /* Typografie */
  --font-display: "Clash Display", "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Radius */
  --r-sm: 7px;
  --r: 11px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  /* Schatten — fein, mehrschichtig */
  --shadow-xs: 0 1px 2px rgba(20, 22, 26, .04);
  --shadow-sm: 0 1px 3px rgba(20, 22, 26, .06), 0 1px 2px rgba(20, 22, 26, .04);
  --shadow-md: 0 6px 16px -4px rgba(20, 22, 26, .08), 0 2px 6px -2px rgba(20, 22, 26, .05);
  --shadow-lg: 0 24px 48px -16px rgba(20, 22, 26, .18);
  --ring: 0 0 0 3px rgba(15, 122, 90, .18);

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Maße */
  --maxw: 1140px;
  --nav-h: 68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ---- Typografie ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 500;
}
.muted { color: var(--ink-muted); }

/* ---- Layout-Helfer ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.stack > * + * { margin-top: 1rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.15rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost { background: var(--bg-elevated); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-faint); box-shadow: var(--shadow-sm); }
.btn-soft { background: var(--accent-soft); color: var(--accent-strong); }
.btn-soft:hover { background: #ddeee5; }
.btn-lg { padding: .92rem 1.5rem; font-size: 1.02rem; border-radius: var(--r-lg); }
.btn-block { width: 100%; }

/* ---- Pills / Badges ---- */
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .34rem .7rem; border-radius: var(--r-full);
  background: var(--bg-elevated); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 500; color: var(--ink-soft);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ---- Cards ---- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.4rem;
}

/* ---- Brand / Logo ---- */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.02em; color: var(--ink); }
.brand .mark { width: 28px; height: 28px; flex: none; }

/* ---- Formularfelder ---- */
.field { display: block; }
.field + .field { margin-top: 1.05rem; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .4rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field .hint { margin-top: .4rem; font-size: .8rem; color: var(--ink-muted); }

.alert {
  padding: .8rem 1rem; border-radius: var(--r);
  font-size: .9rem; font-weight: 500;
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid #f0cfca;
}

/* ---- Fokus (Tastatur) ---- */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* ---- Page-Load: gestaffelte Reveals ---- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: rise .7s var(--ease-out) forwards; }
.reveal.d1 { animation-delay: .06s; }
.reveal.d2 { animation-delay: .14s; }
.reveal.d3 { animation-delay: .22s; }
.reveal.d4 { animation-delay: .30s; }
.reveal.d5 { animation-delay: .38s; }
.reveal.d6 { animation-delay: .46s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
