/* CSS Reset & Variablen */
:root {
  --color-bg-darkest: #0B0B0C;
  --color-bg-dark: #1A1A1D;
  --color-card-bg: #27272A;
  --color-gold: #F5B841;
  /* Adapted from screenshot */
  --color-gold-hover: #D99B29;
  --color-text-main: #F3F4F6;
  --color-text-muted: #9CA3AF;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-btn: 0 8px 20px rgba(245, 184, 65, 0.2);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-darkest);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
}

.text-gold {
  color: var(--color-gold);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

/* =========================================
   NAVIGATION
========================================= */
.navbar {
  position: fixed;
  /* Place over the hero initially and stays sticky */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 0;
  background-color: rgba(11, 11, 12, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  /* Slight thin line like screenshot */
  transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(11, 11, 12, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-bottom-color: transparent;
}

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

.logo img {
  height: 60px;
  /* Adjust based on actual logo */
  width: auto;
  transition: var(--transition);
}

.logo:hover img {
  opacity: 0.9;
  transform: scale(1.02);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--color-text-main);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-gold);
}

/* Mobile Toggle - Hidden on desktop */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-text-main);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Language Switcher using select */
.language-selector {
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-text-main);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3F4F6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1em;
  padding-right: 2rem;
}

.language-selector:hover, .language-selector:focus {
  outline: none;
  border-color: var(--color-gold-hover);
  background-color: rgba(245, 184, 65, 0.1);
}

.language-selector option {
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  padding: 8px;
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  /* Offset for nav */
  background-color: var(--color-bg-darkest);
  overflow: hidden;
}

/* The right-aligned background image mask */
.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 65%;
  background: url('assets/hero-bg.png') center/cover no-repeat;
  /* Fades out to the left so text is readable */
  mask-image: linear-gradient(to right, transparent 0%, black 50%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 65%;
  /* Removed heavy dark gradient overlay so the image pops bright */
  background: linear-gradient(to top, rgba(11, 11, 12, 0.3), rgba(11, 11, 12, 0));
  z-index: 2;
}

.hero-container {
  position: relative;
  z-index: 10;
  width: 100%;
}

.hero-content {
  max-width: 600px;
  animation: fadeUp 1s ease-out;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;

  /* Glanz Effekt Base */
  background: linear-gradient(120deg, var(--color-text-main) 0%, var(--color-text-main) 40%, #FFFFFF 50%, var(--color-text-main) 60%, var(--color-text-main) 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shineText 5s linear infinite;
}

.hero-content h1 .text-gold {
  background: linear-gradient(120deg, var(--color-gold) 0%, var(--color-gold) 40%, #FFF3D6 50%, var(--color-gold) 60%, var(--color-gold) 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shineText 5s linear infinite;
}

@keyframes shineText {
  to {
    background-position: -200% center;
  }
}

.hero-content .subtitle {
  font-size: 1.4rem;
  font-family: var(--font-heading);
  letter-spacing: 2px;
  color: var(--color-text-main);
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  font-weight: 500;
}

.btn-primary {
  display: inline-block;
  background-color: var(--color-gold);
  color: #111;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  /* Slightly rounded */
  letter-spacing: 1px;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background-color: var(--color-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(245, 184, 65, 0.35);
}

/* =========================================
   FEATURES SECTION
========================================= */
.features {
  padding: 5rem 0;
  background-color: var(--color-bg-dark);
  /* Subtle background shift */
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background-color: var(--color-card-bg);
  padding: 2.5rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: block;
  /* Make whole card clickable easily */
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
  border-color: rgba(245, 184, 65, 0.2);
}

.icon-wrapper {
  margin-bottom: 1.5rem;
}

.icon-wrapper i {
  font-size: 3.5rem;
  color: var(--color-gold);
  transition: var(--transition);
}

.feature-card:hover .icon-wrapper i {
  transform: scale(1.1);
  filter: drop-shadow(0 0 10px rgba(245, 184, 65, 0.4));
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--color-gold);
  letter-spacing: 0.5px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* =========================================
   PREMIUM WINDOWS SECTION
========================================= */
.premium-projects {
  padding: 5rem 0;
  background-color: var(--color-bg-darkest);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.section-header h2 {
  font-size: 2rem;
  letter-spacing: 1px;
}

.link-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-gold);
  letter-spacing: 1px;
  position: relative;
  text-transform: uppercase;
}

.link-more::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-more:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.project-image-wrapper {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.project-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s ease;
}

.project-image-wrapper:hover img {
  transform: scale(1.03);
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: var(--color-bg-dark);
}

.site-footer p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* =========================================
   ANIMATIONS
========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE)
========================================= */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(26, 26, 29, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    /* Hidden */
    transition: clip-path 0.4s ease-in-out;
  }

  .nav-links.nav-active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    /* Revealed */
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-bg {
    width: 100%;
    mask-image: linear-gradient(to top, transparent 0%, black 30%, black 100%);
    -webkit-mask-image: linear-gradient(to top, transparent 0%, black 30%, black 100%);
    opacity: 0.8;
    /* Increased opacity from 0.5 to make it much brighter on mobile */
  }

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

  .hero-content {
    margin: 0 auto;
    padding: 0 1rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content .subtitle {
    font-size: 1.1rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   NEW CONTENT MOBILE OVERRIDES
========================================= */
@media (max-width: 900px) {
  .grid[style] {
    grid-template-columns: 1fr !important;
  }

  .intro-section[style] {
    padding: 3rem 1rem !important;
  }

  .intro-section h2 {
    font-size: 1.8rem !important;
  }

  .hero-container,
  .features-grid,
  .intro-section p {
    padding: 0 1rem;
  }

  .why-list[style] {
    padding: 2rem 1rem !important;
  }
}

/* =========================================
   SPOTLIGHT HOVER CARD (NATIVE JS/CSS)
========================================= */
[data-glow] {
  --base: 30;
  --spread: 200;
  --radius: 12;
  --border: 2;
  --backdrop: var(--color-card-bg);
  --backup-border: rgba(255, 255, 255, 0.05);
  --size: 250;
  --outer: 1;
  --border-size: calc(var(--border) * 1px);
  --spotlight-size: calc(var(--size) * 1px);
  --hue: 45; /* Gold hue */
  --saturation: 90;
  --lightness: 60;
  
  /* Fallback Base Styles for Mobile (100% Native, no complex calc/radial masks) */
  background-color: var(--backdrop);
  border: 1px solid var(--backup-border);
  position: relative;
  border-radius: calc(var(--radius) * 1px);
}

/* 
  Fix für mobile Geräte: Pseudo-Elemente mit Masken blockieren 
  manchmal das native Scrolling auf iOS/Safari komplett. 
  Daher laden wir den schweren Effekt nur auf Geräten mit echter Maus!
*/
@media (hover: hover) and (pointer: fine) {
  [data-glow] {
    border: var(--border-size) solid var(--backup-border);
    background-image: radial-gradient(
      var(--spotlight-size) var(--spotlight-size) at
      calc(var(--x, 0) * 1px)
      calc(var(--y, 0) * 1px),
      hsla(var(--hue), calc(var(--saturation)*1%), calc(var(--lightness)*1%), 0.08), transparent
    );
    background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
    background-position: 50% 50%;
  }

  [data-glow]::before,
  [data-glow]::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: calc(var(--border-size) * -1);
    border: var(--border-size) solid transparent;
    border-radius: calc(var(--radius) * 1px);
    background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
    background-repeat: no-repeat;
    background-position: 50% 50%;
    -webkit-mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    -webkit-mask-clip: padding-box, border-box;
    -webkit-mask-composite: source-in, xor;
    mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    mask-clip: padding-box, border-box;
    mask-composite: intersect;
    opacity: var(--glow-opacity, 0);
    transition: opacity 0.3s ease;
  }

  [data-glow]::before {
    background-image: radial-gradient(
      calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at
      calc(var(--x, 0) * 1px)
      calc(var(--y, 0) * 1px),
      hsla(var(--hue), calc(var(--saturation)*1%), calc(var(--lightness)*1%), 1), transparent 100%
    );
    filter: brightness(2);
  }

  [data-glow]::after {
    background-image: radial-gradient(
      calc(var(--spotlight-size) * 0.5) calc(var(--spotlight-size) * 0.5) at
      calc(var(--x, 0) * 1px)
      calc(var(--y, 0) * 1px),
      rgba(255,255,255, 0.8), transparent 100%
    );
  }
}

/* Fallback für Touch/Mobile: Simpler Edge Glow via Border & Shadow, der das Scrolling garantiert nicht stört! */
.type-card-mobile {
  background-color: var(--color-card-bg);
  border: 2px solid rgba(255, 255, 255, 0.05); /* 2px exactly matches the original desktop border size */
  position: relative;
  border-radius: 12px;
  transition: border-color 0.5s ease, box-shadow 0.5s ease; /* Weiche Animation */
}

.type-card-mobile.mobile-edge-glow {
  border-color: rgba(245, 184, 65, 0.8) !important;
}

/* =========================================
   FORMULAR BEREICH (KONTAKT)
========================================= */
.form-input {
  width: 100%;
  padding: 1rem 1.5rem;
  background-color: var(--color-bg-darkest);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--color-text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: 0.5rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(245, 184, 65, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

.hidden {
  display: none !important;
}

.success-msg {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  text-align: center;
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
  background-color: var(--color-bg-darkest);
  border-top: 1px solid rgba(245, 184, 65, 0.1);
  padding: 5rem 0 2rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--color-gold);
}

.footer-description {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  max-width: 400px;
}

.footer-tags {
  color: var(--color-gold);
  font-weight: 500;
  font-size: 0.95rem;
}

.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.footer-right h3 {
  color: var(--color-text-main);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.footer-disclaimer {
  color: rgba(255, 255, 255, 0.3) !important;
  font-size: 0.75rem !important;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .footer-description {
    margin: 0 auto 1rem auto;
  }
  .footer-right {
    text-align: center;
    align-items: center;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}