/* Layout Styles for Market Validation Landing Page */

@import url(https://fonts.bunny.net/css?family=darker-grotesque:300,400,500,600,700,800,900);

/* Animated Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

/* Container */
.container {
  max-width: 990px;
  margin: 0 auto;
  padding: 0 2rem;
  background-color: rgba(255, 255, 255, 0.8); /* Transparent background to see animated canvas */
}

/* Header */
.header {
  padding: 2rem 0;
  /* background: hsl(var(--background)); */
  background: rgba(255, 255, 255, 0.6)!important; /* Transparent background to see animated canvas */
  border-bottom: 4px solid hsl(var(--border));
}

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

.logo {
  height: 50px;
  width: auto;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  padding: 0.5rem 1rem;
  font-family: 'Arial Black', 'Arial', sans-serif;
  font-size: 0.875rem;
  font-weight: 900;
  text-transform: uppercase;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 3px solid hsl(var(--border));
  box-shadow: 2px 2px 0px 0px hsl(var(--border));
  cursor: pointer;
  transition: all 0.1s ease;
}

.lang-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px 0px hsl(var(--border));
}

.lang-btn.active {
  background: hsl(var(--main));
  color: hsl(var(--main-foreground));
}

/* Main Section */
.main {
  padding: 4rem 0;
  min-height: calc(100vh - 150px);
}

/* Intro Section */
.intro {
  text-align: left;
  margin-bottom: 3rem;
}

.intro h1 {
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
  display: inline-block;
}

/* Typewriter cursor effect */
.intro h1.typewriter::after {
  content: '|';
  color: hsl(var(--main));
  animation: blink 0.7s infinite;
  font-weight: 900;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.intro p {
  font-size: 1.25rem;
  line-height: 1.5;
  color: hsl(var(--foreground));
  max-width: 900px;
  font-weight: 700;
  margin: 0!important;
}

/* Why Free Link */
.why-free-link {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.875rem;
  font-weight: 900;
  color: hsl(var(--foreground));
  background: hsl(var(--main));
  border: 3px solid hsl(var(--border));
  box-shadow: 2px 2px 0px 0px hsl(var(--border));
  text-decoration: none;
  transition: all 0.1s ease;
}

.why-free-link:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px 0px hsl(var(--border));
}

.why-free-link:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Form Section */
.form-section {
  margin-top: 3rem;
}

#form-container {
  display: block;
}

#form-container.hidden {
  display: none;
}

#success-message {
  display: none;
}

#success-message.visible {
  display: block;
}

/* Loading State */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.loading .btn::after {
  content: '...';
  animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Footer (Optional) */
footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 4px solid hsl(var(--border));
  margin-top: 4rem;
  background-color: rgba(255, 255, 255, 0.6);
}

footer p {
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.footer-credits {
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-credits a {
  color: hsl(var(--foreground));
  text-decoration: underline;
  font-weight: 700;
  transition: color 0.2s ease;
}

.footer-credits a:hover {
  color: hsl(var(--main));
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .main {
    padding: 3rem 0;
  }

  .intro h1 {
    font-size: 2rem;
  }

  .intro p {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .header {
    padding: 1.5rem 0;
  }

  .header .container {
    /* Keep row layout - logo and switcher on same line */
    gap: 0.5rem;
  }

  .logo {
    height: 35px;
  }

  .language-switcher {
    gap: 0.25rem;
  }

  .lang-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  .main {
    padding: 2rem 0;
  }

  .intro {
    margin-bottom: 2rem;
  }

  .intro h1 {
    font-size: 1.75rem;
  }

  .intro p {
    font-size: 1rem;
  }

  .form-section {
    margin-top: 2rem;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn,
  input,
  textarea {
    border-width: 5px;
  }
}
