:root {
  --bg-elevated: #0c0c0f;
  --bg-tertiary: #131318;
  --bg-modal: #16161c;

  --text-primary: #e6e7ef;
  --text-muted: rgba(230, 231, 239, 0.4);

  --accent-primary: #7c6cff;
  --form-outline: #202028;
  --form-outline-focus: rgba(124, 108, 255, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
}

body {
  position: relative;
  background-image: url('../img/rousr_cvlt_bg.svg');
  background-color: var(--bg-tertiary);
  background-repeat: repeat;
  background-size: 1024px 1024px;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Page content */
.content {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.rousr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 259px;
  width: 630px;
  background-image: url('../img/rousr_logo.svg');
  background-repeat: no-repeat;
}

.rousr-tagline {
  position: absolute;
  top: calc(50% + 109.5px + 16px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.rousr-cta {
  position: absolute;
  top: calc(50% + 159.5px + 16px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* CTA button */
#cta-btn {
  background-color: var(--accent-primary);
  padding: 9px 20px;
  border-radius: 6px;
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow 0.25s ease, opacity 0.25s ease;
}

#cta-btn:hover {
  box-shadow: 0 0 14px 2px rgba(124, 108, 255, 0.5);
}

/* ── Modal ─────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: relative;
  background: var(--bg-modal);
  border: 1px solid var(--form-outline);
  border-radius: 12px;
  padding: 32px 28px 28px;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.modal-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -12px;
  letter-spacing: 0.02em;
}

/* Fields */
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-input {
  background: var(--bg-elevated);
  border: 1px solid var(--form-outline);
  border-radius: 7px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.modal-input::placeholder {
  color: rgba(230, 231, 239, 0.25);
}

.modal-input:focus {
  border-color: var(--form-outline-focus);
}

.modal-input.invalid {
  border-color: rgba(237, 66, 69, 0.7);
}

/* Platform pills */
.modal-pill-group {
  display: flex;
  gap: 8px;
}

.pill-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--form-outline);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  border-color: rgba(124, 108, 255, 0.45);
  color: var(--text-primary);
}

.pill-btn.selected {
  border-color: var(--accent-primary);
  background: rgba(124, 108, 255, 0.14);
  color: var(--text-primary);
}

.pill-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Inline error */
.modal-error {
  font-size: 13px;
  color: #f08080;
  min-height: 0;
  display: none;
}

.modal-error.visible {
  display: block;
}

/* Submit button */
.modal-submit {
  width: 100%;
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 7px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  padding: 10px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, opacity 0.2s ease;
  letter-spacing: 0.02em;
}

.modal-submit:hover {
  box-shadow: 0 0 16px 2px rgba(124, 108, 255, 0.45);
}

.modal-submit:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
}

/* ── Button success state ───────────────────────────────────────────────── */

#cta-btn.success-sent {
  opacity: 0;
  pointer-events: none;
}

.cta-success-msg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 40px;
  background-color: var(--accent-primary);
  font-size: 13px;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cta-success-msg.visible {
  opacity: 1;
}

/* ── Toast (errors only) ────────────────────────────────────────────────── */

.cta-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1e1e28;
  border: 1px solid rgba(124, 108, 255, 0.3);
  color: var(--text-primary);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 999;
}

.cta-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cta-toast--error {
  border-color: rgba(237, 66, 69, 0.4);
  color: #f08080;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 680px) {
  .rousr-logo {
    width: calc(100vw - 100px);
    height: calc((100vw - 100px) * 0.411);
    background-size: contain;
  }

  .rousr-tagline {
    top: calc(50% + (100vw - 100px) * 0.411 / 2 + 14px);
    font-size: 14px;
    letter-spacing: 0.05em;
    white-space: normal;
    text-align: center;
    width: min(85vw, 340px);
  }

  .rousr-cta {
    top: calc(50% + (100vw - 100px) * 0.411 / 2 + 52px);
  }

  #cta-btn {
    width: min(85vw, 340px);
  }

  .modal {
    padding: 28px 20px 24px;
    gap: 18px;
  }

  /* Toast: fixed with horizontal padding on mobile */
  .cta-toast {
    left: 16px;
    right: 16px;
    transform: translateY(12px);
    white-space: normal;
    text-align: center;
    width: auto;
  }

  .cta-toast--visible {
    transform: translateY(0);
  }

}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.rousr-footer {
  font-size: 11px;
  color: rgba(230, 231, 239, 0.25);
  letter-spacing: 0.04em;
}
