/* Fonts */
@font-face {
  font-family: 'Ubuntu';
  src: url('fonts/Ubuntu-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('fonts/Ubuntu-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('fonts/Ubuntu-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('fonts/Ubuntu-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  min-height: 100vh;

  /* Gradient fallback before image loads */
  background: linear-gradient(135deg, #1a3a52 0%, #2c5f7c 50%, #1a3a52 100%);

  /* Mobile background */
  background-image: url('freediving-adventures-bg-mobile.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Fallback for browsers without WebP support */
body {
  background-image: url('freediving-adventures-bg-mobile.jpg');
}

/* WebP support */
@supports (background-image: url('freediving-adventures-bg-mobile.webp')) {
  body {
    background-image: url('freediving-adventures-bg-mobile.webp');
  }

  @media (min-width: 641px) {
    body {
      background-image: url('freediving-adventures-bg-tablet.webp');
    }
  }

  @media (min-width: 1025px) {
    body {
      background-image: url('freediving-adventures-bg-desktop.webp');
    }
  }
}

/* Container */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.1);
  padding: 0;
  position: relative;
}

/* Content */
.content {
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 100%;
  flex: 1;
}

.content > .headline {
  padding: 2rem 1rem 0;
}

.content > .subheadline {
  padding: 0 1rem 0;
}

.content > .waitlist-form {
  position: fixed;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
  width: calc(100% - 2rem);
  z-index: 10;
}

/* Typography */
.headline {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  letter-spacing: -0.5px;
  word-break: break-word;
  hyphens: auto;
}

.subheadline {
  font-size: 1.85rem;
  font-weight: 400;
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  font-style: italic;
}


/* Form */
.waitlist-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* Honeypot - hide from humans, visible to bots */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.email-input {
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transition: all 0.3s ease;
}

.email-input:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.email-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  flex: 1 1 auto;
  min-width: 200px;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-label span {
  user-select: none;
}

/* CTA Button */
.cta-button {
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 120, 180, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.cta-button:hover {
  background: rgba(0, 140, 200, 1);
  border-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cta-button:active {
  background: rgba(0, 100, 160, 1);
}

/* Success Message */
.success-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s;
}

.success-message.show {
  opacity: 1;
  visibility: visible;
}

.success-content {
  background: linear-gradient(135deg, #1a3a52 0%, #2c5f7c 100%);
  padding: 3rem 2rem;
  border-radius: 12px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.success-message.show .success-content {
  transform: scale(1);
  opacity: 1;
}

/* Error Message */
.error-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s;
}

.error-message.show {
  opacity: 1;
  visibility: visible;
}

.error-content {
  background: linear-gradient(135deg, #521a1a 0%, #7c2c2c 100%);
  padding: 3rem 2rem;
  border-radius: 12px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.error-message.show .error-content {
  transform: scale(1);
  opacity: 1;
}

.error-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.error-content .error-text {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.success-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.success-content p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #ffffff;
}

.success-content strong {
  color: #4fc3f7;
}

.success-email {
  font-size: 1rem;
  font-style: italic;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.close-button {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 120, 180, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-button:hover {
  background: rgba(0, 140, 200, 1);
  border-color: #ffffff;
}

/* Footer */
.footer {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.75rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 5;
}

.footer a {
  color: #ffffff;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 0.8;
}

/* Responsive */
@media (min-width: 480px) {
  .headline {
    font-size: 2.25rem;
  }

  .subheadline {
    font-size: 1.5rem;
    margin-top: 2rem;
  }
}

@media (min-width: 641px) {
  .headline {
    font-size: 2.5rem;
  }

  .subheadline {
    font-size: 2rem;
    margin-top: 2.5rem;
  }

  .content > .headline {
    padding: 3rem 2rem 0;
  }

  .content > .subheadline {
    padding: 0 2rem 0;
  }

  .content > .waitlist-form {
    bottom: 15vh;
  }

  .footer {
    font-size: 0.875rem;
    padding: 1rem;
  }
}

@media (min-width: 900px) {
  .headline {
    font-size: 3.5rem;
  }
}

@media (min-width: 1025px) {
  .headline {
    font-size: 4rem;
  }

  .subheadline {
    font-size: 2.25rem;
    margin-top: 3rem;
  }

  .content > .headline {
    padding: 4rem 2rem 0;
  }

  .content > .subheadline {
    padding: 0 2rem 0;
  }

  .content > .waitlist-form {
    bottom: 18vh;
  }
}
