/* Nomelia – Markenauftritt
   Dunkles Petrol, helle natürliche Hintergründe, dezente warme Akzente.
   Systemschriften: schnell, gut lesbar und ohne Drittanbieter-Fonts (Datenschutz). */

:root {
  --petrol-900: #0a3540;
  --petrol-800: #0f4c5c;
  --petrol-600: #1d6b7b;
  --petrol-100: #dcebec;
  --petrol-50: #eef5f5;
  --sand-50: #fbf8f3;
  --sand-100: #f4eee4;
  --sand-200: #e9e0d2;
  --apricot: #f2b880;
  --apricot-soft: #fbe6d1;
  --sage: #a9c5a0;
  --rose: #e7a39b;
  --ink: #1c2b30;
  --muted: #5a6a6f;
  --danger: #a5463c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(10, 53, 64, .06), 0 8px 24px rgba(10, 53, 64, .07);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sand-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-block: 32px 64px; outline: none; }
img { max-width: 100%; }
a { color: var(--petrol-800); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; color: var(--petrol-900); }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .5em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.container { width: min(1100px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 720px; margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--petrol-800); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 2px; border-radius: 6px; }

/* ── Header & Footer ─────────────────────────────── */
.site-header { background: rgba(251, 248, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--sand-200); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; color: var(--petrol-800); }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.main-nav a:hover { background: var(--sand-100); }
.main-nav a.active { background: var(--petrol-50); color: var(--petrol-800); font-weight: 600; }
.badge[hidden] { display: none; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--apricot); color: var(--petrol-900); font-size: .75rem; font-weight: 700; text-align: center; }

.site-footer { background: var(--petrol-900); color: var(--petrol-100); padding-block: 28px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-claim { margin: 0; font-style: italic; }
.site-footer a { color: var(--sand-50); margin-left: 18px; }

/* ── Buttons & Formulare ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--petrol-800); color: #fff; box-shadow: 0 4px 14px rgba(15, 76, 92, .25); }
.btn-primary:hover { background: var(--petrol-600); }
.btn-secondary { background: var(--petrol-50); color: var(--petrol-800); }
.btn-secondary:hover { background: var(--petrol-100); }
.btn-ghost { background: transparent; color: var(--petrol-800); }
.btn-ghost:hover { background: var(--sand-100); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.field { margin-bottom: 26px; }
.field-label { display: block; font-weight: 600; margin-bottom: 10px; color: var(--petrol-900); }
.field-help { display: block; font-size: .88rem; color: var(--muted); margin-top: 6px; }
input[type="text"], input[type="number"], textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--sand-200); border-radius: var(--radius-sm); background: #fff;
}
input:focus, textarea:focus { border-color: var(--petrol-600); outline: none; box-shadow: 0 0 0 3px var(--petrol-100); }
textarea { min-height: 120px; resize: vertical; }

.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option {
  border: 1.5px solid var(--sand-200); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 9px 16px; font: inherit; font-size: .95rem; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.option:hover { border-color: var(--petrol-600); }
.option[aria-pressed="true"] { background: var(--petrol-800); border-color: var(--petrol-800); color: #fff; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #fff; border: 1.5px solid var(--sand-200); border-radius: var(--radius-sm); margin-bottom: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--petrol-800); flex-shrink: 0; }

fieldset.field { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
fieldset.field legend { padding: 0; }
.spaced { margin-top: 24px; }
.share-link { margin-bottom: 14px; }
.fav-item .icon-btn { padding: 7px 10px; }

/* ── Startseite ─────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-block: 24px 48px; }
.hero-claim { font-size: 1.25rem; color: var(--petrol-600); font-weight: 500; margin-bottom: .6em; }
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 34em; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 380px; justify-self: center; width: 100%; }
.hero-art svg { width: 100%; height: 100%; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--petrol-600); margin-bottom: 10px; }

.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 56px; }
.world {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; border: 1.5px solid transparent;
  transition: transform .15s ease, border-color .15s ease;
}
.world:hover { transform: translateY(-3px); border-color: var(--petrol-100); }
.world-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--petrol-50); color: var(--petrol-800); }
.world:nth-child(2) .world-icon { background: var(--apricot-soft); }
.world:nth-child(3) .world-icon { background: #f6e2df; }
.world:nth-child(4) .world-icon { background: #e6efe2; }
.world h3 { margin: 4px 0 0; }
.world p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.world .go { color: var(--petrol-800); font-weight: 600; font-size: .95rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 56px; counter-reset: step; }
.step-card { background: var(--sand-100); border-radius: var(--radius); padding: 22px; }
.step-card::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--petrol-800); color: #fff; font-weight: 700; margin-bottom: 12px; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.value { padding: 18px; border-left: 3px solid var(--apricot); background: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.value strong { display: block; color: var(--petrol-900); margin-bottom: 4px; }

/* ── Fragenprozess ──────────────────────────────── */
.wizard { max-width: 720px; margin-inline: auto; }
.wizard-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.progress { height: 8px; background: var(--sand-200); border-radius: 999px; overflow: hidden; margin-bottom: 28px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--petrol-800), var(--petrol-600)); border-radius: inherit; transition: width .35s ease; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 36px); }
.step-hint { color: var(--muted); margin-top: -.2em; margin-bottom: 26px; }
.optional-tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--petrol-600); background: var(--petrol-50); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.shortcut { text-align: center; margin-top: 18px; }
.shortcut button { background: none; border: 0; color: var(--petrol-800); text-decoration: underline; font: inherit; cursor: pointer; }

/* ── Ergebnisse ─────────────────────────────────── */
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--petrol-800); background: var(--petrol-50); padding: 5px 12px; border-radius: 999px; }
.results { display: grid; gap: 18px; }
.result { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3.5vw, 30px); display: grid; grid-template-columns: auto 1fr auto; gap: 6px 22px; animation: rise .45s ease both; }
.result:nth-child(2) { animation-delay: .06s; } .result:nth-child(3) { animation-delay: .12s; }
.result:nth-child(4) { animation-delay: .18s; } .result:nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rank { grid-row: span 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--petrol-800); background: var(--petrol-50); font-size: 1.1rem; }
.result-name { font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 700; color: var(--petrol-900); margin: 0; line-height: 1.1; }
.result-full { color: var(--muted); font-size: 1rem; margin-top: 2px; }
.result-pron { display: inline-block; font-size: .9rem; color: var(--petrol-600); margin-top: 4px; letter-spacing: .02em; }
.match { text-align: right; }
.match-value { font-size: 1.5rem; font-weight: 700; color: var(--petrol-800); line-height: 1; }
.match-label { font-size: .78rem; color: var(--muted); }
.result-body { grid-column: 2 / -1; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 22px; margin: 14px 0; padding: 14px 0; border-block: 1px solid var(--sand-100); }
.fact dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.fact dd { margin: 2px 0 0; font-size: .97rem; }
.uncertain { display: inline-block; font-size: .75rem; background: var(--apricot-soft); color: #7a4a1d; padding: 1px 8px; border-radius: 999px; margin-left: 4px; }
.reason { background: var(--sand-50); border-left: 3px solid var(--petrol-600); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 10px; }
.reason p { margin: 0 0 .4em; } .reason p:last-child { margin: 0; }
.warning { font-size: .92rem; color: #7a4a1d; background: var(--apricot-soft); padding: 8px 14px; border-radius: var(--radius-sm); margin-bottom: 10px; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--sand-200); background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .92rem; cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--petrol-600); }
.icon-btn[aria-pressed="true"].fav { background: var(--rose); border-color: var(--rose); color: var(--petrol-900); }
.icon-btn[aria-pressed="true"].up { background: var(--sage); border-color: var(--sage); }
.icon-btn[aria-pressed="true"].down { background: var(--sand-200); border-color: var(--sand-200); }
.icon-btn svg { width: 18px; height: 18px; }
details.criteria { margin-top: 10px; }
details.criteria summary { cursor: pointer; color: var(--petrol-800); font-weight: 600; font-size: .92rem; }
.bars { display: grid; gap: 8px; margin-top: 12px; }
.bar { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr 100px; gap: 12px; align-items: center; font-size: .88rem; }
.bar-track { height: 8px; background: var(--sand-100); border-radius: 999px; overflow: hidden; }
.bar-track > span { display: block; height: 100%; background: var(--petrol-600); border-radius: inherit; }
.bar-val { text-align: right; color: var(--muted); white-space: nowrap; }
.refine { margin-top: 28px; background: var(--petrol-50); border-radius: var(--radius); padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.refine p { margin: 0; }

.loading { text-align: center; padding: 70px 20px; }
.notes { display: inline-flex; gap: 10px; margin-bottom: 18px; }
.notes span { width: 14px; height: 14px; border-radius: 50%; background: var(--petrol-600); animation: bounce 1s infinite ease-in-out; }
.notes span:nth-child(2) { animation-delay: .15s; background: var(--apricot); }
.notes span:nth-child(3) { animation-delay: .3s; background: var(--rose); }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.empty { text-align: center; padding: 48px 20px; }

/* ── Favoriten ──────────────────────────────────── */
.fav-group { margin-bottom: 30px; }
.fav-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fav-item { background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 16px 18px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fav-item strong { font-size: 1.2rem; color: var(--petrol-900); display: block; }
.fav-item .remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.fav-item .remove:hover { color: var(--danger); background: var(--sand-100); }

/* ── Textseiten ─────────────────────────────────── */
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.story { font-size: 1.12rem; }
.story p:first-of-type::first-letter { font-size: 3em; float: left; line-height: .9; padding-right: 8px; color: var(--petrol-800); font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--petrol-900); color: #fff; padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow); z-index: 20; font-size: .95rem; }

/* ── Responsiv ──────────────────────────────────── */
@media (max-width: 900px) {
  .worlds { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 260px; order: -1; }
  .values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .worlds, .steps, .values { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr auto; }
  .rank { display: none; }
  .result-body { grid-column: 1 / -1; }
  .bar { grid-template-columns: 1fr 70px; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .main-nav a { padding: 6px 9px; font-size: .88rem; }
  .brand-name { font-size: 1.1rem; }
  .site-footer a { margin: 0 18px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
h2[tabindex="-1"]:focus { outline: none; }
