/* CSS (style.css) */
:root {
  --bg-dark: #0a0a0a;
  --bg-medium: #1a1a1a;
  --bg-light: #2c2c2c;
  --fg-light: #f5f5f5;
  --fg-medium: #cccccc;
  --fg-dark: #999999;
  --accent: #ff5500;
  --accent-dark: #cc4400;
  --success: #28a745;
  --error: #dc3545;

  --radius-small: 6px;
  --radius-medium: 14px;
  --radius-large: 20px;

  --glow: 0 0 12px var(--accent);
  --glow-soft: 0 0 18px rgba(255, 85, 0, 0.5);
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.3);

  --font-logo: "Orbitron", sans-serif;
  --font-heading: "Orbitron", sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --transition-fast: 0.2s ease-in-out;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Global Resets & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base font size */
}

body {
  background-color: var(--bg-dark);
  color: var(--fg-light);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- Headings (h1, h3, etc. bleiben standardmäßig linksbündig im Block) --- */
h1, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--fg-light);
  margin-bottom: 0.75em; /* Behält margin-bottom für Abstand */
  line-height: 1.3;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); text-align: center; /* Hero h1 ist meist zentriert */}
/* h3, h4 etc. bleiben erstmal block und linksbündig. Spezifische Anpassungen bei Bedarf. */
h3 { font-size: clamp(1.5rem, 4vw, 2.5rem); }


/* --- Spezifische H2 Styles für Zentrierung und Hover-Effekte --- */
h2 {
  font-family: var(--font-heading);
  color: var(--fg-light);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.3;

  /* Zentrierung des h2-Blocks */
  display: block; /* Macht h2 zu einem Blockelement */
  width: -moz-fit-content; /* Firefox */
  width: fit-content;    /* Moderne Browser - Breite passt sich dem Inhalt an */
  margin-left: auto;     /* Zentriert den Block horizontal */
  margin-right: auto;    /* Zentriert den Block horizontal */
  margin-bottom: 0.75em; /* Unterer Abstand */
  text-align: center;    /* Zentriert den Text innerhalb des h2 (wichtig für mehrzeilige Titel) */

  /* Für Hover-Effekt (Unterstreichung) */
  position: relative;    /* Notwendig für das ::after Pseudo-Element */
  padding-bottom: 0.3em; /* Platz für die Unterstreichung */
  transition: color var(--transition-fast), text-shadow var(--transition-fast); /* Übergang für Farb- und Leuchteffekt */
}

/* Der Unterstreichungs-Effekt via ::after Pseudo-Element für h2 */
h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0; /* Positioniert am unteren Rand des padding-bottom Bereichs */
  width: 100%; /* Nimmt die volle Breite des h2-Elements ein (welches fit-content ist) */
  height: 3px; /* Dicke der Unterstreichung */
  background-color: var(--accent); /* Farbe der Unterstreichung */
  transform: scaleX(0); /* Startet unsichtbar (Breite 0) */
  transform-origin: left; /* Animation startet von links (oder 'center' falls gewünscht) */
  transition: transform var(--transition-smooth); /* Sanfter Übergang für die Animation */
}

/* Hover-Zustände für h2 */
h2:hover {
  color: var(--accent); /* Textfarbe ändert sich zu Akzentfarbe */
  text-shadow: var(--glow); /* Leuchteffekt */
}

h2:hover::after {
  transform: scaleX(1); /* Unterstreichung wird sichtbar (volle Breite) */
}


p {
  margin-bottom: 1.25rem;
  color: var(--fg-medium);
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover, a:focus {
  color: var(--accent-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Utility Classes --- */
.container {
  width: 90%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.text-center {
  text-align: center;
}
/* Die h2 ist jetzt standardmäßig zentriert, daher braucht .text-center auf dem Parent dies nicht mehr für die h2.
   Die Klasse .text-center ist aber weiterhin nützlich für andere Elemente wie p, form, etc. */

.section-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--fg-dark);
  max-width: 700px;
  margin-left: auto; /* Zentriert, wenn es ein Block ist oder sein Parent text-align:center hat */
  margin-right: auto;
  margin-top: -0.5em; /* Kann angepasst werden, je nachdem wie viel Platz über h2 ist */
  margin-bottom: 2em;
  /* Wenn .section-subtitle immer zentriert sein soll, unabhängig vom Parent: */
  display: block; /* Sicherstellen, dass es ein Block ist für margin auto */
  text-align: center;
}

/* --- Navbar --- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 0.75rem 0;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.6s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.main-nav.show {
  transform: translateY(0);
  opacity: 1;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-logo {
  color: var(--accent);
  font: 700 clamp(1.5rem, 4vw, 1.75rem) var(--font-logo);
  letter-spacing: 0.05em;
  text-shadow: var(--glow);
  text-decoration: none;
}
.nav-logo:hover {
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}
.nav-links a {
  color: var(--fg-light);
  font: 600 clamp(0.85rem, 2vw, 1rem) var(--font-logo);
  text-decoration: none;
  position: relative;
  padding: 0.5em 0;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-smooth);
}
.nav-links a:hover,
.nav-links a:focus,
.nav-links a.active { /* Add .active class with JS for current section */
  color: var(--accent);
}
.nav-links a:hover::after,
.nav-links a:focus::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none; /* Hidden by default, shown in media query */
  background: none;
  border: none;
  color: var(--fg-light);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001; /* Above nav links in mobile */
}
.hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--fg-light);
  margin: 5px 0;
  transition: all var(--transition-smooth);
}

/* --- Sections --- */
.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  min-height: 60vh; /* Adjusted from 100vh for better flow */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative; /* For GSAP animations */
}
.section:nth-child(odd):not(#hero) { /* Alternate background for visual rhythm */
  background-color: var(--bg-medium);
}

/* --- Hero Section --- */
.hero-section {
  min-height: 100vh;
  color: var(--fg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center; /* Zentriert den hero-content Block */
  position: relative;
  overflow: hidden; /* Important for video */
  padding: 0; /* Override general section padding */
}
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3); /* Transparenter für besser sichtbares Video */
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  padding: 2rem;
  /* text-align: center; ist bereits durch .hero-section gesetzt */
}
.hero-title { /* h1 */
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.2em;
  text-shadow: 0 0 15px rgba(0,0,0,0.5), 0 0 25px rgba(0,0,0,0.3);
  /* Die allgemeine h1-Regel sollte dies bereits zentrieren */
}
.hero-title span { /* For PRO in accent color */
  color: var(--accent);
  text-shadow: var(--glow);
}
.hero-subtitle { /* p tag */
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--fg-medium);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto; /* Zentriert, da es ein Block-Element p ist */
  margin-right: auto;
}
.hero-btn {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  padding: 1rem 2.5rem;
}

/* --- About Us Section --- */
.about-content {
  max-width: 800px; /* Control text width for readability */
  margin: 0 auto; /* Zentriert den Block, wenn der Parent keine text-align:center hat */
  /* Der Text innerhalb von .about-content p bleibt standardmäßig linksbündig. */
}
.about-content p {
  font-size: clamp(1rem, 2vw, 1.1rem);
}
.about-content strong {
  color: var(--accent);
  font-weight: 500;
}

/* --- Gains Checker Section --- */
.section-gains {
  background: linear-gradient(rgba(10,10,10,0.8), rgba(10,10,10,0.8));
}
.gains-form {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.gains-form input[type="text"] {
  flex-grow: 1;
  padding: 0.9rem 1.2rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-small);
  color: var(--fg-light);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-width: 200px; /* Ensure it doesn't get too small */
}
.gains-form input[type="text"]::placeholder {
  color: var(--fg-dark);
}
.gains-form input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.3);
}
.gains-form .btn {
  flex-shrink: 0; /* Prevent button from shrinking too much */
}

.result-card {
  width: min(100%, 500px);
  margin: 2rem auto 0;
  padding: 2rem;
  background-color: rgba(30, 30, 30, 0.8); /* Slightly more opaque */
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: left; /* Inhalt der Karte ist linksbündig */
  box-shadow: var(--shadow-medium);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.result-card h3 { /* h3 innerhalb der Karte */
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center; /* Diese h3 spezifisch zentrieren */
}
.result-card p {
  color: var(--fg-medium);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}
.result-card strong {
  color: var(--fg-light);
  min-width: 80px; /* Align values */
  display: inline-block;
}
.result-card .gain-value {
  color: var(--success); /* Or var(--accent) if preferred */
  font-weight: 700;
}
.result-card .error-message {
  color: var(--error);
  font-weight: 500;
  text-align: center;
}
.result-card .loading-message {
  color: var(--fg-dark);
  font-style: italic;
  text-align: center;
}

/* --- Gallery --- */
.gallery-wrapper {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.gallery-item {
  background-color: var(--bg-medium);
  border-radius: var(--radius-medium);
  overflow: hidden; /* Ensure image corners are rounded */
  border: 2px solid transparent; /* For hover transition */
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3; /* Maintain aspect ratio */
  object-fit: cover;
  transition: transform var(--transition-smooth);
}
.gallery-item figcaption {
  padding: 1rem;
  text-align: center;
  color: var(--fg-medium);
  font: 600 0.9rem var(--font-logo);
  background-color: rgba(0,0,0,0.2);
  transition: color var(--transition-fast);
}
.gallery-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-medium), var(--glow-soft);
  border-color: var(--accent);
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-item:hover figcaption {
  color: var(--accent);
}

/* --- Call to Action Section --- */
.section-call {
  background-color: var(--bg-medium);
  text-align: center; /* Zentriert alle direkten Inline/Inline-Block Kinder wie den Button und p */
}
.call-big {
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  padding: 1rem 2.5rem;
  display: inline-block; /* To respect padding & centering by parent's text-align */
  margin: 1rem 0;
  text-shadow: 0 0 8px rgba(255,85,0,0.5);
}
.call-alternative { /* p tag */
  margin-top: 1rem;
  font-size: 1.1rem;
  /* Wird durch .section-call text-align: center; zentriert */
}
.call-alternative .text-link {
  font-weight: 500;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border: 2px solid var(--fg-light);
  background-color: transparent;
  color: var(--fg-light);
  text-transform: uppercase;
  font-family: var(--font-logo);
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
  text-align: center;
}
.btn:hover, .btn:focus {
  transform: translateY(-3px);
  box-shadow: var(--glow-soft);
  text-decoration: none;
}
.btn.accent {
  border-color: var(--accent);
  color: var(--accent);
  background-color: transparent;
}
.btn.accent:hover, .btn.accent:focus {
  background-color: var(--accent);
  color: var(--bg-dark);
  box-shadow: var(--glow);
}

/* --- Footer --- */
.footer {
  background-color: var(--bg-dark); /* Same as body or slightly darker */
  color: var(--fg-dark);
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  text-align: center; /* Zentriert den Inhalt des Footers */
}
.footer p {
  color: var(--fg-dark);
  margin-bottom: 0.5rem;
}
.footer-links a {
  color: var(--fg-dark);
  margin: 0 0.5rem;
}
.footer-links a:hover {
  color: var(--accent);
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%; /* Position below the navbar */
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    background-color: rgba(10, 10, 10, 0.95); /* Slightly more opaque for mobile */
    backdrop-filter: blur(5px);
    padding: 1rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth), padding var(--transition-smooth);
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.nav-active {
    max-height: 500px; /* Arbitrary large enough value */
    padding: 1rem 0;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
  }
  .nav-links a {
    display: block;
    padding: 1rem;
    width: 100%;
  }
  .nav-links a::after {
    display: none; /* Simpler mobile nav links */
  }
  .nav-toggle {
    display: block; /* Show hamburger */
  }
  .main-nav.nav-open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .main-nav.nav-open .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .main-nav.nav-open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .gains-form {
    flex-direction: column; /* Stack form elements */
  }
  .gains-form input[type="text"],
  .gains-form .btn {
    width: 100%; /* Full width for stacked elements */
  }
  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
  }
}

/* GSAP Initial States (hidden for reveal) */
.section:not(#hero), .gallery-item { /* Initialzustand für GSAP Animation */
  opacity: 0;
  transform: translateY(50px);
}