/* Coco Colours – Dark Romantic with Kitsch
   Palette, Typografie und Bausteine für Umfrage + Dashboard */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600&display=swap");

:root {
  --bg:        #17111a;
  --bg-2:      #1e1622;
  --card:      #261c2b;
  --card-soft: #2e2233;
  --line:      rgba(227, 167, 181, 0.16);
  --gold:      #c2a15a;
  --rose:      #e3a7b5;
  --rose-deep: #b56d7f;
  --teal:      #86b8ad;
  --cream:     #f3e9e6;
  --muted:     #b6a3ab;
  --danger:    #e08a8a;
  --ok:        #8fc7a6;
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      680px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(181, 109, 127, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(134, 184, 173, 0.08), transparent 55%),
    var(--bg);
  color: var(--cream);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 96px;
}

/* ---- Kopf --------------------------------------------------------------- */
.brand {
  text-align: center;
  margin: 12px 0 2px;
}
.brand .logo {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(48px, 15vw, 84px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  color: var(--cream);
}
.brand .logo em { font-style: italic; color: var(--rose); }
.brand .mark {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(23px, 6.2vw, 32px);
  line-height: 1.12;
  text-align: center;
  margin: 18px 0 2px;
  letter-spacing: 0.01em;
}
h1 em { font-style: italic; color: var(--rose); }
.lede {
  text-align: center;
  color: var(--muted);
  max-width: 40ch;
  margin: 10px auto 0;
  font-size: 15px;
}

/* Zierteiler (Signatur) */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px auto;
  color: var(--gold);
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 64px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { transform: scaleX(-1); }
.divider svg { width: 16px; height: 16px; opacity: 0.9; }

/* ---- Anonymitäts-Banner ------------------------------------------------- */
.anon {
  background: linear-gradient(180deg, var(--card-soft), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 8px 0 4px;
}
.anon svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--teal); margin-top: 2px; }
.anon strong { color: var(--cream); }
.anon p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---- Fragenblöcke ------------------------------------------------------- */
.q {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin: 14px 0;
}
.q.hidden { display: none; }
.q .label {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .005em;
  color: var(--cream);
  margin: 0 0 4px;
}
.q .hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.q .label + .hint { margin-top: 2px; }

/* Auswahl-Buttons (Single & Multi) */
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--cream);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .15s, background .15s, transform .05s;
  width: 100%;
}
.opt:hover { border-color: rgba(227,167,181,.4); }
.opt:active { transform: scale(.995); }
.opt .box {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border: 1.5px solid var(--muted);
  border-radius: 6px;
  display: grid; place-items: center;
}
.opt[data-single] .box { border-radius: 50%; }
.opt .box svg { width: 12px; height: 12px; opacity: 0; color: var(--bg); }
.opt.on {
  border-color: var(--rose);
  background: linear-gradient(180deg, rgba(227,167,181,.14), rgba(227,167,181,.06));
}
.opt.on .box { background: var(--rose); border-color: var(--rose); }
.opt.on .box svg { opacity: 1; }

/* Sterne / Herzen */
.rating {
  display: flex; gap: 8px; margin-top: 6px;
}
.rating button {
  background: none; border: none; padding: 4px; cursor: pointer; line-height: 0;
}
.rating svg { width: 34px; height: 34px; color: #4a3a44; transition: color .12s, transform .12s; }
.rating button:hover svg { transform: scale(1.08); }
.rating button.on svg { color: var(--rose); }
.rating-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.rating-row:last-child { border-bottom: none; }
.rating-row .name { font-size: 15px; }

/* Skala 0–10 / 1–5 */
.scale { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.scale button {
  flex: 1 1 auto; min-width: 34px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--cream);
  border-radius: 9px; padding: 10px 0; font: inherit; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.scale button.on { border-color: var(--teal); background: rgba(134,184,173,.16); }
.scale-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; }

/* Freitext */
textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font: inherit;
  padding: 12px 14px;
  margin-top: 8px;
}
textarea::placeholder { color: #7c6b73; }

/* Abschnitts-Überschrift */
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--rose);
  font-size: 20px;
  text-align: center;
  margin: 30px 0 2px;
}

/* Absenden */
.submit {
  position: sticky; bottom: 16px;
  width: 100%;
  margin-top: 22px;
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  font: 600 16px "Inter", sans-serif;
  letter-spacing: .02em;
  color: #2a1a20;
  background: linear-gradient(180deg, #f0bfc9, var(--rose));
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(227,167,181,.22);
}
.submit:disabled { opacity: .55; cursor: default; box-shadow: none; }

.footnote { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* Danke-Screen */
.thanks { text-align: center; padding: 40px 12px; }
.thanks h1 { margin-bottom: 8px; }
.thanks p { color: var(--muted); }

/* ---- Focus / Accessibility --------------------------------------------- */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* =========================================================================
   Dashboard
   ========================================================================= */
.dash-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 6px;
}
.dash-head h1 { text-align: left; font-size: 30px; margin: 0; }
.dash-head .total { color: var(--muted); font-size: 14px; }

.controls {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px;
}
.controls select {
  background: var(--card); color: var(--cream);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; min-width: 200px;
}
.controls label { color: var(--muted); font-size: 13px; align-self: center; }

.grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.panel h2 {
  font-family: "Cormorant Garamond", serif; font-weight: 500;
  font-size: 22px; margin: 0 0 4px;
}
.panel .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.panel.alert { border-color: rgba(224,138,138,.45); }
.panel.good  { border-color: rgba(143,199,166,.4); }

.kpi { display: flex; align-items: baseline; gap: 8px; }
.kpi .big {
  font-family: "Cormorant Garamond", serif; font-size: 46px; line-height: 1;
  color: var(--rose);
}
.kpi .unit { color: var(--muted); font-size: 14px; }
.kpi.alert .big { color: var(--danger); }
.kpi.good .big { color: var(--ok); }

/* Balken */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 10px; }
.bar-row .bl { font-size: 13px; color: var(--cream); }
.bar-track { background: var(--bg-2); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rose-deep), var(--rose)); }
.bar-fill.teal { background: linear-gradient(90deg, #5f8f86, var(--teal)); }
.bar-fill.warn { background: linear-gradient(90deg, #a85a5a, var(--danger)); }
.bar-row .bv { font-size: 13px; color: var(--muted); text-align: right; }

.compare { font-size: 12px; color: var(--muted); margin-top: 10px; }
.compare b { color: var(--cream); }

.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel .step {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.funnel .step .n { font-family: "Cormorant Garamond", serif; font-size: 22px; color: var(--rose); }
.funnel .arrow { text-align: center; color: var(--muted); font-size: 12px; }

.quotes { display: flex; flex-direction: column; gap: 10px; }
.quote {
  background: var(--bg-2); border-left: 2px solid var(--rose);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; color: var(--cream);
}
.quote .meta { color: var(--muted); font-size: 11px; margin-top: 6px; }
.empty { color: var(--muted); font-size: 14px; font-style: italic; }
.stars-inline { color: var(--rose); letter-spacing: 2px; }

/* ---- Pop-up nach dem Absenden ------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(9, 6, 11, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  animation: fade .25s ease;
}
.modal {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, var(--card-soft), var(--card));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  animation: pop .28s cubic-bezier(.2,.8,.25,1);
}
.modal .divider { margin: 0 auto 10px; }
.modal h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500; font-size: 30px; line-height: 1.1;
  margin: 2px 0 8px;
}
.modal h2 em { font-style: italic; color: var(--rose); }
.modal p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.modal .tip {
  background: rgba(134,184,173,.1);
  border: 1px solid rgba(134,184,173,.32);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  color: var(--cream);
  font-size: 14.5px; line-height: 1.5;
  margin: 4px 0 18px;
}
.modal .tip strong { color: var(--teal); }
.modal-close {
  border: none; border-radius: 999px;
  padding: 13px 28px;
  font: 600 15px "Inter", sans-serif;
  color: #2a1a20;
  background: linear-gradient(180deg, #f0bfc9, var(--rose));
  cursor: pointer;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal { animation: none; }
}
