/* ebuhanife Vote – Grundlagen
   Schweizer Typografie: klares Raster, Grotesk, Haarlinien, eine Akzentfarbe. */

/* Nunito – wie auf ebuhanife.ch, lokal ausgeliefert */
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #121614;
  --ink-2: #353c38;
  --muted: #6c736f;
  --faint: #9aa19c;
  --line: #e2e5e1;
  --line-2: #cbd1cc;
  --paper: #ffffff;
  --paper-2: #f5f6f3;
  --paper-3: #eceee9;
  --green: #026634;
  --green-2: #014d27;
  --green-soft: #e5efe8;
  --gold: #bf910a;
  --gold-soft: #f6eed3;
  --danger: #b42318;
  --danger-soft: #fbe9e7;
  --focus: 0 0 0 3px rgba(2, 102, 52, .28);

  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.022em; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.num { font-variant-numeric: tabular-nums; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Marke ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand img { width: 34px; height: auto; display: block; }
.brand b { font-weight: 650; }
.brand span { color: var(--green); font-weight: 500; }

/* Marke auf dunklem Bild: helles Logo ohne Hintergrund, Name in Versalien */
.brand-hero { display: inline-flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; }
.brand-hero img { display: block; height: clamp(48px, 6vw, 64px); width: auto; }
.brand-hero strong { font-size: clamp(20px, 2.4vw, 30px); font-weight: 800; letter-spacing: .14em; line-height: 1; text-transform: uppercase; white-space: nowrap; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); }
.btn-line { border-color: var(--line-2); }
.btn-line:hover { border-color: var(--ink); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }

/* ---------- Formulare ---------- */

.field { display: grid; gap: 6px; }
.field > label, .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-2);
}
.hint { font-size: 12.5px; color: var(--muted); }

.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 0;
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.textarea { resize: vertical; min-height: 72px; line-height: 1.4; }
.select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23121614' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: var(--focus); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--paper-2); color: var(--muted); }

/* Segment-Auswahl (Radio als Schalterleiste) */
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line-2); }
.segment.vertical { grid-auto-flow: row; }
.segment label { position: relative; cursor: pointer; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 40px; padding: 8px 10px;
  font-size: 13px; font-weight: 520; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.segment.vertical span { justify-content: flex-start; text-align: left; }
.segment label + label span { border-left: 1px solid var(--line-2); }
.segment.vertical label + label span { border-left: 0; border-top: 1px solid var(--line-2); }
.segment input:checked + span { background: var(--ink); color: var(--paper); }
.segment input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--green); }
.segment input:disabled + span { opacity: .5; cursor: not-allowed; }

/* Schalter */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i {
  position: relative; flex: none; width: 40px; height: 22px;
  border: 1px solid var(--line-2); background: var(--paper-3); transition: background .2s, border-color .2s;
}
.switch i::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  background: var(--paper); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease);
}
.switch input:checked + i { background: var(--green); border-color: var(--green); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: var(--focus); }

/* ---------- Status ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; background: currentColor; }
.pill-draft { color: var(--muted); }
.pill-live { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.pill-live::before { animation: blink 1.4s infinite; }
.pill-closed { color: var(--ink); }

@keyframes blink { 50% { opacity: .2; } }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px);
  padding: 12px 18px; background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 500; transition: opacity .2s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

.spinner {
  width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--green);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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