/* ===========================
   tfk|systemberatung – Light Theme (Mekong im Nebel)
   =========================== */

/* --- Variablen --- */
:root {
  /* Schriften */
  --font-mono: ui-monospace, 'Consolas', 'Menlo', 'Monaco', monospace;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Hintergrund */
  --bg:       #f5f7f4;
  --bg-card:  #ffffff;
  --bg-hover: #edf2ee;
  --border:   #d9e2db;

  /* Text */
  --text:       #2f3b32;
  --text-muted: #6b8f71;

  /* Flussgrün – Primärakzent: Navigation, Buttons, Links */
  --blue:             #2a6b4d;
  --blue-light:       #3a8861;
  --blue-glow:        rgba(42, 107, 77, 0.25);
  --blue-glow-strong: rgba(42, 107, 77, 0.45);
  --blue-glow-soft:   rgba(42, 107, 77, 0.12);

  /* Flussgrün (Service-Boxen) */
  --teal:             #2a6b4d;
  --teal-light:       #3a8861;
  --teal-glow:        rgba(42, 107, 77, 0.25);
  --teal-glow-strong: rgba(42, 107, 77, 0.45);
  --teal-glow-soft:   rgba(42, 107, 77, 0.12);

  /* Akzent-Orange – Projekt-Boxen */
  --lila:             #f4a259;
  --lila-light:       #f6b87a;
  --lila-glow:        rgba(244, 162, 89, 0.3);
  --lila-glow-strong: rgba(244, 162, 89, 0.55);
  --lila-glow-soft:   rgba(244, 162, 89, 0.15);

  /* Status: Geschäftsbetrieb beendet */
  --closed-color: #c0392b;
}

/* ===========================
   Basis
   =========================== */

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===========================
   Header & Navigation
   =========================== */

.site-header {
  background: rgba(245, 247, 244, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

/* Logo: tfk|systemberatung */
.logo a {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.1rem;
  letter-spacing: -0.5px;
}

.logo a .tfk  { font-weight: 600; color: var(--text); }
.logo a .pipe { color: var(--blue); font-weight: 700; padding: 0 0.05rem; }
.logo a .sys  { font-weight: 300; color: var(--text-muted); }

/* Hamburger-Button – auf Desktop unsichtbar */
.nav-toggle {
  display: none;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--lila);
}

/* Dropdown Produkte */
.main-nav .has-dropdown {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.main-nav .dropdown-arrow {
  font-size: 0.65rem;
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.2s;
}

.main-nav .has-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

.main-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 190px;
  padding: 0.4rem 0;
  list-style: none;
  z-index: 200;
  box-shadow: 0 4px 14px rgba(0,0,0,0.09);
}

.main-nav .has-dropdown:hover .dropdown-menu,
.main-nav .has-dropdown.open .dropdown-menu { display: block; }

.main-nav .dropdown-menu a {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.main-nav .dropdown-menu a:hover,
.main-nav .dropdown-menu a.active {
  color: var(--lila);
  background: var(--bg-hover);
}

/* ===========================
   Hero-Bereich
   =========================== */

.hero {
  padding: 4rem 0 2.5rem;
  text-align: center;
}

/* Seiten-Titel (Leistungen, Projekte, …) */
.hero h1 {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.5px;
}

/* Logo-Headline auf der Startseite */
.logo-hero {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.5px;
  margin: 0 0 0.5rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.1rem;
}

.logo-hero .tfk  { font-weight: 600; }
.logo-hero .pipe { color: var(--blue); font-weight: 700; padding: 0 0.05rem; }
.logo-hero .sys  { font-weight: 300; color: var(--text-muted); }

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}

.hero-tagline {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 1.2rem;
}

.hero-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--closed-color);
  border: 2px solid var(--closed-color);
  border-radius: 4px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 2rem;
  opacity: 0.45;
  cursor: default;
  transition: opacity 0.25s ease, border-width 0.25s ease, padding 0.25s ease;
}

.hero-status:hover {
  opacity: 1;
  border-width: 3px;
  padding: 0.3rem 0.85rem;
}

/* ===========================
   Hauptcontainer (.main)
   =========================== */

.main {
  max-width: 720px;
  margin: 3rem auto 4rem;
  padding: 1.8rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.07);
  opacity: 0;
  transform: translateY(6px);
  animation: fadeIn 0.5s ease forwards;
  transition: box-shadow 0.25s;
}

.main:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.10);
}

/* ===========================
   Typografie
   =========================== */

h2 {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  margin: 1.8rem 0 0.4rem;
  letter-spacing: -0.3px;
}

h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text-muted);
  margin: 1.2rem 0 0.25rem;
  letter-spacing: 0;
}

/* Erstes h2 in .main ohne oberen Abstand */
.main > h2:first-child,
.main > section:first-child > h3:first-child {
  margin-top: 0;
}

p { margin: 0 0 0.8rem; }
p:last-child { margin-bottom: 0; }

ul {
  margin: 0.3rem 0 0.8rem;
  padding-left: 1.4rem;
}

ul li { line-height: 1.6; }

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--blue-light); }

/* ===========================
   Buttons
   =========================== */

.btn-glow {
  display: inline-block;
  padding: 0.65rem 1.7rem;
  background: var(--blue);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--blue-glow);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-glow:hover,
.btn-glow:focus {
  color: #ffffff;
  background: var(--blue-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--blue-glow-strong);
}

.btn-glow-outline {
  display: inline-block;
  padding: 0.55rem 1.3rem;
  background: transparent;
  color: var(--blue);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--blue);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn-glow-outline:hover,
.btn-glow-outline:focus {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--blue-glow);
  transform: translateY(-1px);
}

/* ===========================
   Service-Boxen
   =========================== */

.service-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.service-box:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 107, 77, 0.35);
  border-left-color: var(--teal);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09),
              -3px 0 12px var(--teal-glow);
}

.service-box h3 {
  margin-top: 0;
  color: var(--text);
}

.service-box .btn-glow-outline {
  color: var(--teal);
  border-color: var(--teal);
}

.service-box .btn-glow-outline:hover,
.service-box .btn-glow-outline:focus {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--teal-glow);
}

.service-cta {
  display: inline-block;
  margin-top: 1rem;
}

.grafik-rechts {
  float: right;
  height: 110px;
  opacity: 0.4;
  margin-left: 1.2rem;
}

/* ===========================
   Kontakt-Box
   =========================== */

.contact-box {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.contact-box p { margin: 0.4rem 0; }
.contact-box strong { color: var(--text); }

/* ===========================
   Projekt-Boxen
   =========================== */

.project-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.project-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
}

.project-box.open {
  border-color: rgba(244, 162, 89, 0.5);
}

.project-header {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 1rem;
  align-items: start;
  cursor: pointer;
}

.project-icon img {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 0.7;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.meta-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.meta-sub,
.meta-tech {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.toggle-btn {
  background: transparent;
  border: 1px solid var(--lila);
  color: var(--lila);
  font-size: 1.2rem;
  font-weight: 600;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.2s, transform 0.25s;
}

.toggle-btn:hover {
  background: rgba(244, 162, 89, 0.15);
}

.project-box.open .toggle-btn {
  transform: rotate(45deg);
}

.project-full {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-box.open .project-full {
  display: block;
}

/* ===========================
   Footer
   =========================== */

.site-footer {
  text-align: center;
  padding: 2rem 0 3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ===========================
   Theme-Switcher Button
   =========================== */

#theme-toggle {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.2;
  transition: opacity 0.25s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#theme-toggle:hover {
  opacity: 1;
}

/* ===========================
   Animationen
   =========================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 700px) {
  /* Header-Zeile: Logo links, Hamburger rechts */
  .nav-container {
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    padding: 0.7rem 0;
  }

  .logo { flex: 1; }

  /* Hamburger-Button */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s;
  }

  .nav-toggle:hover { background: var(--bg-hover); }

  /* Nav standardmäßig ausgeblendet, erscheint aufgeklappt */
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .main-nav.open {
    display: block;
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--border);
  }

  .main-nav li:last-child { border-bottom: none; }

  .main-nav a {
    display: block;
    padding: 0.65rem 0;
    font-size: 0.95rem;
  }

  /* Dropdown Mobile */
  .main-nav .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
    min-width: 0;
  }

  .main-nav .has-dropdown.open .dropdown-menu { display: block; }

  .main-nav .dropdown-menu li { border-bottom: none; }

  .main-nav .dropdown-menu a {
    padding: 0.45rem 0 0.45rem 1.1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
  }

  .main-nav .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  /* Restliche mobile Anpassungen */
  .hero { padding: 2.5rem 0 1.5rem; }
  .logo-hero { font-size: 1.8rem; }

  .main {
    margin: 1.5rem auto 3rem;
    padding: 1.2rem;
    border-radius: 8px;
  }

  .grafik-rechts {
    float: none;
    display: block;
    margin: 0.5rem auto 1rem;
    height: 80px;
  }

  .service-box,
  .project-box { padding: 1.2rem; }
}

@media (max-width: 480px) {
  .logo-hero { font-size: 1.5rem; }
  .hero h1   { font-size: 1.5rem; }
  .grafik-rechts { height: 60px; }
}
