/* ===== CSS Variables ===== */
:root {
  /* Ruby Conference Theme - Classic Ruby Elegance */
  --color-background: hsl(40, 30%, 96%);
  --color-foreground: hsl(0, 0%, 12%);

  --color-card: hsl(40, 25%, 98%);
  --color-card-foreground: hsl(0, 0%, 12%);

  /* Deep Ruby Red */
  --color-primary: hsl(348, 70%, 35%);
  --color-primary-foreground: hsl(40, 30%, 96%);

  /* Warm Terracotta */
  --color-secondary: hsl(20, 45%, 92%);
  --color-secondary-foreground: hsl(348, 70%, 30%);

  /* Soft Rose */
  --color-muted: hsl(20, 30%, 94%);
  --color-muted-foreground: hsl(20, 15%, 45%);

  /* Warm Gold/Brass Accent */
  --color-accent: hsl(40, 80%, 50%);
  --color-accent-foreground: hsl(0, 0%, 12%);

  --color-destructive: hsl(0, 84.2%, 60.2%);
  --color-border: hsl(30, 20%, 88%);
  --color-ring: hsl(348, 70%, 35%);

  /* Custom Ruby Theme Colors */
  --color-ruby: hsl(348, 70%, 35%);
  --color-ruby-light: hsl(348, 65%, 45%);
  --color-ruby-dark: hsl(348, 75%, 25%);
  --color-gold: hsl(40, 80%, 50%);
  --color-gold-light: hsl(42, 85%, 65%);
  --color-cream: hsl(40, 30%, 96%);
  --color-cream-dark: hsl(35, 25%, 90%);

  /* Font families */
  --font-display: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;

  /* Border radius */
  --radius-lg: 0.75rem;
  --radius-md: calc(0.75rem - 2px);
  --radius-sm: calc(0.75rem - 4px);
}

/* ===== Reset & Base Styles ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "rlig" 1, "calt" 1;
  line-height: 1.5;
}

/* ===== App Container ===== */
.app {
  min-height: 100vh;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  overflow: hidden;
  background-image: linear-gradient(180deg, hsl(40, 30%, 96%) 0%, hsl(35, 25%, 90%) 100%);
}

/* ===== Background Decorations ===== */
.background-decorations {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Ruby Gems */
.ruby-gem {
  position: absolute;
  animation: float 3s ease-in-out infinite;
}

.gem-1 {
  top: 5rem;
  left: 10%;
  width: 2rem;
  height: 2.5rem;
  opacity: 0.2;
}

.gem-2 {
  top: 10rem;
  right: 15%;
  width: 3rem;
  height: 4rem;
  opacity: 0.15;
  animation-delay: 1s;
}

.gem-3 {
  bottom: 8rem;
  left: 20%;
  width: 5rem;
  height: 6rem;
  opacity: 0.1;
  animation-delay: 2s;
}

.gem-4 {
  bottom: 12rem;
  right: 10%;
  width: 2rem;
  height: 2.5rem;
  opacity: 0.15;
  animation-delay: 0.5s;
}

/* Gradient Orbs */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
}

.orb-left {
  top: 25%;
  left: -8rem;
  width: 16rem;
  height: 16rem;
  background-color: hsl(348, 70%, 35%, 0.1);
}

.orb-right {
  bottom: 25%;
  right: -8rem;
  width: 20rem;
  height: 20rem;
  background-color: hsl(40, 80%, 50%, 0.1);
}

/* ===== Hero Content ===== */
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px -4px hsl(0, 0%, 0%, 0.1);
  margin-bottom: 2rem;
}

.sparkle-icon {
  width: 1rem;
  height: 1rem;
  color: var(--color-accent);
}

.badge span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted-foreground);
}

/* Main Heading */
.main-heading {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-foreground);
  margin-bottom: 1rem;
  line-height: 1.1;
  opacity: 0;
}

@media (min-width: 640px) {
  .main-heading {
    font-size: 3.75rem;
  }
}

@media (min-width: 768px) {
  .main-heading {
    font-size: 4.5rem;
  }
}

@media (min-width: 1024px) {
  .main-heading {
    font-size: 6rem;
  }
}

.text-gradient-ruby {
  background-image: linear-gradient(135deg, hsl(348, 70%, 35%) 0%, hsl(348, 75%, 25%) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Subtitle */
.subtitle {
  font-size: 1.125rem;
  color: var(--color-muted-foreground);
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.75;
  opacity: 0;
}

@media (min-width: 640px) {
  .subtitle {
    font-size: 1.25rem;
  }
}

.subtitle .highlight {
  font-weight: 600;
  color: var(--color-foreground);
}

.subtitle .highlight-primary {
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== Waitlist Form ===== */
.waitlist-form-container {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto 2rem;
  opacity: 0;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .waitlist-form {
    flex-direction: row;
  }
}

.waitlist-form input {
  flex: 1;
  height: 3.5rem;
  padding: 0 1rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  background-color: var(--color-card);
  color: var(--color-foreground);
  transition: all 0.2s ease;
}

.waitlist-form input::placeholder {
  color: var(--color-muted-foreground);
}

.waitlist-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px hsl(348, 70%, 35%, 0.2);
}

.waitlist-form button {
  height: 3.5rem;
  padding: 0 1.5rem;
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 10px 40px -10px hsl(348, 70%, 35%, 0.3);
  transition: all 0.2s ease;
}

.waitlist-form button:hover:not(:disabled) {
  background-color: var(--color-ruby-dark);
  transform: scale(1.05);
}

.waitlist-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.waitlist-form button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.waitlist-form button .arrow-icon {
  transition: transform 0.2s ease;
}

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

.loader-icon {
  animation: spin 1s linear infinite;
}

.hidden {
  display: none !important;
}

.form-message {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
}

.form-message.success {
  color: #16a34a;
}

.form-message.error {
  color: var(--color-destructive);
}

/* ===== Social Proof ===== */
.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.avatars {
  display: flex;
  margin-left: 0.75rem;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid var(--color-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary-foreground);
  box-shadow: 0 4px 20px -4px hsl(0, 0%, 0%, 0.1);
  margin-left: -0.75rem;
  animation: fade-in 0.6s ease-out forwards;
}

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

.bg-ruby {
  background-color: var(--color-ruby);
}

.bg-gold {
  background-color: var(--color-gold);
  color: var(--color-foreground);
}

.bg-ruby-light {
  background-color: var(--color-ruby-light);
}

.bg-gold-light {
  background-color: var(--color-gold-light);
  color: var(--color-foreground);
}

.bg-ruby-dark {
  background-color: var(--color-ruby-dark);
}

.waitlist-count {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.count-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.count-plus {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.count-text {
  color: var(--color-muted-foreground);
  font-size: 0.875rem;
}

/* ===== Social Links ===== */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-links a {
  color: var(--color-muted-foreground);
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--color-primary);
}

.social-links svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ===== Bottom Gradient ===== */
.bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to top, hsl(35, 25%, 90%, 0.5), transparent);
  pointer-events: none;
}

/* ===== Train Animation ===== */
.train-animation {
  position: fixed;
  bottom: 50px;
  left: -300px;
  z-index: 5;
  animation: train-move-across 20s linear infinite;
  pointer-events: none;
}

.train {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
}

.locomotive {
  width: 80px;
  height: 60px;
  background: hsl(348, 70%, 35%);
  border-radius: 10px 10px 5px 5px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: scaleX(-1);
}

.locomotive::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 10px;
  width: 30px;
  height: 20px;
  background: hsl(348, 75%, 25%);
  border-radius: 5px;
}

.locomotive::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 5px;
  width: 20px;
  height: 20px;
  background: #333;
  border-radius: 50%;
  box-shadow: 50px 0 0 #333;
}

.coach {
  width: 70px;
  height: 55px;
  background: hsl(40, 80%, 50%);
  border-radius: 5px;
  position: relative;
  margin-left: -2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.coach::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 15px;
  height: 15px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  box-shadow: 20px 0 0 rgba(255, 255, 255, 0.7), 40px 0 0 rgba(255, 255, 255, 0.7);
}

.coach::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 5px;
  width: 18px;
  height: 18px;
  background: #333;
  border-radius: 50%;
  box-shadow: 40px 0 0 #333;
}

.smoke {
  position: absolute;
  top: -30px;
  width: 20px;
  height: 20px;
  background: rgba(100, 100, 100, 0.4);
  border-radius: 50%;
  animation: smoke-rise 2s ease-out infinite;
}

.smoke-1 {
  left: 15px;
}

.smoke-2 {
  left: 25px;
  animation-delay: 0.5s;
}

.smoke-3 {
  left: 35px;
  animation-delay: 1s;
}

/* ===== Animations ===== */
@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes train-move-across {
  0% {
    left: -300px;
  }
  100% {
    left: calc(100% + 300px);
  }
}

@keyframes smoke-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translateY(-40px) scale(2);
    opacity: 0;
  }
}

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

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}
