@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blue: #2563ea;
  --blue-deep: #1d4fc4;
  --ink: #020711;
  --ink-soft: #3b4252;
  --paper: #f5f1e6;      /* Postkarten-Rückseite */
  --white: #fff;
  --radius: 18px;
  --wrap: 1120px;
  --gutter: 20px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only, .hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Hero ---------- */
:root {
  --hero-pt: 22px;    /* Abstand oben bis Logo */
  --logo-w: 168px;
  --copy-mt: 36px;    /* Logo → Text */
  --copy-gap: 32px;   /* Text → Video */
}

/* Blauer Bereich von oben bis zur Videomitte (untere Hälfte deckt .stage in Creme ab).
   overflow: clip statt hidden, sonst funktioniert position: sticky darin nicht. */
.intro {
  position: relative;
  overflow-x: clip;   /* nur seitlich abschneiden (Wasserzeichen), nach unten darf das vergrößerte Video rausragen */
  background: var(--blue);
  color: var(--white);
}

/* großes Logo-Zeichen als Wasserzeichen */
.intro::before {
  content: "";
  position: absolute;
  right: -170px;
  top: -170px;
  width: 440px;
  height: 440px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34' fill='%23fff'%3E%3Crect x='16.54' y='18.11' width='16.03' height='5.35' transform='translate(-7.5 23.45) rotate(-45)'/%3E%3Cpolygon points='13.22 13.22 17 17 24.56 9.44 20.78 5.66 17 9.44 13.22 5.66 1.88 17 13.22 28.34 17 24.56 9.44 17 13.22 13.22'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: .06;
  pointer-events: none;
}

.hero { position: relative; padding-top: var(--hero-pt); }

.logo img { width: var(--logo-w); }

/* Scroll-Tempo des Texts und Wachsen des Videos: Script am Ende von page.php.
   Der Text liegt unter dem Video (z-index), damit das Video sich darüberschieben kann. */
.hero-copy {
  position: relative;
  z-index: 0;
  max-width: calc(820px + 2 * var(--gutter));
  margin: var(--copy-mt) auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}
.hero-copy .subline { margin-left: auto; margin-right: auto; }

.hero-copy-inner { will-change: transform; }

/* Obere Hälfte durchsichtig (Blau von .intro), untere Hälfte Creme
   → Video sitzt genau mittig auf der Kante und liegt über dem Text */
.stage {
  position: relative;
  z-index: 1;
  margin-top: var(--copy-gap);
  background: linear-gradient(to bottom, transparent 50%, var(--paper) 50%);
}

.cta-row { padding-top: 56px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 8.4vw, 56px);
  line-height: 1.06;
  font-weight: 400;
  letter-spacing: -.02em;
}
h1 strong { font-weight: 700; }

.subline {
  margin: 14px 0 0;
  font-size: clamp(18px, 4.4vw, 21px);
  line-height: 1.4;
  opacity: .92;
  max-width: 30em;
}
.subline strong { font-weight: 600; }

/* ---------- Video ---------- */
.video {
  position: relative;
  aspect-ratio: var(--ratio, 16 / 9);
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 16px 36px -22px rgba(2, 7, 17, .45), 0 0 0 1px rgba(255, 255, 255, .12);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}

/* bei Hover: etwas stärkerer Schatten + leichter Zoom – nur auf Geräten mit Maus */
@media (hover: hover) {
  .video:hover { box-shadow: 0 24px 48px -22px rgba(2, 7, 17, .5), 0 0 0 1px rgba(255, 255, 255, .12); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .video:hover { transform: scale(1.02); }
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- CTA / Formular ---------- */
.cta {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  border: 1px solid rgba(2, 7, 17, .06);
  scroll-margin-top: 16px;
}
.cta h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
}
.cta-copy p, .cta form > p { margin: 8px 0 0; color: var(--ink-soft); }
.cta-copy { margin-bottom: 18px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input[type="email"] {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 17px;          /* ≥16px: kein Auto-Zoom auf iOS */
  padding: 14px 16px;
  border: 1.5px solid #d5d9e2;
  border-radius: 12px;
  background: #fafbfc;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input[type="email"]:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(37, 99, 234, .18);
}
input[aria-invalid="true"] { border-color: #d92d20; }

button {
  font: inherit;
  font-weight: 600;
  font-size: 17px;
  padding: 14px 22px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;
  transition: background .15s, transform .1s;
}
button {
  background: var(--blue);
  color: var(--white);
}
button:hover { background: var(--blue-deep); }
button:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.error {
  margin: 10px 0 0 !important;
  color: #b42318 !important;
  font-weight: 500;
}

.fineprint {
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: 12px !important;
}
.fineprint a { color: inherit; }

.success {
  display: flex;
  align-items: center;
  gap: 14px;
}
.success svg {
  flex: none;
  width: 44px;
  height: 44px;
  fill: var(--blue);
}
.success p { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; }

/* ---------- So funktioniert's ---------- */
.how { padding: 56px 0 64px; }

.how h2 {
  margin: 0 0 28px;
  font-size: clamp(28px, 6.4vw, 40px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.02em;
}
.how h2 strong { color: var(--blue); font-weight: 700; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.steps li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1px solid rgba(2, 7, 17, .06);
}
.num {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
}
.steps h3 { margin: 14px 0 4px; font-size: 20px; font-weight: 600; }
.steps p  { margin: 0; color: var(--ink-soft); }

.also {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
}
.also span {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(37, 99, 234, .35);
  color: var(--blue);
  font-weight: 500;
  font-size: 15px;
}


/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .7);
  padding: 36px 0 44px;
  font-size: 14px;
}
.footer img { width: 110px; margin-bottom: 14px; }
.footer p { margin: 0 0 10px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px 40px;
}

/* "Ein Produkt von deichlab" */
.footer .made-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .7);
  text-decoration: none;
  transition: color .15s;
}
.footer .made-by img {
  width: auto;
  height: 26px;
  margin: 0;
  opacity: .85;
  transition: opacity .15s;
}
.footer .made-by:hover { color: var(--white); text-decoration: none; }
.footer .made-by:hover img { opacity: 1; }

/* ---------- ab Tablet ---------- */
@media (min-width: 600px) {
  :root { --gutter: 32px; }
  .field { flex-direction: row; }
  .cta { padding: 28px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Desktop ---------- */
@media (min-width: 980px) {
  :root { --hero-pt: 28px; --logo-w: 210px; --copy-mt: 48px; --copy-gap: 48px; }
  .intro::before { width: 600px; height: 600px; top: -220px; right: -160px; }
  .video { border-radius: 24px; }
  .cta-row { padding-top: 96px; }
  /* volle Breite wie das Video: Text links, Formular rechts */
  .cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    padding: 40px 44px;
  }
  .cta-copy { margin-bottom: 0; }
  .cta h2 { font-size: 28px; }
  .cta .success { grid-column: 1 / -1; justify-content: center; }
  .how { padding: 88px 0 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
