/* ─────────────────────────────────────────────────────────────────
   home.css — homepage layout.

   A single dark, normally-scrolling page: full-height hero with the
   edge-network canvas, a 3-pillar "why" section, the grid-aware
   pricing tiers, and a closing CTA band. Shared primitives (buttons,
   tags, headings, points) come from base.css; sections carry
   .theme-deep so those primitives pick their dark variants.
   ─────────────────────────────────────────────────────────── */

/* base.css locks scrolling for the snap-container pages; the homepage
   scrolls normally, so restore document flow here. */
html, body {
  height: auto;
  overflow: visible;
}
html { scroll-behavior: smooth; }

body {
  background: var(--dark-body);
}

/* ─── Scroll reveal ──────────────────────────────────────────────
   Elements tagged .reveal fade/slide in when scrolled into view
   (home-animations.js adds .in). Pre-hide only applies when JS is
   running (html.js), so content is never stuck hidden. */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.9, 0.3, 1);
}
html.js .reveal.in {
  opacity: 1;
  transform: none;
}
/* Gentle stagger inside card grids. */
html.js .pillar-grid .reveal:nth-child(2),
html.js .price-grid  .reveal:nth-child(2) { transition-delay: 0.1s; }
html.js .pillar-grid .reveal:nth-child(3),
html.js .price-grid  .reveal:nth-child(3) { transition-delay: 0.2s; }
html.js .pillar-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 40px) 80px 80px;
  overflow: hidden;
  background: var(--dark-body);
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 18% 30%, rgba(16, 185, 129, 0.10), transparent 70%),
    radial-gradient(ellipse 50% 45% at 85% 75%, rgba(59, 130, 246, 0.09), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 26px;
}
.hero-kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-light);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.9);
}

.hero-h1 {
  margin-bottom: 26px;
}

.hero-sub {
  font-size: 19px;
  line-height: 1.65;
  color: var(--text-on-dark-muted);
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-btns {
  justify-content: flex-start;
  margin-bottom: 72px;
}

/* Key-fact strip — quiet, mono-spaced, vast.ai-style. */
.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 54px;
  list-style: none;
  padding: 26px 0 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-strip li {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: var(--text-on-dark-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-strip li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.85;
}

/* ─── Content blocks ─────────────────────────────────────────── */
.block {
  padding: 110px 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--dark-body);
}

.block-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.block-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.block-head .section-desc { margin-bottom: 0; }

/* ─── Pillars ────────────────────────────────────────────────── */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pillar {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-on-dark);
  border-radius: calc(var(--radius) + 4px);
  padding: 30px 26px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.pillar:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.32);
  background: rgba(16, 185, 129, 0.03);
}

.pillar-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--primary-light);
  margin-bottom: 22px;
}

.pillar h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-on-dark);
  margin-bottom: 12px;
}

.pillar p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-on-dark-muted);
}

/* ─── FAQ ────────────────────────────────────────────────────── */
.block-inner--narrow {
  max-width: 760px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: rgba(16, 185, 129, 0.3); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-on-dark);
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: var(--primary-light);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 22px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-on-dark-muted);
}
.faq-item a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Pricing ────────────────────────────────────────────────── */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-on-dark);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.price-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.32);
  background: rgba(16, 185, 129, 0.03);
}
.price-card--featured {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.045);
}
.price-card--featured::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-brand);
  opacity: 0.9;
}

.price-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-tier {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-on-dark);
}

.price-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-on-dark-muted);
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
  padding: 4px 10px;
}
.price-badge--save {
  color: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.10);
}

.price-amount {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1.2px;
  line-height: 1;
  color: var(--text-on-dark);
}
.price-unit {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-on-dark-muted);
  margin-left: 4px;
}

.price-gpu {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--cyan);
}

.price-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

.price-card .points { margin-top: 2px; gap: 9px; }
.price-card .point  { font-size: 12.5px; }

.price-cta {
  margin-top: auto;
  padding-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
}
.price-cta:hover { gap: 13px; color: #fff; }

/* Metering strip */
.price-strip {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 26px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 14px 24px;
  font-size: 13px;
  color: var(--text-on-dark-muted);
}
.price-strip strong {
  color: var(--text-on-dark-soft);
  font-weight: 600;
}
.price-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.price-strip iconify-icon { color: var(--primary-light); font-size: 15px; }

.price-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-on-dark-faint);
}
.price-foot a {
  color: var(--text-on-dark-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.price-foot a:hover { color: var(--primary-light); }

/* ─── Closing CTA band ───────────────────────────────────────── */
.cta-band {
  padding: 130px 80px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background:
    radial-gradient(ellipse 55% 65% at 50% 100%, rgba(16, 185, 129, 0.10), transparent 72%),
    var(--dark-body);
}

.cta-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-on-dark-muted);
  max-width: 480px;
  margin: 0 auto 36px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; gap: 14px; }
  .price-card { padding: 24px 22px 20px; }
}

@media (max-width: 640px) {
  .pillar-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 900px) {
  .hero {
    padding: calc(var(--nav-height-mobile) + 48px) 24px 56px;
    min-height: auto;
  }
  .hero-btns { margin-bottom: 48px; }
  .hero-strip { gap: 12px 32px; }
  .hero-sub { font-size: 17px; }

  .block { padding: 72px 24px; }
  .block-head { margin-bottom: 36px; }
  .cta-band { padding: 90px 24px; }
}

@media (max-width: 420px) {
  .hero { padding-left: 16px; padding-right: 16px; }
  .block { padding-left: 16px; padding-right: 16px; }
  .cta-band { padding-left: 16px; padding-right: 16px; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
}
