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

body {
  font-family: "Inter", sans-serif;
  background-color: #fff8f6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  will-change: contents;
}

#scroll-container {
  position: relative;
  height: 805vh;
  z-index: 0;
}

.container {
  position: fixed;
  top: calc(42% + 75px);
  left: 50%;
  width: 90%;
  transform: translateX(-50%);
  text-align: center;
  padding: 2rem;
  padding-top: 0;
  z-index: 3;
}

.logo-svg-wrapper {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.logo-svg-wrapper svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.header-container {
  position: fixed;
  top: 1rem;
  left: 2rem;
  right: 2rem;
  width: calc(100% - 4rem);
  height: 110px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-radius: 24px;
  border: none;
  box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.25),
              inset -2px -2px 3px rgba(0, 0, 0, 0.08);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.language-switcher {
  position: fixed;
  top: calc(1rem + 55px);
  right: 4rem;
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
}

.language-switcher button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
  line-height: 1;
}

.language-switcher button:hover {
  color: #000;
}

.language-switcher button.active {
  color: #FE6A00;
  font-weight: 600;
}

.language-switcher .separator {
  color: #ccc;
  line-height: 1;
}

.glindway-text-wrapper {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  pointer-events: none;
  cursor: pointer;
  will-change: transform;
}

.glindway-text-wrapper svg {
  pointer-events: auto;
}

.glindway-text-wrapper svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

h1 {
  font-family: "Inter", sans-serif;
  font-weight: 200;
  font-size: 1.5rem;
  color: #000000;
  margin-bottom: 2rem;
  margin-top: 0;
  letter-spacing: -0.02em;
  transition: opacity 0.3s ease;
}

.contact {
  font-size: 1.125rem;
  color: #4a4a4a;
  transition: opacity 0.3s ease;
}

.get-in-touch-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  border: none;
  color: #4a4a4a;
  padding: 0.875rem 2.25rem;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.3),
              inset -1px -1px 1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.get-in-touch-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 140px at var(--glow-x, 50%) var(--glow-y, 50%), rgba(254, 106, 0, 0.25) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
}

.get-in-touch-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
}

.get-in-touch-btn:hover::before {
  opacity: 1;
}

.get-in-touch-btn:hover::after {
  opacity: 1;
}

.get-in-touch-btn:hover {
  color: #fe6a00;
  transform: scale(1.05);
}

.get-in-touch-btn:active {
  transform: scale(0.98);
}

.scroll-indicator {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 150;
  cursor: pointer;
  opacity: 1;
  transition: all 0.3s ease;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: auto;
}

.scroll-indicator:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateX(-50%) translateY(-3px);
}

.scroll-indicator span {
  font-size: 0.875rem;
  color: #8a8a8a;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.scroll-indicator:hover span {
  color: #6a6a6a;
}

.chevron-down {
  width: 20px;
  height: 20px;
  border-left: 2px solid #8a8a8a;
  border-bottom: 2px solid #8a8a8a;
  transform: rotate(-45deg);
  transform-origin: center;
  transition: all 0.3s ease;
}

.scroll-indicator:hover .chevron-down {
  border-color: #6a6a6a;
  transform: translateY(3px) rotate(-45deg);
}

.footer {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  z-index: 999;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.footer a {
  color: #b0b0b0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #8a8a8a;
}

/* Sections container */
.sections-container {
  position: absolute;
  top: 220vh;
  left: 0;
  width: 100%;
}

.info-section {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 450px;
  max-width: min(90vw, 700px); /* Allow expansion up to 700px or 90% viewport width */
  padding: 4rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-radius: 24px;
  border: none;
  box-shadow: inset 2px 2px 3px rgba(255, 255, 255, 0.25),
              inset -2px -2px 3px rgba(0, 0, 0, 0.08);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.5s ease, width 0.3s ease;
  pointer-events: auto;
  text-align: center;
  will-change: transform, opacity;
}

/* Expand width on shorter viewports to prevent vertical overflow */
@media (max-height: 800px) and (min-width: 1025px) {
  .info-section {
    width: 550px;
    padding: 3rem;
  }
}

@media (max-height: 700px) and (min-width: 1025px) {
  .info-section {
    width: 650px;
    padding: 2.5rem;
  }
}

/* For very short viewports, maximize width to fit content horizontally */
@media (max-height: 600px) and (min-width: 1025px) {
  .info-section {
    width: min(700px, 85vw);
    padding: 2rem;
  }

  .info-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .info-section p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }

  .info-section ul {
    margin: 0.75rem 0;
  }

  .info-section li {
    margin: 0.5rem 0;
  }
}

/* Horizontal offsets and vertical spacing for each section - Desktop */
/* Values calculated from dynamic positioning algorithm targets */
.section-0 {
  left: calc(50% + 120px);
  top: -35vh;
  margin-top: 0;
}
.section-1 {
  left: calc(50% - 220px);
  top: 60vh;
  margin-top: 0;
}
.section-2 {
  left: calc(50% + 80px);
  top: 150vh;
  margin-top: 0;
}
.section-3 {
  left: calc(50% - 200px);
  top: 220vh;
  margin-top: 0;
}
.section-4 {
  left: calc(50% + 100px);
  top: 290vh;
  margin-top: 0;
}
.section-5 {
  left: 50%;
  /* At 100% scroll with 805vh container, viewport top is at 705vh, center is at 755vh */
  top: 520vh;
  margin-top: 0;
  /* Absolutely positioned to appear centered at 100% scroll */
}

.info-section:hover {
  transform: translateX(-50%) translateY(var(--offset-y, 0)) scale(1.02);
}

.info-section h2 {
  font-family: "Noto Serif", serif !important;
  font-weight: 600 !important;
  font-size: 1.75rem;
  color: #000000;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
}

.info-section p {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: #2a2a2a;
  margin: 0 0 1rem 0;
}

.info-section p:last-child {
  margin-bottom: 0;
}

.info-section ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.info-section li {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.info-section li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #FE6A00;
}

.blog-link {
  color: #FE6A00;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.blog-link:hover {
  opacity: 0.7;
}

.contact-info {
  margin: 1.5rem 0;
}

.contact-info a {
  color: #FE6A00;
  text-decoration: none;
}

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

.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.875rem 2.25rem;
  background: linear-gradient(135deg, rgba(254, 106, 0, 0.85), rgba(230, 95, 0, 0.9));
  color: white;
  text-decoration: none;
  border-radius: 12px;
  border: none;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.4),
              inset -1px -1px 1px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 160px at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
}

.cta-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button:hover::after {
  opacity: 1;
}

.cta-button:hover {
  transform: scale(1.05);
}

.cta-button:active {
  transform: scale(0.98);
}

.team-photo {
  position: fixed;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  border-radius: 50%;
  border: none;
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.3),
              inset -1px -1px 1px rgba(0, 0, 0, 0.1);
  z-index: 60;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  will-change: transform, opacity;
}

.team-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle 90px at var(--glow-x, 50%) var(--glow-y, 50%), rgba(254, 106, 0, 0.25) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.team-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.team-photo:hover::before {
  opacity: 1;
}

.team-photo:hover::after {
  opacity: 1;
}

.team-photo img {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 1024px) {
  /* Shorter scroll on mobile/tablet - animation ends when S5 is centered */
  #scroll-container {
    height: 400vh;
  }

  .container {
    top: calc(42% + 10px);
  }

  h1 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0;
  }

  .get-in-touch-btn {
    margin-top: 1.5rem;
  }

  .logo-wrapper svg {
    max-width: 280px;
  }

  .contact {
    font-size: 1rem;
  }

  .header-container {
    left: 1rem;
    right: 1rem;
    width: calc(100% - 2rem);
    height: 90px;
  }

  .sections-container {
    top: 145vh;
  }

  .info-section {
    width: calc(100vw - 4rem);
    max-width: 500px;
    padding: 2rem;
    /* Override absolute positioning - use relative for natural flow */
    position: relative;
    left: 50%;
    top: auto;
    transform: translateX(-50%);
  }

  /* Mobile: spacing between sections */
  .section-0 {
    margin-top: 0;
  }

  .section-1 {
    margin-top: 25vh;
  }

  .section-2,
  .section-3,
  .section-4,
  .section-5 {
    margin-top: 15vh;
  }

  .section-5 {
    margin-bottom: 15vh;
  }

  /* Override hover transform for mobile relative positioning */
  .info-section:hover {
    transform: translateX(-50%) scale(1.02);
  }

  /* Ensure impressum is visible at bottom on mobile */
  .footer {
    opacity: 1;
    pointer-events: auto;
  }

  .info-section h2 {
    font-size: 1.5rem;
  }

  .info-section p {
    font-size: 0.95rem;
  }

  .logo-svg-wrapper {
    width: 70vw;
    max-width: 400px;
  }

  .glindway-text-wrapper {
    width: 70vw;
    max-width: 400px;
  }

  /* Team photos positioned via JavaScript on mobile */
  .team-photo {
    padding: 0.6rem;
    z-index: 50;
  }

  .team-photo img {
    width: 70px;
    height: 70px;
  }

  .scroll-indicator {
    width: 90%;
    max-width: 300px;
    bottom: 1rem;
  }

  .language-switcher {
    top: calc(1rem + 35px);
    right: 2rem;
  }
}

@media (min-width: 1025px) and (max-width: 1600px) {
  .header-container {
    height: 85px;
  }

  .language-switcher {
    top: calc(1rem + 42.5px);
  }
}
