/* Fabulous Hosting – Landingpage. Schwarz/Weiß, eine Bildschirmseite, keine externen Ressourcen. */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --grey: #6e6e6e;      /* Fließtext zweiter Ordnung, 5.1:1 auf Weiß */
  --line: #e4e4e4;      /* Haarlinien */
  --gutter: clamp(20px, 4vw, 56px);
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  /* Genau eine Bildschirmhöhe; die Typo skaliert mit der Höhe, damit alles hineinpasst.
     Nur auf extrem kleinen Geräten wird gescrollt statt abgeschnitten. */
  min-height: 100dvh;
}
a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

/* ---------- Kopf */
.l-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 700; font-size: 15.5px; letter-spacing: 0.04em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark i { width: 14px; height: 14px; background: var(--black); transform: rotate(45deg); display: inline-block; }
.l-head nav { display: flex; gap: 28px; font-size: 15px; }
.l-head nav a { text-decoration: none; }
.l-head nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hauptbereich */
.l-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 88px);
  padding: clamp(24px, 4vh, 56px) var(--gutter);
}
.l-main h1 {
  /* Breite UND Höhe begrenzen die Größe: 4 Zeilen Headline + Text + Buttons müssen in den Hauptbereich passen */
  font-size: clamp(30px, min(4.6vw, (100dvh - 540px) / 4.2), 76px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
  max-width: 13ch;
}
.l-main h1 span { display: block; text-wrap: balance; }
.lead {
  margin-top: clamp(16px, 2.6vh, 28px);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.5;
  color: var(--grey);
  max-width: 44ch;
}
.cta { display: flex; gap: 12px; margin-top: clamp(20px, 3.4vh, 36px); flex-wrap: wrap; }
.btn {
  display: inline-block; font: 500 16px/1 var(--sans); text-decoration: none;
  padding: 15px 24px; border-radius: 999px; border: 1.5px solid var(--black);
}
.btn.primary { background: var(--black); color: var(--white); }
.btn.primary:hover { background: #2a2a2a; border-color: #2a2a2a; }
.btn.ghost:hover { background: var(--black); color: var(--white); }

/* ---------- Badge über der Headline */
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; margin-bottom: clamp(14px, 2.4vh, 26px);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
}
.badge .eu { width: 28px; height: 28px; flex: none; }

/* ---------- KI-Chat: das eine Element mit Bewegung */
.chat {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 40px 80px -48px rgb(0 0 0 / .35);
  overflow: hidden;
  max-width: 560px;
  justify-self: end;
  width: 100%;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.chat-head .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--black); position: relative; }
.chat-head .avatar::after { content: ""; position: absolute; inset: 8px; background: var(--white); transform: rotate(45deg); }
.chat-head .state { margin-left: auto; color: var(--grey); font-size: 13px; }
.chat-body { display: flex; flex-direction: column; gap: 10px; padding: clamp(16px, 2.4vh, 24px) 20px; min-height: clamp(220px, 34vh, 300px); }
.msg { max-width: 85%; padding: 11px 15px; border-radius: 18px; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--black); color: var(--white); border-bottom-right-radius: 6px; }
.msg.ai, .slot { align-self: flex-start; }
.msg.ai { background: #f2f2f2; border-bottom-left-radius: 6px; }
.msg p + p { margin-top: 4px; }
.msg .link { font-family: var(--mono); font-size: 0.86em; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.msg .meta { color: var(--grey); font-size: 0.88em; }
.typing { display: flex; gap: 5px; padding: 15px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8a8a8a; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

/* Ablauf: Nachricht – Antwort – „tippt…“ – Fertig. Einmal beim Laden. */
.m1, .m2, .m4 { opacity: 0; transform: translateY(6px); animation: pop .35s ease-out forwards; }
.m1 { animation-delay: .4s; }
.m2 { animation-delay: 1.3s; }
/* „tippt…“ und die Antwort liegen übereinander im selben Platz und wechseln nur die Deckkraft */
.slot { display: grid; justify-items: start; }
.slot > * { grid-area: 1 / 1; }
.m3 { opacity: 0; align-self: start; animation: typing-show 1.8s linear 2.1s forwards; }
.m4 { animation-delay: 3.9s; }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes typing-show { 0%, 92% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .m1, .m2, .m4 { opacity: 1; transform: none; animation: none; }
  .m3 { display: none; }
}

/* ---------- Die vier Kernpunkte */
.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.facts div {
  padding: clamp(16px, 2.4vh, 26px) var(--gutter);
  border-left: 1px solid var(--line);
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start;
}
.facts .ico {
  grid-row: span 2;
  width: 40px; height: 40px; padding: 9px;
  border: 1px solid var(--line); border-radius: 12px;
  fill: none; stroke: var(--black); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.facts h2 { align-self: center; }
.facts div:first-child { border-left: 0; }
.facts h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.facts p { grid-column: 2; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--grey); max-width: 34ch; }

/* ---------- Fuß */
.l-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--grey);
}
.l-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.l-foot a { text-decoration: none; }
.l-foot a:hover { color: var(--black); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Kleinere Bildschirme: kompakter, damit alles auf eine Seite passt */
@media (max-width: 1100px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .l-main { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 22px; }
  .l-main h1 { font-size: clamp(34px, 9.5vw, 56px); max-width: 13ch; }
  .lead { font-size: 15px; }
  .facts p { display: none; }
  .facts div { padding: 12px var(--gutter); }
  .facts h2 { font-size: 14px; }
  .l-head nav { gap: 18px; }
  .chat { justify-self: stretch; max-width: none; }
  .chat-body { min-height: 0; padding: 14px 16px; }
  .chat .m2, .chat .m3 { display: none; }
  .chat .m4 { animation-delay: 1.4s; }
  .l-main h1 { font-size: clamp(28px, 8vw, 44px); }
  .lead { margin-top: 12px; }
  .cta { margin-top: 18px; }
  .cta .btn { padding: 13px 20px; font-size: 15px; }
  .l-foot { justify-content: center; text-align: center; }
  .l-foot > span { display: none; }
}
/* Handys: alles kompakt, damit eine Bildschirmhöhe reicht */
@media (max-width: 820px) {
  .l-head { padding-block: 14px; }
  .l-main { padding-block: 18px; gap: 16px; }
  .lead { font-size: 14.5px; line-height: 1.45; }
  .badge { font-size: 13px; padding: 4px 12px 4px 4px; margin-bottom: 12px; }
  .badge .eu { width: 22px; height: 22px; }
  .chat .m1, .chat .chat-head { display: none; }
  .chat { border-radius: 18px; box-shadow: none; }
  .chat-body { padding: 12px; }
  .chat .m4 { max-width: 100%; animation-delay: .5s; }
  .facts div { padding: 10px var(--gutter); column-gap: 10px; grid-template-columns: 32px minmax(0, 1fr); }
  .facts .ico { width: 32px; height: 32px; padding: 6px; border-radius: 10px; }
  .facts h2 { font-size: 13px; line-height: 1.25; }
  .l-foot { padding: 10px var(--gutter); font-size: 12px; }
  .l-foot nav { gap: 4px 14px; justify-content: center; }
}
/* Niedrige Handys: Chat weglassen */
@media (max-width: 820px) and (max-height: 799px) {
  .chat { display: none; }
}
/* Flache Bildschirme (Laptops mit Browserleiste): Kernpunkte nur als Überschrift */
@media (min-width: 821px) and (max-height: 760px) {
  .facts p { display: none; }
  .facts div { padding-block: 14px; }
  .lead { max-width: 52ch; }
}
