/* Font Face Definitions */
@font-face {
  font-family: 'Neue Haas Grotesk Text Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Neue Haas Grotesk Text Pro'), 
       url('https://fonts.cdnfonts.com/s/14415/NHaasGroteskTXPro-55Rg.woff') format('woff');
}

@font-face {
  font-family: 'Neue Haas Grotesk Text Pro';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: local('Neue Haas Grotesk Text Pro'),
       url('https://fonts.cdnfonts.com/s/47998/NeueHaasDisplayXXThin.woff') format('woff');
}

@font-face {
  font-family: 'Neue Haas Grotesk Text Pro';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: local('Neue Haas Grotesk Text Pro'),
       url('https://fonts.cdnfonts.com/s/47998/NeueHaasDisplayXThin.woff') format('woff');
}

@font-face {
  font-family: 'Neue Haas Grotesk Text Pro';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Neue Haas Grotesk Text Pro'),
       url('https://fonts.cdnfonts.com/s/47998/NeueHaasDisplayThin.woff') format('woff');
}

@font-face {
  font-family: 'Neue Haas Grotesk Text Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Neue Haas Grotesk Text Pro'), 
       url('https://fonts.cdnfonts.com/s/14415/NHaasGroteskTXPro-75Bd.woff') format('woff');
}

/* CSS Variables */
:root {
  --font-primary: 'Neue Haas Grotesk Text Pro', 'Neue Haas Grotesk', 'Helvetica Neue', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Colors */
  --primary-coral: #FF5055;
  --deep-navy: #0B4A6F;
  --teal-breeze: #87CFCF;
  --medium-mud: #aea6a3;
  --pearl-white: #F0F0F0;
  --ice-orange: #FF8F6F;
  --dark-slate: #1D282F;
  
  /* Gradient */
  --gradient-background: linear-gradient(135deg, #F0F0F0 0%, #aea6a3 100%);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  font-weight: 300;
  overflow: hidden;
  background: var(--gradient-background);
  color: var(--dark-slate);
}

/* Landing Container */
.landing-container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--gradient-background);
  overflow: hidden;
}

/* Background Particles */
.background-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.bg-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(200, 200, 200, 0.2);
  border-radius: 50%;
  animation: float-particle 4s ease-in-out infinite;
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) scale(0);
    opacity: 0;
    filter: blur(55px);
  }
  50% {
    transform: translateY(-50px) scale(1);
    opacity: 0.2;
    filter: blur(40px);
  }
}

/* Logo Container */
.logo-container {
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 90vw;
  max-height: 33vh;
  z-index: 98789;
  opacity: 0;
  padding: 5px;
  animation: logo-appear 1.2s cubic-bezier(0.34, 1.16, 0.64, 1) 0.2s forwards;
}

@keyframes logo-appear {
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.logo {
  width: 100%;
  height: auto;
  max-height: 30vh;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
  padding: 5px;
  filter: drop-shadow(0 5px 20px rgba(0, 0, 0, 0.25));
}

/* Text Container */
.text-container {
  position: absolute;
  top: 62%;
  transform: translateY(-50%);
  text-align: center;
  z-index: 2;
  opacity: 0;
  animation: text-appear 0.8s ease-out 1.5s forwards;
  width: 100%;
  padding: 0 1rem;
}

.text-container.visible {
  transform: translateY(-50%);
}

@keyframes text-appear {
  to {
    opacity: 1;
    transform: translateY(-50%);
  }
}

.main-heading {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 100;
  letter-spacing: 0.05em;
  color: var(--dark-slate);
  margin-bottom: 0.75rem;
}

/* Morphing Text */
.morphing-container {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--dark-slate);
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
}

.static-text {
  display: inline-block;
}

.morph-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.65em;
  margin: 0 -0.05em;
}

.morph-text {
  letter-spacing: -0.05em;
  position: relative;
  left: -20%;
  display: inline-block;
}

.morph-text.visible {
  opacity: 1;
  animation: none;
}

.morph-text.glitch-out {
  animation: glitch-out 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.morph-text.glitch-in {
  animation: glitch-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes glitch-out {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0);
    text-shadow: none;
  }
  10% {
    transform: translateY(0) translateX(-2px);
    text-shadow: 2px 0 var(--teal-breeze), -2px 0 var(--ice-orange);
  }
  20% {
    transform: translateY(-3px) translateX(2px);
    transform: translateY(-3px) translateX(2px) scaleY(0.1) scaleX(1.2);
    text-shadow: -2px 0 var(--teal-breeze), 20px 0 var(--ice-orange);
  }
  30% {
    transform: translateY(2px) translateX(-2px);
    text-shadow: 8px 22px var(--teal-breeze), -2px -6px var(--ice-orange);
  }
  40% {
    transform: translateY(-2px) translateX(3px);
    text-shadow: -3px 0 var(--teal-breeze), 3px -20px var(--ice-orange);
    opacity: 0.8;
  }
  50% {
    transform: translateY(1px) translateX(-3px)scaleY(1.1) scaleX(1.2);
    text-shadow: 8px -2px var(--teal-breeze), -10px 2px var(--ice-orange);
    opacity: 0.6;
  }
  60% {
    transform: translateY(-4px) translateX(2px);
    text-shadow: -2px 12px var(--teal-breeze), 8px -2px var(--ice-orange);
    opacity: 0.4;
  }
  70% {
    transform: translateY(2px) translateX(-1px) scaleY(1.1);
    text-shadow: 1px 0 var(--teal-breeze), -1px 0 var(--primary-coral);
    opacity: 0.3;
  }
  80% {
    transform: translateY(-5px) translateX(0) scaleY(0.7) blur(2px);
    text-shadow: 10 2px var(--teal-breeze), 0 -22px var(--ice-orange);
    opacity: 0.2;
  }
  90% {
    transform: translateY(3px) translateX(1px) scaleX(1.1);
    text-shadow: -1px 1px var(--teal-breeze), 1px -1px var(--ice-orange);
    opacity: 0.1;
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) translateX(-10px) scaleY(0.2) scaleX(2.0) blur(6px);
    text-shadow: 0 3px var(--teal-breeze), 0 -3px var(--primary-coral);
  }
}

@keyframes glitch-in {
  0% {
    opacity: 0;
    transform: translateY(8px) translateX(0) scale(0.8);
    text-shadow: 0 -3px var(--teal-breeze), 0 3px var(--ice-orange);
  }
  10% {
    transform: translateY(-3px) translateX(-1px) scaleX(1.1) blur(4px);
    text-shadow: 1px -1px var(--teal-breeze), -1px 1px var(--ice-orange);
    opacity: 0.1;
  }
  20% {
    transform: translateY(5px) translateX(0) scaleY(0.9);
    text-shadow: 0 -2px var(--teal-breeze), 0 2px var(--ice-orange);
    opacity: 0.2;
  }
  30% {
    transform: translateY(-2px) translateX(8px) scaleY(0.1) blur(2px);
    text-shadow: -1px 0 var(--teal-breeze), 1px 0 var(--primary-coral);
    opacity: 0.3;
  }
  40% {
    transform: translateY(4px) translateX(-2px);
    text-shadow: 2px -2px var(--teal-breeze), -2px 2px var(--ice-orange);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-1px) translateX(3px);
    text-shadow: -3px 2px var(--teal-breeze), 3px -2px var(--ice-orange);
    opacity: 0.6;
  }
  60% {
    transform: translateY(2px) translateX(-3px);
    text-shadow: 3px 0 var(--teal-breeze), -3px 0 var(--ice-orange);
    opacity: 0.8;
  }
  70% {
    transform: translateY(-12px) translateX(2px) scaleY(0.2) scaleX(1.8);
    text-shadow: -22px -2px var(--teal-breeze), 2px 2px var(--primary-coral);
  }
  80% {
    transform: translateY(3px) translateX(-2px) blur(4px);
    text-shadow: 2px 0 var(--teal-breeze), -2px 0 var(--ice-orange);
  }
  90% {
    transform: translateY(0) translateX(2px) blur(7px);
    text-shadow: -2px 0 var(--teal-breeze), 2px 0 var(--ice-orange);
  }
  100% {
    opacity: 1;
    transform: translateY(0) translateX(0);
    text-shadow: none;
  }
}

/* Ambient Particles - Haze Effect */
.ambient-particles {
  position: absolute;
  inset: -150%;
  pointer-events: none;
  z-index: 1;
}

/* Large haze particles */
.haze-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: haze-float 8s ease-in-out infinite;
  filter: blur(20px);
}

@keyframes haze-float {
  0%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }
  25% {
    opacity: 0.3;
    transform: translate(var(--x1), var(--y1)) scale(1.3);
  }
  50% {
    opacity: 0.8;
    transform: translate(var(--x2), var(--y2)) scale(1.1);
  }
  75% {
    opacity: 0.3;
    transform: translate(var(--x1), var(--y1)) scale(1.2);
  }
}

/* Medium fog particles */
.fog-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: fog-float 6s ease-in-out infinite;
  filter: blur(15px);
}

@keyframes fog-float {
  0%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.42;
    transform: translate(var(--x), var(--y)) scale(1.4);
  }
}

/* Small floating particles */
.ambient-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background-color: #000;
  opacity: 0;
  animation: ambient-float 18s linear infinite;
}

@keyframes ambient-float {
  0% {
    opacity: 0;
    filter: blur(20px);
    transform: translate(0, 0);
  }
  25% {
    opacity: 0.15;
    filter: blur(4px);
  }
  50%, 75% {
    opacity: 0.8;
    filter: blur(8px);
  }
  100% {
    opacity: 0;
    filter: blur(20px);
    transform: translate(var(--x), var(--y));
  }
}

/* Burst Particles */
.burst-particles {
  position: absolute;
  inset: -100%;
  pointer-events: none;
  z-index: 2;
}

.burst-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  animation: burst-out 1.5s ease-out forwards;
}

@keyframes burst-out {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0.8;
    filter: blur(4px);
  }
  50% {
    opacity: 1;
    filter: blur(2px);
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(1.2);
    opacity: 0;
    filter: blur(6px);
  }
}

/* Countdown Timer */
.countdown-container {
  margin: 1.25rem 0;
  padding: 0;
}

.countdown-label {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--medium-mud);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.countdown-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 10vw;
}

.time-value {
  font-size: clamp(1.75rem, 4.5vw, 4.75rem);
  font-weight: 200;
  color: var(--deep-navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.time-label {
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--medium-mud);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.35rem;
}

.time-separator {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 200;
  color: var(--teal-breeze);
  margin: 0 0.25rem;
  align-self: flex-start;
  padding-top: 0.25rem;
}

/* Sign Up Button */
.signup-button {
  margin-top: 1.25rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 400;
  color: rgb(233, 225, 219);
  background: linear-gradient(135deg, var(--medium-mud) 0%, rgb(233, 225, 219, 0.2) 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px var(--ice-orange);
  letter-spacing: 0.05em;
}

.signup-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(11, 74, 111, 0.3);
}

.signup-button:active {
  transform: translateY(0);
}

/* Footer */
.footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.footer-link {
  background: none;
  border: none;
  color: var(--medium-mud);
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 300;
  cursor: pointer;
  padding: 5px 15px;
  transition: color 0.3s ease;
  text-decoration: underline;
}

.footer-link:hover {
  color: var(--deep-navy);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: rgb(233, 225, 219, 0.8);
  backdrop-filter: blur(12px);
  padding: 2.5rem;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.modal.active .modal-content {
  transform: scale(1);
}

.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--medium-mud);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: var(--pearl-white);
  color: var(--dark-slate);
}

.modal-content h2 {
  font-size: 2rem;
  font-weight: 300;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
}

.modal-content p {
  font-size: 1rem;
  color: var(--medium-mud);
  margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--dark-slate);
  background: var(--pearl-white);
  border: 2px solid transparent;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--teal-breeze);
  background: white;
}

.form-group input::placeholder {
  color: var(--medium-mud);
  opacity: 0.6;
}

.submit-button {
  width: 100%;
  padding: 1rem;
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 400;
  color: white;
  background: linear-gradient(135deg, var(--deep-navy) 0%, var(--teal-breeze) 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(11, 74, 111, 0.3);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-text {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.button-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.submit-button.loading .button-text {
  opacity: 0;
}

.submit-button.loading .button-loader {
  display: block;
}

/* Form Message */
.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  text-align: center;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(135, 207, 207, 0.2);
  color: var(--deep-navy);
}

.form-message.error {
  display: block;
  background: rgba(255, 80, 85, 0.2);
  color: var(--primary-coral);
}

/* Impressum Modal Specific Styles */
.impressum-content {
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  text-align: left;
}

.impressum-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--deep-navy);
}

.impressum-content h3 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
}

.impressum-notice {
  background: rgba(255, 143, 111, 0.15);
  border-left: 4px solid var(--ice-orange);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.impressum-section {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.impressum-section p {
  margin-bottom: 0.5rem;
  color: var(--dark-slate);
}

.impressum-section em {
  color: var(--ice-orange);
  font-style: italic;
}

.impressum-section a {
  color: var(--deep-navy);
  text-decoration: underline;
}

.impressum-section a:hover {
  color: var(--teal-breeze);
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo-container {
    top: 5%;
    width: 85vw;
    max-height: 20vh;
    padding: 15px;
  }
  
  .countdown-timer {
    gap: 0.25rem;
  }
  
  .time-unit {
    min-width: 55px;
  }
  
  .time-separator {
    margin: 0 0.15rem;
  }
  
  .modal-content {
    padding: 2rem 1.5rem;
  }
  
  .signup-button {
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .logo-container {
    width: 90vw;
    max-height: 18vh;
    padding: 10px;
  }
  
  .time-unit {
    min-width: 45px;
  }
  
  .time-value {
    font-size: 1.5rem;
  }
  
  .time-label {
    font-size: 0.55rem;
  }
  
  .countdown-label {
    font-size: 0.875rem;
  }
  
  .signup-button {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-height: 700px) {
  .logo-container {
    top: 3%;
    width: 70vw;
    max-height: 22vh;
    padding: 10px;
  }
  
  .main-heading {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
    margin-bottom: 0.5rem;
  }
  
  .morphing-container {
    font-size: clamp(1.75rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
  }
  
  .countdown-container {
    margin: 0.75rem 0;
  }
  
  .time-value {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
  }
  
  .signup-button {
    margin-top: 0.75rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }
}
