/* ============================================================
   site.css — AI MPA Landing CSS Foundation
   3 themes: space / tech / city
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES — THEMES
   ============================================================ */

:root,
[data-theme="space"] {
  --bg-primary:   #0d0221;
  --bg-secondary: #1a0533;
  --accent-1:     #ff00ff;
  --accent-2:     #cc00ff;
  --accent-glow:  rgba(255, 0, 255, 0.3);
  --text-primary: #f0e6ff;
  --text-muted:   #9b8aaa;
  --border:       rgba(255, 0, 255, 0.2);
  --card-bg:      rgba(26, 5, 51, 0.8);
  --nav-bg:       rgba(13, 2, 33, 0.95);
}

[data-theme="tech"] {
  --bg-primary:   #001a2e;
  --bg-secondary: #002d4a;
  --accent-1:     #00d4ff;
  --accent-2:     #00ff9f;
  --accent-glow:  rgba(0, 212, 255, 0.3);
  --text-primary: #e0f4ff;
  --text-muted:   #7ab8cc;
  --border:       rgba(0, 212, 255, 0.2);
  --card-bg:      rgba(0, 45, 74, 0.8);
  --nav-bg:       rgba(0, 26, 46, 0.95);
}

[data-theme="city"] {
  --bg-primary:   #0f0a00;
  --bg-secondary: #1a1000;
  --accent-1:     #ff9900;
  --accent-2:     #ff6600;
  --accent-glow:  rgba(255, 153, 0, 0.3);
  --text-primary: #fff3e0;
  --text-muted:   #cc9966;
  --border:       rgba(255, 153, 0, 0.2);
  --card-bg:      rgba(26, 16, 0, 0.8);
  --nav-bg:       rgba(15, 10, 0, 0.95);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
  line-height: 1.6;
}

a {
  color: var(--accent-1);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

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

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ============================================================
   4. LAYOUT
   ============================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.nav__logo {
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.2s ease;
  text-decoration: none;
  font-size: 1.1rem;
}

.nav__logo:hover {
  color: var(--accent-1);
  opacity: 1;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
  text-decoration: none;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent-1);
  opacity: 1;
}

/* Theme switcher */

.theme-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
}

.theme-btn:hover {
  transform: scale(1.2);
}

.theme-btn.active {
  border-color: var(--text-primary);
}

.theme-btn--space {
  background: #ff00ff;
}

.theme-btn--tech {
  background: #00d4ff;
}

.theme-btn--city {
  background: #ff9900;
}

/* Burger menu */

.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile nav */

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem;
  gap: 1rem;
  border-top: 1px solid var(--border);
}

.nav__mobile.is-open {
  display: flex;
}

.nav__mobile a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav__mobile a:hover {
  color: var(--accent-1);
  opacity: 1;
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .burger {
    display: flex;
  }
}

/* ============================================================
   6. FOOTER
   ============================================================ */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

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

/* ============================================================
   7. HERO
   ============================================================ */

.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin: 1rem 0 2rem;
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================================
   8. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--primary:hover {
  box-shadow: 0 8px 30px var(--accent-glow);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--accent-1);
  border: 2px solid var(--accent-1);
}

.btn--outline:hover {
  background: var(--accent-glow);
  color: var(--accent-1);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   9. CARDS
   ============================================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-1);
  box-shadow: 0 8px 40px var(--accent-glow);
}

.card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.card__list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.card__list li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

.card__list li:last-child {
  border-bottom: none;
}

.card__badge {
  display: inline-block;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.2rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent-1);
  border: 1px solid var(--border);
}

/* ============================================================
   10. SECTION HEADERS
   ============================================================ */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   11. FEATURE LIST
   ============================================================ */

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-list li::before {
  content: attr(data-icon);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* ============================================================
   12. STEPS
   ============================================================ */

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.step__content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.step__content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================================
   13. COMPARE TABLE
   ============================================================ */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
}

.compare-table th {
  background: var(--bg-secondary);
  color: var(--accent-1);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.compare-table td {
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table td:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .compare-table th,
  .compare-table td {
    font-size: 0.82rem;
    padding: 0.65rem 0.75rem;
  }
}

/* ============================================================
   14. CODE BLOCKS
   ============================================================ */

.code-block {
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.code-block__header {
  background: var(--bg-secondary);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Fira Code', 'Courier New', monospace;
  border-bottom: 1px solid var(--border);
}

.code-block pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #e2e8f0;
}

/* ============================================================
   15. ROUTING TREE
   ============================================================ */

.routing-tree {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--text-muted);
  overflow-x: auto;
}

.routing-tree .highlight {
  color: var(--accent-1);
  font-weight: 600;
}

/* ============================================================
   16. OFFER SECTION
   ============================================================ */

.offer {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
}

.offer h2 {
  margin-bottom: 0.75rem;
}

.offer p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ============================================================
   17. MODEL TAGS
   ============================================================ */

.model-category {
  margin-bottom: 2.5rem;
}

.model-category h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.model-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.model-tag {
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease;
  cursor: default;
}

.model-tag:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* ============================================================
   18. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }

  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .offer {
    padding: 2rem 1.25rem;
  }

  .step {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .cards {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   19. UTILITIES
   ============================================================ */

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }
