/* bistellar.ai: same look as the app (black and white, Supabase/Stripe-like).
   The home hero and the closing CTA are always dark (.on-dark): they sit on
   the binary-star scene, the only place warm color lives. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #171717;
  --text: #262626;
  --muted: #737373;
  --line: #e5e5e5;
  --soft: #fafafa;
  --bg: #ffffff;
  --warm: #ffa259; /* the scene's glow color (binary-star-3d.ts LOOK) */
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #fafafa;
    --text: #e5e5e5;
    --muted: #a3a3a3;
    --line: #262626;
    --soft: #111111;
    --bg: #0a0a0a;
  }
}
/* Dark surfaces: the same tokens, fixed to their dark values. */
.on-dark {
  --ink: #ffffff;
  --text: #e5e5e5;
  --muted: rgb(255 255 255 / 0.68);
  --line: rgb(255 255 255 / 0.16);
  --soft: rgb(255 255 255 / 0.08);
  --bg: #000000;
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  border-bottom: 1px solid var(--line);
}
header .wrap {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo svg {
  height: 18px;
  width: auto;
}
header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 6px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover {
  color: var(--ink);
}
.btn-header {
  margin-left: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  opacity: 0.88;
}
.btn-secondary {
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--soft);
}
.btn-ghost {
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--soft);
}
.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
}
.on-dark .btn-secondary {
  background: rgb(255 255 255 / 0.04);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.on-dark .btn-secondary:hover {
  background: rgb(255 255 255 / 0.12);
}

/* ---- Home: hero ---------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.hero > canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
/* Darkens the corner the words sit in, so they read on any frame. */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgb(0 0 0 / 0.85), rgb(0 0 0 / 0.35) 38%, transparent 62%),
    linear-gradient(to right, rgb(0 0 0 / 0.55), transparent 55%),
    linear-gradient(to bottom, rgb(0 0 0 / 0.5), transparent 120px);
}
.hero header {
  border-bottom-color: transparent;
}
.hero-copy {
  width: 100%;
  margin-top: auto;
  padding-top: 80px;
  padding-bottom: clamp(56px, 10vh, 112px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.04);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  color: var(--text);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 8px var(--warm);
}
.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.045em;
}
.hero p {
  margin: 24px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

/* ---- Home: sections ------------------------------------------------------ */

.section {
  padding: 128px 0;
}
.section-soft {
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.section h2,
.cta h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.section-head p,
.lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

/* Formats: three cards, each with a small drawn preview. */
.formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.format {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.format-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  overflow: hidden;
}
.format-body {
  padding: 24px;
}
.format-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.format h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.format p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.badge-live {
  border-color: rgb(22 163 74 / 0.3);
  background: rgb(22 163 74 / 0.08);
  color: #15803d;
}
@media (prefers-color-scheme: dark) {
  .badge-live {
    color: #4ade80;
  }
}

/* Video: a phone frame with a caption, like a UGC ad. */
.visual-video {
  background: radial-gradient(120% 90% at 70% 0%, #3a2414, #0a0a0a 70%);
}
.phone {
  position: relative;
  width: 116px;
  aspect-ratio: 9 / 16;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 16px;
  background:
    radial-gradient(60% 40% at 50% 34%, rgb(255 190 140 / 0.35), transparent 70%),
    linear-gradient(to bottom, #2a2018, #120d0a);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
  transform: translateY(26px);
}
.phone::before {
  /* the presenter: head and shoulders */
  content: '';
  position: absolute;
  left: 50%;
  top: 28%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  border-radius: 50%;
  background: rgb(255 220 190 / 0.22);
  box-shadow: 0 46px 0 14px rgb(255 220 190 / 0.12);
}
.phone-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 30%;
  padding: 4px 6px;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}
.phone-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 14px;
  height: 2px;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.2);
}
.phone-bar span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: 2px;
  background: #fff;
}

/* Image: the sizes one brief produces. */
.ratios {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.ratios span {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  overflow: hidden;
}
/* each size's "image" and headline, so the boxes read as ads */
.ratios span::before {
  content: '';
  position: absolute;
  inset: 5px 5px 34% 5px;
  border-radius: 3px;
  background: radial-gradient(70% 70% at 60% 40%, rgb(255 162 89 / 0.45), rgb(255 162 89 / 0.08));
}
.ratios span::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 40%;
  bottom: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.5;
}
.r-square {
  width: 70px;
  height: 70px;
}
.r-portrait {
  width: 64px;
  height: 80px;
}
.r-story {
  width: 52px;
  height: 92px;
}
.r-wide {
  width: 84px;
  height: 44px;
}
.r-wide::before {
  inset: 5px 50% 5px 5px;
}
.r-wide::after {
  left: 54%;
  right: 8px;
  bottom: 50%;
}

/* Voice: a directed script over a waveform. */
.visual-voice {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 18px;
  padding: 0 24px;
}
.script {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-size: 13px;
}
.script li {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip {
  flex-shrink: 0;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 36px;
}
.wave span {
  flex: 1;
  height: 30%;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.8;
}
.wave span:nth-child(3n) {
  height: 70%;
}
.wave span:nth-child(4n + 1) {
  height: 45%;
}
.wave span:nth-child(5n + 2) {
  height: 95%;
}
.wave span:nth-child(7n) {
  height: 20%;
}
.wave span:nth-child(n + 15) {
  opacity: 0.25;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.step-n {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.steps h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Developers */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
}
.checks {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.checks li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  font-size: 15px;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 10px;
  height: 5px;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(-45deg);
}
.checks strong {
  color: var(--ink);
  font-weight: 600;
}
.code {
  margin: 0;
  padding: 24px;
  border: 1px solid #262626;
  border-radius: 12px;
  background: #0a0a0a;
  color: #e5e5e5;
  font: 13px/1.7 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  overflow-x: auto;
}
.c-mute {
  color: #737373;
}
.c-str {
  color: #ffc79a;
}
.c-num {
  color: #a5b4fc;
}

/* Closing CTA */
.cta {
  padding: 120px 0;
  text-align: center;
  background:
    radial-gradient(60% 120% at 50% 120%, rgb(255 162 89 / 0.22), transparent 70%),
    #000;
}
.cta p {
  margin: 16px auto 0;
  max-width: 480px;
  color: var(--muted);
  font-size: 18px;
}
.cta .actions {
  justify-content: center;
}

/* ---- Legal pages --------------------------------------------------------- */

.legal {
  max-width: 720px;
  padding: 64px 0 96px;
}
.legal h1 {
  margin: 0;
  color: var(--ink);
  font-size: 36px;
  letter-spacing: -0.025em;
}
.legal .meta {
  margin: 8px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.legal h2 {
  margin: 40px 0 8px;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.01em;
}
.legal p,
.legal li {
  font-size: 15px;
}
.legal ul {
  padding-left: 20px;
}
.legal li {
  margin: 4px 0;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.legal th,
.legal td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.legal th {
  color: var(--ink);
  font-weight: 600;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 32px;
}
footer nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--ink);
}

/* ---- Smaller screens ----------------------------------------------------- */

@media (max-width: 960px) {
  .formats {
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}
@media (max-width: 760px) {
  .nav-link,
  .btn-header {
    display: none;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding: 0 20px;
  }
  /* The words take the lower part of the screen; the scene the upper. */
  .hero-shade {
    background:
      linear-gradient(to top, rgb(0 0 0 / 0.92), rgb(0 0 0 / 0.6) 42%, transparent 70%),
      linear-gradient(to bottom, rgb(0 0 0 / 0.5), transparent 120px);
  }
  .hero-copy {
    padding-bottom: 48px;
  }
  .hero .actions .btn {
    flex: 1;
  }
  .section {
    padding: 88px 0;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .code {
    padding: 18px;
    font-size: 12px;
  }
  .cta {
    padding: 88px 0;
  }
  footer nav {
    margin-left: 0;
  }
}
