/* ============================================
   ReelFit Marketing Site — styles.css
   ============================================ */

/* ------------------------------------------
   1. CSS Custom Properties
   ------------------------------------------ */
:root {
  /* Colors */
  --color-primary: #E87290;
  --color-primary-hover: #D4506E;
  --color-primary-light: rgba(232, 114, 144, 0.12);
  --color-primary-glow: rgba(232, 114, 144, 0.25);
  --color-bg: #FAF8F2;
  --color-surface: #FFFFFF;
  --color-surface-alt: #FFF5F0;
  --color-text: #2D2D2D;
  --color-text-muted: #6B6B6B;
  --color-text-on-primary: #FFFFFF;

  /* Shadows */
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 24px rgba(0, 0, 0, 0.12);
  --shadow-button: 0 4px 14px rgba(232, 114, 144, 0.35);

  /* Borders */
  --border-light: 1px solid rgba(0, 0, 0, 0.06);

  /* Radii */
  --radius-card: 16px;
  --radius-button: 14px;
  --radius-pill: 9999px;
  --radius-badge: 20px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Typography */
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;

  /* Layout */
  --max-width: 1120px;
  --section-padding: var(--space-3xl) var(--space-md);
}

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

/* ------------------------------------------
   3. Base Body Styles
   ------------------------------------------ */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ------------------------------------------
   4. Typography
   ------------------------------------------ */
h1 {
  font-size: var(--font-size-5xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xl);
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  line-height: 1.4;
}

.text-muted {
  color: var(--color-text-muted);
}

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

/* ------------------------------------------
   5. Layout
   ------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ------------------------------------------
   6. Section Padding
   ------------------------------------------ */
section {
  padding: var(--section-padding);
}

/* ------------------------------------------
   7. Buttons
   ------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 700;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-button);
  padding: 14px 28px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(232, 114, 144, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-button);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: var(--border-light);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-card);
}

.btn-sm {
  font-size: var(--font-size-sm);
  padding: 10px 20px;
}

/* ------------------------------------------
   8. Cards
   ------------------------------------------ */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: var(--border-light);
  padding: var(--space-lg);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

/* ------------------------------------------
   9. Form Elements
   ------------------------------------------ */
.input {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  padding: 14px 20px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-button);
  background-color: var(--color-surface);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

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

/* ------------------------------------------
   10. Scroll Reveal
   ------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------
   11. Skip Link (Accessibility)
   ------------------------------------------ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-button);
  font-weight: 700;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ------------------------------------------
   12. Navbar
   ------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 248, 242, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-light);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-card);
}

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

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 800;
  font-size: var(--font-size-xl);
  z-index: 1001;
}

.navbar-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  border-radius: 10px;
  font-weight: 800;
  font-size: var(--font-size-lg);
}

.navbar-logo-text {
  color: var(--color-text);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.navbar-links a {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.navbar-links a:hover {
  color: var(--color-text);
}

.navbar-cta {
  margin-left: var(--space-sm);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-md);
  background: rgba(250, 248, 242, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-light);
}

.mobile-menu a {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-muted);
}

.mobile-menu a:hover {
  color: var(--color-text);
}

.mobile-menu.open {
  display: flex;
}

/* ------------------------------------------
   13. Hero Section
   ------------------------------------------ */
.hero {
  padding-top: calc(64px + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.badge {
  display: inline-block;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: 700;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-badge);
  margin-bottom: var(--space-md);
}

.hero-content h1 {
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

.waitlist-form > .input[name="name"] {
  max-width: 440px;
  margin-bottom: var(--space-xs);
}

.waitlist-form .form-row {
  display: flex;
  gap: var(--space-xs);
  max-width: 440px;
}

.waitlist-form .form-row .input {
  flex: 1;
}

.waitlist-form .form-message {
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
  min-height: 20px;
}

.waitlist-form .form-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.cf-turnstile {
  margin-top: var(--space-xs);
}

/* Phone Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Interactive Swipe Demo */
.swipe-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.swipe-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: 600;
  text-align: center;
  animation: pulse-hint 2s ease-in-out infinite;
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.swipe-card-container {
  width: 100%;
  position: relative;
}

.swipe-cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-align: center;
}

.swipe-cta-text {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--color-text);
}

.swipe-card {
  position: relative;
  width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition: box-shadow 0.2s ease;
}

.swipe-card:active {
  cursor: grabbing;
  box-shadow: var(--shadow-card-hover);
}

.swipe-card.swiping {
  transition: none !important;
}

.swipe-card.swipe-away {
  transition: transform 0.5s ease, opacity 0.5s ease !important;
  pointer-events: none;
}

.swipe-card-overlay {
  position: absolute;
  top: 20px;
  z-index: 10;
  padding: 8px 20px;
  border-radius: var(--radius-badge);
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.swipe-card-overlay-left {
  right: 16px;
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 2px solid #dc3545;
}

.swipe-card-overlay-right {
  left: 16px;
  background: rgba(232, 114, 144, 0.15);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.swipe-card-image {
  width: 100%;
  height: 220px;
  background: url('assets/images/app-discover.png') center 20% / cover no-repeat;
  position: relative;
}

.swipe-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.05));
}

.swipe-card-body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.swipe-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-badge);
  width: fit-content;
}

.swipe-card-badge::before {
  content: '\2728';
  font-size: 0.7rem;
}

.swipe-card-title {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
}

.swipe-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.swipe-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-badge);
}

.swipe-tag-level {
  background: #FFF3CD;
  color: #856404;
}

.swipe-tag-equip {
  background: #E8E8E8;
  color: #555;
}

.swipe-card-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: 600;
}

.swipe-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.swipe-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
}

.swipe-btn:hover {
  transform: scale(1.1);
}

.swipe-btn:active {
  transform: scale(0.95);
}

.swipe-btn-skip {
  background: #FDE8E8;
  color: #dc3545;
}

.swipe-btn-love {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ------------------------------------------
   14. How It Works
   ------------------------------------------ */
.how-it-works {
  background-color: var(--color-surface);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.step {
  flex: 1;
  max-width: 220px;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  border-radius: 50%;
  font-weight: 800;
  font-size: var(--font-size-base);
  margin-bottom: var(--space-sm);
}

.step-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.step h3 {
  margin-bottom: var(--space-xs);
}

.step p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.step-arrow {
  font-size: var(--font-size-2xl);
  color: var(--color-primary);
  margin-top: 60px;
  flex-shrink: 0;
}

/* ------------------------------------------
   15. Features
   ------------------------------------------ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.feature-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.feature-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.feature-card h3 {
  margin-bottom: var(--space-xs);
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ------------------------------------------
   16. FAQ
   ------------------------------------------ */
.faq {
  background-color: var(--color-surface);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: var(--border-light);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-size: var(--font-size-lg);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: var(--font-size-2xl);
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--space-sm);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 0 var(--space-md) 0;
}

.faq-answer p {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ------------------------------------------
   17. Final CTA
   ------------------------------------------ */
.final-cta {
  background: linear-gradient(135deg, var(--color-surface-alt) 0%, var(--color-primary-light) 100%);
}

.final-cta h2 {
  margin-bottom: var(--space-sm);
}

.final-cta > .container > p {
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-lg);
}

.waitlist-form-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.waitlist-form-centered .form-row {
  justify-content: center;
}

.waitlist-form-centered .form-hint,
.waitlist-form-centered .form-message {
  text-align: center;
}

/* ------------------------------------------
   18. Footer
   ------------------------------------------ */
.footer {
  padding: var(--space-xl) 0;
  border-top: var(--border-light);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 800;
  font-size: var(--font-size-xl);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

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

.footer-copyright {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ------------------------------------------
   19. Privacy Page Styles
   ------------------------------------------ */
.privacy-page {
  padding-top: calc(64px + var(--space-2xl));
  padding-bottom: var(--space-2xl);
}

.privacy-page h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-lg);
}

.privacy-page h2 {
  font-size: var(--font-size-2xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.privacy-page p {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-sm);
  max-width: 720px;
}

.privacy-list {
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
  max-width: 720px;
}

.privacy-list li {
  list-style: disc;
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* --- Form Message States --- */
.form-message.success { color: #2e7d32; }
.form-message.error { color: #c62828; }

/* ------------------------------------------
   20. Responsive: Tablet (max-width: 768px)
   ------------------------------------------ */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-4xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  section {
    padding: var(--space-2xl) var(--space-sm);
  }

  /* Navbar mobile */
  .navbar-links {
    display: none;
  }

  .navbar-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero single column */
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .waitlist-form .form-row {
    max-width: 100%;
    flex-direction: column;
  }

  .waitlist-form-centered .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-visual {
    order: -1;
  }

  .swipe-card-image {
    height: 180px;
  }

  /* Steps column stack */
  .steps {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
  }

  .step {
    max-width: 320px;
  }

  .step-arrow {
    transform: rotate(90deg);
    margin-top: 0;
  }

  /* Features 2-col */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer column */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ------------------------------------------
   21. Responsive: Small Mobile (max-width: 480px)
   ------------------------------------------ */
@media (max-width: 480px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }

  /* Features 1-col */
  .features-grid {
    grid-template-columns: 1fr;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
