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

:root {
  --orange: #F36C21;
  --orange-dim: #a34a13;
  --bg: #0a0a0a;
  --surface: #141414;
  --surface2: #1e1e1e;
  --text: #f0ede8;
  --muted: #888;
  --border: rgba(243,108,33,0.18);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Language-specific visibility */
html[data-language="de"] .source-en { display: none; }
html[data-language="de"] .source-de { display: inline; }
html[data-language="en"] .source-en { display: inline; }
html[data-language="en"] .source-de { display: none; }

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  letter-spacing: 0.08em;
  color: var(--orange);
  text-decoration: none;
}

.nav-logo-img {
      width: 4.4rem;
      height: 4.4rem;
  object-fit: contain;
  display: block;
}

.nav-logo-text {
  display: inline-block;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 1.25rem;
}

.lang-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-1px);
}

.lang-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.lang-toggle-label {
  display: inline-block;
}

.lang-toggle-flags {
  display: inline-flex;
  align-items: center;
}

.lang-flag,
.lang-flag-single {
  width: 1.05rem;
  height: 1.05rem;
  object-fit: cover;
  display: block;
}

.lang-flag-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.lang-flag-pair,
.lang-flag-single {
  display: none;
}

html[data-language="de"] .lang-flag-pair[data-lang-flag="en"] {
  display: inline-flex;
}

html[data-language="en"] .lang-flag-single[data-lang-flag="de"] {
  display: block;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 3vw, 2.5rem) clamp(2rem, 4vw, 4rem);
  position: relative;
  background-image: url('imagesvideos/DasTeamfoto(background).jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero {
    background-size: contain;
    background-attachment: scroll;
    justify-content: space-between;
    padding-top: clamp(8rem, 20vh, 12rem);
  }
}

.hero-bg-text {
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(8rem, 20vw, 18rem);
  color: rgba(243,108,33,0.04);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.hero-tag {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--orange);
}

.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  max-width: 14ch;
  margin-bottom: 1.8rem;
}

.hero h1 span { color: var(--orange); }

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 42ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  color: #0a0a0a;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover { background: #e05e18; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  margin-left: 1rem;
}

.btn-ghost:hover { border-color: var(--orange); color: var(--orange); background: transparent; transform: translateY(-1px); }

/* DIVIDER */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 0 2.5rem;
  width: calc(100% - 5rem);
}

/* STATS BAR */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  margin: 0;
}

.stat-item {
  padding: 2rem 2.5rem;
  border-right: 0.5px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ABOUT */
.about {
  padding: 5rem 2.5rem;
  position: relative;
  z-index: 50;
  background: var(--bg);
}

.about-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

.about h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.about p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* CONTACT */
.contact {
  padding: 5rem 2.5rem;
  background: var(--surface);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}

.contact-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}

.contact h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.contact-sub {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 30ch;
  text-align: right;
  line-height: 1.6;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(12rem, 30vw, 20rem), 1fr));
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
}

.social-card {
  background: var(--bg);
  padding: clamp(0.8rem, 2vw, 1.8rem);
  text-decoration: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: clamp(5rem, 12vh, 7rem);
  gap: clamp(0.6rem, 2vw, 1rem);
  transition: background 0.2s;
  cursor: pointer;
}

.social-card:hover { background: var(--surface2); }

.social-copy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}

.social-card:hover .social-arrow { color: var(--orange); transform: translate(3px, -3px); }

.social-logo {
  width: clamp(3rem, 8vw, 5rem);
  height: clamp(3rem, 8vw, 5rem);
  object-fit: contain;
  margin-bottom: 0;
  padding: clamp(0.2rem, 1vw, 0.35rem);
  background: #000;
  border-radius: 0.5rem;
  filter: brightness(0.9);
  transition: filter 0.2s, transform 0.2s;
  justify-self: end;
}

.social-card:hover .social-logo {
  filter: brightness(1.2);
  transform: scale(1.1);
}

.social-logo-email {
  font-size: 1.8rem;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  filter: none;
  background: #000;
}

.social-platform {
  font-size: clamp(0.6rem, 1.5vw, 0.75rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.social-handle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text);
  letter-spacing: 0.04em;
}

.social-arrow {
  font-size: 1.1rem;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
  align-self: flex-start;
}

/* FOOTER */
footer {
  padding: 1.8rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 0.5px solid var(--border);
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  color: var(--orange);
  letter-spacing: 0.08em;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

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

footer a:hover { color: #e05e18; }

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag    { animation: fadeUp 0.5s ease both; }
.hero h1     { animation: fadeUp 0.55s 0.1s ease both; }
.hero-sub    { animation: fadeUp 0.55s 0.2s ease both; }
.hero .btns  { animation: fadeUp 0.55s 0.3s ease both; }

/* PAGE STYLES */
.page-header {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 8rem 2.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 60ch;
  line-height: 1.7;
}

/* ROBOT SHOWCASE  ─  Das einzig korrekte sticky-Muster */

/* 1. Äußere Section: liefert den Scroll-Raum (200vh = 2× Bildschirmhöhe) */
#robot-section {
  position: relative;
  height: 200vh;
  background: var(--bg);
  z-index: 0;
}

/* 2. Sticky-Container: bleibt im Viewport während man durch die Section scrollt */
.robot-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

/* 3. Das Roboter-Bild: zentriert, nimmt so viel Platz wie möglich */
#robot-frame {
  max-width: 80vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  /* KEIN position:sticky hier – das erledigt der Parent! */
}

/* Info-Block (Titel + Feature-Cards) */
.robot-info {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 1rem;
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto 4rem;
  pointer-events: auto;
  z-index: 2;
}

#robot-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0.4rem;
  opacity: 1;
  transition: opacity 0.4s ease;
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  text-align: center;
}

#robot-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  grid-auto-rows: 1fr; /* ensure rows have equal height */
  opacity: 1;
  transition: opacity 0.4s ease;
  width: 100%;
  align-items: stretch;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(0.8rem, 1.5vw, 1.2rem);
  text-align: left;
  width: 100%;
  /* allow card to stretch to same height as siblings */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  box-sizing: border-box;
  pointer-events: auto;
}

/* Robot facts wrapper: separate section below the sticky robot showcase */
#robot-facts {
  max-width: 1100px;
  margin: 2rem auto 4rem;
  padding: 0 1rem;
  z-index: 2;
}

/* Ensure sticky showcase gives breathing room so facts don't visually collide */
.robot-sticky {
  padding-bottom: 0.25rem;
}

.feature-card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  color: var(--orange);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: clamp(1.3rem, 2vw, 1.56rem);
  color: var(--muted);
  line-height: 1.5;
}

.tooltip {
  color: var(--orange);
  cursor: help;
  position: relative;
  border-bottom: 1px dotted var(--orange);
  transition: color 0.2s;
}

.tooltip:hover {
  color: #e05e18;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.8rem);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 1.2rem;
  width: min(330px, calc(100vw - 2rem));
  max-width: min(330px, calc(100vw - 2rem));
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  font-size: 1rem;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.tooltip:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .robot-info {
    position: relative;
    top: 0;
    transform: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 1rem;
    margin-top: 2rem;
  }
  
  #robot-title {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    margin-bottom: 1rem;
  }
  
  #robot-features {
    grid-template-columns: 1fr;
    width: 100%;
    align-items: stretch;
    gap: clamp(0.6rem, 1.5vw, 0.8rem);
  }
  
  .feature-card {
    max-width: 100%;
  }
}

/* Scroll-Hinweis */
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fadeInOut 2.5s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50%       { opacity: 0.7; }
}

.content {
  padding: 4rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.content h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--orange);
  margin: 2.5rem 0 1.5rem 0;
  letter-spacing: 0.02em;
}

.content h2:first-child {
  margin-top: 0;
}

.content p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.content strong {
  color: var(--text);
  font-weight: 500;
}

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

.content a:hover { color: #e05e18; }

@media (max-width: 768px) {
  nav {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-actions {
    order: 2;
    margin-left: 0;
    margin-right: 0;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
  }

  .page-header { padding: clamp(4rem, 8vw, 6rem) 1.5rem clamp(2rem, 4vw, 3rem); }
  .content { padding: clamp(2rem, 4vw, 3rem) 1.5rem; }
  .about { grid-template-columns: 1fr; padding: clamp(2rem, 4vw, 5rem) 1.5rem; }
  .social-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 1rem; }
  
  .hero { padding: clamp(3rem, 6vw, 4rem) 1.5rem clamp(1.5rem, 3vw, 2rem); }
  .hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
  .hero-bg-text { font-size: clamp(4rem, 12vw, 8rem); }
  .hero-sub { font-size: clamp(0.85rem, 2vw, 1rem); }
  
  .stats-bar { grid-template-columns: 1fr; }
  .stat-item { padding: clamp(1rem, 2vw, 1.5rem); border-right: none; border-bottom: 0.5px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .stat-num { font-size: clamp(1.5rem, 4vw, 2rem); }
  .stat-label { font-size: clamp(0.65rem, 1.5vw, 0.8rem); }
  
  #robot-features { grid-template-columns: 1fr; gap: clamp(0.6rem, 1.5vw, 0.8rem); }
  .feature-card { padding: clamp(0.8rem, 1.5vw, 0.9rem); }
  .feature-card h3 { font-size: clamp(0.8rem, 1.5vw, 0.9rem); }
  .feature-card p { font-size: clamp(0.65rem, 1.2vw, 0.7rem); }
  
  .scroll-hint { font-size: clamp(0.5rem, 1vw, 0.6rem); }
  
  .contact-top { flex-direction: column; align-items: flex-start; margin-bottom: clamp(1.5rem, 3vw, 2rem); }
  .contact-sub { text-align: left; font-size: clamp(0.7rem, 1.5vw, 0.75rem); }
}
