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

:root {
  /* Colors from Figma */
  --color-bg: #000625;
  --color-primary: #ffffff;
  --color-accent: #226bf4;
  --color-accent-glow: rgba(34, 107, 244, 0.5);
  --color-accent-light: rgba(34, 107, 244, 0.1);
  --color-accent-border: rgba(34, 107, 244, 0.3);
  --color-input-border: rgba(49, 121, 255, 0.5);
  --color-btn-border: rgba(113, 162, 255, 0.5);
  --color-text-secondary: #6d7998;
  --color-gradient-start: #02001d;

  /* Modal colors */
  --color-modal-bg: #FFFFFF;
  --color-modal-text: #000000;

  /* Fonts */
  --font-logo: 'Bruno Ace SC', sans-serif;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Border radius */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-checkbox: 5px;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-primary);
  height: 100vh;
  overflow: hidden;
}

/* Landing Page */
.landing,
.thank-you-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  overflow: hidden;
}

/* Background Layers */
.bg-pattern {
  position: absolute;
  inset: -40px -40px -31px -40px;
  background-image: url('assets/bg-pattern.png');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 1;
}

.bg-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 291px;
  background: linear-gradient(180deg, var(--color-gradient-start) 0%, rgba(2, 0, 29, 0) 100%);
  z-index: 2;
}

.bg-blur {
  position: absolute;
  inset: -36px 0 0 0;
  background-image: url('assets/bg-blur.png');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  filter: blur(50px);
  z-index: 1;
}

.content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 1008px;
  width: 100%;
}

/* Logo */
.logo {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.logo-icon {
  position: relative;
  width: 129px;
  height: 106px;
  margin-bottom: 0.5rem;
}

.logo-left {
  position: absolute;
  left: 0;
  top: 0;
  width: 70px;
  height: 106px;
  transform: rotate(180deg) scaleY(-1);
}

.logo-right {
  position: absolute;
  left: 59px;
  top: 0;
  width: 70px;
  height: 106px;
}

.logo-text {
  font-family: var(--font-logo);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -1.7px;
  color: var(--color-primary);
}

/* Hero */
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -1.92px;
  margin-bottom: 1rem;
  line-height: 1;
}

.subtitle {
  font-size: clamp(3rem, 7vw, 96px);
  font-weight: 700;
  letter-spacing: -2.88px;
  margin-bottom: 4.5rem;
  line-height: 1;
}

/* Subscribe Section */
.subscribe-section {
  max-width: 659px;
  margin: 0 auto;
  box-shadow:
    0px 216px 61px 0px rgba(6, 12, 35, 0.01),
    0px 138px 55px 0px rgba(6, 12, 35, 0.09),
    0px 78px 47px 0px rgba(6, 12, 35, 0.3),
    0px 35px 35px 0px rgba(6, 12, 35, 0.51),
    0px 9px 19px 0px rgba(6, 12, 35, 0.59);
}

.subscribe-label {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.72px;
  margin-bottom: 15px;
  text-align: left;
}

.subscribe-form {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.input-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.email-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 18px;
  z-index: 2;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  height: 64px;
  padding: 24px 24px 24px 60px;
  background: var(--color-accent-light);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius);
  color: var(--color-primary);
  font-size: 16px;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.48px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.input-wrapper input::placeholder {
  color: var(--color-primary);
  opacity: 0.5;
}

.input-wrapper input:focus {
  border-color: var(--color-accent);
  background: rgba(34, 107, 244, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px 16px 32px;
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: -0.6px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1.5px solid var(--color-btn-border);
  box-shadow: 0px 0px 50px 0px var(--color-accent-glow);
}

.btn-primary:hover {
  background: #3a7cf5;
  transform: translateY(-2px);
  box-shadow: 0px 0px 60px 0px var(--color-accent-glow);
}

.btn-primary .btn-icon {
  width: 32px;
  height: 32px;
}

.btn-secondary {
  background: var(--color-accent-light);
  backdrop-filter: blur(10px);
  color: var(--color-primary);
  border: 1px solid var(--color-accent-border);
  font-size: 16px;
  padding: 16px 32px;
}

.btn-secondary:hover {
  background: rgba(34, 107, 244, 0.2);
}

.btn-full {
  width: 100%;
  margin: 0;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.footer-text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.48px;
  text-align: center;
  color: var(--color-primary);
}

.footer .btn-secondary {
  pointer-events: auto;
  cursor: pointer;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  background: var(--color-modal-bg);
  border: 2px solid white;
  border-radius: var(--radius);
  padding: 48px 32px 48px 32px;
  max-width: 596px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
  box-shadow:
    0px 436px 122px 0px rgba(7, 5, 36, 0.02),
    0px 279px 112px 0px rgba(7, 5, 36, 0.15),
    0px 157px 94px 0px rgba(7, 5, 36, 0.5),
    0px 70px 70px 0px rgba(7, 5, 36, 0.85),
    0px 17px 38px 0px rgba(7, 5, 36, 0.98);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 0.7;
}

.modal-close img {
  width: 20px;
  height: 20px;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.72px;
  text-align: center;
  color: var(--color-modal-text);
  margin-bottom: 2rem;
}

/* Form Sections */
.form-section {
  margin-bottom: 32px;
}

.form-section h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--color-modal-text);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.42px;
  color: var(--color-modal-text);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-sm);
  color: var(--color-modal-text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.42px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder {
  color: var(--color-modal-text);
  opacity: 0.2;
}

.form-group input:focus {
  border-color: var(--color-accent);
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 20px;
}

.checkbox input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: #4a5ef6;
  border-radius: var(--radius-checkbox);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.checkbox input:checked + .checkmark::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox input:not(:checked) + .checkmark {
  background: transparent;
  border: 2px solid var(--color-input-border);
}

/* Modal button */
.modal-content .btn-primary {
  margin-top: 24px;
  box-shadow: 0px 10px 50px 0px rgba(34, 107, 244, 0.3);
}

.modal-content .form-section:last-of-type {
  margin-bottom: 0;
}

/* Thank You Page */
.thank-you-page {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: var(--color-bg);
}

.thank-you-page.active {
  display: flex;
}

.thank-you-page .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}


.thank-you-content {
  text-align: center;
  max-width: 798px;
  margin: 0 auto;
}

.thank-you-content h1 {
  font-size: clamp(2rem, 4vw, 64px);
  font-weight: 600;
  letter-spacing: -1.92px;
  margin-bottom: 24px;
  line-height: 1;
}

.thank-you-content p {
  font-size: clamp(1.25rem, 2.5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.96px;
  line-height: 1.375;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    padding: 0 1.5rem;
    bottom: 2rem;
  }

  .footer .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .input-wrapper {
    max-width: none;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive - Mobile (390px and below) - Matching Figma Design */
@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }

  .landing,
  .thank-you-page {
    padding: 0;
    min-height: 100vh;
    height: auto;
  }

  /* Logo - Mobile */
  .logo {
    top: 48px;
  }

  .logo-icon {
    width: 70px;
    height: 58px;
    margin-bottom: 0;
  }

  .logo-left,
  .logo-right {
    width: 38px;
    height: 58px;
  }

  .logo-right {
    left: 32px;
  }

  .logo-text {
    font-size: 18.5px;
    letter-spacing: -0.93px;
  }

  /* Content */
  .content {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 150px;
    padding-bottom: 200px;
  }

  /* Hero - Mobile */
  .hero {
    width: 100%;
    max-width: 342px;
  }

  .hero h1 {
    font-size: 24px;
    letter-spacing: -0.72px;
    margin-bottom: 16px;
    line-height: 1;
  }

  .subtitle {
    font-size: 48px;
    letter-spacing: -1.44px;
    margin-bottom: 48px;
    line-height: 1;
  }

  /* Subscribe Section - Mobile */
  .subscribe-section {
    max-width: 342px;
    width: 100%;
  }

  .subscribe-label {
    font-size: 16px;
    letter-spacing: -0.48px;
    margin-bottom: 15px;
    text-align: center;
  }

  .subscribe-form {
    flex-direction: column;
    gap: 12px;
  }

  .input-wrapper {
    min-width: 100%;
  }

  .input-wrapper input {
    height: 56px;
    padding: 20px 20px 20px 59px;
    font-size: 16px;
  }

  .email-icon {
    left: 20px;
    width: 22px;
    height: 18px;
  }

  .btn {
    font-size: 20px;
    padding: 16px 36px 16px 24px;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .btn-primary .btn-icon {
    width: 32px;
    height: 32px;
  }

  /* Footer - Mobile */
  .footer {
    position: absolute;
    bottom: auto;
    top: 673px;
    left: 50%;
    transform: translateX(-50%);
    width: 342px;
    padding: 0;
    gap: 24px;
    align-items: center;
  }

  .footer-text {
    font-size: 16px;
    letter-spacing: -0.48px;
    line-height: 24px;
    text-align: center;
  }

  .footer .btn-secondary {
    width: auto;
    font-size: 16px;
    padding: 16px 32px;
  }

  /* Modal - Mobile */
  .modal {
    padding: 1rem;
  }

  .modal-content {
    padding: 32px 24px;
    max-height: 85vh;
  }

  .modal-content h2 {
    font-size: 20px;
    margin-bottom: 1.5rem;
  }

  .form-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .checkbox-group {
    flex-direction: column;
    gap: 12px;
  }

  /* Thank You - Mobile */
  .thank-you-page .content {
    padding: 0 24px;
    min-height: 100vh;
    padding-top: 150px;
  }

  .thank-you-content {
    max-width: 342px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .thank-you-content h1 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -1.44px;
    line-height: 1;
    margin-bottom: 0;
  }

  .thank-you-content p {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.72px;
    line-height: 32px;
  }
}

/* Extra Small Mobile (320px) */
@media (max-width: 360px) {
  .content {
    padding: 0 16px;
  }

  .hero,
  .subscribe-section,
  .footer {
    max-width: 100%;
    width: calc(100% - 32px);
  }

  .subtitle {
    font-size: 40px;
  }

  .footer {
    width: calc(100% - 32px);
  }
}

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

.btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success message */
.success-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-weight: 500;
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
