/* Global Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-bg-base: #f8fafc;
  /* Lighter background */
  --color-bg-glow-1: rgba(139, 92, 246, 0.15);
  /* Purple glow */
  --color-bg-glow-2: rgba(56, 189, 248, 0.15);
  /* Light blue glow */
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-primary: #3b82f6;
  /* Modern Blue */
  --color-primary-hover: #2563eb;
  --color-primary-gradient: linear-gradient(135deg, #6366f1, #3b82f6);
  --color-border: #e2e8f0;
  --radius: 12px;
  --font-main: "DM Sans", system-ui, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--color-bg-base);
  background-image:
    radial-gradient(circle at 15% 50%, var(--color-bg-glow-1), transparent 40%),
    radial-gradient(circle at 85% 30%, var(--color-bg-glow-2), transparent 40%);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Header */
/* Header */
.site-header {
  position: sticky;
  top: 1rem;
  z-index: 100;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.pill-header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  /* Pill shape */
  padding: 0.75rem 1.5rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pill-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
}

.header-logo {
  height: 48px;
  width: auto;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  margin-left: 0.75rem;
  letter-spacing: -0.5px;
}

@media (max-width: 400px) {
  .header-title {
    display: none;
    /* Hide text on very small screens to save space */
  }
}

.header-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s;
  padding: 0.5rem;
}

.header-link:hover {
  color: var(--color-primary);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-lang-select {
  padding: 0.375rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background-color: transparent;
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  outline: none;
  font-family: var(--font-main);
  transition: border-color 0.2s, background-color 0.2s;
}

.header-lang-select:hover {
  background-color: rgba(255, 255, 255, 0.4);
  border-color: var(--color-primary);
}

/* Hero Section */
.page {
  padding: 2rem 1rem 4rem;
  display: flex;
  justify-content: center;
}

@media (max-width: 600px) {
  .page {
    padding: 2rem 1.5rem 4rem;
    /* More padding on mobile sides */
  }
}

.hero {
  max-width: 1200px;
  /* Wider container for split layout */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  margin: 0 auto;
}

/* Hero Content */
.hero-content {
  max-width: 700px;
  /* Slightly wider to support wider form if needed */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Desktop Split Layout */
@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    text-align: left;
    align-items: center;
    justify-content: space-between;
    gap: 6rem;
    padding: 0 2rem;
  }

  .hero-content {
    align-items: flex-start;
    /* Align text left */
    flex: 1;
    gap: 1.5rem;
    /* Additional spacing for desktop */
  }

  .hero-title,
  .hero-subtitle,
  .form {
    align-self: flex-start;
    text-align: left;
    margin-left: 0;
  }

  .hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .app-image {
    max-width: 85%;
    margin-left: auto;
  }

  .input-group {
    width: 100%;
    max-width: 500px;
  }
}

.hero-title {
  font-family: var(--font-main);
  /* Ensure font consistency */
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  /* Tighter tracking */
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--color-text);
}

.highlight-wrapper {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  /* Default behavior */
}

@media (max-width: 400px) {
  .highlight-wrapper {
    white-space: normal;
    /* Allow wrap on tiny screens so no horiz overflow */
  }
}

.hero-title .highlight {
  color: var(--color-primary);
  position: relative;
  z-index: 1;
}

.highlight-underline {
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 100%;
  height: 30px;
  z-index: 0;
  overflow: visible;
}

.highlight-underline path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 1.3s ease-out 0.5s forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-subtitle {
  font-family: var(--font-main);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
  max-width: 420px;
  line-height: 1.6;
}

/* Form Pill Layout */
.form {
  width: 100%;
  max-width: 580px;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-pill-container {
  display: flex;
  width: 100%;
  background: white;
  border-radius: 9999px;
  padding: 0.375rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.8, 0.64, 1);
  position: relative;
}

.form-pill-container:hover,
.form-pill-container:focus-within {
  transform: scale(1.06);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.18), inset 0 0 0 2px var(--color-primary);
}

.pill-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-text);
  outline: none;
  min-width: 0;
  /* Allow shrinking below min-content */
}

.pill-input::placeholder {
  color: #94a3b8;
}

.pill-btn {
  background: var(--color-primary-gradient);
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.pill-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.pill-btn:active {
  transform: translateY(1px);
}

.form-subtext {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0.8;
}

@media (min-width: 900px) {
  .form {
    align-items: flex-start;
  }

  .form-subtext {
    width: 100%;
    justify-content: center;
  }
}

/* Social Proof */
.social-proof {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

@media (min-width: 900px) {
  .social-proof {
    text-align: left;
    align-items: flex-start;
    align-self: flex-start;
    width: 100%;
    max-width: 580px;
  }
}

.stars {
  color: #fbbf24;
  /* Gold/Amber-400 */
  letter-spacing: 2px;
  font-size: 1.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.proof-text {
  margin: 0;
  color: var(--color-text);
}

.proof-subtext {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  max-width: 400px;
}

/* Visual & Floating Elements */
.hero-visual {
  width: 100%;
  max-width: 1000px;
  padding: 0 1rem;
  position: relative;
  /* For absolutely positioned cards */
}

.app-image {
  width: 100%;
  height: auto;
  display: block;
  /* Add depth with a soft drop shadow for the floating device */
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.15));
  position: relative;
  z-index: 2;
  border-radius: 32px;
  /* Smoother curve for modern phones */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

.app-image:hover {
  transform: scale(1.03) translateY(-10px);
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.2));
}

/* Floating Cards */
.glass-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  /* subtle solid border */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  position: absolute;
  padding: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-logo {
  font-size: 2rem;
  line-height: 1;
}

.card-stat {
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
  min-width: 140px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-value span {
  font-size: 1.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Positioning the cards */
.floating-card.top-left {
  top: 10%;
  left: 5%;
}

.floating-card.middle-right {
  top: 40%;
  right: -5%;
}

.floating-card.bottom-left {
  bottom: 0%;
  /* Dropped down below the image edge */
  left: 0%;
  /* Pushed to the left to avoid image */
}


.animate-float-delayed {
  animation: float 12s ease-in-out infinite;
  animation-delay: -3s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: float 12s ease-in-out infinite;
}

/* Utilities */
.error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  text-align: left;
}

.success {
  color: #16a34a;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  text-align: left;
}

/* Back Link */
.back-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-visual {
    padding: 2rem 0;
    /* Remove side padding so cards have more room */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .floating-card {
    position: relative;
    transform: none;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 320px;
  }

  .floating-card.top-left,
  .floating-card.middle-right,
  .floating-card.bottom-left {
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
  }

  .app-image {
    order: -1;
    /* Place image above the cards on mobile */
    margin-bottom: 1rem;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.25rem;
  }

  /* Refactor form styling to be outside media query issues */
  .form-pill-container {
    flex-direction: column;
    padding: 0.5rem;
    border-radius: 24px;
    /* Less round for stacked layout */
  }

  .pill-input {
    width: 100%;
    margin-bottom: 0.5rem;
    text-align: center;
  }

  .pill-btn {
    width: 100%;
    border-radius: 20px;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.75rem;
    /* Smaller font on very small screens */
  }
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  opacity: 0;
  /* Hidden initially */
  animation: fadeUp 0.8s ease-out forwards;
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

/* Hide reCAPTCHA badge */
.grecaptcha-badge {
  visibility: hidden;
}


/* Impressum Page Styles */
.impressum-page {
  background-color: #f9fafb;
}

.impressum-block {
  width: 100%;
  max-width: 800px;
  background: white;
  padding: 2rem 2rem;
  /* Reduced padding from 3rem */
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  margin: 2rem auto;
}

.impressum-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Reduced gap from 1.5rem */
}

.impressum-title {
  font-size: 1.75rem;
  /* Slightly smaller title */
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  /* Reduced margin */
  padding-bottom: 0.25rem;
  /* Reduced padding */
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
  align-self: flex-start;
}

.impressum-section {
  margin-bottom: 1rem;
  /* Reduced margin from 1.5rem */
}

.impressum-h3 {
  font-size: 1.125rem;
  /* Slightly smaller h3 */
  font-weight: 600;
  color: var(--color-text);
  margin-top: 1rem;
  /* Reduced margin from 1.5rem */
  margin-bottom: 0.5rem;
  /* Reduced margin from 0.75rem */
}

.impressum-block p {
  color: #374151;
  line-height: 1.6;
  /* Slightly reduced line-height */
  margin-bottom: 0.75rem;
  /* Reduced margin from 1rem */
}

.impressum-block a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.impressum-block a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.impressum-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  /* Reduced margin */
}

.impressum-back {
  margin-top: 2rem;
  /* Reduced margin from 3rem */
  text-align: center;
  padding-top: 1.5rem;
  /* Reduced padding */
  border-top: 1px solid var(--color-border);
}

/* Responsive adjustment */
@media (max-width: 600px) {
  .impressum-block {
    padding: 1.5rem 1rem;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
  }

  .impressum-title {
    font-size: 1.5rem;
  }
}

/* Footer Styles */
.site-footer {
  margin-top: auto;
  padding: 3rem 1rem 2rem;
  width: 100%;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s;
  padding: 0.5rem;
}

.footer-link:hover {
  color: var(--color-primary);
}

.footer-lang-select {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: white;
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  outline: none;
  font-family: var(--font-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
  /* Touch target size */
}

.footer-lang-select:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.footer-legal {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  max-width: 600px;
  opacity: 0.8;
}

.footer-legal a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.footer-legal a:hover {
  color: var(--color-primary);
}