/* Self-hosted fonts (no external request to Google at runtime - see fonts/). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/space-grotesk-700.woff2") format("woff2");
}

:root {
  --color-deep-blue: #155EEF;
  --color-turquoise: #14C9B7;
  --color-mint: #A8F0D1;
  --color-navy: #081F3A;
  --color-off-white: #F6FBFA;
  --gradient-primary: linear-gradient(135deg, #155EEF 0%, #14C9B7 55%, #A8F0D1 100%);

  --font-headline: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-navy);
  background: var(--color-off-white);
  line-height: 1.5;
  overscroll-behavior-y: none;
}

h1, h2, h3 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
}

p { margin: 0 0 1rem; }

a { color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout helpers ---------- */
.wrapper {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / Nav ---------- */
.nav {
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(8, 31, 58, 0.06);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  order: -1;
}

.logo-img {
  height: 2rem;
  width: auto;
}

.logo-fallback {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

.logo-fallback .logo-x {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

.hero-blob--one {
  width: 22rem;
  height: 22rem;
  top: -8rem;
  left: -6rem;
  background: var(--gradient-primary);
  animation: blobFloatOne 16s ease-in-out infinite;
}

.hero-blob--two {
  width: 18rem;
  height: 18rem;
  bottom: -7rem;
  right: -5rem;
  background: var(--gradient-primary);
  animation: blobFloatTwo 20s ease-in-out infinite;
}

@keyframes blobFloatOne {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2rem, 3rem) scale(1.15); }
}

@keyframes blobFloatTwo {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2.5rem, -2rem) scale(1.1); }
}

.hero .wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-kicker {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-turquoise);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw + 1rem, 3.5rem);
  max-width: 20ch;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subheadline {
  font-size: 1.05rem;
  max-width: 42ch;
  color: rgba(8, 31, 58, 0.75);
}

/* ---------- Search mockup ---------- */
.search-mockup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #FFFFFF;
  border: 1.5px solid rgba(8, 31, 58, 0.1);
  border-radius: 9999px;
  height: 3.5rem;
  padding: 0 1.25rem;
  margin: 1.75rem 0 2rem;
  width: 100%;
  max-width: 26rem;
  box-shadow: 0 12px 30px -18px rgba(8, 31, 58, 0.35);
}

.search-mockup svg {
  flex-shrink: 0;
  color: var(--color-deep-blue);
}

.search-mockup-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4rem;
  color: var(--color-navy);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 1;
  min-width: 0;
}

.search-cursor {
  display: inline-block;
  flex-shrink: 0;
  width: 2px;
  height: 1.2rem;
  background: var(--color-deep-blue);
  margin-left: 2px;
  animation: blinkCursor 1s step-end infinite;
}

.search-cursor.cursor-static {
  animation: none;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---------- CTA buttons ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 9999px;
  padding: 0.85rem 1.6rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover, .btn:focus-visible {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: 0 10px 24px -12px rgba(21, 94, 239, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-navy);
}

.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--color-navy);
  color: #FFFFFF;
}

/* ---------- Cards ---------- */
.cards-section {
  padding: 1rem 0 4rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: #FFFFFF;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 20px 45px -30px rgba(8, 31, 58, 0.4);
  scroll-margin-top: 5.5rem;
}

.card-eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-turquoise);
  margin-bottom: 0.5rem;
  display: block;
}

.card h1,
.card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: rgba(8, 31, 58, 0.75);
}

.lead-form {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-navy);
  margin-bottom: 0.4rem;
}

.form-field-optional {
  font-weight: 400;
  color: rgba(8, 31, 58, 0.55);
  text-transform: none;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(8, 31, 58, 0.15);
  border-radius: 0.75rem;
  background: var(--color-off-white);
  color: var(--color-navy);
}

.form-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--color-deep-blue);
  outline-offset: 2px;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: #E23D3D;
}

.form-field-error {
  min-height: 1rem;
  margin: 0.35rem 0 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #B3261E;
}

.form-field input[type="file"] {
  padding: 0.5rem;
  background: #FFFFFF;
  cursor: pointer;
}

.form-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.form-field-row[hidden] {
  display: none;
}

.form-field-row > .form-field {
  flex: 1 1 10rem;
  min-width: 0;
}

fieldset.form-field {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

fieldset.form-field[hidden] {
  display: none;
}

fieldset.form-field > legend {
  display: block;
  width: 100%;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-navy);
}

.form-section-note {
  font-family: var(--font-body);
  font-size: 0.8rem;
  margin: 0.5rem 0 -0.3rem;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--color-deep-blue);
  width: 1.15rem;
  height: 1.15rem;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choice-chip {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid rgba(8, 31, 58, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

/* The gradient fill lives on its own layer, deliberately oversized (inset: -2px) so it
   always overshoots the chip's own edge. The chip's `overflow: hidden` then hard-clips
   it to the pill shape - this avoids any sub-pixel mismatch between how a browser rounds
   the border vs. the background at the corners (which showed up as squared-off corners
   peeking through on some setups). */
.choice-chip::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: -1;
}

.choice-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-chip:has(input:checked) {
  border-color: transparent;
  color: #FFFFFF;
}

.choice-chip:has(input:checked)::before {
  opacity: 1;
}

.choice-chip:has(input:focus-visible) {
  outline: 2px solid var(--color-deep-blue);
  outline-offset: 2px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-navy);
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.package-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .package-group {
    grid-template-columns: repeat(3, 1fr);
  }
}

.package-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 0.75rem;
  border: 1.5px solid rgba(8, 31, 58, 0.15);
  border-radius: 0.9rem;
  text-align: center;
  cursor: pointer;
  background: #FFFFFF;
}

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

.package-option:has(input:checked) {
  border-color: var(--color-deep-blue);
  box-shadow: 0 0 0 2px rgba(21, 94, 239, 0.15);
}

.package-option.is-disabled {
  cursor: not-allowed;
  background: var(--color-off-white);
  opacity: 0.6;
}

.package-name {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-navy);
}

.package-price {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-turquoise);
}

.package-badge {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(8, 31, 58, 0.5);
}

.lead-form .btn {
  align-self: flex-start;
}

.form-step {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.form-step[hidden] {
  display: none;
}

.stepper {
  margin-bottom: 0.5rem;
}

.stepper-track {
  height: 0.4rem;
  border-radius: 9999px;
  background: rgba(8, 31, 58, 0.08);
  overflow: hidden;
}

.stepper-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--gradient-primary);
  transition: width 0.25s ease;
}

.stepper-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.6rem 0 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

.stepper-caption-step {
  font-weight: 600;
  color: var(--color-turquoise);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.stepper-caption-label {
  font-weight: 600;
  color: var(--color-navy);
  text-align: right;
}

.form-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.form-success,
.form-error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
}

.form-success {
  background: var(--color-mint);
  color: var(--color-navy);
}

.form-error {
  background: #FDE8E8;
  color: #7A1F1F;
}

/* ---------- Standalone form page (e.g. stellenanzeige.html) ---------- */
.form-page {
  padding: 3rem 0 4rem;
}

.form-page .wrapper {
  max-width: 36rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-deep-blue);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

/* ---------- Legal pages (Impressum, Datenschutz, AGB) ---------- */
.legal-page {
  padding: 3rem 0 4rem;
}

.legal-page .wrapper {
  max-width: 48rem;
}

.legal-updated {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(8, 31, 58, 0.5);
  margin: 0 0 2rem;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin: 2.25rem 0 0.75rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-navy);
  margin: 1.5rem 0 0.5rem;
}

.legal-content p,
.legal-content li {
  color: rgba(8, 31, 58, 0.8);
  font-size: 0.95rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

.legal-content a {
  color: var(--color-deep-blue);
}

.legal-note {
  background: var(--color-mint);
  color: var(--color-navy);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(8, 31, 58, 0.12);
  vertical-align: top;
}

.legal-table th {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-navy);
}

.legal-table td {
  color: rgba(8, 31, 58, 0.8);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy);
  color: var(--color-off-white);
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--color-mint);
  text-decoration: underline;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer p.site-footer-links {
  margin-top: 0.75rem;
}

.site-footer-links a {
  margin: 0 0.4rem;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-blob--one,
  .hero-blob--two,
  .search-cursor {
    animation: none !important;
  }
}
