/* Relay — marketing + secondary page styles.
   Load AFTER relay.css: relay.css owns the tokens and form/button primitives,
   this file owns page furniture (nav, hero, sections, tiers, prose).
   index.html carries its own copy of these rules inline; the class names are
   deliberately identical so nav.js can emit one markup for both. */

html { scroll-behavior: smooth; }
body.page { font-size: 16px; line-height: 1.6; }
body.page img, body.page svg { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 780px; }
section { padding: 80px 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; text-wrap: balance; margin: 0; }
p { margin: 0; }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .11em;
  color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 14px; height: 1px; background: var(--accent); display: inline-block; }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 56ch; line-height: 1.65; }
.page-head { padding: 72px 0 8px; }
.page-head h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.1; margin: 16px 0 0; }
.page-head h1 em { font-style: italic; color: var(--accent); }
.page-head .lede { margin-top: 18px; }

/* ---- nav (markup produced by nav.js) ---- */
nav.top {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; padding-bottom: 16px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 19px; font-weight: 600; text-decoration: none; color: var(--ink); }
.wordmark .baton { width: 26px; height: 26px; flex: none; border-radius: 7px; background: #f7f5f0; padding: 3px; display: inline-flex; }
.wordmark .baton img { width: 100%; height: 100%; display: block; }
.navlinks { display: flex; gap: 26px; font-size: 14px; color: var(--ink-soft); }
.navlinks a { text-decoration: none; transition: color .15s; }
.navlinks a:hover, .navlinks a.here { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--on-accent);
  background: var(--ink); border: none; border-radius: 7px; padding: 9px 15px; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.nav-signin {
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  padding: 9px 12px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--surface);
  white-space: nowrap;
}
.nav-signin:hover { color: var(--ink); border-color: var(--ink-faint); }

/* signed-in avatar menu */
.usermenu { position: relative; }
.avatar {
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  font-family: var(--sans);
}
.avatar:hover { border-color: var(--ink-faint); }
.usermenu .sheet {
  position: absolute; right: 0; top: 44px; min-width: 216px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 11px; padding: 6px; font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
}
.usermenu .sheet .who { padding: 9px 11px 11px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.usermenu .sheet .who b { display: block; font-size: 13.5px; }
.usermenu .sheet .who span { color: var(--ink-faint); font-size: 12.5px; word-break: break-all; }
.usermenu .sheet a, .usermenu .sheet button {
  display: block; width: 100%; text-align: left; padding: 8px 11px; border-radius: 7px;
  text-decoration: none; color: var(--ink); background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px;
}
.usermenu .sheet a:hover, .usermenu .sheet button:hover { background: var(--surface-sunk); }
.usermenu .sheet button.out { color: var(--danger); }

/* ---- shared page furniture ---- */
.btn.lg { font-size: 14.5px; padding: 12px 20px; }
.ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.prose p { color: var(--ink-soft); margin-top: 16px; font-size: 16px; }
.prose h2 { font-size: 26px; margin-top: 48px; }
.prose h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; margin-top: 30px; }
.prose ul { color: var(--ink-soft); padding-left: 20px; margin-top: 14px; }
.prose li { margin-bottom: 8px; }
.rule { border: none; border-top: 1px solid var(--line); margin: 0; }

.grid2 > *, .grid3 > *, .tiers > * { min-width: 0; }   /* grid tracks default to min-content:auto, so one wide <pre> stretches the whole column */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; }
.tile { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--surface); }
.tile .tag { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--signal); }
.tile h3 { font-family: var(--sans); font-size: 16px; font-weight: 700; margin: 9px 0 7px; }
.tile p { font-size: 14px; color: var(--ink-soft); }

/* ---- pricing ---- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; align-items: start; }
.tier { border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; background: var(--surface); display: flex; flex-direction: column; }
.tier.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tier .name { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.tier .price { font-family: var(--serif); font-size: 40px; line-height: 1.1; margin-top: 14px; }
.tier .price small { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.tier .blurb { font-size: 14px; color: var(--ink-soft); margin-top: 10px; min-height: 42px; }
.tier ul { list-style: none; padding: 0; margin: 20px 0 24px; font-size: 14px; }
.tier li { padding: 7px 0 7px 22px; position: relative; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.tier li:last-child { border-bottom: none; }
.tier li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); font-size: 12px; }
.tier .btn { margin-top: auto; }
.pill { display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); padding: 3px 9px; border-radius: 999px; margin-left: 8px; }

.faq { margin-top: 56px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.faq p { color: var(--ink-soft); font-size: 15px; margin-top: 10px; }

/* ---- forms on secondary pages ---- */
.formcard { max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px; margin-top: 36px; }
.formcard h2 { font-size: 20px; }
.formcard .sub { color: var(--ink-soft); font-size: 14px; margin: 8px 0 22px; }
.formcard textarea {
  font-family: var(--sans); font-size: 13.5px; padding: 10px 12px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  width: 100%; min-height: 120px; resize: vertical;
}
.formcard select {
  font-family: var(--sans); font-size: 13.5px; padding: 10px 12px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 100%;
}
.foot-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 16px; line-height: 1.55; }

/* ---- summary rows (account, checkout) ---- */
.rows { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rows .row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows .row:last-child { border-bottom: none; }
.rows .row .k { color: var(--ink-soft); }
.rows .row .v { text-align: right; word-break: break-word; }

footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
footer .cols { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
footer .col h4 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); font-weight: 600; margin: 0 0 12px; }
footer .col a { display: block; font-size: 14px; color: var(--ink-soft); text-decoration: none; padding: 4px 0; }
footer .col a:hover { color: var(--ink); }
footer .base { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 880px) {
  .navlinks { display: none; }
  .tiers, .grid3 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; gap: 28px; }
  section { padding: 56px 0; }
}

/* ---- code blocks on secondary pages ----
   overflow-x on the block itself, so a long curl line scrolls inside its own
   box instead of widening the whole page on a phone. */
body.page pre {
  margin: 0; padding: 16px 18px; overflow-x: auto; max-width: 100%;
  font-family: var(--mono); font-size: 12.6px; line-height: 1.65;
  color: var(--code-fg); background: var(--code-bg);
  border: 1px solid var(--code-line); border-radius: 10px;
}
body.page pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* Inline <code> — it was inheriting whatever the surrounding paragraph used,
   which in a muted foot-note meant grey-on-grey at 2.3:1. Give it its own
   colour and chip so a flag name stands out wherever it appears. */
body.page code {
  font-family: var(--mono); font-size: .88em; color: var(--ink);
  background: var(--surface-sunk); border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 5px;
}

/* ---- mobile navigation ----
   The horizontal links vanish below 880px. Before this existed, that left a
   phone visitor with sign-in and nothing else — no Product, Pricing, Docs,
   Demo or Contact anywhere on the page. */
.nav-burger {
  display: none; background: none; border: 1px solid var(--line-strong);
  border-radius: 8px; width: 40px; height: 38px; cursor: pointer;
  padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-burger span {
  display: block; width: 17px; height: 1.5px; background: var(--ink);
  transition: transform .18s ease, opacity .18s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-drawer { display: none; }
.nav-drawer a {
  display: block; padding: 13px 28px; font-size: 15.5px; color: var(--ink);
  text-decoration: none; border-top: 1px solid var(--line);
}
.nav-drawer a.here { font-weight: 600; }
.nav-drawer .drawer-cta {
  margin: 14px 28px 8px; padding: 12px 16px; text-align: center; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; border-top: none;
}
.nav-drawer .drawer-alt {
  margin: 0 28px 18px; padding: 11px 16px; text-align: center; border-radius: 8px;
  border: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong);
  color: var(--ink); font-weight: 600;
}

@media (max-width: 880px) {
  .nav-burger { display: flex; }
  .nav-drawer:not([hidden]) { display: block; background: var(--surface); border-top: 1px solid var(--line); }
  /* Keep one primary action visible in the bar itself; the rest moves to the drawer. */
  .nav-right .nav-signin { display: none; }
}

/* ---- focus states ----
   Keyboard users need to see where they are. The default outline is removed by
   several component styles, so put a consistent one back everywhere. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
