/* dnd-table website: the product page and the docs. Same palette and type as the app. */

:root {
  color-scheme: dark;
  --bg: #15120f;
  --bg-2: #1a1612;
  --surface: #1e1915;
  --surface-2: #28211b;
  --surface-3: #332a22;
  --border: #3b3128;
  --text: #efe6da;
  --muted: #a89a8b;
  --faint: #6f6356;
  --accent: #d9a441;
  --accent-strong: #eab85a;
  --accent-ink: #1b1409;
  --gm: #a58bdc;
  --danger: #e06a5c;
  --success: #7cc28a;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --wide: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- top bar ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 26px;
  height: 26px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
}

.nav__links a:hover,
.nav__links a[aria-current='page'] {
  color: var(--text);
}

.nav__links .btn {
  color: var(--text);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

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

.btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- landing page ---------- */

.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 96px 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section > h2,
.section .start h2,
.band h2 {
  margin: 0 0 18px;
  max-width: 820px;
  font-size: clamp(30px, 4vw, 44px);
}

.lede {
  max-width: 640px;
  color: var(--muted);
  font-size: 19px;
}

.hero {
  position: relative;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgb(217 164 65 / 0.16), transparent 70%),
    radial-gradient(700px 400px at 90% 30%, rgb(165 139 220 / 0.08), transparent 70%);
}

.hero__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 88px 24px 0;
  text-align: center;
}

.hero h1 {
  max-width: 880px;
  margin: 0 auto;
  font-size: clamp(40px, 6.4vw, 72px);
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero .lede {
  margin: 24px auto 0;
}

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

.hero__meta {
  margin-top: 20px;
  color: var(--faint);
  font-size: 14px;
}

.hero__meta span + span::before {
  content: '·';
  margin: 0 10px;
}

.shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow:
    0 30px 80px rgb(0 0 0 / 0.5),
    0 0 0 1px rgb(255 255 255 / 0.02);
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.shot__bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface-3);
}

.shot__bar span {
  margin-left: 10px;
  color: var(--faint);
  font: 12px var(--font-mono);
}

.shot img {
  display: block;
  width: 100%;
}

.hero__shot {
  max-width: 1100px;
  margin: 64px auto 0;
}

/* Three kinds of screen. */
.screens {
  display: grid;
  grid-template-columns: 1.4fr 0.62fr 1.4fr;
  align-items: end;
  gap: 28px;
  margin-top: 56px;
}

.screen {
  margin: 0;
}

.screen figcaption {
  margin-top: 18px;
}

.screen h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.screen p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.phone {
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 8px;
  background: #0d0b09;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
}

.phone img {
  display: block;
  border-radius: 19px;
}

/* Feature grid. */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 48px;
}

.card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}

.card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgb(217 164 65 / 0.12);
  color: var(--accent);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Alternating showcase rows. */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 56px;
  padding: 56px 0;
}

.showcase--flip {
  grid-template-columns: 1.25fr 1fr;
}

.showcase--flip .showcase__text {
  order: 2;
}

.showcase h3 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3vw, 34px);
}

.showcase p {
  margin: 0 0 14px;
  color: var(--muted);
}

.showcase ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.showcase li {
  position: relative;
  padding: 6px 0 6px 28px;
}

.showcase li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 14px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.showcase__narrow {
  max-width: 290px;
  justify-self: center;
}

/* Privacy band. */
.band {
  border-block: 1px solid var(--border);
  background: var(--bg-2);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.facts h3 {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 650;
}

.facts p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Quick start. */
.start {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.terminal {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0f0d0b;
  overflow-x: auto;
  font: 14px/1.9 var(--font-mono);
  color: var(--text);
}

.terminal .c {
  color: var(--faint);
}

.terminal .p {
  color: var(--accent);
  user-select: none;
}

.cta {
  text-align: center;
}

.cta h2 {
  margin: 0 auto;
  max-width: 720px;
  font-size: clamp(30px, 4vw, 46px);
}

.cta .hero__ctas {
  margin-top: 28px;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 13px;
}

.footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 40px 24px 56px;
  display: grid;
  gap: 16px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
}

.footer__links a {
  color: var(--muted);
  text-decoration: none;
}

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

.footer p {
  margin: 0;
  max-width: 900px;
}

/* ---------- docs ---------- */

.docs {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 14px;
}

.toc__title {
  margin: 0 0 10px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.toc li a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}

.toc li a:hover {
  border-left-color: var(--muted);
  color: var(--text);
}

.toc li a.is-current {
  border-left-color: var(--accent);
  color: var(--text);
}

.toc .toc__sub a {
  padding-left: 24px;
  font-size: 13px;
}

.toc__pages {
  margin-bottom: 28px;
}

.toc__pages a[aria-current='page'] {
  border-left-color: var(--accent);
  color: var(--text);
  font-weight: 600;
}

.prose {
  max-width: 760px;
  min-width: 0;
}

.prose h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.4vw, 48px);
}

.prose h2 {
  margin: 56px 0 14px;
  padding-top: 8px;
  font-size: 30px;
}

.prose h3 {
  margin: 36px 0 10px;
  font-size: 22px;
}

.prose h4 {
  margin: 28px 0 8px;
  font-size: 17px;
}

.prose p,
.prose li {
  color: #ddd2c4;
}

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

.prose hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 4px;
}

.prose li::marker {
  color: var(--faint);
}

.prose img {
  display: block;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.4);
}

.prose :not(pre) > code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.prose pre {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #0f0d0b;
  overflow-x: auto;
  line-height: 1.6;
}

.prose table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.prose blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

.prose blockquote p {
  color: var(--muted);
}

.prose .anchor {
  margin-left: 8px;
  color: var(--faint);
  font-family: var(--font-body);
  font-size: 0.6em;
  text-decoration: none;
  opacity: 0;
}

.prose :is(h2, h3):hover .anchor {
  opacity: 1;
}

.edit {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 14px;
}

/* ---------- small screens ---------- */

@media (max-width: 960px) {
  .screens {
    grid-template-columns: 1fr 1fr;
  }

  .screen--phone {
    grid-row: span 2;
  }

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

  .showcase,
  .showcase--flip,
  .start {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .showcase--flip .showcase__text {
    order: 0;
  }

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

  .docs {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toc {
    position: static;
    max-height: none;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
  }

  .toc__sections {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav__inner {
    gap: 16px;
    padding: 0 16px;
  }

  .nav__links {
    gap: 14px;
    font-size: 14px;
  }

  .nav__links .hide-sm {
    display: none;
  }

  .section {
    padding: 64px 16px;
  }

  .hero__inner {
    padding: 56px 16px 0;
  }

  .screens,
  .grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .screen--phone {
    grid-row: auto;
    max-width: 280px;
  }

  .docs {
    padding: 32px 16px 72px;
  }

  .prose h2 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
