/* Tom Stahl AI Engineering – Prototyp
   Farbwerte sind aus dem Flyer und den Logo-Dateien in docs/ ausgemessen. */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Hintergrundverlauf des Flyers, von links nach rechts */
  --bg-start: #01020e;
  --bg-mid: #0c1e31;
  --bg-end: #183a54;
  --bg-header: #00000d;
  --bg-card: #12171e;
  --bg-footer: #2f2f2f;

  --border-card: #1b3550;
  --border-soft: rgba(139, 212, 217, 0.16);

  --text: #ffffff;
  --text-muted: #cfd8e0;

  /* Akzentlinien der drei Flyer-Karten */
  --accent-blue: #4086bc;
  --accent-teal: #8bd4d9;
  --accent-sand: #e0ceb0;
  /* Helle Schriftfarbe aus dem Logo */
  --logo-light: #b9edf0;

  --font: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --content-width: 75rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-space: clamp(3rem, 7vw, 5.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-mid);
}

/* Fester Verlauf hinter der ganzen Seite */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
}

main {
  flex: 1;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

a {
  color: var(--logo-light);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.9rem;
  background: var(--logo-light);
  color: var(--bg-start);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
  color: var(--bg-start);
}

/* ---------- Kopfzeile ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 13, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.85rem;
}

.logo-link {
  display: inline-flex;
  color: var(--text);
}

.logo {
  display: block;
  height: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  width: auto;
  font-family: var(--font);
}

/* Das Original-Logo ist ohne Unterschneidung gesetzt */
.logo text,
.logo-long text {
  font-kerning: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(0.75rem, 2vw, 1.75rem);
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--text-muted);
  font-size: 0.95em;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent-teal);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(26rem, 72vh, 44rem);
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Dunkelt die Textseite ab, damit der Claim vor dem Netz lesbar bleibt */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(1, 2, 14, 0.9) 0%, rgba(1, 2, 14, 0.55) 45%, rgba(1, 2, 14, 0) 80%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-block: var(--section-space);
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.25rem, 1.3rem + 4.6vw, 4.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.hero h1 .accent {
  display: block;
  color: var(--logo-light);
}

.hero-lead {
  max-width: 44ch;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 600;
  line-height: 1.45;
}

/* ---------- Einleitung ---------- */

.section {
  padding-block: var(--section-space);
}

/* Volle Inhaltsbreite wie die Karten darunter; "pretty" vermeidet unschöne Umbrüche */
.intro p {
  color: var(--text-muted);
  text-wrap: pretty;
}

.intro p + p {
  margin-top: 1.1rem;
}

/* ---------- Karten ---------- */

.cards {
  padding-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.card {
  --accent: var(--accent-blue);
  padding: clamp(1.25rem, 2.4vw, 1.9rem);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

.card--teal {
  --accent: var(--accent-teal);
}

.card--sand {
  --accent: var(--accent-sand);
}

.card h2 {
  padding-bottom: 0.65rem;
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
  /* Akzentlinie wie im Flyer: läuft nach rechts aus */
  background: linear-gradient(90deg, var(--accent), transparent 85%) left bottom / 100% 2px no-repeat;
}

.card ul {
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

.card li {
  position: relative;
  padding-left: 1.4rem;
  line-height: 1.45;
}

.card li + li {
  margin-top: 0.7rem;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Kontakt ---------- */

.contact {
  padding-top: 0;
}

.contact-panel {
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: rgba(18, 23, 30, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 4px;
}

.contact h2 {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
}

.contact-company {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem clamp(1.5rem, 5vw, 4rem);
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-list a {
  text-decoration: none;
  white-space: nowrap;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* ---------- Fußzeile ---------- */

.site-footer {
  background: var(--bg-footer);
  font-size: 0.92em;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding-block: 1rem;
}

.site-footer p {
  font-weight: 600;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text-muted);
  font-size: 0.85em;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- Rechtsseiten (bewusst klein gesetzt, wie Kleingedrucktes) ---------- */

.legal {
  max-width: 40rem;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.legal .logo-long {
  display: block;
  width: min(100%, 15rem);
  height: auto;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-family: var(--font);
}

.legal h1 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.legal h2 {
  margin-top: 1.25rem;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.3;
}

.legal p,
.legal ul {
  margin-top: 0.35rem;
  color: var(--text-muted);
}

.legal ul {
  padding-left: 1.25rem;
}

.legal address {
  font-style: normal;
}

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 56rem) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 40rem) {
  html {
    scroll-padding-top: 8rem;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(1, 2, 14, 0.8) 0%, rgba(1, 2, 14, 0.6) 60%, rgba(1, 2, 14, 0.25) 100%);
  }
}

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