/* ----------------------------------------------------
   vorralo — Tokens aus dem App-Logo abgeleitet
   - Primary: Logo-Grün
   - Text/Lines: Anthrazit (Logo-Bügel)
   - Background: warmes Off-White (Logo-Hintergrund)
   ---------------------------------------------------- */

:root {
  /* Greyscale + Brand */
  --c-bg:        #fafaf7;   /* warmes Off-White (wie Logo-BG) */
  --c-surface:   #ffffff;
  --c-surface-2: #f1f1ec;
  --c-line:      #e8e8e0;
  --c-line-2:    #d6d6cf;
  --c-text:      #1f2a2d;   /* Anthrazit, wie Logo-Bügel */
  --c-text-2:    #5a6166;
  --c-text-3:    #9aa0a4;
  --c-invert:    #ffffff;
  --c-on-dark:   #ffffff;

  /* Brand: Logo-Grün */
  --c-brand:        #7bb73f;
  --c-brand-hover:  #6ba635;
  --c-brand-press:  #5d9329;
  --c-brand-tint:   #ecf5dc;
  --c-brand-line:   #c9e2a3;
  --c-on-brand:     #102a05;   /* sehr dunkles Grün-Schwarz für Text auf Brand */

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(31,42,45,.05), 0 1px 1px rgba(31,42,45,.04);
  --sh-2: 0 4px 14px rgba(31,42,45,.06);

  /* Type */
  --f-sans: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --fs-100: 12px;
  --fs-200: 13px;
  --fs-300: 15px;
  --fs-400: 17px;
  --fs-500: 22px;
  --fs-600: 28px;
  --fs-700: 40px;
  --fs-800: 56px;

  --lh-tight: 1.15;
  --lh-base:  1.5;

  --container: 1120px;
  --tap-min:   44px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--fs-300);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

img, svg { display: block; max-width: 100%; }

/* ---------- Layout ---------- */
.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  /* Mobile: 24px Atemluft + iOS Safe-Area respektieren */
  padding-left:  max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
@media (min-width: 640px) {
  .container {
    padding-left:  max(var(--s-5), env(safe-area-inset-left));
    padding-right: max(var(--s-5), env(safe-area-inset-right));
  }
}
@media (min-width: 960px) {
  .container {
    padding-left:  max(var(--s-6), env(safe-area-inset-left));
    padding-right: max(var(--s-6), env(safe-area-inset-right));
  }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(250,250,247,.85);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--c-line);
  z-index: 50;
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: var(--fs-400);
  color: var(--c-text);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-spacer { flex: 1; }

.nav {
  display: flex;
  gap: var(--s-2);
  align-items: center;
}
.nav .nav-link {
  color: var(--c-text-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.nav .nav-link:hover { color: var(--c-text); background: var(--c-surface-2); }
.nav .hide-narrow { display: none; }
@media (min-width: 480px) {
  .nav .hide-narrow { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--tap-min);
  padding: 0 var(--s-5);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--fs-300);
  font-weight: 600;
  cursor: pointer;
  transition: transform .04s ease, background .15s ease, border-color .15s ease, color .15s ease;
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
/* Mobile-first: btn-lg/xl sind etwas zurückhaltender. Ab Tablet werden sie groß. */
.btn-lg  { min-height: 52px; padding: 0 var(--s-5); font-size: var(--fs-300); border-radius: var(--r-lg); }
.btn-xl  { min-height: 56px; padding: 0 var(--s-6); font-size: var(--fs-400); border-radius: var(--r-lg); }
@media (min-width: 640px) {
  .btn-lg { min-height: 56px; padding: 0 var(--s-6); font-size: var(--fs-400); }
  .btn-xl { min-height: 64px; padding: 0 var(--s-7); font-size: var(--fs-400); }
}

.btn-primary {
  background: var(--c-brand);
  color: var(--c-on-brand);
  border-color: var(--c-brand);
}
.btn-primary:hover  { background: var(--c-brand-hover); border-color: var(--c-brand-hover); }
.btn-primary:active { background: var(--c-brand-press); border-color: var(--c-brand-press); }

.btn-dark {
  background: var(--c-text);
  color: var(--c-on-dark);
  border-color: var(--c-text);
}
.btn-dark:hover { background: #2a373b; border-color: #2a373b; }

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-line-2);
}
.btn-ghost:hover { background: var(--c-surface-2); }

.btn-link {
  background: none;
  color: var(--c-text-2);
  padding: 0 var(--s-2);
  min-height: auto;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--c-line-2);
}
.btn-link:hover { color: var(--c-text); text-decoration-color: var(--c-brand); }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */
/* Default: einfacher Stack, KEIN Grid (sonst brechen alle Pages mit nur Text-Hero). */
.hero {
  padding: var(--s-6) 0 var(--s-5);
}
@media (min-width: 960px) {
  .hero { padding: var(--s-7) 0 var(--s-6); }
}
.hero h1 {
  font-size: clamp(28px, 6vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 var(--s-4);
  font-weight: 700;
  text-wrap: balance;
}
.hero .accent { color: var(--c-brand); }
.hero p.lede {
  font-size: clamp(15px, 2vw, var(--fs-400));
  color: var(--c-text-2);
  max-width: 56ch;
  margin: 0 0 var(--s-5);
  text-wrap: pretty;
}
.hero .cta {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: stretch;
}
.hero .cta .btn { width: 100%; }
@media (min-width: 480px) {
  .hero .cta { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .hero .cta .btn { width: auto; }
}

/* Hero-Compact: für Innen-Seiten (Admin, Dashboard). Kleinere Typo, weniger Padding. */
.hero-compact { padding: var(--s-5) 0 var(--s-3); }
@media (min-width: 960px) {
  .hero-compact { padding: var(--s-6) 0 var(--s-4); }
}
.hero-compact h1 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 var(--s-3);
  font-weight: 700;
}
.hero-compact p.lede {
  font-size: var(--fs-300);
  margin: 0;
}
.hero-compact .tag { margin-bottom: var(--s-3); }

/* Hero-Split: nur Home-Page nutzt das (Text + Visual). */
.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: center;
}
.hero-split .visual { display: none; }
@media (min-width: 960px) {
  .hero-split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: var(--s-7);
  }
  .hero-split .visual {
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    background:
      radial-gradient(circle at 30% 30%, var(--c-brand-tint) 0%, transparent 60%),
      var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-xl);
    padding: var(--s-6);
  }
  .hero-split .visual img {
    width: 60%;
    max-width: 280px;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--sh-2);
  }
}

/* ---------- Bento Grid ---------- */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  padding: var(--s-5) 0 var(--s-6);
}
/* Tablet: 2 cols. Spans für ALLE Klassen explizit, sonst defaulten Karten zu span 1. */
@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
  .b-wide  { grid-column: span 2; }
  .b-two   { grid-column: span 2; }
  .b-half  { grid-column: span 1; }
  .b-third { grid-column: span 1; }
  .b-one   { grid-column: span 1; }
}
/* Desktop: 6-col Grid mit feiner Verteilung. */
@media (min-width: 960px) {
  .bento { grid-template-columns: repeat(6, 1fr); gap: var(--s-5); }
  .b-wide  { grid-column: span 6; }
  .b-two   { grid-column: span 4; }
  .b-half  { grid-column: span 3; }
  .b-third { grid-column: span 2; }
  .b-one   { grid-column: span 2; }
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color .15s ease, transform .15s ease;
}
@media (min-width: 640px) {
  .card { padding: var(--s-6); min-height: 180px; }
}
.card:hover { border-color: var(--c-line-2); }

.card.dark {
  background: var(--c-text);
  color: var(--c-on-dark);
  border-color: var(--c-text);
}

.card.brand {
  background: var(--c-brand-tint);
  border-color: var(--c-brand-line);
}

.card .eyebrow {
  font-size: var(--fs-100);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-3);
  font-weight: 600;
}
.card.dark  .eyebrow { color: rgba(255,255,255,.55); }
.card.brand .eyebrow { color: var(--c-brand-press); }

.card h3 {
  font-size: var(--fs-500);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
  margin: 0;
  font-weight: 600;
}
.card p {
  color: var(--c-text-2);
  margin: 0;
}
.card.dark p { color: rgba(255,255,255,.7); }
.card.brand p { color: var(--c-text); }

/* ---------- Outro CTA ---------- */
.outro {
  padding: var(--s-4) 0 var(--s-7);
}
.outro-card {
  text-align: center;
  align-items: center;
  padding: var(--s-6) var(--s-5);
  background: var(--c-text);
  border-color: var(--c-text);
  color: var(--c-on-dark);
}
.outro-card h3 {
  font-size: clamp(20px, 4vw, 28px);
  margin: 0;
}
.outro-card p {
  color: rgba(255,255,255,.65);
  margin: 0;
}
.outro-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: var(--s-3);
  width: 100%;
  align-items: center;
}
.outro-card .btn-primary { width: 100%; max-width: 320px; }
.outro-card .btn-link { color: rgba(255,255,255,.7); text-decoration-color: rgba(255,255,255,.25); }
.outro-card .btn-link:hover { color: #fff; text-decoration-color: var(--c-brand); }
@media (min-width: 640px) {
  .outro-card { padding: var(--s-7); }
  .outro-actions { flex-direction: row; justify-content: center; }
  .outro-card .btn-primary { width: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--c-line);
  padding: var(--s-5) 0;
  color: var(--c-text-3);
  font-size: var(--fs-200);
}
.site-footer .row {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3);
}

/* ---------- Auth screens ---------- */
.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6) var(--s-4);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  padding: var(--s-5);
}
@media (min-width: 480px) {
  .auth-card { padding: var(--s-7); }
}
.auth-card h1 {
  margin: 0 0 var(--s-2);
  font-size: var(--fs-600);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: var(--lh-tight);
}
.auth-card p.lede {
  margin: 0 0 var(--s-6);
  color: var(--c-text-2);
}
.auth-card .form-row + .form-row { margin-top: var(--s-4); }
.auth-card .actions { margin-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); }
.auth-card .alt {
  margin-top: var(--s-5);
  text-align: center;
  font-size: var(--fs-200);
  color: var(--c-text-2);
}
.auth-card .alt a { color: var(--c-brand-press); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Form ---------- */
.label {
  display: block;
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: var(--s-2);
  letter-spacing: 0.01em;
}
.input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--c-line-2);
  background: var(--c-surface);
  font-family: inherit;
  font-size: var(--fs-400);
  color: var(--c-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(123,183,63,0.18);
}
.input::placeholder { color: var(--c-text-3); }

/* ---------- Flash messages ---------- */
.flash {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  margin-bottom: var(--s-4);
  font-size: var(--fs-200);
  border: 1px solid var(--c-line);
}
.flash.success { background: var(--c-brand-tint); border-color: var(--c-brand-line); color: var(--c-text); }
.flash.error   { background: #2a1f1f; color: var(--c-on-dark); border-color: #2a1f1f; }

/* ---------- Coming-soon Banner ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  border: 1px solid var(--c-brand-line);
  background: var(--c-brand-tint);
  border-radius: 999px;
  font-size: var(--fs-100);
  font-weight: 700;
  color: var(--c-brand-press);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.tag .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-brand);
  position: relative;
}
.tag .pulse::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--c-brand);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(.6); opacity: .9; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ---------- Utility ---------- */
.u-mt-4 { margin-top: var(--s-4); }
.u-mt-5 { margin-top: var(--s-5); }
.u-mt-6 { margin-top: var(--s-6); }
.u-text-2 { color: var(--c-text-2); }
.u-text-3 { color: var(--c-text-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.inline-form { display: inline; }
