/* ============================================================
   BMI Nexus – Stylesheet
   Dunkel, Neon-Akzente, serifenlose Schrift
   ============================================================ */

:root {
  /* Farben */
  --bg:            #0b1020;
  --bg-2:          #0f1730;
  --surface:       #131c38;
  --line:          #23305a;
  --line-soft:     #1b2547;

  --text:          #eaf0ff;
  --text-soft:     #b9c4e0;
  --text-dim:      #8d9ab8;

  --neon:          #39ff14;   /* Neon-Grün – Hauptakzent */
  --neon-2:        #eeff00;   /* Neon-Gelb */
  --unter:         #4d8dff;   /* Untergewicht */
  --normal:        #2ee6a8;   /* Normal */
  --ueber:         #ffd23f;   /* Übergewicht */
  --stark:         #ff5c8a;   /* Starkes Übergewicht */

  --radius:        16px;
  --radius-sm:     12px;
  --shadow:        0 18px 40px rgba(4, 8, 22, .55);
  --maxw:          1120px;

  --font: "Inter", "Segoe UI", "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

a { color: var(--neon); text-decoration: none; }
a:hover { text-decoration: underline; }

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

:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  letter-spacing: .01em;
  cursor: pointer;
  padding: .8rem 1.5rem;
  min-height: 48px;
  transition: transform .16s ease, box-shadow .2s ease, background-color .2s ease;
}

/* Buttons: dunkle Fläche, nur der Rand leuchtet neon – achteckig */
.btn-primary {
  --cut: 14px;                 /* Größe der abgeschrägten Ecken */
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--neon);
  transition: transform .16s ease, color .2s ease, filter .2s ease;
}

.btn-primary::before,
.btn-primary::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

/* Äußerer Rand: Neon-Verlauf */
.btn-primary::before {
  inset: 0;
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon-2) 100%);
  clip-path: polygon(
    var(--cut) 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut)),
    0 var(--cut)
  );
}

/* Innenfläche: dunkel, 2px kleiner – so bleibt der Rand sichtbar */
.btn-primary::after {
  inset: 2px;
  background: linear-gradient(180deg, rgba(13, 19, 38, .97), rgba(9, 14, 30, .97));
  clip-path: polygon(
    calc(var(--cut) - 1.2px) 0,
    calc(100% - var(--cut) + 1.2px) 0,
    100% calc(var(--cut) - 1.2px),
    100% calc(100% - var(--cut) + 1.2px),
    calc(100% - var(--cut) + 1.2px) 100%,
    calc(var(--cut) - 1.2px) 100%,
    0 calc(100% - var(--cut) + 1.2px),
    0 calc(var(--cut) - 1.2px)
  );
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: #ffffff;
  filter: drop-shadow(0 0 10px rgba(57, 255, 20, .45));
  text-decoration: none;
}
.btn-primary:active { transform: translateY(0); }

/* Tastatur-Fokus: Rand wird hell und das Achteck leuchtet */
.btn-primary:focus-visible {
  outline: none;
  filter: drop-shadow(0 0 5px var(--neon)) drop-shadow(0 0 14px rgba(57, 255, 20, .6));
}
.btn-primary:focus-visible::before {
  background: linear-gradient(135deg, #ffffff 0%, var(--neon-2) 100%);
}

.btn-small { --cut: 8px; padding: .55rem 1.3rem; min-height: 42px; font-size: .95rem; }
.btn-big   { --cut: 18px; padding: 1rem 2.1rem; font-size: 1.08rem; min-height: 56px; }
.btn-block { width: 100%; }

.textlink { color: var(--text-soft); font-weight: 600; }
.textlink:hover { color: var(--neon); }

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 16, 32, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--neon);
  background: rgba(57, 255, 20, .1);
  border: 1px solid rgba(57, 255, 20, .35);
}
.brand-text em { font-style: normal; color: var(--neon); }

.nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}
.nav a { color: var(--text-soft); font-size: .97rem; font-weight: 550; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(50% 55% at 22% 35%, rgba(57, 255, 20, .22), transparent 70%),
    radial-gradient(45% 50% at 78% 20%, rgba(238, 255, 0, .22), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }

.pill {
  display: inline-block;
  margin: 0 0 1.2rem;
  padding: .35rem .9rem;
  font-size: .85rem;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(19, 28, 56, .7);
}
.neon {
  color: var(--neon);
  text-shadow: 0 0 24px rgba(57, 255, 20, .55);
}
.slogan {
  max-width: 44ch;
  font-size: clamp(1.02rem, 2.6vw, 1.2rem);
  color: var(--text-soft);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin: 1.6rem 0 2.6rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 0;
  max-width: 780px;
}
.hero-facts > div {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(23, 33, 66, .7), rgba(15, 23, 48, .5));
}
.hero-facts dt {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: -.01em;
}
.hero-facts dd { margin: .2rem 0 0; font-size: .92rem; color: var(--text-dim); }

/* ---------- Sections ---------- */

.section { padding: clamp(2.8rem, 7vw, 5rem) 0; }
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(15, 23, 48, .75) 12%, rgba(15, 23, 48, .75) 88%, transparent);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.eyebrow {
  margin: 0 0 .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--neon);
}
.lead { color: var(--text-soft); margin: 0; }

/* ---------- Rechner ---------- */

.calc {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.card {
  background: linear-gradient(180deg, rgba(23, 33, 66, .85), rgba(15, 23, 48, .85));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: .4rem;
}
.input-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(9, 14, 30, .8);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .2rem .9rem .2rem .2rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input-row:focus-within {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, .18);
}
.input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 650;
  padding: .55rem .7rem;
}
.input-row input:focus { outline: none; }
.unit { color: var(--text-dim); font-size: .95rem; font-weight: 600; }

.slider-field { margin-bottom: 1.15rem; }
.slider-field label {
  display: block;
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: .2rem;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(57, 255, 20, .7), rgba(238, 255, 0, .7));
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(57, 255, 20, .7), rgba(238, 255, 0, .7));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: #0b1020;
  border: 3px solid var(--neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, .6);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0b1020;
  border: 3px solid var(--neon);
  box-shadow: 0 0 12px rgba(57, 255, 20, .6);
}

.form-hint {
  min-height: 1.2rem;
  margin: 0 0 .8rem;
  font-size: .88rem;
  color: var(--stark);
}
.form-hint.is-ok { color: var(--text-dim); }

.disclaimer {
  margin: .9rem 0 0;
  font-size: .8rem;
  color: var(--text-dim);
  text-align: center;
}

/* Ergebnis */

.calc-result { padding: 1.5rem; }

.result-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: center;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line-soft);
}

.gauge { position: relative; width: 160px; height: 160px; flex: none; }
.gauge svg { transform: rotate(-90deg); }
.gauge-track {
  fill: none;
  stroke: rgba(35, 48, 90, .8);
  stroke-width: 12;
}
.gauge-value {
  fill: none;
  stroke: var(--neon);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 414.7;
  stroke-dashoffset: 414.7;
  transition: stroke-dashoffset .5s ease, stroke .3s ease;
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, .55));
}
.gauge-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.gauge-number {
  display: block;
  font-size: 2.1rem;
  font-weight: 750;
  letter-spacing: -.02em;
}
.gauge-label {
  display: block;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.result-cat {
  margin: 0 0 .3rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.result-sentence { margin: 0 0 .9rem; color: var(--text-soft); font-size: .98rem; }

.result-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.result-meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9rem;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line-soft);
  padding-bottom: .4rem;
}
.result-meta li:last-child { border-bottom: 0; padding-bottom: 0; }
.result-meta strong { color: var(--text); font-weight: 650; white-space: nowrap; }

/* Skala */

.scale-block { padding: 1.4rem 0 1.1rem; border-bottom: 1px solid var(--line-soft); }
.scale-head {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .55rem;
}
.scale { position: relative; padding-top: 30px; }
.scale-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.seg { display: block; }
.seg-unter  { background: linear-gradient(90deg, #2f6fdd, var(--unter)); }
.seg-normal { background: linear-gradient(90deg, var(--normal), #14c98c); }
.seg-ueber  { background: linear-gradient(90deg, var(--ueber), #f0a52c); }
.seg-stark  { background: linear-gradient(90deg, #f2603f, var(--stark)); }

.scale-marker {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  transition: left .35s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scale-marker-label {
  font-size: .78rem;
  font-weight: 700;
  color: #06122a;
  background: #ffffff;
  border-radius: 6px;
  padding: .05rem .4rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(4, 8, 22, .8);
}
.scale-marker-pin {
  width: 3px;
  height: 24px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, .9), 0 0 3px rgba(4, 8, 22, .9);
}

.scale-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  margin-top: .9rem;
  font-size: .82rem;
  color: var(--text-dim);
}
.scale-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-unter  { background: var(--unter); }
.dot-normal { background: var(--normal); }
.dot-ueber  { background: var(--ueber); }
.dot-stark  { background: var(--stark); }

/* Symbolfiguren */

.figures-block { padding-top: 1.4rem; }
.figures-title {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: .9rem;
}
.figures {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.figure {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(9, 14, 30, .6);
  padding: .5rem .5rem .7rem;
  text-align: center;
  opacity: .55;
  filter: grayscale(.35);
  transition: opacity .3s ease, filter .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.figure img {
  width: 100%;
  max-width: 120px;
  margin: 0 auto;
  border-radius: 8px;
}
.figure-name {
  display: block;
  margin-top: .5rem;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.3;
}
.figure-range { display: block; font-size: .74rem; color: var(--text-dim); }

.figure.is-active {
  opacity: 1;
  filter: none;
  transform: translateY(-3px);
  border-color: var(--cat-color, var(--neon));
  box-shadow: 0 0 0 1px var(--cat-color, var(--neon)), 0 12px 30px rgba(4, 8, 22, .6);
}
.figure.is-active .figure-name { color: var(--cat-color, var(--neon)); }

.figure[data-cat="untergewicht"] { --cat-color: var(--unter); }
.figure[data-cat="normal"]       { --cat-color: var(--normal); }
.figure[data-cat="uebergewicht"] { --cat-color: var(--ueber); }
.figure[data-cat="stark"]        { --cat-color: var(--stark); }

.tip {
  margin: 0;
  padding: .9rem 1rem;
  font-size: .92rem;
  color: var(--text-soft);
  border-left: 3px solid var(--neon);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(57, 255, 20, .07);
}

/* ---------- Funktionen ---------- */

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.feature {
  padding: 1.4rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(23, 33, 66, .6), rgba(15, 23, 48, .45));
  transition: transform .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(57, 255, 20, .45); }
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; font-size: .93rem; color: var(--text-soft); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: .9rem;
  border-radius: 12px;
  color: var(--neon);
  background: rgba(57, 255, 20, .1);
  border: 1px solid rgba(57, 255, 20, .32);
  box-shadow: 0 0 18px rgba(57, 255, 20, .12);
}

/* ---------- FAQ ---------- */

.faq { max-width: 800px; display: grid; gap: .7rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(23, 33, 66, .7), rgba(15, 23, 48, .6));
  overflow: hidden;
}
.faq-item[open] { border-color: rgba(57, 255, 20, .45); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-weight: 620;
  font-size: 1.02rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--neon); }

.faq-icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--neon);
  transform: translate(-50%, -50%);
  border-radius: 2px;
}
.faq-icon::before { width: 11px; height: 2px; }
.faq-icon::after  { width: 2px; height: 11px; transition: transform .25s ease, opacity .25s ease; }
.faq-item[open] .faq-icon { border-color: var(--neon); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.faq-body {
  padding: 0 1.1rem 1.1rem;
  color: var(--text-soft);
  font-size: .96rem;
  border-top: 1px solid var(--line-soft);
  padding-top: .9rem;
}
.faq-body p:last-child { margin-bottom: 0; }
.faq-formula {
  display: inline-block;
  font-weight: 700;
  color: var(--neon);
  background: rgba(57, 255, 20, .08);
  border: 1px dashed rgba(57, 255, 20, .4);
  border-radius: 8px;
  padding: .3rem .7rem;
}
.faq-list { margin: 0 0 .8rem; padding-left: 1.1rem; }
.faq-list li { margin-bottom: .3rem; }
.faq-list strong { color: var(--text); }

/* ---------- Footer ---------- */

.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line-soft);
  background: rgba(9, 14, 30, .7);
}
.footer-inner { display: grid; gap: .4rem; }
.footer p { margin: 0; font-size: .92rem; color: var(--text-soft); }
.footer-note { color: var(--text-dim); font-size: .85rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .nav-cta { margin-left: auto; }
  .result-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .result-meta li { text-align: left; }
  .gauge { width: 140px; height: 140px; }
  .gauge svg { width: 140px; height: 140px; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure img { max-width: 100px; }
  .card { padding: 1.15rem; }
  .faq-item summary { font-size: .98rem; padding: .9rem 1rem; }
}

@media (max-width: 380px) {
  .hero-actions .btn-big { width: 100%; }
  .scale-legend { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
