/* ==========================================================================
   Landing Page Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: calc(var(--space-3xl) + 2rem) 0 var(--space-3xl);
  overflow: hidden;
}

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

/* Differentiated from the feature checkmark green (UI-review #41):
   uses primary-blue to separate the "Powered by" badge from the
   pricing-card check marks. Still WCAG AA. */
.hero-badge {
  display: inline-block;
  padding: 0.25rem 0.875rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

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

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 520px;
  margin-bottom: var(--space-xl);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

/* Secondary CTA as a text link with arrow, not a second button (UI-review
   #13). Demotes it visually so "Get Started Free" is the clear primary. */
.hero-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  color: var(--color-primary);
  padding: var(--space-sm) 0;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.hero-secondary-link:hover {
  color: var(--color-primary-hover);
  gap: var(--space-sm);
}

.hero-secondary-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.hero-fineprint {
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Hero mockup — pure CSS Minecraft map preview */
.hero-mockup {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.mockup-browser-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}

.mockup-browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.mockup-map {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #1a1a2e;
  overflow: hidden;
}

.mockup-map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  gap: 1px;
}

.map-tile {
  transition: opacity 0.5s ease;
}

.map-tile.t1 { background: linear-gradient(135deg, #2d5016, #3a6b1e); }
.map-tile.t2 { background: linear-gradient(135deg, #3a6b1e, #4a8528); }
.map-tile.t3 { background: linear-gradient(135deg, #4a8528, #5b8731); }
.map-tile.t4 { background: linear-gradient(135deg, #5b6b3a, #6b7f3e); }
.map-tile.t5 { background: linear-gradient(135deg, #3a6b4a, #4a8560); opacity: 0.9; }
.map-tile.t6 { background: linear-gradient(135deg, #4a8528, #6b9f3e); }
.map-tile.t7 { background: linear-gradient(135deg, #3b5998, #4a70b5); }
.map-tile.t8 { background: linear-gradient(135deg, #5b8731, #7aa648); }
.map-tile.t9 { background: linear-gradient(135deg, #6b7f3e, #8ba050); }

.mockup-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mockup-zoom span {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Section Shared
   -------------------------------------------------------------------------- */
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: var(--space-sm) auto var(--space-2xl);
}

.section-alt {
  background: var(--color-surface);
}

/* --------------------------------------------------------------------------
   How It Works — Steps
   -------------------------------------------------------------------------- */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

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

.step-icon {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: center;
}

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

.step p {
  font-size: var(--text-sm);
}

.step-connector {
  display: flex;
  /* Align arrow with the centre of each step's icon row (step-number
     badge + icon), rather than the step card's full height (UI-review #30).
     Centring on the parent achieves this without hardcoded offsets. */
  align-items: center;
  align-self: center;
}

/* Hide connectors on mobile — they rotate sideways and look cramped
   between stacked steps. Visual order is clear enough from the numbered
   badges alone. */
@media (max-width: 768px) {
  .step-connector { display: none; }
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  /* 3 cards: free, basic, premium. `auto-fit` + minmax keeps the layout
     healthy at narrow widths: 3 cols desktop, 2 cols tablet, 1 col phone
     without additional media queries. */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: 1080px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-primary);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 1rem;
  font-size: var(--text-xs);
  font-weight: 700;
  color: white;
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

.pricing-tier {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.pricing-price {
  margin-bottom: var(--space-xl);
}

.price-amount {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.price-period {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.pricing-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: var(--space-xl);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta-section {
  padding: var(--space-3xl) 0;
}

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

.cta-section .section-subtitle {
  margin-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-2xl) 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: var(--space-3xl);
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.footer-brand p {
  margin-top: var(--space-sm);
  max-width: 280px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-xl);
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-heading {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.footer-column a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

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

/* Legacy selector kept for any leftover markup that may still use it. */
.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

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

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle { margin: 0 auto var(--space-xl); }
  .hero-actions { justify-content: center; }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  /* Hero CTAs stack full-width on mobile so they're tap-friendly and
     visually balanced (UI-review #38). */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-secondary-link {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  padding: var(--space-sm) 0;
  list-style: none;
  position: relative;
  padding-right: var(--space-2xl);
}

/* Hide the default disclosure triangle so we can draw our own. */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }

.faq-item summary::after {
  content: '';
  position: absolute;
  right: var(--space-xs);
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: translateY(-75%) rotate(45deg);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.faq-item p {
  margin-top: var(--space-sm);
  padding-bottom: var(--space-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.faq-item code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-border-light);
  padding: 0 var(--space-xs);
  border-radius: var(--radius-sm);
}
