/* Tokens mirror app/src/styles/main.css so the landing page and the app feel like one product. */
:root {
  color-scheme: light;
  --canvas: 250 250 251;
  --surface: 255 255 255;
  --surface-sunken: 243 244 246;
  --line: 230 232 236;
  --line-strong: 208 212 220;
  --fg: 22 25 34;
  --fg-muted: 92 99 113;
  --fg-subtle: 140 147 161;
  --accent: 94 92 230;
  --accent-hover: 79 76 214;
  --accent-soft: 238 238 253;
  --accent-soft-fg: 74 70 201;
  --info-soft: 226 239 254;
  --info-soft-fg: 24 90 190;
  --success: 22 163 106;
  --shadow: 22 25 34;
  --av-l: 88%;
  --av-fg-l: 32%;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: 13 14 18;
    --surface: 19 20 26;
    --surface-sunken: 16 17 22;
    --line: 37 40 49;
    --line-strong: 54 58 70;
    --fg: 231 233 238;
    --fg-muted: 150 156 170;
    --fg-subtle: 106 112 127;
    --accent: 116 114 245;
    --accent-hover: 139 137 250;
    --accent-soft: 36 35 72;
    --accent-soft-fg: 176 175 255;
    --info-soft: 15 38 64;
    --info-soft-fg: 140 196 255;
    --success: 64 196 129;
    --shadow: 0 0 0;
    --av-l: 24%;
    --av-fg-l: 80%;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: rgb(var(--canvas));
  color: rgb(var(--fg));
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* A soft accent glow behind the hero; decorative only. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 70vh;
  background: radial-gradient(50% 60% at 70% 30%, rgb(var(--accent) / 0.14), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; }

code, kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875em;
}

kbd {
  padding: 1px 6px;
  border: 1px solid rgb(var(--line-strong));
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgb(var(--surface));
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

.brand.small { font-size: 14px; gap: 8px; color: rgb(var(--fg)); }

.logo {
  width: 28px;
  height: 22px;
  background: rgb(var(--accent));
  -webkit-mask: url(/otter.svg) center / contain no-repeat;
  mask: url(/otter.svg) center / contain no-repeat;
}

.brand.small .logo { width: 20px; height: 16px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:focus-visible, .copy:focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 2px;
}

.btn-primary {
  background: rgb(var(--accent));
  color: #fff;
  box-shadow: 0 1px 2px rgb(var(--shadow) / 0.15), inset 0 1px 0 rgb(255 255 255 / 0.15);
}

.btn-primary:hover { background: rgb(var(--accent-hover)); }

.btn-ghost {
  border: 1px solid rgb(var(--line-strong));
  background: rgb(var(--surface) / 0.6);
}

.btn-ghost:hover { border-color: rgb(var(--fg-subtle)); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding-block: 56px 88px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 4px 12px 4px 10px;
  border: 1px solid rgb(var(--line));
  border-radius: 999px;
  background: rgb(var(--surface));
  color: rgb(var(--fg-muted));
  font-size: 13px;
  font-weight: 500;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(var(--success));
  box-shadow: 0 0 0 0 rgb(var(--success) / 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgb(var(--success) / 0); }
  100% { box-shadow: 0 0 0 0 rgb(var(--success) / 0); }
}

h1 {
  margin: 0;
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}

.lede {
  margin: 22px 0 32px;
  max-width: 34em;
  color: rgb(var(--fg-muted));
  font-size: 18px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Activity "screenshot" ---------- */

.shot {
  border: 1px solid rgb(var(--line));
  border-radius: 14px;
  background: rgb(var(--surface));
  box-shadow: 0 24px 60px -20px rgb(var(--shadow) / 0.25), 0 2px 6px rgb(var(--shadow) / 0.06);
  overflow: hidden;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgb(var(--line));
  background: rgb(var(--surface-sunken));
}

.shot-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(var(--line-strong));
}

.shot-bar p {
  margin: 0 0 0 10px;
  color: rgb(var(--fg-subtle));
  font-size: 12px;
  font-weight: 500;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  height: 340px;
  overflow: hidden;
}

.feed li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 11px 16px;
  font-size: 14px;
  line-height: 1.45;
}

.feed li + li { border-top: 1px solid rgb(var(--line) / 0.6); }

.feed li.enter { animation: enter 0.45s ease-out; }

@keyframes enter {
  from { opacity: 0; transform: translateY(-8px); background: rgb(var(--accent-soft)); }
  to { opacity: 1; transform: none; }
}

.feed p { margin: 0; color: rgb(var(--fg-muted)); }
.feed b { color: rgb(var(--fg)); font-weight: 600; }
.feed code { color: rgb(var(--fg)); }

.feed time {
  color: rgb(var(--fg-subtle));
  font-size: 12px;
  padding-top: 2px;
}

.av {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: hsl(var(--h) 55% var(--av-l));
  color: hsl(var(--h) 45% var(--av-fg-l));
  font-size: 11px;
  font-weight: 600;
}

.pill {
  display: inline-block;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
}

.pill-info { background: rgb(var(--info-soft)); color: rgb(var(--info-soft-fg)); }
.pill-accent { background: rgb(var(--accent-soft)); color: rgb(var(--accent-soft-fg)); }

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-block: 40px 72px;
  border-top: 1px solid rgb(var(--line));
}

.features h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

/* ---------- Demo ---------- */

.demo { padding-bottom: 96px; scroll-margin-top: 24px; }

.demo-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 36px 40px;
  border: 1px solid rgb(var(--line));
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgb(var(--accent) / 0.08), transparent 60%),
    rgb(var(--surface));
}

.demo h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.demo-card p { margin: 0; color: rgb(var(--fg-muted)); }

.creds { margin: 0; display: grid; gap: 12px; }

.creds dt {
  margin-bottom: 2px;
  color: rgb(var(--fg-subtle));
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.creds dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 6px 6px 6px 12px;
  border: 1px solid rgb(var(--line));
  border-radius: 8px;
  background: rgb(var(--surface-sunken));
}

.creds code { font-size: 14px; overflow-wrap: anywhere; }

.copy {
  flex: none;
  padding: 3px 10px;
  border: 1px solid rgb(var(--line-strong));
  border-radius: 6px;
  background: rgb(var(--surface));
  color: rgb(var(--fg-muted));
  font: 500 12px Inter, system-ui, sans-serif;
  cursor: pointer;
}

.copy:hover { color: rgb(var(--fg)); }
.copy.done { color: rgb(var(--success)); border-color: rgb(var(--success) / 0.5); }

/* ---------- Footer ---------- */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px 40px;
  border-top: 1px solid rgb(var(--line));
  color: rgb(var(--fg-subtle));
  font-size: 13px;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .demo-card { grid-template-columns: 1fr; gap: 24px; }
  .demo-card .btn { justify-self: start; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .features { grid-template-columns: 1fr; gap: 24px; }
  .demo-card { padding: 24px 20px; }
  .feed { height: 300px; }
  .feed li { font-size: 13px; }
  .lede { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .feed li.enter { animation: none; }
}
