/* Vessel landing page. Palette + type mirror the host chrome (host/src/theme.tsx)
   so the site and the app feel like one product. Light/dark = a token swap. */

:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --text: #26282b;
  --text-mid: #5b5e63;
  --text-muted: #8a8d92;
  --hair: #e9e9e6;
  --hair-strong: #dededa;
  --chip: #f1f1ef;
  --accent: oklch(0.55 0.09 230);
  --accent-soft: oklch(0.55 0.09 230 / 0.1);
  --accent-border: oklch(0.55 0.09 230 / 0.3);
  --ok: oklch(0.58 0.07 155);
  --on-accent: #ffffff;
  --shadow: 0 18px 50px -12px rgba(20, 22, 28, 0.22), 0 4px 12px rgba(20, 22, 28, 0.08);
  --ui: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1e21;
    --surface: #26282b;
    --text: #e7e8ea;
    --text-mid: #aeb1b6;
    --text-muted: #7e8186;
    --hair: #303338;
    --hair-strong: #3a3d42;
    --chip: #2e3135;
    --accent: oklch(0.7 0.1 230);
    --accent-soft: oklch(0.7 0.1 230 / 0.16);
    --accent-border: oklch(0.7 0.1 230 / 0.4);
    --ok: oklch(0.72 0.09 155);
    --on-accent: #16181b;
    --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Faint atmosphere — a cool light pooling top-right, not a flat fill. */
  background-image: radial-gradient(120% 80% at 85% -10%, var(--accent-soft), transparent 55%);
  background-attachment: fixed;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--text-mid);
  background: var(--chip);
  border: 1px solid var(--hair);
  border-radius: 5px;
  padding: 0.05em 0.36em;
}

a {
  color: inherit;
  text-decoration: none;
}

.ink {
  color: var(--accent);
}

/* ---- top bar ---- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 56px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--hair);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.wordmark .glyph {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  font-size: 14px;
  color: var(--text-mid);
}
.nav a {
  transition: color 0.15s;
}
.nav a:hover {
  color: var(--text);
}
.nav-gh {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* ---- shared section rhythm ---- */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

section {
  padding: clamp(56px, 9vw, 116px) 0;
  border-bottom: 1px solid var(--hair);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.eyebrow.center {
  text-align: center;
  margin-bottom: 44px;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
}

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

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding-top: clamp(48px, 8vw, 92px);
}

.lede {
  margin: 0 0 30px;
  max-width: 33em;
  font-size: clamp(16px, 1.8vw, 18.5px);
  color: var(--text-mid);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 9px;
  font-weight: 500;
  font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 1px 0 var(--accent-border), 0 8px 22px -10px var(--accent);
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--accent) 88%, black);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--hair-strong);
}
.btn-ghost:hover {
  background: var(--chip);
}

.fineprint {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- hero art: one file, three layers ---- */
.hero-art {
  display: flex;
  justify-content: center;
}
.filecard {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--hair-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: float 7s ease-in-out infinite;
}
.filecard-top {
  display: flex;
  align-items: center;
  padding: 13px 14px 0;
}
.tab {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
  background: var(--chip);
  border: 1px solid var(--hair);
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  padding: 7px 12px;
}
.layers {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-top: 1px solid var(--hair);
}
.layer {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 10px;
  background: linear-gradient(var(--chip), var(--chip)) padding-box;
  border: 1px solid var(--hair);
  font-size: 13.5px;
  color: var(--text-mid);
  opacity: 0;
  animation: layer-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--ld);
}
.layer-k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  padding: 3px 7px;
  min-width: 42px;
  text-align: center;
}
.filecard-foot {
  padding: 0 16px 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ---- the model band ---- */
.model-grid,
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
}
.model-cell .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}
.model-cell h3 {
  margin-top: 10px;
}
.model-cell p,
.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-mid);
}

/* ---- what's inside ---- */
.card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 14px;
  transition: border-color 0.18s, transform 0.18s;
}
.card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
}
.card-k {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 5px;
  padding: 3px 8px;
  margin-bottom: 16px;
}

/* ---- run it yourself ---- */
.selfhost-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.selfhost-lede {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--text-mid);
}
.codeblock {
  position: relative;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--hair-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.codeblock pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.copy:hover {
  background: var(--accent);
  color: var(--on-accent);
}
.copy.copied {
  background: var(--ok);
  color: var(--on-accent);
  border-color: transparent;
}
.selfhost-foot {
  margin: 22px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.selfhost-foot a,
.fineprint a {
  color: var(--text-mid);
  border-bottom: 1px solid var(--hair-strong);
}
.selfhost-foot a:hover,
.fineprint a:hover {
  color: var(--accent);
}

/* ---- safety ---- */
.safety {
  border-bottom: none;
}
.safety-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.safety .eyebrow {
  text-align: center;
}
.claim {
  margin: 0 0 18px;
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.claim-sub {
  margin: 0 auto;
  max-width: 56em;
  font-size: 15px;
  color: var(--text-mid);
}

/* ---- footer ---- */
.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px clamp(20px, 5vw, 56px) 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.foot-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}
.foot-mark svg {
  color: var(--accent);
}
.foot-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.foot-note a {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--hair-strong);
}
.foot-note a:hover {
  color: var(--accent);
}

/* ---- motion ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.66s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes layer-in {
  to {
    opacity: 1;
  }
}
@keyframes float {
  50% {
    transform: translateY(-9px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .layer,
  .filecard {
    animation: none;
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
  }
  .filecard {
    max-width: 320px;
  }
  .model-grid,
  .how-grid {
    grid-template-columns: 1fr;
  }
  .examples-grid {
    grid-template-columns: 1fr;
  }
  .demo-name {
    display: none;
  }
}

/* ---- examples gallery ---- */
.examples-lede,
.demo .examples-lede {
  max-width: 60ch;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 15px;
  color: var(--text-mid);
}
.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 24px);
}
.ex-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 14px;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.ex-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.ex-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ex-head h3 {
  margin: 0;
  flex: 1;
}
.ex-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.ex-badge.signed {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}
.ex-badge.unsigned {
  color: var(--text-muted);
  border: 1px dashed var(--hair-strong);
}
.ex-card p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  color: var(--text-mid);
}
.ex-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
}
.ex-dl .dl-i {
  transition: transform 0.15s;
}
.ex-card:hover .ex-dl .dl-i {
  transform: translateY(2px);
}
.examples-foot {
  margin: 36px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}
.examples-foot a {
  color: var(--text-mid);
  border-bottom: 1px solid var(--hair-strong);
}
.examples-foot a:hover {
  color: var(--accent);
}

/* ---- theming demo ---- */
.demo-window {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--hair-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--chip);
  border-bottom: 1px solid var(--hair);
}
.demo-dots {
  display: inline-flex;
  gap: 6px;
}
.demo-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hair-strong);
}
.demo-name {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mid);
}
.demo-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-ctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-mid);
}
.demo-ctl select,
.demo-mode {
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--hair-strong);
  border-radius: 7px;
  padding: 4px 8px;
  cursor: pointer;
}
.demo-mode:hover,
.demo-ctl select:hover {
  border-color: var(--accent-border);
}
.demo-frame {
  display: block;
  width: 100%;
  height: 332px;
  border: 0;
  background: #fff;
}
