/* FONT & BASE TOKENS */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/InterVariable.woff2') format('woff2');
}

/* ------------------------------------------
  NEU: THEME-VARIABLEN (DARK & LIGHT)
  ------------------------------------------
*/

/* Dark Mode (Standard) */
:root {
  --bg: #0a0c10;
  --surface: #111418;
  --line: #252932;
  --text: #e9ecf1;
  --muted: #a0a6af;
  --shadow-color: rgba(0, 0, 0, .55);
  
  --yellow: #FCEF00;
  --orange: #FF8A3D;
  --mint: #2AE5A9;
  --blue: #4DA3FF;
  --violet: #9C7BFF;
  --accent-grad: linear-gradient(135deg, var(--yellow), var(--orange));
  
  --wrap: 1120px;
  --rad: 16px;
  --space: 120px;
  --gap: 24px;
}

/* Light Mode (wird per JS-Klasse 'light-mode' auf <body> getoggelt) */
body.light-mode {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --line: #e4e7eb;
  --text: #1a1d23;
  --muted: #5c626e;
  --shadow-color: rgba(0, 0, 0, .1);

  /* Akzente im Light-Mode leicht angepasst für Lesbarkeit */
  --yellow: #e6b400; /* Dunkleres Gelb */
  --orange: #e86a1a;
  --mint: #00c68b;
  --blue: #007bff;
  --violet: #7a5cff;
  --accent-grad: linear-gradient(135deg, var(--yellow), var(--orange));
}

/* ------------------------------------------
  BASIS-STILE
  ------------------------------------------
*/

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  /* NEU: Sanfter Übergang für Theme-Wechsel */
  transition: background-color 0.3s ease, color 0.3s ease;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--yellow);
  text-decoration: none;
  transition: all .25s;
}

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

/* LAYOUT & HELPERS */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}
.grid {
  display: grid;
  gap: var(--gap);
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.text-center {
  text-align: center;
}

.section-header {
  max-width: 70ch;
  margin: 0 auto 3.5rem auto;
}

.pill-badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.05); /* Bleibt dezent, funktioniert in beiden Modi */
  transition: border-color 0.3s ease;
}

/* TYPOGRAPHY */
.h1 {
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 1rem 0 1.5rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--text);
  transition: color 0.3s ease;
}
.h3 {
  font-size: clamp(20px, 2.5vw, 24px);
  margin: 0 0 .5rem;
  transition: color 0.3s ease;
}

.p {
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
  transition: color 0.3s ease;
}

.subtle-text {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.3s ease;
}


/* ------------------------------------------
  HEADER & NEUE SCHALTER
  ------------------------------------------
*/
#header {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 100;
  transition: all .3s ease;
}

#header nav {
  height: 56px;
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  /* Hintergrund im Light-Mode angepasst */
  background: rgba(17, 20, 24, 0.7); /* Standard Dark */
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 8px 32px var(--shadow-color);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.light-mode #header nav {
  background: rgba(255, 255, 255, 0.7); /* Light-Mode Hintergrund */
}

#header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: .5px;
  font-size: 15px;
  /* NEU: Verhindert Schrumpfen bei Flexbox */
  flex-shrink: 0;
}
#header .brand img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid var(--surface);
  transition: border-color 0.3s ease;
}

/* NEU: Wrapper für alle Navigations-Aktionen */
#header .nav-actions {
  display: flex;
  align-items: center;
  gap: 8px; /* Kleinerer Abstand für die Icons */
}

#header .nav-links {
  display: flex; /* Bleibt flex für Desktop */
  align-items: center;
}

#header .nav-links a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 999px;
  transition: all .2s;
}

#header .nav-links a:hover,
#header .nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

body.light-mode #header .nav-links a:hover,
body.light-mode #header .nav-links a.active {
  background: rgba(0, 0, 0, 0.05); /* Angepasster Hover im Light-Mode */
}

/* NEU: Icon-Buttons (Theme & Sprache) */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--text);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* NEU: Theme-Schalter Logik (Sonne/Mond anzeigen) */
#theme-toggle .icon-moon { display: none; }
#theme-toggle .icon-sun { display: block; }

body.dark-mode #theme-toggle .icon-moon { display: block; }
body.dark-mode #theme-toggle .icon-sun { display: none; }

/* NEU: Sprach-Schalter Styling */
.lang-btn {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.lang-btn.active {
  color: #111;
  background: var(--yellow);
  border-color: var(--yellow);
}

#header .cta-btn {
  background: var(--yellow);
  color: #111;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .2s, background-color .2s;
  flex-shrink: 0; /* Verhindert Schrumpfen */
}

#header .cta-btn:hover {
  transform: scale(1.05);
  color: #111 !important;
}

/* Alte Regel bleibt bestehen, blendet nur die Links aus, nicht die Aktionen */
@media(max-width: 900px) {
  #header .nav-links {
    display: none;
  }
}

/* ------------------------------------------
  RESTLICHE SEKTIONEN (Anpassungen für Theme)
  ------------------------------------------
*/

main > section {
  padding: var(--space) 0;
  scroll-margin-top: 100px;
  position: relative;
  transition: border-color 0.3s ease;
}

main > section:not(#home) {
  border-top: 1px solid var(--line);
}

/* HERO SECTION */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: 120px;
  padding-bottom: 80px;
}
.hero-content { max-width: 85ch; }
.phone-stack {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1rem;
  align-items: center;
}
.phone {
  border-radius: 3rem;
  border: 14px solid #111; /* Bleibt dunkel, simuliert Handy-Rahmen */
  background: #000;
  box-shadow: 0 0 0 2px var(--line);
  overflow: hidden;
  aspect-ratio: 9/16;
  position: relative;
  transition: all .4s cubic-bezier(.22, 1, .36, 1);
}
.phone video { width: 100%; height: 100%; object-fit: cover; }
.phone:nth-child(1) { transform: rotate(-8deg) scale(0.9); z-index: 1; }
.phone:nth-child(2) { z-index: 2; transform: translateY(-15px); }
.phone:nth-child(3) { transform: rotate(8deg) scale(0.9); z-index: 1; }
.phone-stack:hover .phone:nth-child(1) { transform: rotate(-12deg) scale(0.95) translateX(-20px); }
.phone-stack:hover .phone:nth-child(3) { transform: rotate(12deg) scale(0.95) translateX(20px); }
.phone-stack:hover .phone:nth-child(2) { transform: translateY(-15px) scale(1.03); }


/* PHILOSOPHY & WORK (BENTO GRID) */
.bento-grid {
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--gap);
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 24px;
  position: relative;
  overflow: hidden;
  /* NEU: Sanfter Übergang für Theme-Wechsel */
  transition: all .3s ease;
}
.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
}
.bento-card.philosophy { grid-column: span 6; grid-row: span 1; display: flex; flex-direction: column; justify-content: center; text-align: center; }
@media(min-width: 768px) { .bento-card.philosophy { grid-column: span 4; } }
.bento-card.stats { grid-column: span 6; grid-row: span 1; display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; gap: 1.5rem; }
@media(min-width: 768px) { .bento-card.stats { grid-column: span 2; grid-row: span 2; flex-direction: column; justify-content: center; align-items: center; } }
.stat-item { text-align: center; }
.stat-number { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.bento-card.work { grid-column: span 6; }
@media(min-width: 768px) { .work-1 { grid-column: span 4; } .work-2 { grid-column: span 2; } .work-3 { grid-column: span 6; } }

.bento-card.work img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform .5s ease, opacity .5s;
  opacity: 0.6;
}
/* NEU: Im Light-Mode Bilder weniger transparent, da Hintergrund heller */
body.light-mode .bento-card.work img {
  opacity: 0.8;
}
.bento-card.work:hover img {
  transform: scale(1.05);
  opacity: 0.8;
}
body.light-mode .bento-card.work:hover img {
  opacity: 1;
}

.work-content { position: relative; z-index: 1; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.work-content h3 { text-shadow: 0 2px 10px #000; }
.work-content p { text-shadow: 0 1px 5px #000; color: var(--text); }
/* NEU: Im Light-Mode Textschatten entfernen, da störend */
body.light-mode .work-content h3,
body.light-mode .work-content p {
  text-shadow: none;
  color: var(--text); /* Sorgt für Kontrast zum Bild */
}
/* Fallback für helles Bild im Light-Mode: leichter Schatten */
body.light-mode .work-content h3 {
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
body.light-mode .work-content p {
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  color: var(--text);
}


/* TOOLBOX SECTION */
#toolbox .section-header h2 {
  margin-top: 1rem;
}
#toolbox .filter-bar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 3rem; }
.filter-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover {
  color: var(--text);
  background: var(--surface);
}
.filter-btn.active {
  color: #111;
  background: var(--yellow);
  border-color: var(--yellow);
}
.toolbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gap); }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad); padding: 20px; transition: all .3s ease; display: flex; flex-direction: column; gap: 12px; transform: scale(1); }

/*
  FIX FÜR FILTER-LÜCKEN:
  Statt die Karten nur unsichtbar zu machen, werden sie
  mit 'display: none' komplett aus dem Layout entfernt.
  Dadurch rückt das Grid sauber nach.
*/
.tool-card.hidden {
  /*
  transform: scale(0.8);
  opacity: 0;
  pointer-events: none;
  height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  */
  display: none;
}

.tool-card header { display: flex; justify-content: space-between; align-items: center; }
.tool-card .type-badge { font-size: 12px; padding: 4px 8px; border-radius: 6px; font-weight: 700; }
.tool-card.playbook .type-badge { background: rgba(156, 123, 255, 0.1); color: var(--violet); }
.tool-card.prompt .type-badge { background: rgba(42, 229, 169, 0.1); color: var(--mint); }
.tool-card p { font-size: 14px; line-height: 1.6; }
.tool-card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 1rem; }
.tool-card .tag { background: rgba(255, 255, 255, 0.05); color: var(--muted); font-size: 11px; padding: 4px 8px; border-radius: 4px; font-weight: 600; }

body.light-mode .tool-card.tag {
  background: rgba(0, 0, 0, 0.04);
}


/* TRUST SECTION */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-card { border: 1px solid var(--line); border-radius: var(--rad); padding: 24px; background: var(--surface); text-align: center; transition: background-color 0.3s ease, border-color 0.3s ease; }
.trust-card .icon { margin-bottom: 1rem; height: 40px; width: 40px; color: var(--yellow); transition: color 0.3s ease; }
.trust-card .logo-wall { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; margin-top: 1.5rem; }

/* Logo-Filter für Light/Dark Mode angepasst */
.trust-card .logo-wall img {
  height: 32px;
  filter: grayscale(1) brightness(0) invert(1) opacity(0.7); /* Dark Mode */
  transition: all .3s;
}
body.light-mode .trust-card .logo-wall img {
  filter: grayscale(1) brightness(0) opacity(0.6); /* Light Mode */
}
.trust-card .logo-wall img:hover {
  opacity: 1;
  filter: grayscale(0) brightness(0) invert(1); /* Dark Mode Hover */
}
body.light-mode .trust-card .logo-wall img:hover {
  opacity: 1;
  filter: grayscale(0) brightness(0); /* Light Mode Hover */
}

.trust-card.media-feature { padding: 0; overflow: hidden; }
.media-feature iframe { width: 100%; height: 100%; aspect-ratio: 16/9; border: 0; }


/* SERVICES & CONTACT */
#contact {
  background: var(--surface);
  transition: background-color 0.3s ease;
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: calc(var(--gap)*2); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 24px; border-radius: var(--rad); background: var(--yellow); color: #111; font-size: 16px; font-weight: 800; transition: all .2s; border: 0; cursor: pointer; }
.contact-btn:hover { transform: scale(1.05); color: #111 !important; }
.contact-btn svg { width: 20px; height: 20px; }


/* FOOTER */
footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--bg);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
footer .socials a { color: var(--muted); margin: 0 1rem; }
footer .socials a:hover { color: var(--text); }


/* ANIMATIONS & EXTRAS */
[data-animate] { opacity: 0; transform: translateY(30px); transition: opacity .6s ease-out, transform .6s ease-out; }
[data-animate].visible { opacity: 1; transform: translateY(0); }