/* ============================================
   Fridge Wizard Marketing Landing Page
   Design tokens ported from fridge-wizard-web
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg-start: #0a0a0f;
  --color-bg-mid: #1a0b2e;
  --color-purple-primary: #8B5CF6;
  --color-violet: #7C3AED;
  --color-purple-light: #A855F7;
  --color-purple-deep: #6b21a8;
  --color-pink: #EC4899;
  --color-cyan: #06B6D4;

  /* Glass surfaces */
  --glass-bg: rgba(10, 10, 15, 0.7);
  --glass-bg-hover: rgba(10, 10, 15, 0.8);
  --glass-border: rgba(168, 85, 247, 0.2);
  --glass-border-hover: rgba(168, 85, 247, 0.3);
  --input-bg: rgba(30, 15, 45, 0.6);
  --input-bg-hover: rgba(30, 15, 45, 0.7);
  --input-bg-focus: rgba(30, 15, 45, 0.8);

  /* Shadows */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-glass-hover: 0 12px 48px rgba(168, 85, 247, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-btn: 0 4px 20px rgba(168, 85, 247, 0.4);
  --shadow-btn-hover: 0 6px 30px rgba(168, 85, 247, 0.6);
  --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.4);
  --shadow-icon: 0 0 20px rgba(168, 85, 247, 0.2);
  --shadow-focus: 0 0 0 3px rgba(168, 85, 247, 0.2);

  /* Radii */
  --radius-glass: 20px;
  --radius-glass-lg: 24px;
  --radius-glass-xl: 28px;
  --radius-btn: 20px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Fonts */
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--color-bg-start) 0%, var(--color-bg-mid) 50%, var(--color-bg-start) 100%);
  background-attachment: fixed;
  color: rgba(229, 231, 235, 0.9);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 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;
}

.sr-only-focusable:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  width: auto;
  height: auto;
  padding: 12px 24px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-btn);
  text-decoration: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(243, 232, 255, 0.95);
}

.gradient-text {
  color: #c084fc; /* fallback */
  background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-heading {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

/* --- Glass Card --- */
.glass-card {
  position: relative;
  border-radius: var(--radius-glass-lg);
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
}

@media (hover: hover) {
  .glass-card:hover {
    box-shadow: var(--shadow-glass-hover);
    transform: translateY(-2px);
    border-color: var(--glass-border-hover);
  }
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: white;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  box-shadow: var(--shadow-btn);
  border: 1px solid rgba(168, 85, 247, 0.3);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.25;
}

@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-hover);
  }
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-btn), var(--shadow-focus);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* --- Input --- */
.input-glass {
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: white;
  background: var(--input-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  line-height: 1.25;
}

.input-glass:hover {
  background: var(--input-bg-hover);
  border-color: rgba(168, 85, 247, 0.4);
}

.input-glass:focus {
  outline: none;
  background: var(--input-bg-focus);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: var(--shadow-focus);
}

.input-glass::placeholder {
  color: rgba(168, 85, 247, 0.4);
}

/* --- Icon Circle --- */
.icon-circle {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: var(--radius-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--color-purple-deep) 0%, var(--color-purple-light) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: var(--shadow-icon);
}

/* --- Logo Circle --- */
.logo-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-purple-deep) 0%, var(--color-purple-light) 100%);
  box-shadow: var(--shadow-glow);
  margin: 0 auto 24px;
}

.logo-emoji {
  font-size: 2.25rem;
  line-height: 1;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--glass-border);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s var(--ease);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(243, 232, 255, 0.95);
}

.nav-logo-emoji {
  font-size: 1.875rem;
  line-height: 1;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-cta {
  padding: 8px 20px;
  font-size: 0.8125rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 48px 0;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-heading {
  font-size: 3rem;
  line-height: 1.167;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: 1.25rem;
  color: rgba(192, 132, 252, 0.7);
  margin-bottom: 20px;
  letter-spacing: 0.005em;
}

.hero-description {
  max-width: 560px;
  margin: 0 auto 36px;
  color: rgba(209, 213, 219, 0.8);
  font-size: 1rem;
  line-height: 1.6;
}

/* Hero entrance animations */
.hero-animate {
  animation: slideUp 0.6s var(--ease) var(--delay, 0s) both;
}

/* --- Signup Form --- */
.signup-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.signup-form .input-glass {
  flex: 1;
}

.signup-form .btn-primary {
  flex-shrink: 0;
}

.hero-form-wrapper {
  margin-bottom: 0;
}

.form-note {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: rgba(168, 85, 247, 0.5);
  text-align: center;
}

.form-success {
  text-align: center;
  color: rgba(192, 132, 252, 0.9);
  font-size: 1.125rem;
  font-weight: 500;
  padding: 12px 0;
}

.form-error {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: rgba(239, 68, 68, 0.9);
  text-align: center;
}

/* --- Sparkles --- */
.sparkle {
  position: absolute;
  font-size: 1.25rem;
  opacity: 0.4;
  pointer-events: none;
  animation: float 3s ease-in-out infinite;
}

.sparkle-1 {
  top: 15%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 3s;
}

.sparkle-2 {
  top: 25%;
  right: 12%;
  animation-delay: 1s;
  animation-duration: 4s;
}

.sparkle-3 {
  bottom: 20%;
  left: 18%;
  animation-delay: 2s;
  animation-duration: 3.5s;
}

/* ============================================
   Features Section
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}

.feature-text h3 {
  font-size: 1.125rem;
  margin-bottom: 6px;
  color: white;
}

.feature-text p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* ============================================
   How It Works Section
   ============================================ */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.step {
  text-align: center;
  max-width: 280px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--color-purple-deep) 0%, var(--color-purple-light) 100%);
  margin-bottom: 16px;
}

.step-emoji {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 16px;
}

.step-title {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: white;
}

.step-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.step-connector {
  display: none;
}

.connector-line {
  width: 2px;
  height: 40px;
  background: var(--glass-border);
}

/* ============================================
   Secondary CTA Section
   ============================================ */
.cta-card {
  text-align: center;
  padding: 48px 32px;
  max-width: 640px;
  margin: 0 auto;
}

.cta-heading {
  font-size: 2rem;
  margin-bottom: 12px;
}

.cta-description {
  color: rgba(192, 132, 252, 0.7);
  margin-bottom: 28px;
  font-size: 1rem;
}

.cta-form {
  max-width: 440px;
  margin: 0 auto;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 48px 0 32px;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.footer-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(243, 232, 255, 0.95);
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(192, 132, 252, 0.5);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(168, 85, 247, 0.6);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.footer-links a:hover {
  color: rgba(192, 132, 252, 0.9);
}

.footer-links a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: 4px;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(168, 85, 247, 0.4);
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(5deg);
  }
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--delay, 0s);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Scrollbar (Webkit)
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 10, 15, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.4);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.6);
  background-clip: content-box;
}

/* Selection */
::selection {
  background: rgba(168, 85, 247, 0.3);
  color: inherit;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 100px 0;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .hero-heading {
    font-size: 3.5rem;
  }

  .steps {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
  }

  .step {
    flex: 1;
    max-width: 300px;
    padding: 0 24px;
  }

  .step-connector {
    display: flex;
    align-items: center;
    padding-top: 56px;
  }

  .connector-line {
    width: 60px;
    height: 2px;
    background: var(--glass-border);
  }

  .cta-card {
    padding: 64px 48px;
  }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
  .hero-heading {
    font-size: 2.25rem;
  }

  .section-heading {
    font-size: 1.875rem;
  }

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

  .signup-form .btn-primary {
    width: 100%;
  }

  .cta-heading {
    font-size: 1.5rem;
  }

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

  .cta-form .btn-primary {
    width: 100%;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .sparkle {
    display: none;
  }
}

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

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
