/* Aether Data Collective — theme styles
   Clean · modern · minimal · subtle futurist
*/

:root {
  --bg: #0b0d10;
  --bg-elevated: #12151a;
  --bg-card: #151920;
  --bg-soft: #1a1f28;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaed;
  --text-muted: #9aa3b2;
  --text-faint: #6b7380;
  --accent: #3ddecb;
  --accent-dim: rgba(61, 222, 203, 0.12);
  --accent-strong: #2bc4b2;
  --warn: #f0c674;
  --danger: #f07178;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 222, 203, 0.08), transparent 55%),
    radial-gradient(ellipse 40% 30% at 100% 0%, rgba(80, 120, 255, 0.05), transparent 50%);
  z-index: 0;
}

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

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

a:hover {
  color: #7aefe0;
}

p {
  margin: 0 0 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.15rem; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Layout */
.site {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding-bottom: 4rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: 4rem 0;
}

.section--tight {
  padding: 2.5rem 0;
}

.section__eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section__lead {
  color: var(--text-muted);
  max-width: 42rem;
  font-size: 1.05rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 13, 16, 0.82);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-brand:hover {
  color: var(--text);
}

.site-brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #3d7bde);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: #061014;
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-brand__text small {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: var(--text);
  background: var(--bg-soft);
}

.header-cta {
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  line-height: 1.2;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #061014;
}

.btn--primary:hover {
  background: var(--accent-strong);
  color: #061014;
}

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

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero__meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hero-card__badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.hero-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.hero-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-card__price {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  margin: 1rem 0;
}

.hero-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card__badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.card__badge--accent {
  color: var(--accent);
  border-color: rgba(61, 222, 203, 0.35);
  background: var(--accent-dim);
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card h3 a {
  color: var(--text);
}

.card h3 a:hover {
  color: var(--accent);
}

.card__excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

.card__price {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Feature / explain blocks */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.feature__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 0.85rem;
}

.feature h3 {
  font-size: 1.05rem;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* x402 panel */
.x402-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
}

.x402-panel__code {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  color: var(--text-muted);
  overflow-x: auto;
}

.x402-panel__code .k { color: var(--accent); }
.x402-panel__code .s { color: var(--warn); }
.x402-panel__code .n { color: #82aaff; }

/* Product detail */
.product-hero {
  padding: 3rem 0 1.5rem;
}

.product-hero__layout {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.product-buy {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.includes-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.includes-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.4rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.includes-list li:last-child {
  border-bottom: 0;
}

.includes-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

/* Signals */
.signal-list {
  padding-left: 1.2rem;
}

.signal-list li {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.signal-list strong {
  color: var(--text);
}

.signal-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.access-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.access-pill--free {
  color: var(--accent);
  border-color: rgba(61, 222, 203, 0.3);
}

.access-pill--paid {
  color: var(--warn);
  border-color: rgba(240, 198, 116, 0.35);
}

/* x402 CTA widget */
.x402-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.x402-cta__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.x402-cta__protocol {
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.x402-cta__price {
  color: var(--text-muted);
}

.x402-cta__hint {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin: 0;
}

.x402-gate {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px dashed rgba(61, 222, 203, 0.35);
  border-radius: var(--radius);
  background: var(--accent-dim);
}

.x402-gate h3 {
  font-size: 1rem;
}

.x402-gate p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

/* Content prose */
.entry-content {
  max-width: 42rem;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2 {
  margin-top: 2rem;
}

.entry-content ul,
.entry-content ol {
  color: var(--text-muted);
}

.page-header {
  padding: 2.75rem 0 1rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 40rem;
}

/* Forms */
.form-stack {
  display: grid;
  gap: 1rem;
  max-width: 28rem;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(61, 222, 203, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.85rem;
}

.site-footer p,
.site-footer li {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.4rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* Archive / list rows */
.list-stack {
  display: grid;
  gap: 0.85rem;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.list-row h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.list-row h3 a {
  color: var(--text);
}

.list-row p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.list-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* Split section headers */
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
}

/* Empty state */
.empty-state {
  padding: 2rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .hero__grid,
  .product-hero__layout,
  .x402-panel,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .product-buy {
    position: static;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: rgba(11, 13, 16, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }

  .primary-nav.is-open {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .header-cta {
    margin: 0.5rem 0 0;
  }

  .list-row {
    grid-template-columns: 1fr;
  }

  .list-row__meta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .card-grid,
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}
