/* ==========================================================
   Gestaltung für stefanfalk.com
   Farben und Schriften lassen sich hier oben zentral ändern.
   ========================================================== */

/* Schrift liegt im Ordner /fonts (kein Abruf bei Google, gut für den Datenschutz) */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Helles Farbschema */
  --page: #ffffff;          /* Seitenhintergrund */
  --surface: #f6f7f9;       /* Karten */
  --heading: #111827;       /* Überschriften */
  --text: #3f4654;          /* Fließtext */
  --muted: #5f6673;         /* Nebentexte */
  --line: #e5e7eb;          /* Rahmen, Trennlinien */
  --link: #4338ca;          /* Links, Hervorhebungen */
  --accent: #6366f1;        /* Akzentfarbe (Indigo) */
  --cta: #4f46e5;           /* Hauptknöpfe */
  --cta-hover: #4338ca;
  --on-cta: #ffffff;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 12px 32px rgba(17, 24, 39, 0.07);

  /* Dunkle Bänder (Kopfbereich, Zertifikate, Fußzeile): immer dunkel */
  --band: #0f1220;
  --band-card: #171a2e;
  --band-text: #ffffff;
  --band-soft: #c7cad9;
  --band-line: rgba(165, 180, 252, 0.18);
  --band-accent: #a5b4fc;
  --grad-hero: linear-gradient(135deg, #0f1220 0%, #181a35 55%, #2b2670 100%);
  --grad-media: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4f46e5 120%);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --header-height: 64px;

  color-scheme: light dark;
}

/* Dunkles Farbschema, wenn das Gerät auf „Dunkel“ steht */
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e1117;
    --surface: #161b26;
    --heading: #f3f4f6;
    --text: #c3c8d2;
    --muted: #9aa2af;
    --line: rgba(255, 255, 255, 0.09);
    --link: #a5b4fc;
    --accent: #818cf8;
    --shadow: none;
    --band: #0a0c16;
    --band-card: #151829;
  }
}

/* ---------- Grundlagen ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 1.0625rem/1.65 var(--font);
}

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

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--heading);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
}

strong {
  font-weight: 600;
}

a {
  color: var(--link);
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--page);
}

.kicker {
  margin: 0 0 0.75rem;
  color: var(--link);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Knöpfe ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.3rem;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-cta {
  background: var(--cta);
  color: var(--on-cta);
}

.btn-cta:hover {
  background: var(--cta-hover);
}

/* Rahmen-Knopf auf dunklem Hintergrund */
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 18, 32, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--band-line);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
}

.brand {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--band-soft);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  color: #ffffff;
}

.nav .nav-contact {
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  background: var(--cta);
  color: var(--on-cta);
}

.nav .nav-contact:hover {
  background: var(--cta-hover);
  color: var(--on-cta);
}

@media (max-width: 720px) {
  .nav-optional {
    display: none;
  }
}

/* ---------- Kopfbereich (Person) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 9vw, 6rem) 0 clamp(3.5rem, 9vw, 6.5rem);
  background: var(--grad-hero);
  color: var(--band-soft);
}

/* Weicher Lichtschein oben rechts */
.hero::after {
  content: "";
  position: absolute;
  right: -200px;
  top: -260px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.28) 0%, rgba(129, 140, 248, 0) 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
}

.hero .kicker {
  color: var(--band-accent);
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-lead {
  max-width: 40rem;
  margin: 1.25rem 0 1.5rem;
  color: #e0e2ee;
  font-size: clamp(1.125rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #e0e2ee;
  font-size: 0.875rem;
}

/* Das Foto ist nur 70 × 70 px groß, deshalb nicht größer als nötig anzeigen */
.portrait {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(165, 180, 252, 0.22), 0 20px 50px rgba(0, 0, 0, 0.4);
  object-fit: cover;
}

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portrait {
    order: -1;
    width: 104px;
    height: 104px;
  }
}

/* ---------- Abschnitte ---------- */

.section {
  padding: clamp(4rem, 9vw, 6rem) 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-lead {
  margin: 1rem 0 0;
  font-size: 1.125rem;
}

.subhead {
  margin: 3.5rem 0 1.25rem;
  font-size: 1.25rem;
}

/* ---------- Projekte ---------- */

.project-id {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.project-id img {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.project-id h3 {
  font-size: 1.5rem;
}

.project-tagline {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--page);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Großes Projekt (AutoPrizer) */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-body {
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.feature-body > p {
  margin: 0;
}

.feature-media {
  display: flex;
  min-height: 20rem;
  padding: 2.5rem 0 0 2.5rem;
  background: var(--grad-media);
}

/* Screenshot füllt die Fläche bis zum Kartenrand, Ausschnitt oben links */
.feature-media img {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 12px 0 0 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  object-fit: cover;
  object-position: left top;
}

.modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.modules li {
  padding-left: 0.9rem;
  border-left: 3px solid var(--accent);
}

.modules strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--heading);
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature-media {
    padding: 1.75rem 0 0 1.75rem;
  }
}

@media (max-width: 520px) {
  .modules {
    grid-template-columns: 1fr;
  }
}

/* Projekt-Karten (Variora, Arandu360) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 1.75rem 1.75rem 0;
  background: var(--grad-media);
}

.project-media img {
  display: block;
  width: 100%;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

/* Foto statt Screenshot: füllt die ganze Bildfläche */
.project-media-photo {
  padding: 0;
}

.project-media-photo img {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.project-body > p {
  margin: 0;
}

@media (max-width: 760px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Kleine Werkzeug-Karten */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--page);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.product img {
  width: 44px;
  height: 44px;
  margin-bottom: 0.4rem;
  border-radius: 10px;
}

.product h4 {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.product p {
  margin: 0;
}

.product small {
  margin-top: auto;
  padding-top: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

@media (max-width: 1000px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Auf dem Handy: eine Spalte, Icon links neben dem Text */
@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.25rem 1rem;
    padding: 1.1rem;
  }

  .product img {
    grid-row: span 3;
    margin: 0;
  }

  .product small {
    padding-top: 0.25rem;
  }
}

/* ---------- Zertifikate (dunkles Band) ---------- */

.band {
  padding: clamp(4rem, 9vw, 6rem) 0;
  background: var(--band);
  color: var(--band-soft);
}

.band h2 {
  color: var(--band-text);
}

.band .kicker {
  color: var(--band-accent);
}

.band-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 4rem);
}

.band p {
  margin: 1rem 0 1.5rem;
}

.tags-dark {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags-dark li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--band-line);
  border-radius: 999px;
  background: var(--band-card);
  color: #e0e2ee;
  font-size: 0.875rem;
}

.certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.certs img {
  display: block;
  width: 100%;
  border-radius: 14px;
}

@media (max-width: 860px) {
  .band-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Über mich ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
  gap: clamp(2rem, 6vw, 4rem);
}

.about-grid h2 {
  margin-bottom: 1rem;
}

.about-lead {
  color: var(--heading);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
}

.facts {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.facts div + div {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0.25rem 0 0;
  color: var(--heading);
  font-weight: 600;
}

@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Leistungen unter „Über mich“ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.services li {
  padding: 1.25rem 1.25rem 1.25rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--page);
}

.services strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--heading);
  font-size: 1rem;
}

@media (max-width: 860px) {
  .services {
    grid-template-columns: 1fr;
  }
}

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

.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
}

.contact-card p:last-child {
  margin: 0.75rem 0 0;
  font-size: 1.125rem;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-list li:first-child {
  border-top: 1px solid var(--line);
}

.contact-list span:first-child {
  width: 5.5rem;
  color: var(--muted);
}

.contact-list a {
  font-weight: 600;
}

.contact-button {
  margin-top: 1.5rem;
}

@media (max-width: 760px) {
  .contact-card {
    grid-template-columns: 1fr;
  }
}

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

.site-footer {
  padding: 2rem 0;
  background: var(--band);
  color: var(--band-soft);
  font-size: 0.875rem;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 1.5rem;
}

.site-footer a {
  color: var(--band-soft);
}

.site-footer a:hover {
  color: #ffffff;
}

/* ---------- Unterseiten (Datenschutz, 404) ---------- */

.legal {
  max-width: 46rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.legal h1 {
  margin-bottom: 2rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.legal h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
}

.legal p {
  margin: 0.5rem 0;
}

.legal .stand {
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.notfound {
  padding-top: clamp(4rem, 12vw, 8rem);
  padding-bottom: clamp(4rem, 12vw, 8rem);
}

.notfound h1 {
  color: #ffffff;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

.notfound p {
  max-width: 38rem;
  margin: 1.25rem 0 2rem;
  color: #e0e2ee;
  font-size: 1.125rem;
}
