@font-face {
  font-family: 'FaktPro-Blond';
  src: local('FaktPro-Blond'), local('Fakt Pro Blond');
  font-weight: 400;
  font-style: normal;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh; 
  overflow: hidden;
  background-color: #000000; 
  font-family: 'FaktPro-Blond', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

body.loaded {
  opacity: 1;
}

/* Background Video Settings */
.video-wrapper {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #000000;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  filter: invert(0) contrast(1.02) brightness(0.98);
  transition: opacity 0.8s ease, filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bg-video.loaded {
  visibility: visible;
  opacity: 1;
}

body.info-active .bg-video {
  filter: invert(1) contrast(1.02) brightness(1.02);
}

/* UI Layer */
#ui-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center; 
  padding: 0 clamp(1.5rem, 3vw, 3rem);
  pointer-events: none; 
  mix-blend-mode: difference;
  isolation: isolate;
}

/* -------------------------------------------
   DYNAMIC DESKTOP GRID SYSTEM 
------------------------------------------- */
.grid-container {
  display: grid;
  width: 100%;
  grid-template-columns: auto 850px min-content;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.col-center {
  display: flex;
  justify-content: center;
  padding: 0 2rem;
  width: 100%;
}

.info-wrapper {
  width: 100%;
  max-width: 850px; 
}

/* Restored desktop layout: perfectly spreads the 3 columns (left, center, right) */
.bottom-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: clamp(2rem, 4vh, 5rem);
  width: 100%;
}

.bottom-grid .block {
  flex: 0 1 auto;
}

/* Fluid Text Specs */
.text {
  font-family: 'FaktPro-Blond', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: clamp(19px, 1.6vw, 24px);
  color: #ffffff; 
}

.title {
  font-family: 'FaktPro-Blond', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(11px, 0.9vw, 13px);
  line-height: 16px;
  text-transform: uppercase;
  margin-bottom: 12px; 
  color: #ffffff; 
}

.blocksatz {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Guaranteed Inline Name Logic */
.col-name {
  position: relative;
  align-self: flex-start;
  margin-top: 28px; 
  min-width: 280px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.name-static {
  opacity: 1;
  visibility: visible;
  white-space: nowrap;
}

/* Simultaneous Fade Animation */
.name-detail {
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

.hide-when-inactive {
  opacity: 0;
  visibility: hidden;
  transform: translateZ(0);
  will-change: opacity, transform;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.info-active .name-detail,
body.info-active .hide-when-inactive {
  opacity: 1;
  visibility: visible;
}

.col-dot {
  display: flex;
  justify-content: flex-end;
  align-self: flex-start;
  margin-top: 30px; 
}

/* Dot Toggle Button */
#circle-btn {
  width: 20px; 
  height: 20px;
  background-color: #ffffff; 
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

#circle-btn:hover {
  opacity: 0.6;
}

body.info-active #circle-btn {
  transform: scale(0.65);
}

/* Interactive Link Buttons */
.interactive-link-btn {
  font-family: 'FaktPro-Blond', sans-serif !important;
  font-size: clamp(15px, 1.3vw, 20px) !important;
  line-height: clamp(19px, 1.6vw, 24px) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.3s ease;
  text-align: left;
  color: #ffffff !important;
}

.interactive-link-btn:hover {
  opacity: 0.6;
}

/* -------------------------------------------
   MOBILE GRID SYSTEM 
------------------------------------------- */
@media (max-width: 900px) {
  #ui-layer {
    padding: 1.5rem;
    align-items: stretch;
  }

  .grid-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    position: relative; /* Acts as the absolute bounding box for the dot */
  }

  /* Name block strictly constrained to one line */
  .col-name {
    margin-top: 0;
    width: 100%;
    gap: 6px;
    flex-shrink: 0;
  }

  .col-center {
    flex-grow: 1;
    padding: 2.5rem 0 0 0;
    align-items: flex-end;
    justify-content: flex-end;
    overflow-y: auto; 
  }

  .info-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  /* Mobile address stacking with increased vertical gap */
  .bottom-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 40px; 
    column-gap: 1.5rem;
    align-items: flex-start;
    margin-top: 2rem;
  }

  .address-ch { 
    grid-column: 1 / 2; 
    grid-row: 1 / 2; 
  }
  
  .address-de { 
    grid-column: 1 / 2; 
    grid-row: 2 / 3; 
  }
  
  .contact-block { 
    grid-column: 2 / 3; 
    grid-row: 1 / 2; 
    text-align: right; 
  }

  .contact-links {
    text-align: right;
  }

  .hide-mobile {
    display: none; 
  }

  /* MOBILE DOT MOVEMENT ENGINE (Fixes the page reload jump) */
  .col-dot {
    position: absolute;
    bottom: 0;  
    right: 0;   
    margin-top: 0;
    z-index: 20;
    transform: translateX(calc(-50vw + 1.5rem + 10px));
    /* Transition is explicitly OFF by default so it doesn't jump on reload */
    transition: none; 
  }

  /* Transition is safely enabled 150ms after the page loads */
  body.layout-ready .col-dot {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
  }

  body.info-active .col-dot {
    transform: translateX(3.5px) translateY(3.5px);
  }

  #circle-btn {
    pointer-events: auto;
  }
}

/* -------------------------------------------
   ACCESSIBILITY: PREFERS REDUCED MOTION
------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  body, .bg-video, #circle-btn, .hide-when-inactive, .name-static, .name-detail, .col-dot {
    transition: none !important;
  }
}
