:root {
  color-scheme: light;
  --navy-950: #071a2d;
  --navy-900: #102a43;
  --navy-800: #173f5f;
  --blue: #146ef5;
  --blue-dark: #0c55c7;
  --mint: #58e0c1;
  --paper: #ffffff;
  --page: #f3f6fa;
  --ink: #10233a;
  --muted: #617083;
  --line: #dce4ee;
  --line-strong: #c6d2df;
  --danger: #b4233c;
  --shadow: 0 28px 80px rgba(7, 26, 45, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, var(--navy-950) 0 570px, var(--page) 570px),
    var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a,
button,
input {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(88, 224, 193, 0.72);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--navy-950);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
footer {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 86px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 650;
}

.hero {
  display: grid;
  min-height: 430px;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.72fr);
  align-items: center;
  gap: clamp(36px, 7vw, 90px);
  padding: 46px 0 94px;
  color: #fff;
}

.eyebrow,
.step-label {
  margin: 0;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 17px 0 0;
  font-size: clamp(3rem, 7vw, 6.25rem);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: 0.91;
}

.hero h1 span {
  color: var(--mint);
}

.hero-intro {
  max-width: 650px;
  margin: 27px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
}

.trust-list svg,
.rate-note svg,
.primary-button svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-list svg {
  color: var(--mint);
}

.hero-orbit {
  position: relative;
  display: grid;
  width: min(100%, 350px);
  aspect-ratio: 1;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(88, 224, 193, 0.19);
  border-radius: inherit;
}

.hero-orbit::before {
  inset: 15%;
}

.hero-orbit::after {
  inset: -6%;
  border-style: dashed;
}

.orbit-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: 170px;
  min-height: 190px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 38px;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 12%, rgba(88, 224, 193, 0.25), transparent 45%),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
  text-align: center;
  backdrop-filter: blur(12px);
}

.orbit-card > span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 20px;
  background: var(--mint);
  box-shadow: 0 14px 40px rgba(88, 224, 193, 0.25);
  color: var(--navy-950);
  font-size: 2rem;
  font-weight: 900;
}

.orbit-card strong {
  font-size: 1rem;
}

.orbit-card small {
  color: rgba(255, 255, 255, 0.62);
}

.calculator-shell {
  position: relative;
  z-index: 2;
  margin-top: -58px;
  border: 1px solid rgba(198, 210, 223, 0.72);
  border-radius: 30px;
  padding: clamp(24px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.calculator-heading,
.form-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.calculator-heading h2,
.form-section-heading h3 {
  margin: 8px 0 0;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.calculator-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.form-section-heading h3 {
  font-size: 1.35rem;
}

.calculator-shell .step-label {
  color: var(--blue);
}

.calculator-hint,
.form-section-heading > span {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.target-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 27px 0 0;
  padding: 0;
  border: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.target-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.target-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.target-content {
  display: grid;
  min-height: 148px;
  grid-template-rows: auto 1fr;
  gap: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fbfcfe;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.target-option:hover .target-content {
  transform: translateY(-2px);
  border-color: #aebfd1;
}

.target-option input:focus-visible + .target-content {
  outline: 3px solid rgba(20, 110, 245, 0.28);
  outline-offset: 3px;
}

.target-option input:checked + .target-content {
  border-color: var(--blue);
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px var(--blue), 0 12px 28px rgba(20, 110, 245, 0.1);
}

.target-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #e9eef5;
  color: var(--navy-800);
  font-weight: 900;
}

.target-option input:checked + .target-content .target-icon {
  background: var(--blue);
  color: #fff;
}

.target-content strong,
.target-content small {
  display: block;
}

.target-content strong {
  color: var(--ink);
  font-size: 0.91rem;
  line-height: 1.22;
}

.target-content small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
}

.form-section-heading {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 35px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 23px;
}

.field {
  position: relative;
  min-width: 0;
}

.field > label {
  display: block;
  margin-bottom: 8px;
  color: #32465b;
  font-size: 0.78rem;
  font-weight: 800;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  padding: 0 54px 0 15px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.input-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(20, 110, 245, 0.1);
}

.unit {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: #68798a;
  font-size: 0.8rem;
  font-weight: 800;
  pointer-events: none;
}

.unit-wide {
  right: 12px;
  font-size: 0.67rem;
}

.field > small {
  display: block;
  min-height: 34px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.25;
}

.field.is-target .input-wrap input {
  border-style: dashed;
  border-color: #99b9e7;
  background: #f1f6fd;
  color: transparent;
  cursor: not-allowed;
}

.field.is-target .unit {
  display: none;
}

.field.is-target .input-wrap::after {
  content: "Wird berechnet";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 850;
  pointer-events: none;
}

.rate-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 25px;
  border: 1px solid #d8e6f8;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f4f8fd;
  color: #42566c;
}

.rate-note svg {
  margin-top: 1px;
  color: var(--blue);
}

.rate-note p {
  margin: 0;
  font-size: 0.76rem;
}

.form-error {
  margin: 18px 0 0;
  border-left: 3px solid var(--danger);
  border-radius: 0 10px 10px 0;
  padding: 11px 14px;
  background: #fff0f3;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 14px;
  padding: 0 21px;
  font-weight: 850;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  border: 0;
  background: var(--blue);
  box-shadow: 0 12px 30px rgba(20, 110, 245, 0.22);
  color: #fff;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--blue-dark);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #485c70;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 72px);
  margin-top: 28px;
  border-radius: 28px;
  padding: clamp(27px, 5vw, 54px);
  background:
    radial-gradient(circle at 95% 0%, rgba(88, 224, 193, 0.14), transparent 35%),
    var(--navy-950);
  box-shadow: 0 25px 70px rgba(7, 26, 45, 0.18);
  color: #fff;
  outline: none;
}

.result-card[hidden] {
  display: none;
}

.result-main > p:first-child {
  margin: 0;
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-main h2 {
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
}

#result-value {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

#result-summary {
  max-width: 42ch;
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
}

.result-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.12);
}

.result-details > div {
  min-width: 0;
  padding: 17px;
  background: rgba(255, 255, 255, 0.045);
}

.result-details dt {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.66rem;
}

.result-details dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  font-weight: 800;
}

.result-details .final-payment {
  grid-column: 1 / -1;
}

.result-disclaimer {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 17px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
}

.privacy-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0 80px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--line);
}

.privacy-strip > div {
  display: grid;
  gap: 5px;
  padding: 23px 25px;
  background: #fff;
}

.privacy-strip strong {
  font-size: 0.86rem;
}

.privacy-strip span {
  color: var(--muted);
  font-size: 0.74rem;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 26px 0 38px;
  color: var(--muted);
  font-size: 0.72rem;
}

footer p {
  margin: 0;
}

@media (max-width: 900px) {
  body {
    background: linear-gradient(180deg, var(--navy-950) 0 780px, var(--page) 780px);
  }

  .hero {
    min-height: 660px;
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 100px;
  }

  .hero-orbit {
    position: absolute;
    width: 220px;
    opacity: 0.23;
    right: -55px;
    top: 190px;
  }

  .orbit-card {
    transform: scale(0.72);
  }

  .target-picker,
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 520px);
  }

  .site-header {
    min-height: 72px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .brand-label {
    display: none;
  }

  .hero {
    min-height: 600px;
    align-items: start;
    padding: 52px 0 95px;
  }

  .hero h1 {
    font-size: clamp(3.15rem, 16vw, 5rem);
  }

  .hero-orbit {
    display: none;
  }

  .trust-list {
    display: grid;
    gap: 9px;
  }

  .calculator-shell {
    margin-top: -48px;
    border-radius: 22px;
    padding: 24px 17px;
  }

  .calculator-heading,
  .form-section-heading {
    align-items: start;
    flex-direction: column;
    gap: 9px;
  }

  .target-picker,
  .field-grid,
  .privacy-strip {
    grid-template-columns: 1fr;
  }

  .target-content {
    min-height: 108px;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: 1fr;
    align-items: center;
    gap: 13px;
    padding: 15px;
  }

  .field > small {
    min-height: 0;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .result-card {
    border-radius: 22px;
  }

  .result-details {
    grid-template-columns: 1fr;
  }

  .result-details .final-payment {
    grid-column: auto;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
