/* ==========================================================================
   Nerdist Solutions - nerdist.info
   Statisch, ohne Framework. Schriften lokal (Geist, Geist Mono, SIL OFL 1.1).
   Aufbau: Fonts, Tokens, Basis, Komponenten, Abschnitte, Rechtsseiten, Motion
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens ----------
   Eine Akzentfarbe (Logo-Teal), eine kühle Neutralfamilie.
   Radius-Regel: ein Radius (--radius) für Bilder, Buttons und Flächen. */
:root {
  /* Nur dunkel (Nutzerentscheidung). Kein Umschalten nach Systemeinstellung. */
  color-scheme: dark;

  --bg: #0c1518;
  --surface: #142126;
  --ink: #e8f0f2;
  --ink-muted: #9db0b6;
  --line: #26373d;
  --accent: #3bb3cf;
  --accent-hover: #62c6dd;
  --on-accent: #06161b;
  --shadow: 0 1px 2px rgb(0 10 16 / 0.35), 0 18px 40px -18px rgb(0 12 20 / 0.75);

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 12px;
  --nav-h: 76px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index-Skala */
  --z-nav: 10;
  --z-top: 15;
  --z-skip: 20;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

img,
picture {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
  background: var(--surface);
}
.brand img,
.footer__brand img {
  background: none;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.2s var(--ease), text-decoration-thickness 0.2s var(--ease);
}
a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

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

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
}
.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: var(--z-skip);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 10px 22px -12px rgb(0 70 95 / 0.6);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn--small {
  min-height: 42px;
  padding: 0.5rem 1.15rem;
  font-size: 0.9375rem;
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}
/* Logo ist das unveränderte Original, hier nur in der Größe angepasst. */
.brand {
  display: block;
  line-height: 0;
  border-radius: 6px;
}
.brand img {
  height: 60px;
  width: auto;
}
.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.nav__links {
  display: flex;
  gap: 1.75rem;
  padding: 0;
  list-style: none;
}
.nav__links a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.5em;
  text-decoration-thickness: 2px;
}
.nav__links a:hover,
.nav__links a[aria-current] {
  color: var(--ink);
  text-decoration-line: underline;
}

@media (max-width: 719px) {
  :root {
    --nav-h: 64px;
  }
  .nav__links {
    display: none;
  }
  .brand img {
    height: 50px;
  }
}

/* ---------- Abschnitte allgemein ---------- */
.section {
  padding-block: clamp(5rem, 11vw, 10rem);
}

.statement {
  font-size: clamp(1.875rem, 4.2vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 3vw, 2rem);
}
@media (max-width: 767px) {
  .grid-12 > * {
    grid-column: 1 / -1 !important;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__copy {
  display: grid;
  justify-items: start;
  gap: clamp(1.25rem, 2.2vw, 1.75rem);
}
.hero__eyebrow {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.hero h1 {
  font-size: clamp(2.125rem, 4vw, 3rem);
  line-height: 1.06;
}
.hero__lead {
  max-width: 36ch;
  color: var(--ink-muted);
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
}
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 899px) {
  .hero {
    align-items: flex-start;
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__figure {
    max-width: 30rem;
  }
}

/* ---------- Zur Person ---------- */
.person h2 {
  grid-column: 1 / 10;
  font-size: clamp(1.875rem, 4.2vw, 3.25rem);
  line-height: 1.1;
}
.person__text {
  grid-column: 4 / 12;
  max-width: 60ch;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  display: grid;
  gap: 1.25rem;
}
.person__text p:first-child {
  font-size: clamp(1.1875rem, 1.8vw, 1.4375rem);
  line-height: 1.5;
}
.person__text p:last-child {
  color: var(--ink-muted);
}

/* ---------- Warum Nerdist ---------- */
.warum__intro {
  max-width: 60ch;
  display: grid;
  gap: 1.25rem;
}
.warum__intro h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}
.warum__intro p {
  color: var(--ink-muted);
  font-size: 1.1875rem;
}
.wide-figure {
  margin-top: clamp(2.25rem, 5vw, 4rem);
}
.wide-figure img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: 70% 22%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 719px) {
  .wide-figure img {
    aspect-ratio: 4 / 3;
    object-position: 78% 25%;
  }
}
.warum__quote {
  margin-top: clamp(2.25rem, 5vw, 4rem);
  row-gap: 1rem;
}
.warum__quote > * {
  grid-column: 3 / -1;
}
.warum__lead {
  color: var(--ink-muted);
}
.warum__quote blockquote p {
  max-width: 24ch;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.warum__end {
  max-width: 44ch;
  margin-top: 0.75rem;
  font-size: 1.1875rem;
}

/* ---------- Ansatz ---------- */
.ansatz {
  background: var(--surface);
}
.ansatz h2 {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.ansatz .statement {
  grid-column: 1 / 11;
  margin-top: 0.75rem;
  font-size: clamp(2.125rem, 5vw, 3.75rem);
}
.ansatz__copy {
  grid-column: 1 / 6;
  margin-top: clamp(2rem, 5vw, 4rem);
  display: grid;
  align-content: start;
  gap: 1.25rem;
  font-size: 1.1875rem;
}
.ansatz__copy p:first-child {
  color: var(--ink-muted);
}
.ansatz__media {
  grid-column: 7 / -1;
  margin-top: clamp(2rem, 5vw, 4rem);
}
.ansatz__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.callout {
  position: relative;
  max-width: 30rem;
  margin: -2.5rem 0 0 -4.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  font-size: 1.125rem;
  line-height: 1.5;
}
.callout strong {
  font-weight: 600;
}
@media (max-width: 767px) {
  .callout {
    margin: -1.5rem 0 0;
    padding: 1.25rem 1.35rem;
  }
}

/* ---------- Kontakt ---------- */
.contact h2 {
  max-width: 16ch;
}
.contact__list {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}
.contact__row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 12rem) minmax(0, 1fr);
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.contact__row dt {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}
.contact__row dd {
  font-size: clamp(1.375rem, 3vw, 2.125rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.contact__row dd.mono {
  font-size: clamp(1.1875rem, 2.6vw, 1.875rem);
  font-weight: 450;
}
.contact__row dd a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
.contact__row dd a:hover {
  color: var(--accent);
}
.contact__vcard {
  margin-top: 2rem;
  display: grid;
  gap: 0.25rem;
}
.contact__vcard a {
  font-weight: 550;
}
.contact__vcard span {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
@media (max-width: 559px) {
  .contact__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Fußzeile ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 2.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 3rem;
}
.footer__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.footer__brand img {
  height: 72px;
  width: auto;
}
.footer__nav {
  display: flex;
  gap: 1.75rem;
  padding: 0;
  list-style: none;
}
.footer__nav a {
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--ink-muted);
}
.footer__nav a:hover {
  color: var(--ink);
}
.footer__copy {
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

/* ---------- Nach-oben-Button ----------
   Erscheint erst am Seitenende (main.js blendet ihn ein, sobald die Fußzeile sichtbar ist).
   Ohne JavaScript bleibt er verborgen. Der Pfeil ist eine reine CSS-Form, kein Symbol. */
.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-top);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), var(--shadow);
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 8px, 0);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s,
    background-color 0.2s var(--ease);
}
.to-top::before {
  content: "";
  width: 11px;
  height: 11px;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: translateY(3px) rotate(45deg);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.to-top:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.to-top.is-visible:active {
  transform: scale(0.96);
}

/* ---------- Rechtsseiten und 404 ---------- */
.legal {
  padding-block: clamp(3rem, 8vw, 6rem);
}
.legal > .container > * + * {
  margin-top: 1.25rem;
}
.legal h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin-bottom: 1.5rem;
}
.legal h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
}
.legal p,
.legal ul,
.legal dl {
  max-width: 66ch;
}
.legal ul {
  padding-left: 1.25rem;
}
.legal li + li {
  margin-top: 0.35rem;
}
.facts {
  display: grid;
  gap: 1.1rem;
}
.facts div {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
}
.facts dt {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}
@media (max-width: 559px) {
  .facts div {
    grid-template-columns: minmax(0, 1fr);
  }
}
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-weight: 550;
}

.notfound {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1.5rem;
  min-height: calc(100dvh - var(--nav-h) - 180px);
  padding-block: clamp(3rem, 8vw, 6rem);
}
.notfound .mono {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.notfound h1 {
  font-size: clamp(2.125rem, 5vw, 3.5rem);
  line-height: 1.06;
}
.notfound p:not(.mono) {
  max-width: 40ch;
  color: var(--ink-muted);
  font-size: 1.1875rem;
}

/* ---------- Fotos leicht abdunkeln, damit sie auf dem dunklen Grund nicht blenden ---------- */
.hero__figure img,
.wide-figure img,
.ansatz__media img {
  filter: brightness(0.93);
}

/* ---------- Bewegung ----------
   Hero: Einblendung in Lesereihenfolge (Hierarchie). Weitere Abschnitte: sanftes
   Einblenden beim Erreichen des Sichtbereichs. Nur transform/opacity. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      opacity: 0;
      transform: translate3d(0, 14px, 0);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  [data-hero] {
    animation: rise 0.85s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  [data-hero="1"] { --i: 1; }
  [data-hero="2"] { --i: 2; }
  [data-hero="3"] { --i: 3; }
  [data-hero="4"] { --i: 4; }

  .reveal-pending {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  .reveal-pending.is-visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
