/* Gloww Hautanalyse — Frontend
   Design-Token identisch zur Hauptseite, damit das Tool nicht wie ein
   Fremdkörper wirkt, sondern wie eine Fortsetzung der Marke. */

:root {
  --bg: #FAF7F4;
  --bg-alt: #F0EBE3;
  --accent: #C9A87C;
  --accent-dark: #B8956A;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-light: #999;
  --cta: #2C2C2C;
  --border: #E8E2D9;
  --ok: #5B8C6E;
  --warn: #C9922C;
  --act: #C07A4A;
  --bad: #B85C4A;
  --shadow-s: 0 1px 3px rgba(26, 26, 26, .05);
  --shadow-m: 0 8px 30px rgba(26, 26, 26, .08);
  --shadow-l: 0 20px 60px rgba(26, 26, 26, .14);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  overscroll-behavior-y: contain;
  min-height: 100svh;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 8.6vw, 42px); line-height: 1.08; }
h2 { font-size: clamp(24px, 6.6vw, 32px); line-height: 1.14; }
h3 { font-size: 19px; line-height: 1.24; }
p { color: var(--text-muted); }
a { color: var(--accent-dark); }

.eyebrow {
  font-size: 10px; letter-spacing: 2.6px; text-transform: uppercase;
  color: var(--accent-dark); font-weight: 600;
}

.wrap { max-width: 520px; margin: 0 auto; padding: 0 20px; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 247, 244, .92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.top-in { max-width: 520px; margin: 0 auto; padding: 13px 20px; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; color: var(--accent-dark); text-decoration: none; }
/* Das Wortzeichen erbt die Farbe vom Elternelement (fill="currentColor"
   im Symbol), deshalb reicht ein color-Wechsel, um es umzufärben. */
.logo { display: block; width: 108px; height: auto; fill: currentColor; }
.logo--foot { width: 84px; margin: 0 auto 12px; color: var(--muted); opacity: .6; }
.logo--mark { width: 112px; margin: 6px auto 16px; color: var(--accent-dark); }
.steps { margin-left: auto; display: flex; gap: 5px; align-items: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: .35s var(--ease); }
.dot.on { background: var(--accent); transform: scale(1.34); }
.dot.done { background: var(--accent-dark); }

/* ---------- Schritte ---------- */
.screen { display: none; padding: 30px 0 60px; animation: rise .45s var(--ease) both; }
.screen.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

/* ---------- Karten und Buttons ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  padding: 20px; box-shadow: var(--shadow-s);
}
.card + .card { margin-top: 12px; }
.card.alt { background: var(--bg-alt); box-shadow: none; }

.btn {
  display: block; width: 100%; border: 0; border-radius: var(--r);
  background: var(--cta); color: #fff; font: 600 15px/1 var(--sans);
  padding: 17px 20px; cursor: pointer; letter-spacing: .2px;
  transition: .22s var(--ease); font-family: var(--sans);
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.accent { background: var(--accent-dark); }
.btn + .btn { margin-top: 10px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-top: 0; }

.list { list-style: none; display: grid; gap: 14px; }
.list li { display: flex; gap: 13px; align-items: flex-start; font-size: 14px; color: var(--text-muted); }
.num {
  flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--bg-alt);
  color: var(--accent-dark); font: 600 11px/24px var(--sans); text-align: center;
}
.list li b { color: var(--text); font-weight: 600; display: block; margin-bottom: 1px; }

/* ---------- Helligkeits-Hinweis ---------- */
.bright {
  display: flex; gap: 14px; align-items: center; padding: 16px;
  background: linear-gradient(135deg, #fff, var(--bg-alt));
  border: 1px solid var(--accent); border-radius: var(--r);
}
.bright .icon {
  flex: 0 0 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #FFF4DF, var(--accent));
  box-shadow: 0 0 0 5px rgba(201, 168, 124, .16);
  animation: glow 2.6s ease-in-out infinite;
}
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 5px rgba(201, 168, 124, .14); } 50% { box-shadow: 0 0 0 11px rgba(201, 168, 124, .05); } }
.bright b { display: block; font-size: 14px; }
.bright span { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Kamera ---------- */
.cam {
  position: relative; width: 100%; aspect-ratio: 3 / 4;
  background: #17150F; border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow-m);
}
.cam video, .cam canvas.mirror {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transform: scaleX(-1);
}
.cam .veil { position: absolute; inset: 0; pointer-events: none; }

/* Weiche weiße Kante rund um die Silhouette, wie bei einem Filter */
.fade {
  position: absolute; inset: -2%;
  background:
    radial-gradient(52% 41% at 50% 44%, rgba(255, 255, 255, 0) 62%, rgba(255, 253, 250, .55) 76%, rgba(255, 254, 252, .93) 92%, #fff 100%);
  pointer-events: none;
}
.silhouette { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.hint {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  background: rgba(26, 26, 26, .72); color: #fff;
  backdrop-filter: blur(8px);
  border-radius: var(--r); padding: 11px 13px;
  font-size: 12.5px; line-height: 1.45; text-align: center;
  transition: .25s var(--ease);
}
.hint.ok { background: rgba(91, 140, 110, .88); }

.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 12px; }
.chk {
  display: flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 7px 11px; font-size: 11.5px; color: var(--text-muted);
  transition: .25s var(--ease);
}
.chk i {
  flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--border);
  transition: .25s var(--ease);
}
.chk.good { border-color: rgba(91, 140, 110, .4); color: var(--ok); }
.chk.good i { background: var(--ok); }
.chk.bad { border-color: rgba(184, 92, 74, .35); color: var(--bad); }
.chk.bad i { background: var(--bad); }

.count {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 100px; color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .3); pointer-events: none;
}
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: fl .5s ease-out; }
@keyframes fl { 0% { opacity: .92; } 100% { opacity: 0; } }

/* ---------- Analyse-Fortschritt ---------- */
.prog { display: grid; gap: 11px; margin-top: 22px; }
.prog-row { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: var(--text-light); transition: .3s; }
.prog-row.on { color: var(--text); }
.prog-row.done { color: var(--text-muted); }
.spin {
  flex: 0 0 15px; height: 15px; border-radius: 50%;
  border: 1.6px solid var(--border); border-top-color: var(--accent);
  animation: sp .85s linear infinite;
}
.prog-row:not(.on) .spin { animation: none; border-top-color: var(--border); }
.prog-row.done .spin { border: 0; background: var(--ok); position: relative; }
.prog-row.done .spin::after {
  content: ''; position: absolute; left: 4.5px; top: 2.5px; width: 4px; height: 7px;
  border: 1.6px solid #fff; border-top: 0; border-left: 0; transform: rotate(42deg);
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- Ergebnis ---------- */
.score-head { text-align: center; padding: 6px 0 4px; }
.ring { position: relative; width: 168px; height: 168px; margin: 0 auto 6px; }
.ring svg { transform: rotate(-90deg); }
.ring .val {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.ring .val b { font-family: var(--serif); font-size: 52px; font-weight: 400; line-height: 1; }
.ring .val span { font-size: 9px; letter-spacing: 2.2px; color: var(--text-light); margin-top: 5px; }

.pill {
  display: inline-block; border: 1px solid var(--border); background: #fff;
  border-radius: 20px; padding: 6px 15px; font-size: 11px; letter-spacing: 1.6px;
  text-transform: uppercase; font-weight: 600; color: var(--accent-dark);
}
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.kv div { text-align: center; }
.kv small { display: block; font-size: 9.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-light); }
.kv b { font-size: 14px; font-weight: 600; }

.sec-title { margin: 32px 0 12px; }
.sec-title h3 { margin-bottom: 4px; }
.sec-title p { font-size: 13px; }

/* Gesichtskarte */
.facemap { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.facemap svg { width: 100%; height: auto; }
.zone-list { display: grid; gap: 11px; }
.zrow { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 13px; }
.zrow b { font-weight: 600; }
.zrow em { font-style: normal; font-weight: 600; font-size: 12.5px; }
.zrow small { grid-column: 1 / -1; color: var(--text-light); font-size: 11.5px; }

/* Parametergruppen */
.group { border-top: 1px solid var(--border); }
.group:last-child { border-bottom: 1px solid var(--border); }
.group > button {
  width: 100%; background: none; border: 0; padding: 15px 0; cursor: pointer;
  display: flex; align-items: center; gap: 10px; font-family: var(--sans);
  font-size: 14px; font-weight: 600; color: var(--text); text-align: left;
}
.group > button .cnt { margin-left: auto; font-size: 11.5px; color: var(--text-light); font-weight: 400; }
.group > button .car { width: 9px; height: 9px; border-right: 1.4px solid var(--text-light); border-bottom: 1.4px solid var(--text-light); transform: rotate(45deg); transition: .3s var(--ease); margin-bottom: 3px; }
.group.open > button .car { transform: rotate(-135deg); margin-bottom: 0; }
.group .body { display: none; padding-bottom: 6px; }
.group.open .body { display: grid; gap: 16px; }

.param .phead { display: flex; align-items: baseline; gap: 8px; }
.param .phead b { font-size: 13.5px; font-weight: 600; }
.param .phead em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; white-space: nowrap; }
.track { height: 4px; background: var(--bg-alt); border-radius: 2px; margin: 7px 0 6px; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 2px; transition: width .8s var(--ease); }
.param .meta { font-size: 10.5px; color: var(--text-light); letter-spacing: .2px; }
.param p { font-size: 12.8px; line-height: 1.55; margin-top: 4px; }

/* Empfehlungen */
.reco { border: 1px solid var(--border); border-radius: var(--r); background: #fff; padding: 18px; position: relative; }
.reco + .reco { margin-top: 11px; }
.reco.primary { border-color: var(--accent); box-shadow: var(--shadow-m); }
.reco .badge {
  position: absolute; top: -9px; left: 16px; background: var(--accent); color: #fff;
  font-size: 9px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700;
  padding: 4px 9px; border-radius: 2px;
}
.reco .badge.plain { background: var(--bg-alt); color: var(--text-muted); }
.reco h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; margin: 6px 0 2px; }
.reco .dur { font-size: 11.5px; color: var(--text-light); }
.reco .price { font-family: var(--serif); font-size: 24px; float: right; margin-top: 4px; }
.reco p { font-size: 13px; margin-top: 9px; clear: both; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag { font-size: 10.5px; background: var(--bg-alt); color: var(--text-muted); padding: 4px 9px; border-radius: 12px; }

.seq { display: grid; gap: 14px; }
.seq .row { display: flex; gap: 12px; }
.seq .n { font-family: var(--serif); font-size: 21px; color: var(--accent); line-height: 1; flex: 0 0 20px; }
.seq b { font-size: 13.5px; display: block; }
.seq p { font-size: 12.8px; margin-top: 2px; }

.care { display: grid; gap: 13px; }
.care .row { display: grid; gap: 3px; }
.care .when { font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent-dark); font-weight: 600; }
.care b { font-size: 13.5px; font-weight: 600; }
.care p { font-size: 12.5px; }

/* ---------- Formular ---------- */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 11.5px; font-weight: 600; margin-bottom: 5px; }
.field .opt { color: var(--text-light); font-weight: 400; }
.field input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--r);
  background: #fff; padding: 14px 13px; font: 400 15px var(--sans); color: var(--text);
}
.field input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 168, 124, .14); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.field .err { font-size: 11.5px; color: var(--bad); margin-top: 4px; display: none; }
.field input[aria-invalid="true"] ~ .err { display: block; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.consent { display: flex; gap: 11px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--border); }
.consent:first-of-type { border-top: 0; }
.consent input { flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; accent-color: var(--accent-dark); }
.consent label { font-size: 12.3px; line-height: 1.52; color: var(--text-muted); }
.consent label b { color: var(--text); font-weight: 600; display: block; margin-bottom: 2px; font-size: 12.8px; }
.consent .must { color: var(--bad); }

.note { font-size: 11.5px; color: var(--text-light); line-height: 1.55; margin-top: 12px; }
.alert {
  background: #FDF1EE; border: 1px solid rgba(184, 92, 74, .3); color: #8C4636;
  border-radius: var(--r); padding: 12px 14px; font-size: 13px; margin-bottom: 14px;
}
.alert.hide { display: none; }

.done-mark {
  width: 62px; height: 62px; border-radius: 50%; background: var(--ok);
  margin: 0 auto 20px; position: relative;
}
.done-mark::after {
  content: ''; position: absolute; left: 21px; top: 16px; width: 15px; height: 26px;
  border: 2.6px solid #fff; border-top: 0; border-left: 0; transform: rotate(42deg);
}

footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 22px 0 40px; }
footer p { font-size: 11px; color: var(--text-light); line-height: 1.7; }
footer a { color: var(--text-light); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
