/* =========================================================
   1) Design Tokens
   ========================================================= */

:root {
  --bg-1: #08111f;
  --bg-2: #113154;
  --bg-3: #1e4d78;

  --card: rgba(255, 255, 255, 0.94);
  --card-strong: rgba(255, 255, 255, 0.98);
  --border-soft: rgba(255, 255, 255, 0.16);

  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --white: #ffffff;

  --accent: #e11d48;
  --accent-alt: #38bdf8;

  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.16);

  --radius-xl: 28px;
  --radius-lg: 22px;
}

/* =========================================================
   2) Reset / Base
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  color: var(--white);
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.16), transparent 22%),
    radial-gradient(circle at 85% 18%, rgba(225, 29, 72, 0.12), transparent 20%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
}

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

a {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   3) Page Layout
   ========================================================= */

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 26px;
}

.shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 28px;
  align-items: stretch;
}

.hero,
.panel {
  min-height: 760px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   4) Hero
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px;
  border: 1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04)),
    linear-gradient(140deg, rgba(7, 24, 44, 0.82), rgba(17, 49, 84, 0.64));
  backdrop-filter: blur(10px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -20% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 58%,
    rgba(255, 255, 255, 0.06) 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 660px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 22px 0 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 20px;
  max-width: 9.5em;
  font-size: clamp(40px, 5vw, 78px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.30);
  transform: translateX(-0.02em);
}

.hero h1 .highlight {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 0.15em 0.65em 0.25em;
  border-radius: 0.4em;
  box-sizing: border-box;
  white-space: nowrap;
  color: var(--white);
  background: linear-gradient(135deg, #e11d48, #fb7185);
  box-shadow: 0 14px 34px rgba(225, 29, 72, 0.34);
}

.lead {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.94);
}

/* =========================================================
   5) Hero Infos
   ========================================================= */

.info-list {
  margin-top: 34px;
  display: grid;
  gap: 16px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  font-size: clamp(18px, 1.6vw, 24px);
  color: rgba(255, 255, 255, 0.92);
}

.info-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-alt);
  box-shadow: 0 0 0 7px rgba(56, 189, 248, 0.14);
}

/* =========================================================
   6) Panel / Sprachauswahl
   ========================================================= */

.panel {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text);
  background: linear-gradient(180deg, var(--card-strong), var(--card));
}

.panel-head h2 {
  margin: 0 0 10px;
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.05;
  color: var(--text);
}

.panel-head p {
  margin: 0 0 26px;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--text-soft);
}

.lang-grid {
  display: grid;
  gap: 18px;
}

.lang-card {
  position: relative;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 152px;
  padding: 22px 64px 22px 22px;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  border: 1px solid #dbe4ef;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.lang-card::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.9;
}

.lang-card:hover,
.lang-card:focus-visible {
  transform: translateY(-3px) scale(1.01);
  border-color: #bfd2e6;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
  outline: none;
}

.flag-wrap {
  width: 108px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.flag-wrap img {
  max-width: 88px;
  max-height: 56px;
  object-fit: contain;
}

.lang-content {
  min-width: 0;
}

.lang-title {
  margin: 0 0 6px;
  font-size: clamp(24px, 1.8vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  white-space: normal;
  overflow-wrap: break-word;
}

.lang-subtitle {
  margin: 0;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.4;
  color: var(--text-soft);
}

.lang-cta {
  display: none;
}

.panel-note {
  margin: 20px 2px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.footer {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.76);
}

/* =========================================================
   7) Formularseiten
   ========================================================= */

.form-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.form-hero {
  min-height: auto;
}

.compact-hero {
  min-height: clamp(120px, 16vh, 180px);
  padding: clamp(10px, 1.2vh, 14px) clamp(18px, 2.2vw, 28px);
}

.form-hero-inner {
  max-width: 760px;
  gap: clamp(2px, 0.5vh, 6px);
  justify-content: center;
}

.form-hero h1 {
  margin-bottom: clamp(4px, 0.6vh, 8px);
  font-size: clamp(24px, 2.6vh, 42px);
}

.form-hero h1 .highlight {
  margin-top: 4px;
  padding: 0.1em 0.5em 0.18em;
}

.form-lead {
  font-size: clamp(14px, 1.2vh, 18px);
  line-height: 1.15;
}

.single-line {
  white-space: nowrap;
  max-width: none;
}

.form-stage {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  box-shadow: var(--shadow-lg);
}

.form-stage-inner {
  padding: 28px;
}

#c1 {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
}

/* =========================================================
   8) Navigation / Buttons / Hero Tools
   ========================================================= */

.back-button {
  position: absolute;
  top: clamp(10px, 1.2vh, 16px);
  right: clamp(10px, 1.2vw, 18px);
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: clamp(34px, 3.2vh, 40px);
  padding: 0 14px;

  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);

  color: var(--white);
  font-size: clamp(12px, 1.1vh, 14px);
  font-weight: 700;
  text-decoration: none;

  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.back-button:hover,
.back-button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.back-button-left {
  left: clamp(10px, 1.2vw, 18px);
  right: auto;
}

.hero-flag {
  position: absolute;
  top: clamp(10px, 1.2vh, 16px);
  right: clamp(10px, 1.2vw, 18px);
  z-index: 2;

  width: 64px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.hero-flag img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* rechter Stapel: Flag + Home */
.hero-tools {
  position: absolute;
  top: clamp(10px, 1.2vh, 16px);
  right: clamp(10px, 1.2vw, 18px);
  z-index: 2;

  width: 64px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-tools .hero-flag {
  position: static;
  width: 100%;
  height: 46px;
}

.back-button-home {
  position: static;
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 700;
}

/* =========================================================
   9) Abschlussseite / Success
   ========================================================= */

.done-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.done-card {
  width: 100%;
  max-width: 520px;
  padding: clamp(24px, 3vw, 36px);
  text-align: center;

  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04)),
    linear-gradient(140deg, rgba(7, 24, 44, 0.82), rgba(17, 49, 84, 0.64));

  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.done-title {
  margin: 10px 0 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.done-sub {
  display: block;
  margin-top: 6px;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.progress-ring {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
}

.progress-ring svg {
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 10;
}

.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.ring-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--white);
}

/* =========================================================
   10) Responsive
   ========================================================= */

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

  .hero,
  .panel {
    min-height: auto;
  }

  .hero {
    padding: 34px;
  }
}

@media (max-width: 840px) {
  .page {
    padding: 16px;
  }

  .hero,
  .panel,
  .form-stage {
    border-radius: 22px;
  }

  .hero {
    padding: 26px;
  }

  .lead {
    max-width: none;
  }

  .compact-hero {
    min-height: auto;
    padding: 12px 16px;
  }

  .form-hero-inner {
    gap: 4px;
  }

  .form-hero h1 {
    margin-bottom: 6px;
    font-size: clamp(22px, 5vw, 34px);
  }

  .form-lead {
    font-size: 15px;
  }

  .single-line {
    white-space: normal;
  }

  .form-stage-inner {
    padding: 18px;
  }

  .back-button {
    top: 10px;
    right: 10px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .hero-flag {
    top: 10px;
    right: 10px;
    width: 58px;
    height: 42px;
  }

  .hero-tools {
    top: 10px;
    right: 10px;
    width: 58px;
    gap: 10px;
  }

  .hero-tools .hero-flag,
  .back-button-home {
    height: 42px;
    min-height: 42px;
  }

  .back-button-home {
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .hero h1 {
    max-width: 100%;
    font-size: clamp(30px, 8vw, 48px);
    line-height: 1;
    transform: none;
  }

  .hero h1 .highlight {
    padding: 0.12em 0.45em 0.2em;
  }

  .eyebrow {
    margin-top: 18px;
  }

  .info-item {
    align-items: flex-start;
  }

  .lang-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .lang-card::after {
    display: none;
  }

  .flag-wrap {
    width: 100%;
    height: 88px;
  }

  .compact-hero {
    padding: 10px 12px;
  }

  .form-hero-inner {
    padding-right: 70px;
  }

  .form-hero h1 {
    margin-bottom: 4px;
    font-size: clamp(20px, 6vw, 28px);
  }

  .form-hero h1 .highlight {
    margin-top: 3px;
    padding: 0.1em 0.42em 0.16em;
  }

  .form-lead {
    max-width: calc(100% - 70px);
    font-size: 14px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .single-line {
    white-space: normal;
  }

  .back-button {
    top: 8px;
    right: 8px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .hero-flag {
    top: 8px;
    right: 8px;
    width: 54px;
    height: 38px;
    padding: 5px;
  }

  .hero-tools {
    top: 8px;
    right: 8px;
    width: 54px;
    gap: 8px;
  }

  .hero-tools .hero-flag,
  .back-button-home {
    height: 38px;
    min-height: 38px;
  }

  .back-button-home {
    font-size: 18px;
  }

  .done-card {
    padding: 24px 18px;
  }
}