/* ===== Design-Tokens ===== */
:root {
  --bg: #0b1020;
  --bg-2: #0e1430;
  --text: #e7e9ee;
  --muted: #a7afc2;
  --brand: #7c3aed;
  --brand-2: #06b6d4;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --gutter: clamp(20px, 6vw, 36px);
  /* Header-Höhe zentral */
  --header-h: 80px; /* hier kannst du die Leistenhöhe steuern */
  /* Optional: --accent:#22d3ee; */
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-2: #f7f7fb;
    --text: #0b1020;
    --muted: #4a5568;
    --card: #ffffff;
    --border: #e8e8ef;
    --shadow: 0 10px 30px rgba(10, 10, 30, 0.08);
  }
}
*,
*:before,
*:after {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.14) 0%,
      rgba(0, 0, 0, 0.24) 100%
    ),
    radial-gradient(
      1400px 900px at 12% 8%,
      rgba(124, 58, 237, 0.5) 0%,
      rgba(124, 58, 237, 0.22) 46%,
      rgba(124, 58, 237, 0) 86%
    ),
    radial-gradient(
      1300px 850px at 88% 14%,
      rgba(6, 182, 212, 0.4) 0%,
      rgba(6, 182, 212, 0.18) 44%,
      rgba(6, 182, 212, 0) 84%
    ),
    radial-gradient(
      1200px 900px at 50% 120%,
      rgba(2, 6, 23, 0.66),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 100% 100%, auto, auto, auto, 100% 100%;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;

  min-height: 100vh; /* oder 100svh für Mobile-Safe-Area */
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container nutzt den Gutter */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: 24px;
}

/* ===== Header / Navigation ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: linear-gradient(
    180deg,
    rgba(12, 16, 36, 0.85),
    rgba(12, 16, 36, 0.55)
  );
  border-bottom: 1px solid var(--border);
  height: var(--header-h); /* Leiste fixieren */
}
@media (prefers-color-scheme: light) {
  header {
    background: rgba(255, 255, 255, 0.75);
  }
}

/* WICHTIG: Container-Padding im Header entfernen, damit die Leiste nicht wächst */
header .container {
  padding-block: 0;
}

/* Die Nav füllt die Leiste und zentriert Inhalte vertikal */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

/* Logo-Gruppe */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* Entfernt die feste Höhe */
header .logo img {
  height: auto;
  max-height: 48px; /* z. B. größere Obergrenze */
  width: auto;
  display: block;
  position: relative;
  top: 3px; /* optional, um es visuell nach unten zu schieben */
  /*transform: translateY(-50%); /* exakte vertikale Zentrierung */
}

/* Optional: Logo darf über den Header hinausragen */
header .logo {
  position: relative;
  z-index: 51; /* damit es über der Leiste bleibt */
}

/* Menü */
.menu {
  display: flex;
  gap: 18px;
  align-items: center;
}
.menu a {
  padding: 10px 12px;
  border-radius: 12px;
}
.menu a:hover {
  background: var(--card);
}

/* Aktiver Menüpunkt mit Sultexio-Gradient */
.menu a[aria-current="page"],
.sheet a[aria-current="page"] {
  position: relative;
  font-weight: 600;
  color: var(--brand); /* Fallback-Farbe */
}

/* Gradient-Unterstreichung */
.menu a[aria-current="page"]::after,
.sheet a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px; /* Abstand zur Schrift */
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 2px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
  border: 0;
}
.cta:active {
  transform: translateY(1px);
}

/* Ghost-Style beibehalten */
.ghost {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
}

/* Hamburger Linien */
.hamb {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 2000; /* höher als das Drawer-Menü */
}

.hamb span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  transition: all 0.3s ease;
}

/* Mobile sichtbar */
@media (max-width: 900px) {
  .menu {
    display: none;
  }
  .hamb {
    display: flex;
  }
  .sheet {
    margin-top: var(--header-h); /* so hoch wie der Header */
    height: calc(100% - var(--header-h)); /* Höhe anpassen */
  }
}

/* Animation wenn Menü offen */
.hamb.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamb.active span:nth-child(2) {
  opacity: 0;
}
.hamb.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Mobile Drawer ===== */
.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.drawer.open {
  display: block;
}

.sheet {
  background: white;
  width: 75%; /* statt 100% */
  max-width: 320px; /* optional: harte Grenze */
  height: 100%;
  padding-top: 10px;
}

.drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.sheet {
  margin-left: auto;
  width: min(90vw, 360px);
  height: 100%;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: 20px;
}
.sheet a {
  display: block;
  padding: 14px 10px;
  border-radius: 12px;
}
.sheet a:hover {
  background: var(--card);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 40px 72px; /*min(12vw, 120px) 72px;*/
  padding-inline: calc(var(--gutter) + env(safe-area-inset-left))
    calc(var(--gutter) + env(safe-area-inset-right));
}

.hero .chip {
  margin-bottom: 12px; /* neuer Abstand unter den Chips */
}

.hero h1 {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.hero p {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  margin: 0 0 26px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero ul {
  color: var(--muted);
  margin-top: 8px; /* etwas Abstand nach oben */
  margin-bottom: 16px; /* Abstand nach unten vor dem Button */
  padding-left: 20px; /* Einrückung für die Bullets */
}

.hero ul li {
  margin-bottom: 6px; /* kleiner Zeilenabstand zwischen den Punkten */
}

/* ===== Sections & Cards ===== */
section {
  padding: 72px 0;
}
section.container:last-of-type {
  margin-bottom: 86px; /* oder dein Wunschwert */
}
.projects:last-of-type {
  margin-bottom: 86px; /* oder dein Wunschwert */
}
.small.reveal:last-of-type {
  margin-bottom: 86px; /* oder dein Wunschwert */
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card h3 {
  margin: 6px 0 10px;
}
.card p {
  color: var(--muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.14);
  color: #cdb6ff;
  border: 1px solid rgba(124, 58, 237, 0.25);
}
@media (prefers-color-scheme: light) {
  .chip {
    color: #5531a8;
    background: #f2ebff;
    border-color: #e8ddff;
  }
}

/* ===== Projekte ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.tile {
  grid-column: span 4;
  min-height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.18),
    rgba(6, 182, 212, 0.18)
  );
  border: 1px solid var(--border);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.tile:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px 200px at 120% -10%,
    rgba(124, 58, 237, 0.3),
    transparent 60%
  );
  pointer-events: none;
}
.tile h4 {
  margin: 0 0 8px;
}
.tile p {
  color: var(--muted);
  margin: 0;
}
@media (max-width: 1100px) {
  .tile {
    grid-column: span 6;
  }
}
@media (max-width: 720px) {
  .tile {
    grid-column: span 12;
  }
}

/* ===== Filter Leiste ===== */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 24px;
  align-items: center;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 600;
  cursor: pointer;
}
.filter-btn[aria-selected="true"] {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
}
.filter-btn svg {
  width: 18px;
  height: 18px;
}
.hidden {
  display: none !important;
}

/* ===== Footer ===== */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
footer {
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.small {
  font-size: 13px;
  color: var(--muted);
}

.logo-small {
  display: flex;
  align-items: center; /* vertikal zentrieren */
  gap: 10px; /* Abstand zwischen Logo und Text */
}

.logo-small img {
  height: 24px; /* oder deine Wunschgröße */
  width: auto;
  border-radius: 8px;
  display: block;
}

/* Gradient-Text-Fix für Sultexio */
.brand-gradient {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--brand),
    var(--brand-2) 60%,
    var(--accent, var(--brand)) 100%
  );
  background-size: 200% auto;
  background-position: 0 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: background-position 0.6s ease;
}
.brand-gradient:hover {
  background-position: 100% 50%;
  text-decoration: underline;
}

/* ===== Animationen ===== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.show {
  opacity: 1;
  transform: none;
}
.glow:hover {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 0 0 6px rgba(124, 58, 237, 0.18), var(--shadow);
}
.tilt {
  transform: perspective(800px) rotateX(0) rotateY(0);
  transition: transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hamburger Button immer über dem Drawer anzeigen */
.hamb {
  position: relative;
  z-index: 2001; /* höher als .drawer */
}

/* Drawer liegt darunter */
.drawer {
  z-index: 2000;
}

/* Wenn Menü offen ist, Button oben rechts fixieren */
.drawer.open .hamb {
  position: fixed;
  top: 16px;
  right: 16px;
}


/* ===== Hero crossfade (GSAP-controlled) ===== */
.hero .hero-line {
  display: block;
  margin: 0;
  letter-spacing: -0.02em;
}
.hero .hero-line-primary {
  /* visible by default; GSAP will animate it out */
}
.hero .hero-line-secondary {
  opacity: 0;
  transform: translateY(12px);
}
@media (prefers-reduced-motion: reduce) {
  .hero .hero-line-secondary {
    opacity: 1 !important;
    transform: none !important;
  }
}
