/* ─────────────────────────────────────────────────────────────
   Corvus Marketing — Nothing Design System
   Dark-first, monochrome, typography-driven.
   ───────────────────────────────────────────────────────────── */

/* ── Tokens + Base ── */
@import url("@corvus/shared/nothing-theme.css");
@import url("@corvus/shared/base.css");

/* ── Fonts (self-hosted via @fontsource) ── */
@import url("@fontsource-variable/space-grotesk");
@import url("@fontsource/space-mono/400.css");
@import url("@fontsource/space-mono/700.css");
@import url("@fontsource/doto/400.css");
@import url("@fontsource/doto/700.css");

/* ── Reset ── */

h1,
h2,
h3,
p,
ul,
dl,
dd,
dt {
  margin: 0;
}

/* ── Body ── */

body {
  background: var(--corvus-color-bg-base);
  color: var(--corvus-color-text-primary);
  font-family: var(--corvus-typography-font-body);
  line-height: 1.6;
}

/* ── Skip Link ── */

.skip-link {
  position: absolute;
  top: var(--corvus-spacing-md);
  left: var(--corvus-spacing-md);
  z-index: 10;
  padding: var(--corvus-spacing-sm) var(--corvus-spacing-md);
  border-radius: var(--corvus-radius-pill);
  background: var(--corvus-color-text-display);
  color: var(--corvus-color-bg-base);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-caption-size);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transform: translateY(-140%);
  transition: transform var(--corvus-motion-duration-micro) var(--corvus-motion-easing-default);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ── Site Backdrop — Nothing dot-grid motif ── */

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--corvus-color-bg-base);
}

.site-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    var(--corvus-color-border-default) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgb(0 0 0 / 30%), transparent 50%);
}

/* ── Shell Container ── */

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ── Topbar ── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--corvus-spacing-md);
  padding: var(--corvus-spacing-lg) 0 var(--corvus-spacing-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--corvus-spacing-sm);
  color: var(--corvus-color-text-display);
  text-decoration: none;
  font-family: var(--corvus-typography-font-display);
  font-size: 1.1rem;
  font-weight: var(--corvus-typography-weight-bold);
  letter-spacing: -0.03em;
  text-transform: none;
}

.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--corvus-spacing-xs);
}

.topbar-nav > a {
  padding: var(--corvus-spacing-sm) var(--corvus-spacing-md);
  border-radius: var(--corvus-radius-pill);
  color: var(--corvus-color-text-secondary);
  text-decoration: none;
  font-family: var(--corvus-typography-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--corvus-motion-duration-micro) var(--corvus-motion-easing-default);
}

/* ── Hero ── */

.hero {
  padding: var(--corvus-spacing-4xl) 0 var(--corvus-spacing-3xl);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: var(--corvus-spacing-lg);
  align-items: start;
}

.hero-copy {
  padding: var(--corvus-spacing-md) 0;
}

.eyebrow {
  color: var(--corvus-color-accent-default);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-label-size);
  font-weight: var(--corvus-typography-weight-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--corvus-typography-font-body);
  font-weight: var(--corvus-typography-weight-bold);
  color: var(--corvus-color-text-display);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 11ch;
  margin-top: var(--corvus-spacing-md);
  font-size: clamp(3rem, 6vw, 5.2rem);
}

.subtitle {
  max-width: 56ch;
  margin-top: var(--corvus-spacing-lg);
  color: var(--corvus-color-text-secondary);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--corvus-spacing-sm);
  margin-top: var(--corvus-spacing-xl);
}

.hero-note {
  max-width: 58ch;
  margin-top: var(--corvus-spacing-lg);
  padding-left: var(--corvus-spacing-md);
  border-left: 2px solid var(--corvus-color-accent-default);
  color: var(--corvus-color-text-secondary);
  font-size: var(--corvus-typography-scale-body-sm-size);
}

.hero-rail {
  display: grid;
  gap: var(--corvus-spacing-md);
}

/* ── Cards — shared flat surface treatment ── */

.terminal-card,
.install-card,
.feature-card,
.workflow-card,
.docs-card,
.faq-group,
.cta-band,
.stat-card {
  border: 1px solid var(--corvus-color-border-default);
  background: var(--corvus-color-bg-surface);
}

/* ── Terminal Card ── */

.terminal-card {
  border-radius: var(--corvus-radius-card-lg);
  overflow: hidden;
}

.terminal-head {
  display: grid;
  grid-template-columns: repeat(3, 0.75rem) 1fr auto;
  gap: var(--corvus-spacing-xs);
  align-items: center;
  padding: var(--corvus-spacing-md) var(--corvus-spacing-md);
  border-bottom: 1px solid var(--corvus-color-border-default);
  background: var(--corvus-color-bg-raised);
}

.terminal-head span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: var(--corvus-radius-pill);
}

.terminal-head span:nth-child(1) {
  background: var(--corvus-color-accent-default);
}

.terminal-head span:nth-child(2) {
  background: var(--corvus-color-status-warning);
}

.terminal-head span:nth-child(3) {
  background: var(--corvus-color-status-success);
}

.terminal-head p {
  margin-left: var(--corvus-spacing-xs);
  color: var(--corvus-color-text-secondary);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-caption-size);
}

.copy-button {
  border: 1px solid var(--corvus-color-border-visible);
  border-radius: var(--corvus-radius-pill);
  background: transparent;
  color: var(--corvus-color-text-primary);
  padding: var(--corvus-spacing-xs) var(--corvus-spacing-md);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-label-size);
  font-weight: var(--corvus-typography-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    border-color var(--corvus-motion-duration-micro) var(--corvus-motion-easing-default),
    color var(--corvus-motion-duration-micro) var(--corvus-motion-easing-default);
}

.copy-button:hover {
  border-color: var(--corvus-color-text-secondary);
  color: var(--corvus-color-text-display);
}

.copy-button.is-copied {
  border-color: var(--corvus-color-status-success);
  color: var(--corvus-color-status-success);
}

.command-block,
.code-block {
  overflow-x: hidden;
  padding: var(--corvus-spacing-md);
  border-radius: var(--corvus-radius-card);
  background: var(--corvus-color-bg-base);
  color: var(--corvus-color-text-primary);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-body-sm-size);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.command-block code,
.code-block code {
  display: block;
  white-space: inherit;
}

.terminal-card .command-block {
  margin: var(--corvus-spacing-md);
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--corvus-spacing-md);
  padding: 0 var(--corvus-spacing-md) var(--corvus-spacing-md);
}

/* ── Links (inline, terminal, faq, footer) ── */

.terminal-actions a,
.inline-link,
.faq-list a,
.footer-links a {
  color: var(--corvus-color-interactive-default);
  text-decoration: none;
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-caption-size);
  font-weight: var(--corvus-typography-weight-bold);
  letter-spacing: 0.02em;
}

.terminal-actions a:hover,
.inline-link:hover,
.faq-list a:hover,
.footer-links a:hover {
  color: var(--corvus-color-text-display);
}

.topbar-nav > a:not(.btn):hover {
  color: var(--corvus-color-text-display);
}

/* ── Pill Row ── */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--corvus-spacing-xs);
  padding: 0 var(--corvus-spacing-md) var(--corvus-spacing-md);
  list-style: none;
}

.pill-row li {
  padding: var(--corvus-spacing-xs) var(--corvus-spacing-sm);
  border: 1px solid var(--corvus-color-border-visible);
  border-radius: var(--corvus-radius-pill);
  color: var(--corvus-color-text-secondary);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-label-size);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Stats Grid ── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--corvus-spacing-sm);
}

.stat-card {
  border-radius: var(--corvus-radius-card-lg);
  padding: var(--corvus-spacing-md);
}

.stat-card dt {
  color: var(--corvus-color-text-secondary);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-label-size);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card dd {
  margin-top: var(--corvus-spacing-xs);
  color: var(--corvus-color-text-display);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-heading-size);
  font-weight: var(--corvus-typography-weight-bold);
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--corvus-spacing-sm) var(--corvus-spacing-lg);
  border: 1px solid transparent;
  border-radius: var(--corvus-radius-pill);
  font-family: var(--corvus-typography-font-mono);
  font-size: 13px;
  font-weight: var(--corvus-typography-weight-regular);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color var(--corvus-motion-duration-default) var(--corvus-motion-easing-default),
    background-color var(--corvus-motion-duration-default) var(--corvus-motion-easing-default),
    color var(--corvus-motion-duration-default) var(--corvus-motion-easing-default);
}

.btn-primary {
  background: var(--corvus-color-text-display);
  color: var(--corvus-color-bg-base);
}

.btn-primary:hover {
  background: var(--corvus-color-text-primary);
}

.topbar-nav > a.btn-primary {
  color: var(--corvus-color-bg-base);
}

.btn-ghost {
  border-color: var(--corvus-color-border-visible);
  background: transparent;
  color: var(--corvus-color-text-secondary);
}

.btn-ghost:hover {
  border-color: var(--corvus-color-text-secondary);
  color: var(--corvus-color-text-display);
}

/* ── Sections ── */

.section {
  position: relative;
  padding: var(--corvus-spacing-4xl) 0;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--corvus-color-border-default);
}

.section-head {
  margin-bottom: var(--corvus-spacing-xl);
}

.section-head h2 {
  max-width: 16ch;
  margin-top: var(--corvus-spacing-sm);
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.section-copy {
  max-width: 60ch;
  margin-top: var(--corvus-spacing-md);
  color: var(--corvus-color-text-secondary);
}

/* ── Grids ── */

.install-grid,
.feature-grid,
.workflow-grid,
.docs-grid,
.faq-grid {
  display: grid;
  gap: var(--corvus-spacing-md);
}

.install-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-grid,
.docs-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ── Cards ── */

.install-card,
.feature-card,
.workflow-card,
.docs-card,
.faq-group {
  border-radius: var(--corvus-radius-card-lg);
  padding: var(--corvus-spacing-lg);
}

.card-kicker,
.step-number {
  color: var(--corvus-color-accent-default);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-label-size);
  font-weight: var(--corvus-typography-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-copy,
.feature-card p,
.workflow-card p,
.docs-card p {
  margin-top: var(--corvus-spacing-sm);
  color: var(--corvus-color-text-secondary);
}

.install-card {
  display: grid;
  gap: var(--corvus-spacing-md);
  align-content: start;
}

.command-list {
  display: grid;
  gap: var(--corvus-spacing-sm);
  padding: 0;
  list-style: none;
}

.command-list li {
  padding: var(--corvus-spacing-sm) var(--corvus-spacing-md);
  border-radius: var(--corvus-radius-card);
  background: var(--corvus-color-bg-base);
  border: 1px solid var(--corvus-color-border-default);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-body-sm-size);
}

.feature-card h3,
.workflow-card h3,
.docs-card h3,
.faq-group h3 {
  font-size: var(--corvus-typography-scale-heading-size);
}

.workflow-card,
.docs-card {
  min-height: 100%;
}

.workflow-card h3,
.docs-card h3 {
  margin-top: var(--corvus-spacing-sm);
}

/* ── FAQ ── */

.faq-group h3 {
  margin-bottom: var(--corvus-spacing-md);
}

.faq-list {
  display: grid;
  gap: var(--corvus-spacing-sm);
}

.faq-list details {
  border: 1px solid var(--corvus-color-border-default);
  border-radius: var(--corvus-radius-card);
  background: var(--corvus-color-bg-surface);
}

.faq-list details[open] {
  border-color: var(--corvus-color-border-visible);
}

.faq-list summary {
  display: flex;
  align-items: center;
  gap: var(--corvus-spacing-sm);
  padding: var(--corvus-spacing-md);
  color: var(--corvus-color-text-primary);
  cursor: pointer;
  font-weight: var(--corvus-typography-weight-medium);
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  border-radius: var(--corvus-radius-pill);
  border: 1px solid var(--corvus-color-border-visible);
  color: var(--corvus-color-text-secondary);
  font-family: var(--corvus-typography-font-mono);
  font-weight: var(--corvus-typography-weight-bold);
  font-size: var(--corvus-typography-scale-body-sm-size);
}

.faq-list details[open] summary::before {
  content: "−";
  border-color: var(--corvus-color-accent-default);
  color: var(--corvus-color-accent-default);
}

.faq-list details > :not(summary) {
  padding: 0 var(--corvus-spacing-md) var(--corvus-spacing-md);
}

.faq-list ul {
  padding-left: var(--corvus-spacing-md);
  color: var(--corvus-color-text-secondary);
}

.faq-list li + li {
  margin-top: var(--corvus-spacing-xs);
}

/* ── CTA Band ── */

.cta-band {
  overflow: hidden;
  border-radius: var(--corvus-radius-card-lg);
  padding: var(--corvus-spacing-2xl);
}

.cta-band h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 3rem);
}

.cta-band p {
  max-width: 58ch;
  margin-top: var(--corvus-spacing-md);
  color: var(--corvus-color-text-secondary);
}

/* ── Footer ── */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--corvus-spacing-md);
  padding: var(--corvus-spacing-xl) 0 var(--corvus-spacing-3xl);
  color: var(--corvus-color-text-secondary);
  font-family: var(--corvus-typography-font-mono);
  font-size: var(--corvus-typography-scale-caption-size);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--corvus-spacing-md);
}

/* ── Focus ── */

:focus-visible {
  outline: 2px solid var(--corvus-color-text-primary);
  outline-offset: 3px;
}

/* ── Motion — reduced-motion safe ── */

@media (prefers-reduced-motion: no-preference) {
  .terminal-card,
  .install-card,
  .feature-card,
  .workflow-card,
  .docs-card,
  .faq-group,
  .stat-card,
  .cta-band {
    transition: border-color var(--corvus-motion-duration-default)
      var(--corvus-motion-easing-default);
  }

  .install-card:hover,
  .terminal-card:hover,
  .feature-card:hover,
  .workflow-card:hover,
  .docs-card:hover,
  .faq-group:hover,
  .stat-card:hover,
  .cta-band:hover {
    border-color: var(--corvus-color-border-visible);
  }

  .copy-button.is-copied {
    animation: copy-pop 320ms ease;
  }
}

@keyframes copy-pop {
  0% {
    transform: scale(0.96);
  }

  60% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

/* ── Responsive: ≤ 960px ── */

@media (width <= 960px) {
  .shell {
    width: min(1120px, calc(100% - 1.25rem));
  }

  .topbar,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-nav,
  .hero-actions {
    width: 100%;
  }

  .hero-grid,
  .install-grid,
  .feature-grid,
  .workflow-grid,
  .docs-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .btn {
    width: 100%;
  }
}

/* ── Responsive: ≤ 640px ── */

@media (width <= 640px) {
  .hero {
    padding-top: var(--corvus-spacing-3xl);
  }

  .hero h1,
  .section-head h2,
  .cta-band h2 {
    max-width: none;
  }

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

  .cta-band {
    padding: var(--corvus-spacing-lg);
  }

  .command-block,
  .code-block {
    padding: var(--corvus-spacing-sm) var(--corvus-spacing-md);
    font-size: var(--corvus-typography-scale-caption-size);
  }
}
