/* ===========================================
   FLUENT MATES - Styles
   =========================================== */

/* -------------------------------------------
   1. CSS Custom Properties
   ------------------------------------------- */

:root {
  color-scheme: dark light;

  /* Colors - Dark mode defaults */
  --color-primary: #f4a261;
  --color-accent: #e76f51;
  --color-text: #f8f9fa;
  --color-muted: #adb5bd;
  --color-bg: #1a1a1a;
  --color-surface: #222;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --line-height: 1.6;
  --max-width: 70ch;
}

@media (prefers-color-scheme: light) {
  :root {
    --color-text: #1a1a1a;
    --color-muted: #666;
    --color-bg: #fefefe;
    --color-surface: #f5f5f5;
  }
}

/* -------------------------------------------
   1b. Keyframe Animations
   ------------------------------------------- */

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* -------------------------------------------
   2. Reset / Base Styles
   ------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  opacity: 0;
  transition: opacity 0.2s;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* -------------------------------------------
   3. Typography
   ------------------------------------------- */

h1, h2, h3 {
  margin: 0 0 var(--space-sm);
  line-height: 1.2;
  font-weight: 600;
}

h2 {
  margin: 0 0 var(--space-md);
}

.text-center + .features-grid,
.text-center + .pricing-grid,
.text-center + .steps {
  margin-top: var(--space-lg);
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 var(--space-sm);
}

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

/* -------------------------------------------
   4. Layout Utilities
   ------------------------------------------- */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.section {
  padding: var(--space-lg) 0;
}

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

/* -------------------------------------------
   5. Components
   ------------------------------------------- */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: opacity 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  opacity: 0.85;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: #d35f43;
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid transparent;
}

.btn-secondary:hover {
  border-color: var(--color-muted);
}

/* App Store Badge */
.app-store-badge {
  display: inline-block;
  margin-top: var(--space-sm);
  transition: opacity 0.15s ease;
}

.app-store-badge:hover {
  opacity: 0.85;
}

.app-store-badge img {
  height: 64px;
  width: auto;
}

/* Cards */
.card {
  background-color: var(--color-surface);
  padding: var(--space-md);
  border-radius: 0.75rem;
}


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

.card p:last-child {
  margin-bottom: 0;
}

/* Feature Grid */
.features-grid {
  display: grid;
  gap: var(--space-sm);
}

.features-grid .card {
  padding: 1.25rem 1.5rem;
}

.features-grid .card h3 {
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Steps */
.steps {
  display: grid;
  gap: var(--space-md);
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 var(--space-sm);
  align-items: start;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  grid-row: 1 / 3;
  background-color: var(--color-primary);
  color: var(--color-bg);
  font-weight: 600;
  border-radius: 50%;
}

.step h3 {
  margin-bottom: 0.25rem;
  align-self: end;
}

.step p {
  margin: 0;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pricing Cards */
.pricing-grid {
  display: grid;
  gap: var(--space-sm);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
  }
}

.pricing-card {
  background-color: var(--color-surface);
  padding: var(--space-md);
  border-radius: 1rem;
  text-align: center;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pricing-card h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.pricing-card.featured {
  border-color: var(--color-primary);
}

.pricing-card.featured h3 {
  color: var(--color-primary);
}

.price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  line-height: 1.1;
}

.price span:last-child {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-muted);
}

.pricing-card .text-muted {
  font-size: 0.875rem;
  margin: 0;
}

/* Premium Features */
.premium-features {
  display: grid;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .premium-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

.premium-feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.premium-feature h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.premium-feature h3::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: 700;
}

.verified-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: #1d9bf0;
}

.premium-feature p {
  margin: 0;
  color: var(--color-muted);
}

.premium-page .section {
  padding: var(--space-md) 0;
}

.premium-page .hero-small + .section {
  padding-top: var(--space-lg);
}

/* -------------------------------------------
   6. Page-Specific Sections
   ------------------------------------------- */

/* Header */
.site-header {
  padding: var(--space-sm) 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.brand:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-muted);
  font-size: 0.9375rem;
}

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

.nav-links .nav-premium {
  background: linear-gradient(60deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82);
  background-size: 300% 300%;
  animation: gradient-shift 6s ease infinite alternate;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
}

.nav-links .nav-premium:hover {
  text-decoration: none;
  color: #fff;
  opacity: 0.9;
}

/* Hero */
.hero {
  padding: var(--space-xl) 0;
  text-align: center;
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('/assets/bg.jpg') center/cover no-repeat;
  color: #fff;
}

.hero h1 {
  margin: 0 auto var(--space-sm);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero h1 span {
  white-space: nowrap;
}

.hero .lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: var(--max-width);
  margin: 0 auto var(--space-md);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.hero-cta .text-muted {
  font-size: 0.875rem;
}

/* GitHub Link */
.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid var(--color-muted);
  border-radius: 0.5rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.github-link:hover {
  text-decoration: none;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.github-link svg {
  flex-shrink: 0;
}

.hero-cta .btn,
.hero-cta .github-link {
  min-width: 200px;
  text-align: center;
}

@media (max-width: 480px) {
  .hero-cta .btn,
  .hero-cta .github-link {
    width: 100%;
    min-width: 0;
  }
}

.hero .github-link {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.hero .github-link:hover {
  color: #fff;
  border-color: #fff;
}

/* Hero Small (for secondary pages) */
.hero-small {
  padding: var(--space-lg) 0 0;
  text-align: center;
}

.hero-small + .section {
  padding-top: var(--space-sm);
}

.hero-small h1 {
  margin-bottom: var(--space-xs);
}

.hero-small .lead {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Features Section */
.features {
  background-color: var(--color-surface);
}

/* CTA Section */
.cta-section.section {
  text-align: center;
  padding: var(--space-md) 0;
}

.cta-section h2 {
  margin-bottom: var(--space-xs);
}

.cta-section .lead {
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

/* Legal Content */
.legal-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.legal-content h2 {
  margin-top: var(--space-md);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content ul {
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
}

.legal-content li {
  margin-bottom: var(--space-xs);
}

/* Footer */
.site-footer {
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  list-style: none;
  margin: 0 0 var(--space-sm);
  padding: 0;
}

.site-footer a {
  color: var(--color-muted);
}

.site-footer a:hover {
  color: var(--color-primary);
}

/* -------------------------------------------
   7. Responsive Adjustments
   ------------------------------------------- */

@media (min-width: 768px) {
  h2 {
    font-size: 2rem;
  }

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

  .section {
    padding: var(--space-xl) 0;
  }

  .hero {
    padding: var(--space-xl) 0 calc(var(--space-xl) * 1.5);
    text-align: left;
  }

  .hero h1 {
    margin: 0 0 var(--space-sm);
  }

  .hero .lead {
    margin: 0 0 var(--space-md);
  }

  .hero-cta {
    align-items: flex-start;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3.5rem;
  }
}
