@import url("fonts.css");

:root {
  --bg: #fbf8f6;
  --surface: #ffffff;
  --ink: #2a2124;
  --ink-2: #554a4e;
  --muted: #8a7e82;
  --line: #eee4e0;
  --line-2: #e2d5d0;
  --accent: #a35d6a;
  --accent-ink: #ffffff;
  --accent-deep: #874754;
  --accent-soft: #f6e9eb;
  --accent-tint: #fcf4f5;
  --gold: #c9a27e;
  --ok: #3f7d5c;
  --ok-soft: #e8f3ec;
  --warn: #9a6a1f;
  --warn-soft: #fbf1df;
  --err: #b0413e;
  --err-soft: #fbeaea;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(42, 33, 36, .04), 0 8px 28px rgba(42, 33, 36, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink);
  background:
    radial-gradient(1200px 520px at 85% -120px, #f7e3e6 0%, rgba(247, 227, 230, 0) 60%),
    radial-gradient(900px 420px at -10% -60px, #f4ebe1 0%, rgba(244, 235, 225, 0) 55%),
    var(--bg);
  background-repeat: no-repeat;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-deep); }
:focus-visible { outline: 3px solid rgba(163, 93, 106, .35); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------- Kopf ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.site-head { padding: 28px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #fff, var(--accent-soft));
  border: 1px solid var(--line-2);
  color: var(--accent); font-family: var(--serif); font-size: 20px; font-weight: 500;
}
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-link { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.7); white-space: nowrap; }
.head-link:hover { border-color: var(--accent); color: var(--accent-deep); }

.hero { padding: 28px 0 22px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 7vw, 46px); line-height: 1.08; letter-spacing: -.02em; margin: 0; }
h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.lead { color: var(--ink-2); margin: 12px 0 0; max-width: 34em; }
h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -.01em; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

/* ---------- Schritte ---------- */
.steps { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.steps li { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.steps li.on { background: var(--accent); }
.step-label { font-size: 13px; color: var(--muted); margin: -8px 0 16px; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 14px; }
@media (max-width: 480px) { .card { padding: 18px; } }

/* Behandlungen */
.services { display: grid; gap: 10px; }
.service {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; transition: border-color .15s, background .15s, transform .15s;
}
.service:hover { border-color: var(--line-2); background: var(--accent-tint); }
.service.sel { border-color: var(--accent); background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent); }
.service-name { font-weight: 600; font-size: 16px; }
.service-desc { grid-column: 1; color: var(--muted); font-size: 14px; }
.service-meta { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.service-meta b { display: block; font-weight: 600; color: var(--ink); }

/* ---------- Kalender (Kundin) ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-family: var(--serif); font-size: 19px; font-weight: 500; text-transform: capitalize; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2); font-size: 18px; line-height: 1;
}
.icon-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.cal-day {
  position: relative; aspect-ratio: 1 / 1; max-height: 52px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; cursor: pointer; font-weight: 500; font-size: 15px; display: grid; place-items: center;
}
.cal-day:hover:not(:disabled) { background: var(--accent-tint); border-color: var(--line-2); }
.cal-day:disabled { color: #c9bfc2; cursor: default; }
.cal-day.avail::after { content: ""; position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .7; }
.cal-day.today { border-color: var(--line-2); }
.cal-day.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cal-day.sel::after { background: #fff; }
.cal-day.empty { visibility: hidden; }

.slots-wrap { margin-top: 18px; border-top: 1px dashed var(--line-2); padding-top: 16px; }
.slots-title { font-weight: 600; margin: 0 0 10px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot {
  padding: 10px 0; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; transition: all .12s;
}
.slot:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
.slot.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slot:disabled {
  cursor: not-allowed; color: #bfb3b6; font-weight: 500; text-decoration: line-through;
  background: repeating-linear-gradient(-45deg, #faf6f5, #faf6f5 6px, #f4eeec 6px, #f4eeec 12px);
  border-color: var(--line);
}
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 12px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line-2); }
.legend .l-free::before { background: #fff; }
.legend .l-busy::before { background: repeating-linear-gradient(-45deg, #faf6f5, #faf6f5 3px, #ece4e2 3px, #ece4e2 6px); }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: #fff;
  font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(163, 93, 106, .12); }
.hint { font-size: 13px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-weight: 600; font-size: 16px; text-decoration: none; transition: background .15s, border-color .15s, opacity .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-deep); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-deep); }
.btn-danger { background: transparent; border-color: #e7c9c8; color: var(--err); }
.btn-danger:hover:not(:disabled) { background: var(--err-soft); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn-row .btn { flex: 1 1 180px; }
.link-btn { background: none; border: none; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }

/* ---------- Zusammenfassung ---------- */
.summary { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-tint); border: 1px solid #f0dfe2; margin-bottom: 18px; }
.summary .s-service { font-weight: 600; }
.summary .s-when { color: var(--ink-2); }
.summary .s-change { justify-self: start; margin-top: 4px; }

/* ---------- Hinweise ---------- */
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; margin-bottom: 16px; }
.notice .n-ico { flex: none; font-size: 18px; line-height: 1.3; }
.notice-ok { background: var(--ok-soft); color: #24543b; }
.notice-warn { background: var(--warn-soft); color: #6a4813; }
.notice-err { background: var(--err-soft); color: #7d2624; }
.notice-info { background: var(--accent-tint); color: var(--ink-2); border: 1px solid #f0dfe2; }

/* Erfolg / Statusseiten */
.state { text-align: center; padding: 34px 22px; }
.state-ico {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-size: 32px;
  background: var(--accent-soft); color: var(--accent);
}
.state-ico.ok { background: var(--ok-soft); color: var(--ok); }
.state-ico.wa { background: #e7f6ec; color: #1f9d55; }
.state h2 { font-size: 26px; margin-bottom: 8px; }
.state p { color: var(--ink-2); margin: 0 auto 8px; max-width: 30em; }
.detail-list { margin: 18px auto 0; max-width: 360px; text-align: left; display: grid; gap: 8px; }
.detail-list div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: 15px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 600; text-align: right; }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-off { background: #f1eeee; color: var(--muted); }

.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; background: #fff; }
.list-item:hover { border-color: var(--accent); }
.list-item small { color: var(--muted); display: block; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 16px; }

/* Fuß */
.site-foot { padding: 34px 0 40px; text-align: center; font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--muted); margin: 0 8px; }
.site-foot .addr { margin-bottom: 8px; }

/* Dialog */
dialog { border: none; border-radius: var(--radius); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(42,33,36,.25); }
dialog::backdrop { background: rgba(42, 33, 36, .35); backdrop-filter: blur(2px); }
.dlg-body { padding: 24px; }
.dlg-body h2 { margin-bottom: 6px; }

.fade-in { animation: fade .28s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
