/* ============================================
   Anthills — landing styles
   Strict monochrome, light + dark themes
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-elev: #fafafa;
  --bg-sunk: #f4f4f5;
  --fg: #0a0a0a;
  --fg-muted: #6b6b70;
  --fg-faint: #9b9ba1;
  --border: #e6e6e8;
  --border-strong: #d4d4d8;
  --btn-bg: #0a0a0a;
  --btn-fg: #ffffff;
  --shadow-lg: 0 2px 4px rgba(0,0,0,.04), 0 24px 60px rgba(0,0,0,.10);
  --grain: rgba(10,10,10,.028);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #08080a;
  --bg-elev: #101013;
  --bg-sunk: #16161a;
  --fg: #f5f5f6;
  --fg-muted: #9a9aa2;
  --fg-faint: #6a6a73;
  --border: #232329;
  --border-strong: #32323a;
  --btn-bg: #f5f5f6;
  --btn-fg: #08080a;
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.6);
  --grain: rgba(255,255,255,.03);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080a;
    --bg-elev: #101013;
    --bg-sunk: #16161a;
    --fg: #f5f5f6;
    --fg-muted: #9a9aa2;
    --fg-faint: #6a6a73;
    --border: #232329;
    --border-strong: #32323a;
    --btn-bg: #f5f5f6;
    --btn-fg: #08080a;
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.6);
    --grain: rgba(255,255,255,.03);
    color-scheme: dark;
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}
@media (max-width: 640px) {
  .wrap { padding-inline: 20px; }
}

.section {
  padding-block: 120px;
  position: relative;
}
@media (max-width: 900px) { .section { padding-block: 88px; } }
@media (max-width: 640px) { .section { padding-block: 64px; } }

/* ---------- typography ---------- */
h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.section-head { margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  margin-top: 18px;
}
.section-head p {
  color: var(--fg-muted);
  font-size: 1.0625rem;
  max-width: 52ch;
  margin-top: 18px;
  text-wrap: pretty;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding-inline: 24px;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), background-color .2s ease,
    border-color .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(.97); }

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn--primary:hover { opacity: .86; }

.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--fg);
}
.btn--ghost:hover { background: var(--bg-sunk); border-color: var(--fg-faint); }

.btn--sm { height: 38px; padding-inline: 18px; font-size: .875rem; }

.btn .arrow { transition: transform .2s cubic-bezier(.2,.8,.3,1); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.header.is-stuck { border-bottom-color: var(--border); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.logo__mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  font-size: .9375rem;
  color: var(--fg-muted);
  transition: color .18s ease;
}
.nav a:hover { color: var(--fg); }
@media (max-width: 860px) { .nav { display: none; } }

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--border-strong); background: var(--bg-sunk); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- hero ---------- */
.hero {
  padding-top: 92px;
  padding-bottom: 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 640px) { .hero { padding-top: 56px; padding-bottom: 64px; } }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grain) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grain) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 100%);
  pointer-events: none;
}

.hero__inner { position: relative; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding-inline: 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: .8125rem;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
}
.badge__dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--fg);
  flex: none;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 5rem);
  margin-top: 28px;
  letter-spacing: -0.045em;
}
.hero h1 .dim { color: var(--fg-faint); }

.hero__sub {
  margin: 26px auto 0;
  max-width: 54ch;
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  color: var(--fg-muted);
  text-wrap: pretty;
}

.hero__cta {
  margin-top: 38px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__strip {
  margin-top: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px 40px;
  flex-wrap: wrap;
  color: var(--fg-faint);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero__strip span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- products ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .products { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color .25s ease, transform .25s cubic-bezier(.2,.8,.3,1),
    box-shadow .25s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card--wide { grid-column: span 2; }
@media (max-width: 820px) { .card--wide { grid-column: span 1; } }
@media (max-width: 640px) { .card { padding: 26px; } }

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.card__icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card__icon svg { width: 22px; height: 22px; }
.card__icon img { width: 100%; height: 100%; object-fit: cover; }
/* Product icons bring their own shape and background. */
.card__icon:has(img) { border-color: transparent; background: none; }
/* Square source icons need the shape applied here, plus an edge that stays
   visible when the artwork matches the page background. */
.card__icon--square,
.page-hero__icon--square {
  border-radius: 11px;
  border-color: var(--border-strong);
}
.page-hero__icon--square { border-radius: 16px; }
.card__icon--square:has(img),
.page-hero__icon--square:has(img) { border-color: var(--border-strong); }

.card__tag {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.card h3 {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.card p {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: .9375rem;
  text-wrap: pretty;
  max-width: 46ch;
}
.card p code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em;
  color: var(--fg);
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  white-space: nowrap;
}

.card__link {
  margin-top: auto;
  padding-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--fg);
}
.card__link .arrow { transition: transform .2s cubic-bezier(.2,.8,.3,1); }
.card:hover .card__link .arrow { transform: translateX(4px); }

.card__stretch {
  position: absolute;
  inset: 0;
}

/* ---------- team ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .team { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .team { grid-template-columns: repeat(2, 1fr); } }

.member {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
  transition: border-color .25s ease, transform .25s cubic-bezier(.2,.8,.3,1);
}
.member:hover { border-color: var(--border-strong); transform: translateY(-3px); }

.member__avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-muted);
  margin-bottom: 18px;
  transition: color .25s ease, border-color .25s ease;
}
.member__avatar svg { width: 20px; height: 20px; }
.member:hover .member__avatar { color: var(--fg); }
.member h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.member p {
  margin-top: 4px;
  font-size: .875rem;
  color: var(--fg-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.01em;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--bg);
  padding: 30px 26px;
}
.stat__num {
  font-size: clamp(1.75rem, 3.4vw, 2.375rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat__label {
  margin-top: 8px;
  font-size: .875rem;
  color: var(--fg-muted);
}

/* ---------- cta ---------- */
.cta {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-elev);
  padding: 72px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 640px) { .cta { padding: 52px 24px; border-radius: 20px; } }

.cta h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  max-width: 20ch;
  margin-inline: auto;
}
.cta p {
  margin: 18px auto 0;
  max-width: 46ch;
  color: var(--fg-muted);
  text-wrap: pretty;
}
.cta__actions {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 56px 44px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer__brand { grid-column: span 2; }
}

.footer__brand p {
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: .9375rem;
  max-width: 34ch;
}

.footer h4 {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer li a {
  font-size: .9375rem;
  color: var(--fg-muted);
  transition: color .18s ease;
}
.footer li a:hover { color: var(--fg); }

.footer__bottom {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .875rem;
  color: var(--fg-faint);
}

/* ---------- product subpages ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .875rem;
  color: var(--fg-muted);
  transition: color .18s ease;
}
.back-link:hover { color: var(--fg); }
.back-link svg { transition: transform .2s cubic-bezier(.2,.8,.3,1); }
.back-link:hover svg { transform: translateX(-3px); }

.page-hero {
  padding-top: 72px;
  padding-bottom: 80px;
}
@media (max-width: 640px) { .page-hero { padding-top: 44px; padding-bottom: 56px; } }

.page-hero__head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
}
.page-hero__icon {
  width: 68px;
  height: 68px;
  flex: none;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.page-hero__icon svg { width: 32px; height: 32px; }
.page-hero__icon img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__icon:has(img) { border-color: transparent; background: none; }

.page-hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.5rem);
  letter-spacing: -0.04em;
}
.page-hero__lead {
  margin-top: 22px;
  max-width: 58ch;
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  color: var(--fg-muted);
  text-wrap: pretty;
}
.page-hero__cta {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feature {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-elev);
}
.feature__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.feature__icon svg { width: 18px; height: 18px; }
.feature h3 { font-size: 1.0625rem; letter-spacing: -0.02em; }
.feature p {
  margin-top: 10px;
  font-size: .9375rem;
  color: var(--fg-muted);
  text-wrap: pretty;
}

/* ---------- chat mockup ---------- */
.chat {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-elev);
  overflow: hidden;
  max-width: 560px;
}
.chat__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.chat__avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  flex: none;
  border: 1px solid var(--border-strong);
}
.chat__avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat__name { font-size: .9375rem; font-weight: 500; letter-spacing: -0.02em; }
.chat__meta { font-size: .75rem; color: var(--fg-faint); }

.chat__body {
  padding: 20px 18px;
  display: grid;
  gap: 12px;
  justify-items: start;
}
.msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: .9375rem;
  line-height: 1.5;
}
.msg--out {
  justify-self: end;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-color: transparent;
}
.msg__who {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  color: var(--fg-faint);
  margin-bottom: 4px;
}
.msg--out .msg__who { color: var(--btn-fg); opacity: .6; }
.msg code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em;
}
.msg .mention { font-weight: 500; }
.msg--out .mention { text-decoration: underline; text-underline-offset: 2px; }

/* Marketing screenshots ship with their own light background, so they get a
   frame instead of sitting directly on the page. */
.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}
.shot {
  flex: 0 0 auto;
  width: 232px;
  scroll-snap-align: start;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: border-color .25s ease, transform .25s cubic-bezier(.2,.8,.3,1);
}
.shot:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.shot img { width: 100%; height: auto; }
@media (max-width: 560px) { .shot { width: 190px; } }

.steps {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  counter-reset: step;
}
.step {
  background: var(--bg);
  padding: 28px 30px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
@media (max-width: 560px) { .step { padding: 24px; gap: 16px; } }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-faint);
  padding-top: 3px;
  flex: none;
}
/* Command reference reuses the .steps frame, minus the numbering. */
.cmd {
  background: var(--bg);
  padding: 22px 30px;
}
@media (max-width: 560px) { .cmd { padding: 20px 24px; } }
.cmd > code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.cmd p {
  margin-top: 8px;
  font-size: .9375rem;
  color: var(--fg-muted);
  max-width: 60ch;
  text-wrap: pretty;
}
.cmd p code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em;
  color: var(--fg);
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  white-space: nowrap;
}

.step h3 { font-size: 1.0625rem; letter-spacing: -0.02em; }
.step p {
  margin-top: 8px;
  font-size: .9375rem;
  color: var(--fg-muted);
  max-width: 60ch;
  text-wrap: pretty;
}
.page-hero__lead code,
.feature code,
.step code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em;
  color: var(--fg);
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s cubic-bezier(.2,.8,.3,1), transform .7s cubic-bezier(.2,.8,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
