/* Landing-page composition. Shared colors, type, and controls: /shared/theme.css. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
}

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

.site-shell {
  position: relative;
  min-height: 100vh;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ambient::before,
.ambient::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.28;
  animation: drift 20s ease-in-out infinite alternate;
}

.ambient::before {
  top: 2rem;
  right: -8rem;
  width: 28rem;
  height: 28rem;
  background: rgba(59, 130, 246, 0.08);
}

.ambient::after {
  bottom: 10rem;
  left: -8rem;
  width: 24rem;
  height: 24rem;
  background: rgba(99, 102, 241, 0.06);
  animation-duration: 24s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -20px, 0) scale(1.06); }
}

/* ── Layout ── */
.wrap {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line-subtle);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.header-links a { transition: color 150ms ease; }
.header-links a:not(.button-primary):hover { color: var(--text); }

.header-links .launch-link {
  min-height: 0;
  width: auto;
  padding: 0.55rem 1rem;
  font-size: inherit;
  white-space: nowrap;
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5.5rem 0 5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
}

h1, h2, h3 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
}

.hero-lede {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero .action-row {
  justify-content: center;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.25rem;
  font-size: 0.92rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

/* ── Feature cards ── */
.hero-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 760px;
  margin-top: 3.5rem;
}

.feature-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  text-align: left;
}

.feature-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.feature-card-header svg {
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.8;
}

.feature-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-card-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0 0 0.65rem;
}

.feature-card-preview {
  padding: 0.6rem 0.7rem;
  border-radius: 0.5rem;
  background: rgba(5, 7, 10, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-code);
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--muted);
  white-space: pre;
  overflow-x: auto;
}

.feature-card-preview .hl {
  color: var(--accent);
}

.feature-card-preview .tx {
  color: var(--text);
  opacity: 0.85;
}

/* ── Sections ── */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
}

.section-header {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: end;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.section-header h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
}

.section-copy {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.section-copy p,
.cta-copy p { margin: 0; }

/* ── Workflow ── */
.workflow-list {
  margin-top: 1.5rem;
}

.workflow-step {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.step-number {
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  opacity: 0.8;
}

.step-label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.15;
}

.step-copy {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── Detail grid ── */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.detail-panel,
.command-panel {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--panel);
}

.detail-panel h3,
.command-panel h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.detail-panel p,
.command-panel p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin: 0;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.detail-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.command-block {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 0.7rem;
  background: rgba(5, 7, 10, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #d0d6de;
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.65;
}

/* ── FAQ ── */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.faq-item {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--panel);
}

.faq-item h3 {
  font-size: 1.2rem;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

/* ── CTA ── */
.final-cta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--line);
}

.cta-copy h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.cta-copy p {
  max-width: 32rem;
  margin-top: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

.footer-brand .brand {
  font-size: 0.9rem;
}

.footer-brand .brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.4rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  opacity: 0.6;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 650ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0ms);
}

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

/* ── Light mode details ── */
html:not(.dark) .ambient::before { background: rgba(59, 130, 246, 0.04); }
html:not(.dark) .ambient::after { background: rgba(99, 102, 241, 0.03); }

html:not(.dark) .feature-card-preview,
html:not(.dark) .command-block {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #4b5563;
}

html:not(.dark) .feature-card-preview .tx { color: var(--text); }

html:not(.dark) .detail-list li {
  border-top-color: #f3f4f6;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .section-header,
  .detail-grid,
  .final-cta {
    grid-template-columns: 1fr;
  }

  .hero-features {
    max-width: 480px;
  }

  .workflow-step {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(1140px, calc(100% - 1.4rem));
  }

  .site-header-inner {
    padding: 0.75rem 0;
  }

  .header-links a:not(.launch-link) { display: none; }

  h1 { font-size: clamp(2.6rem, 12vw, 3.8rem); }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero-features {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

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

  .final-cta .action-row {
    justify-content: center;
  }

  .button-primary,
  .button-secondary {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient::before, .ambient::after { animation: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .button-primary, .button-secondary {
    transition: none;
  }
  .button-primary:hover, .button-secondary:hover {
    transform: none;
  }
}
