/* ============================================================
   PZTec — Feedback (feedback.pztec.ch)
   Gleiche Designsprache wie pztec.ch: warmes Papier, dunkles
   Panel, Coral-Akzent, Sora + Space Mono (via /assets geteilt).
   ============================================================ */

/* ---------- Fonts (geteilt mit der Hauptseite via /assets) ---------- */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/assets/fonts/sora-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/spacemono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/spacemono-700-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --paper:      #f4f3ee;
  --paper-2:    #eceae3;
  --card:       #ffffff;
  --ink:        #14171d;
  --ink-2:      #545b68;
  --ink-3:      #8b91a0;
  --line:       rgba(20, 23, 29, 0.12);
  --line-soft:  rgba(20, 23, 29, 0.07);
  --accent:     #e94560;
  --accent-ink: #c62b48;
  --panel:      #0b0e15;
  --panel-2:    #0f131c;
  --panel-ink:  #f4f5f7;
  --panel-mut:  #8a94a6;

  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --wrap: 760px;
  --r: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

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

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.accent { color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.brand__mark {
  display: inline-block; flex: none;
  height: 38px; aspect-ratio: 12.843 / 10.477;
  background-color: var(--ink);
  -webkit-mask: url('/assets/logo.svg') center / contain no-repeat;
          mask: url('/assets/logo.svg') center / contain no-repeat;
}
.brand__name { font-weight: 700; font-size: 1.55rem; letter-spacing: -0.01em; color: var(--ink); }
.nav__home {
  font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2);
  transition: color .2s var(--ease);
}
.nav__home:hover { color: var(--accent); }

/* ---------- Kopf (dunkles Panel) ---------- */
.fb-hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 80% -20%, var(--panel-2), var(--panel) 60%);
  color: var(--panel-ink);
  padding: clamp(48px, 8vw, 84px) 0 clamp(72px, 10vw, 110px);
}
.fb-hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 45%, transparent 85%);
}
.fb-hero .wrap { position: relative; z-index: 2; }
.fb-hero__title {
  font-size: clamp(2rem, 5.4vw, 3.2rem);
  line-height: 1.05; letter-spacing: -0.025em; font-weight: 700;
  margin-top: 14px;
}
.fb-hero__lead {
  margin-top: 16px; max-width: 540px;
  font-size: clamp(1rem, 1.6vw, 1.12rem); color: #c9cfda;
}

/* ---------- Formular-Karte (überlappt das Panel) ---------- */
.fb-body { padding-bottom: clamp(64px, 9vw, 100px); }
.fb-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(26px, 4.5vw, 44px);
  margin-top: clamp(-56px, -6vw, -40px);
  position: relative; z-index: 3;
  box-shadow: 0 30px 60px -34px rgba(11, 14, 21, 0.5);
}

.field { border: 0; margin: 0 0 30px; }
.field:last-of-type { margin-bottom: 26px; }
.field__label {
  display: block;
  font-family: var(--mono); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 12px;
}
.field__sublabel {
  display: block; font-size: 0.86rem; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
}
.opt { text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.req { color: var(--accent-ink); }

/* ---------- Inputs ---------- */
.input {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: rgba(20, 23, 29, 0.24); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
textarea.input { resize: vertical; min-height: 120px; }

/* ---------- Chips (Apps + Kategorien) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; cursor: pointer; }
.chip input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.chip span {
  display: inline-flex; align-items: center;
  padding: 9px 18px;
  font-size: 0.94rem; font-weight: 500;
  background: var(--paper); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px;
  transition: all .2s var(--ease);
  user-select: none;
}
.chip:hover span { border-color: var(--accent); color: var(--accent-ink); }
.chip input:checked + span {
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#app-other { margin-top: 12px; max-width: 340px; }

/* ---------- Sterne ---------- */
.stars {
  display: inline-flex; flex-direction: row-reverse; gap: 4px;
}
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label {
  cursor: pointer;
  padding: 3px;
  color: var(--line);
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.stars label svg {
  width: 38px; height: 38px;
  fill: currentColor;
  stroke: var(--ink-3); stroke-width: 1;
  stroke-linejoin: round;
  transition: inherit;
}
/* Hover: alle Sterne bis zum überfahrenen füllen (row-reverse-Trick) */
.stars label:hover,
.stars label:hover ~ label {
  color: var(--accent); transform: scale(1.08);
}
.stars label:hover ~ label { transform: none; }
.stars label:hover svg, .stars label:hover ~ label svg { stroke: var(--accent-ink); }
/* Auswahl */
.stars input:checked ~ label { color: var(--accent); }
.stars input:checked ~ label svg { stroke: var(--accent-ink); }
.stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.stars__caption {
  font-family: var(--mono); font-size: 0.85rem;
  color: var(--ink-2); margin-top: 6px; min-height: 1.4em;
}

/* ---------- Einzelne Aspekte (kompakte Sterne-Zeilen) ---------- */
.aspects {
  display: grid; gap: 6px;
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 8px 16px;
}
.aspect {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 16px; flex-wrap: wrap;
  padding-block: 4px;
}
.aspect + .aspect { border-top: 1px solid var(--line-soft); }
.aspect__name { font-size: 0.95rem; font-weight: 500; color: var(--ink-2); }
.aspect__rating { display: inline-flex; align-items: center; gap: 10px; }
.aspect__val {
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3);
  min-width: 2.6em; text-align: right;
}
.stars--sm { gap: 0; }
.stars--sm label { padding: 2px; }
.stars--sm label svg { width: 26px; height: 26px; }

/* ---------- Segment-Schalter (Anonym / Kontakt) ---------- */
.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
}
.seg__opt { position: relative; cursor: pointer; }
.seg__opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg__opt span {
  display: inline-flex; align-items: center;
  padding: 9px 20px; border-radius: 999px;
  font-size: 0.94rem; font-weight: 500; color: var(--ink-2);
  transition: all .2s var(--ease); user-select: none;
}
.seg__opt:hover span { color: var(--ink); }
.seg__opt input:checked + span {
  background: var(--ink); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px -4px rgba(20, 23, 29, 0.4);
}
.seg__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.contact-fields {
  display: grid; gap: 16px; grid-template-columns: 1fr 1fr;
  margin-top: 18px; padding: 20px;
  background: var(--paper); border: 1px dashed var(--line); border-radius: 12px;
}
.contact-fields .input { background: #fff; }
.contact-fields__hint {
  grid-column: 1 / -1;
  font-size: 0.85rem; color: var(--ink-3); margin-top: -2px;
}

/* ---------- Fehler / Senden ---------- */
.form-error {
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-ink);
  border-radius: 12px; padding: 12px 16px;
  font-size: 0.94rem; margin-bottom: 20px;
}

.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg); color: var(--fg);
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 999px;
  border: 1px solid var(--bg); cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--submit { width: 100%; }
.btn[disabled] { opacity: 0.65; cursor: wait; transform: none; }

.btn__spinner {
  display: none;
  width: 18px; height: 18px; flex: none;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.is-sending .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.fb-note {
  font-family: var(--mono); font-size: 0.76rem;
  color: var(--ink-3); text-align: center; margin-top: 14px;
}

/* ---------- Honeypot ---------- */
.hp {
  position: absolute !important; left: -9999px !important; top: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Erfolg ---------- */
.fb-success { text-align: center; padding-block: clamp(44px, 7vw, 70px); }
.fb-success__check {
  width: 74px; height: 74px; margin: 0 auto 22px;
  stroke: var(--accent); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.fb-success__check circle {
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: draw 0.7s var(--ease) forwards;
}
.fb-success__check path {
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: draw 0.4s var(--ease) 0.55s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fb-success__check circle, .fb-success__check path { stroke-dashoffset: 0; }
}
.fb-success h2 { font-size: 1.7rem; letter-spacing: -0.02em; }
.fb-success p { color: var(--ink-2); margin: 10px auto 26px; max-width: 400px; }

/* ---------- Footer ---------- */
.footer { background: var(--panel); color: var(--panel-ink); padding: 28px 0; }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 12px 32px;
  align-items: center; justify-content: space-between;
}
.footer__tag, .footer__copy { font-family: var(--mono); font-size: 0.78rem; color: var(--panel-mut); }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: #c9cfda; font-size: 0.88rem; transition: color .2s var(--ease); }
.footer__links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .contact-fields { grid-template-columns: 1fr; }
  .stars label svg { width: 34px; height: 34px; }
  .seg { width: 100%; }
  .seg__opt { flex: 1; }
  .seg__opt span { width: 100%; justify-content: center; }
}
