/* =========================
   Base + Dark theme hooks
   ========================= */
:root{
  --brand: var(--color-primary, #0077CC);
  --brand-2: var(--color-secondary, #00C49A);
  --bg: var(--color-bg-light, #F4F6F8);
  --bg-elev:#ffffff;
  --text: var(--color-text-main, #2B2B2B);
  --text-dim:#76808A;
  --border: rgba(0,0,0,.08);
}

html[data-theme="dark"]{
  --bg: var(--color-bg-dark, #0B1D2A);
  --bg-elev:#0F2433;
  --text: var(--color-text-white, #FFFFFF);
  --text-dim:#A9B3BD;
  --border: rgba(255,255,255,.12);
}

/* Force dark palette regardless of base CSS */
html[data-theme="dark"] body{ background:var(--bg)!important; color:var(--text)!important; }
html[data-theme="dark"] .card{ background:var(--bg-elev)!important; border-color:var(--border)!important; }
html[data-theme="dark"] .btn-ghost{ color:var(--text); border-color:var(--border); }

/* =========================
   Resets & Layout
   ========================= */
*{ box-sizing:border-box; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: var(--font-family-base, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img{ max-width:100%; height:auto; display:block; }
.container{ max-width:1140px; margin:0 auto; padding:0 20px; }
a{ color:inherit; }

/* Focus sichtbar, aber dezent */
:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; border-radius:6px; }

/* =========================
   Buttons
   ========================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; min-height:44px;
  border-radius:10px; border:1px solid transparent; text-decoration:none; cursor:pointer;
  transition: transform .06s ease, background-color .2s ease, border-color .2s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background:var(--brand); color:#fff; }
.btn-primary:hover{ background:var(--brand-2); }
.btn-ghost{ background:transparent; color:var(--text); border-color:var(--border); }
.btn-ghost:hover{ border-color:var(--text); }
.btn.icon{ width:44px; height:44px; border-radius:10px; }

/* =========================
   NAV
   ========================= */
.nav.sticky{
  position:sticky; top:0; z-index:80;
  backdrop-filter:saturate(180%) blur(8px);
  -webkit-backdrop-filter:saturate(180%) blur(8px);
  background: rgba(0,0,0,0.00);
  border-bottom:1px solid var(--border);
}
/* Gradient-Fallback wenn color-mix nicht unterstützt wird */
@supports (background: color-mix(in oklab, white 50%, black 50%)){
  .nav.sticky{ background: color-mix(in oklab, var(--bg) 85%, transparent); }
}

.nav__inner{ display:flex; align-items:center; justify-content:space-between; gap:20px; padding:10px 0; }
.nav__brand img{ height:auto; max-height:40px; width:auto; }
.nav__links{ display:flex; gap:18px; list-style:none; margin:0; padding:0; }
.nav__links a{ text-decoration:none; color:var(--text); opacity:.9; }
.nav__links a:hover{ opacity:1; }
.nav__right{ display:flex; align-items:center; gap:10px; }
.nav__lang a{ margin:0 6px; text-decoration:none; opacity:.7; color:var(--text); }
.nav__lang a.active{ opacity:1; font-weight:600; }

/* Sichtbarkeiten */
.desktop-only{ display:flex; }
.nav__burger{ display:none; }

/* Burger */
.nav__burger{
  width:44px; height:44px; border:1px solid var(--border);
  background:transparent; border-radius:10px;
  align-items:center; justify-content:center; gap:4px;
  transition: border-color .2s ease, background-color .2s ease;
}
.nav__burger:hover{ border-color:var(--text); }
.nav__burger span{
  display:block; width:20px; height:2px; background:var(--text); border-radius:2px;
  transition: transform .2s ease, opacity .2s ease, width .2s ease;
}
.nav__burger span:nth-child(2){ width:16px; }

/* „X“-Animation bei geöffnetem Menü */
.nav__burger[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2){ opacity:0; width:0; }
.nav__burger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* Mobile Drawer */
.mnav[hidden]{ display:none!important; }
.mnav{
  position:fixed; inset:56px 0 auto 0; /* unter der NAV */
  background:var(--bg-elev);
  border-top:1px solid var(--border);
  display:grid; gap:12px; padding:16px 20px;
  z-index:90; /* über Nav (80) & Cookie (70) */
  box-shadow:0 10px 20px rgba(0,0,0,.2);
}
.mnav a{ text-decoration:none; color:var(--text); }
.mnav__lang a{ margin-right:10px; }

/* =========================
   Sections
   ========================= */

/* Hero Headline – responsiv & sauberer Umbruch */
.hero__headline{
  margin: 0 0 8px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  /* skaliert zwischen ~28px und ~48px */
  font-size: clamp(1.75rem, 2.2vw + 1.1rem, 3rem);
  overflow-wrap: anywhere;    /* bricht lange Wörter */
  hyphens: auto;
}

/* Hero image responsiveness – feinjustiert für Mobile */
.hero__visual{ justify-self:end; max-width:100%; }
.hero__visual .hero-img,
.hero-img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  aspect-ratio: 1024/360;
  object-fit: contain;
  margin-inline: auto; /* zentriert bei 1-Spalten-Layout */
}

.hero{
  padding:80px 0 40px;
  background: linear-gradient(180deg, rgba(0,0,0,.00), rgba(0,0,0,.00));
}
@supports (background: color-mix(in srgb, white 50%, black 50%)){
  .hero{ background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 60%); }
}
.hero__inner{ display:grid; grid-template-columns:1.1fr .9fr; gap:32px; align-items:center; }
.hero__kicker{ font-size:.95rem; color:var(--text-dim); margin-bottom:8px; }
.lead{ font-size:1.1rem; opacity:.95; }
.hero__ctas{ display:flex; gap:12px; margin-top:16px; flex-wrap:wrap; }
.hero__socialproof{ margin-top:12px; font-size:.95rem; color:var(--text-dim); }
.hero__visual{ justify-self:end; }

/* Hero image responsiveness */
.hero__visual img,
.hero-img{
  display:block;
  width:100% !important;
  height:auto !important;
  max-width:1024px;
  aspect-ratio:1024/360;
  object-fit:contain;
}

.partners{ padding:24px 0; }
.partners__row{ display:flex; gap:12px; flex-wrap:wrap; padding-top:8px; }
.partner-dot{ width:44px; height:44px; border-radius:50%; background:var(--bg-elev); border:1px solid var(--border); opacity:.8; }

.benefits{ padding:50px 0 10px; }
.grid-bento{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; }
.card{ background:var(--bg-elev); border:1px solid var(--border); border-radius:14px; padding:18px; box-shadow:0 2px 6px rgba(0,0,0,.04); }

.how{ padding:40px 0; }
.steps-3{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; }
.step__num{ font-weight:700; margin-bottom:6px; color:var(--brand); }

.pricing-wrap{ padding:40px 0; display:grid; grid-template-columns:1.4fr .6fr; gap:24px; align-items:start; }
.pricing__cards{ display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; }
.price{ font-size:1.6rem; margin:10px 0 14px; }
.featured{ outline:2px solid var(--brand); outline-offset:0; }
.list{ padding-left:18px; }

.testimonials__list{ display:grid; grid-template-columns:1fr; gap:12px; }
.stars{ color:#FBBF24; } /* amber */

.faq{ padding:40px 0; }
.accordion details{
  background:var(--bg-elev); border:1px solid var(--border); border-radius:10px;
  padding:10px 14px; margin-bottom:10px;
}
.accordion summary{ cursor:pointer; font-weight:600; list-style:none; }
.accordion summary::-webkit-details-marker{ display:none; }

.cta{ padding:40px 0 60px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.00)); }
@supports (background: color-mix(in srgb, white 50%, black 50%)){
  .cta{ background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand) 7%, transparent)); }
}
.cta__box{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }

.contact{ padding:40px 0 60px; }
.contact form{ display:grid; gap:10px; grid-template-columns:1fr 1fr; }
.contact textarea{ grid-column:1 / -1; }
.contact button{ justify-self:start; }

/* -------- Contact Form: Inputs größer + Error States -------- */
.form-field { display:flex; flex-direction:column; gap:6px; }
.contact form input[type="text"],
.contact form input[type="email"],
.contact form input[type="tel"],
.contact form input:not([type]),
.contact form select,
.contact form textarea {
  width:100%;
  min-height:48px;               /* höher */
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--bg-elev);
  color:var(--text);
  font-size:1rem;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.contact form textarea{ min-height:120px; resize:vertical; }

.contact form input:focus,
.contact form textarea:focus,
.contact form select:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}

/* Checkbox-Zeile */
.form-check {
  display:flex; align-items:flex-start; gap:10px; grid-column:1 / -1;
  color:var(--text-dim); font-size:.95rem;
}
.form-check input[type="checkbox"]{ width:18px; height:18px; margin-top:3px; accent-color:var(--brand); }

/* Error Styles */
:root{ --error:#ef4444; }               /* rot */
.error-text{ color:var(--error); min-height:1em; font-size:.9rem; }
.input--error{
  border-color:var(--error) !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.2) !important;
}
:root{
  --success: #22c55e; /* Grün */
}

/* Alerts */
.alert {
  grid-column: 1 / -1;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elev);
}
.alert.success{
  border-color: var(--success);
  color: var(--success); /* Text grün */
  /* optional leichte Tönung des Hintergrunds */
  background: color-mix(in srgb, var(--success) 10%, var(--bg-elev));
}
.alert.error   { border-color: #b45309; }

/* Hinweiszeile (Plan) */
.form-hint{ color: var(--text-dim); font-size: .95rem; }

/* Honeypot unsichtbar für Menschen, sichtbar für Bots */
.hp-wrap {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* =========================
   Footer
   ========================= */
.footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;                 /* erlaubt zweite Zeile */
}
.footer__brand img { max-height: 40px; height: auto; width: auto; }
.footer__nav a { margin-left: 14px; text-decoration: none; color: var(--text); }

/* Copyright-Zeile unten & zentriert */
.footer .small-text {
  flex: 0 0 100%;                  /* nimmt gesamte Breite in zweiter Zeile */
  text-align: center;
  margin-top: 8px;
  color: var(--text-dim);
  font-size: .9rem;
}

/* =========================
   Cookie
   ========================= */
.cookie.hidden{ display:none; }
.cookie{
  position:fixed; inset:auto 0 0 0;
  background:var(--bg-elev);
  border-top:1px solid var(--border);
  padding:14px 0 calc(14px + env(safe-area-inset-bottom));
  z-index:70;
}
.cookie__inner{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cookie__text p{ margin:6px 0; color:var(--text-dim); }

/* =========================
   Responsive
   ========================= */
/* Desktop (>=1000px): Hero-Bild über beide Spalten, zentriert, 1024px breit */
@media (min-width: 1000px){
  .hero__visual--desktop-center{
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px; /* optional */
  }
  .hero__visual--desktop-center .hero-img{
    width: 1024px !important;
    max-width: 1024px !important;
    height: auto;
    margin-inline: auto;
    flex:0 0 auto;
  }
}

/* Tablet & Down (<=1000px) */
@media (max-width: 1000px){
  .nav__links,
  .desktop-only{ display: none; }       /* nur hier verstecken */
  .nav__burger{ display: flex; }

  .hero{ padding: 56px 0 24px; }
  .hero__inner{ grid-template-columns: 1fr; align-items: start; }
  .hero__visual{ justify-self: center; }

  /* Headline kompakter auf schmalen Screens */
  .hero__headline{
    font-size: clamp(1.6rem, 4.8vw + 0.8rem, 2.2rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
  }
  .hero__ctas{ gap: 10px; }

  /* Image-Breite begrenzen, damit es nie zu groß wirkt */
  .hero__visual .hero-img{
    width: 100%;
    height: auto;
    max-width: min(92vw, 520px);
  }

  .pricing-wrap{ grid-template-columns: 1fr; }
  .pricing__cards{ grid-template-columns: 1fr; }
  .steps-3{ grid-template-columns: 1fr; }
  .grid-bento{ grid-template-columns: 1fr; }
}

/* Phones (<=600px) */
@media (max-width: 600px){
  .hero__ctas{ flex-direction: column; align-items: stretch; }
  .container{ padding: 0 16px; } /* etwas schmalerer Seitenabstand */
  .footer__inner { justify-content: center; }
  .footer__nav { width: 100%; text-align: center; }
  .footer__nav a { margin: 0 8px; }
}

/* Motion Preferences */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
