:root {
  --color-primary: #3B82F6;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #60A5FA;
  --color-bg: #0a0f1a;
  --color-bg-secondary: #111827;
  --color-bg-tertiary: #1f2937;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-success: #10B981;
  --color-error: #EF4444;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --glow-color: var(--color-primary);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== Background Effects ==================== */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--color-primary);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--color-primary-dark);
  bottom: -100px;
  left: -100px;
  animation-delay: -7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--color-primary-light);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  opacity: 0.2;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* ==================== Particles ==================== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
  opacity: 0.6;
  animation: particle-float 15s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: -3s; }
.particle:nth-child(3) { left: 60%; top: 40%; animation-delay: -6s; }
.particle:nth-child(4) { left: 80%; top: 60%; animation-delay: -9s; }
.particle:nth-child(5) { left: 90%; top: 10%; animation-delay: -12s; }

@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-100px) scale(1.5);
    opacity: 0.3;
  }
}

/* ==================== Container ==================== */
.container {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* ==================== Header ==================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  margin-bottom: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==================== Hero Section ==================== */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 1rem 0;
}

.hero-content {
  max-width: 560px;
}

/* ==================== Badge ==================== */
.badge-wrapper {
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--color-primary-light);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-pulse {
  position: absolute;
  left: 0.75rem;
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.badge svg {
  color: var(--color-primary-light);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* ==================== Typography ==================== */
h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text) 50%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--color-primary-light);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.description {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ==================== Benefits Card ==================== */
.benefits-card {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.8));
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.benefits-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary-light);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.benefits {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.benefits li::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: 50%;
  margin-top: 0.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ==================== Form ==================== */
.signup-form {
  margin-bottom: 1.5rem;
}

.form-card {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.6), rgba(17, 24, 39, 0.6));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.form-group {
  display: flex;
  gap: 0.75rem;
}

.input-wrapper {
  flex: 1;
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color 0.2s;
}

.form-group input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.75rem;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.05);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.form-group input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--color-primary);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
}

.form-group button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.form-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.form-group button:active {
  transform: translateY(0) scale(0.98);
}

.form-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  transition: transform 0.2s;
}

.form-group button:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  animation: spin 1s linear infinite;
}

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

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.privacy-note svg {
  opacity: 0.7;
}

/* ==================== Success Message ==================== */
.success-message {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 1rem;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  color: var(--color-success);
  margin-bottom: 1rem;
  animation: checkmark 0.5s ease-out 0.2s both;
}

@keyframes checkmark {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.success-message h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.success-message > p {
  color: var(--color-text-muted);
}

.substack-promo {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.substack-promo p {
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.substack-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #FF6719, #ff8c00);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(255, 103, 25, 0.3);
}

.substack-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 103, 25, 0.4);
}

/* ==================== Error Message ==================== */
.error-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.75rem;
  color: #fca5a5;
  animation: shake 0.5s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.error-message svg {
  flex-shrink: 0;
}

/* ==================== Social Proof ==================== */
.social-proof {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatars {
  display: flex;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--hue), 70%, 50%), hsl(var(--hue), 70%, 30%));
  border: 2px solid var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  margin-left: -10px;
}

.avatar:first-child {
  margin-left: 0;
}

.social-proof p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.social-proof strong {
  color: var(--color-text);
}

/* ==================== Hero Visual ==================== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ebook-scene {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ebook-glow {
  position: absolute;
  width: 250px;
  height: 350px;
  background: var(--color-primary);
  filter: blur(100px);
  opacity: 0.3;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

.ebook-mockup {
  perspective: 1200px;
  z-index: 2;
}

.ebook-cover {
  position: relative;
  width: 240px;
  height: 340px;
  transform-style: preserve-3d;
  transform: rotateY(-20deg) rotateX(5deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: book-float 6s ease-in-out infinite;
}

@keyframes book-float {
  0%, 100% { transform: rotateY(-20deg) rotateX(5deg) translateY(0); }
  50% { transform: rotateY(-15deg) rotateX(3deg) translateY(-15px); }
}

.ebook-cover:hover {
  transform: rotateY(-10deg) rotateX(2deg) translateY(-10px);
  animation-play-state: paused;
}

.ebook-spine {
  position: absolute;
  left: -24px;
  width: 24px;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
  transform: rotateY(-90deg) translateX(-12px);
  transform-origin: right;
  border-radius: 3px 0 0 3px;
}

.ebook-front {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(165deg, var(--color-primary), var(--color-primary-dark) 70%);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(var(--color-primary), 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ebook-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.ebook-label {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ebook-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.ebook-front h3 {
  color: white;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ebook-decoration {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.ebook-decoration span {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.4);
}

.ebook-decoration span:nth-child(1) { width: 50px; }
.ebook-decoration span:nth-child(2) { width: 30px; }
.ebook-decoration span:nth-child(3) { width: 20px; }

.ebook-footer {
  position: relative;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.ebook-footer span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ==================== Floating Cards ==================== */
.floating-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: float-card 8s ease-in-out infinite;
}

.float-card svg {
  color: var(--color-primary-light);
  width: 18px;
  height: 18px;
}

.float-card-1 {
  top: 10%;
  right: 5%;
  animation-delay: 0s;
}

.float-card-2 {
  bottom: 20%;
  left: 0;
  animation-delay: -2.5s;
}

.float-card-3 {
  bottom: 5%;
  right: 15%;
  animation-delay: -5s;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==================== Footer ==================== */
footer {
  margin-top: auto;
  padding: 2rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
  .hero {
    gap: 3rem;
  }

  .ebook-cover {
    width: 200px;
    height: 280px;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 1.5rem;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  .badge-wrapper {
    display: flex;
    justify-content: center;
  }

  h1 {
    font-size: 2.25rem;
  }

  .benefits-card {
    text-align: left;
  }

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

  .form-group button {
    width: 100%;
    justify-content: center;
  }

  .social-proof {
    flex-direction: column;
    text-align: center;
  }

  .ebook-scene {
    max-width: 320px;
  }

  .ebook-cover {
    width: 180px;
    height: 250px;
  }

  .float-card {
    display: none;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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

  h1 {
    font-size: 1.85rem;
  }

  .description {
    font-size: 0.95rem;
  }

  .benefits-card {
    padding: 1rem;
  }

  .form-card {
    padding: 1rem;
  }

  .ebook-cover {
    width: 160px;
    height: 220px;
  }
}

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