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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  background-color: #000000;
}

/* Cookie-Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 40, 0.95);
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  font-size: 14px;
}

.cookie-banner a {
  color: #8bc4ff;
  text-decoration: underline;
}

.cookie-banner button {
  border: none;
  padding: 8px 16px;
  background: #2060c0;
  color: #ffffff;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
}

.cookie-banner button:hover {
  background: #184c96;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%) scale(0.9);
  object-fit: cover;
  background-color: #000000;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 10, 40, 0.3),
    rgba(0, 0, 0, 0.5)
  );
}

/* Logo */
.logo-link {
  position: absolute;
  top: -10px;
  left: 20px;
  z-index: 99999;
}

.logo {
  height: 150px;
  width: auto;
  display: block;
}

/* Hero Inhalt */
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
}

.hero-title {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 80px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #ffffff;
  z-index: 3;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-subtitle {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: 35px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: #ffffff;
  z-index: 3;
  line-height: 1.1;
  white-space: nowrap;
}

/* Navigation */
.hero-links {
  position: absolute;
  top: 40px;
  right: 10%;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 4;
}

/* Outline Buttons */
.hero-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 24px;
  min-width: 160px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(147, 197, 253, 0.8);
  text-decoration: none;
  color: #ffffff;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;          /* Fix: keine Höhenänderung durch Pfeile */
  height: 48px;            /* definierte Buttonhöhe */
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.hero-box:hover {
  transform: translateY(-3px);
  background: rgba(15, 23, 42, 0.7);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(191, 219, 254, 0.95);
}

/* Pfeil mittig + größer */
.nav-arrow {
  position: relative;
  top: 8px;
  font-size: 2em;
  line-height: 1;
}

/* Fokus-Rand entfernen */
.hero-box:focus,
.hero-box:focus-visible,
.hero-links a.hero-box:focus,
.hero-links a.hero-box:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Dropdown-Struktur */
.nav-item {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 220px;
  background: rgba(5, 20, 60, 0.9);
  border-radius: 12px;
  padding: 8px 0;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Anzeige über JS-Klasse .open steuern */
.nav-item.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(40, 90, 180, 0.85);
}

/* Hauptinhalt */
.main-content {
  background: #0b1020;
  color: #e5e7eb;
  font-family: 'Inter', sans-serif;
}

/* Sections außen */
.section {
  padding: 80px 16px;
  background: linear-gradient(135deg, #0b1020, #111827);
}

.section-alt {
  background: linear-gradient(135deg, #111827, #0b1020);
}

/* Innen: Orange-Panels */
.section-inner {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Icons */
.section-icon {
  width: 72px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.section-icon::before {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f9fafb;
}

.icon-remote::before { content: "REMOTE"; }
.icon-onsite::before { content: "ON SITE"; }
.icon-network::before { content: "NETWORK"; }
.icon-smarthome::before { content: "SMART HOME"; }
.icon-backup::before { content: "SECURITY"; }
.icon-contact::before { content: "CONTACT"; }
.icon-about::before { content: "ABOUT"; }

.section h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
  color: #111827;
}

.section p {
  font-size: 1rem;
  line-height: 1.6;
  color: #1f2937;
}

/* Who I am */
.section-about {
  background: linear-gradient(135deg, #0b1020, #111827);
}

.section-about .section-inner {
  background: linear-gradient(135deg, #fdba74, #fb923c);
  border-radius: 16px;
  padding: 32px 24px;
}

/* Contact-Bereich */
.section-contact {
  background: #111827;
}

.section-contact .section-inner {
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.section-contact h2,
.section-contact p {
  color: #e5e7eb;
}

/* Contact Grid & Items */
.contact-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.contact-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #f9fafb;
}

.contact-item p {
  font-size: 0.95rem;
  color: #d1d5db;
}

.contact-item a {
  color: #93c5fd;
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Kontaktformular */
.contact-form {
  margin-top: 40px;
  max-width: 700px;
}

.contact-form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.contact-form label {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.contact-form input,
.contact-form textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #f9fafb;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form-consent {
  font-size: 0.85rem;
}

.contact-form-consent a {
  color: #93c5fd;
  text-decoration: underline;
}

.contact-form-button {
  margin-top: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  background: #2563eb;
  color: #ffffff;
  transition: background 0.15s ease, transform 0.15s ease,
    box-shadow 0.15s ease;
}

.contact-form-button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.7);
}

/* Footer */
.site-footer {
  padding: 24px 16px 40px;
  background: #020617;
  color: #9ca3af;
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: #93c5fd;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsiv: Tablets / mittelbreite Screens */
@media (max-width: 900px) {
  .hero-title {
    font-size: 48px;
    white-space: normal;
    width: 90%;
  }

  .hero-subtitle {
    font-size: 26px;
    top: 58%;
    width: 90%;
    white-space: normal;
  }

  .hero-links {
    top: 90px;
    right: 5%;
    gap: 10px;
    flex-wrap: wrap;          /* erlaubt Umbruch, falls zu breit */
    justify-content: flex-end;
  }

  .hero-box {
    min-width: 140px;
    padding: 10px 18px;
    height: 44px;
  }

  .contact-grid {
    grid-template-columns: 1fr; /* auf kleineren Bildschirmen untereinander */
  }
}

/* Responsiv: Smartphones hochkant */
@media (max-width: 600px) {
  .logo {
    height: 90px;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .section {
    padding: 60px 16px;
  }

  /* Dropdown-Menü in mobiler Hochformat-Ansicht leicht nach links verschieben */
  .nav-dropdown-menu {
    right: auto;
    left: 0;
    transform: translateX(-150px); /* feiner optischer Versatz */
  }

  /* Navigation mobil: Buttons untereinander, kein Rausschieben nach links */
  .hero-links {
    top: 15px;              /* war 20px → Pillen rücken näher zum oberen Rand */
    right: 5%;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;

  }

/* --- Variante A: Automatischer Umbruch für lange Überschriften --- */
  .section-inner h1,
  .section-inner h2 {
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: anywhere;
  }
}

/* Responsiv: Landscape auf kleineren Geräten (z.B. S22 quer) */
@media (max-width: 900px) and (orientation: landscape) {
  /* Pillen weiter nach oben, ungefähr auf Logo-Höhe */
  .hero-links {
    top: 35px;      /* ggf. auf 30px oder 40px feinjustieren */
    right: 5%;
  }

  /* Titel wieder etwas höher, damit das Gesamtbild passt */
  .hero-title {
    top: 50%;       /* näher an der Mitte statt 56% */
  }

  .hero-subtitle {
    top: 72%;       /* entsprechend etwas höher */
  }

.hero-title {
    font-size: clamp(1.4rem, 4vw, 2.2rem); /* skaliert sanft mit der Breite */
    line-height: 1.1;                      /* enger, vermeidet Überlappung */
    white-space: normal;                   /* Umbruch erlaubt, aber kontrolliert */
  }

  .hero-subtitle {
    top: 65%;                              /* leicht nach unten versetzt */
    font-size: clamp(1rem, 2.5vw, 1.6rem); /* ausgewogenes Verhältnis */
  }

  .logo {
    top: 10px;                             /* kein Kontakt zur Headline */
    height: 120px;                         /* angepasst für bessere Proportion */
  }
}

/* Fix für alle Portrait-Geräte von 384px bis 1200px Breite */
@media (min-width: 384px) and (max-width: 1200px) and (orientation: portrait) {
  .logo-link {
    position: absolute;  /* am Hero ausgerichtet, nicht am Viewport */
    top: 50px;
    left: 20px;
  }
}
