/* The landing page (landing.html). Tokens are the Handroll design system's; the page is the one place vermilion
   goes beyond a single action: the sticky bar and the two words "ask" and "install". */
:root {
  color-scheme: light dark;
  --bg: #f2ede1; --surface: #eae5d9; --surface-hover: #e3ddcf; --text: #1d1b19; --muted: #5d5a55;
  --line: #c7c3b9; --field-line: #857f76; --primary-hover: #34302c; --on-bar: #f2ede1;
  --action: #c23a2b; --on-action: #f2ede1; --action-hover: #a93224;
  --error-bg: #fbefc9; --error-rule: #d4a017; --error-icon: #a87400; --error-text: #1d1b19;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513; --surface: #22201d; --surface-hover: #2b2925; --text: #efe8d8; --muted: #aea99d;
    --line: #423f3a; --field-line: #726c63; --primary-hover: #fbf6ea; --on-bar: #efe8d8;
    --action: #ec5a49; --on-action: #171513; --action-hover: #f07a6b;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--sans); }
a { color: var(--text); }
a:hover { color: var(--muted); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
h1, h2, h3, p, figure, ol { margin: 0; }
.defs { display: none; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.small { font-size: 15.3px; color: var(--muted); }
.nowrap { white-space: nowrap; }
.red { color: var(--action); }

.wrap { max-width: 72rem; margin: 0 auto; padding-inline: 16px; }
.section { padding-block: 64px; display: flex; flex-direction: column; gap: 40px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.rule { border-top: 1px solid var(--line); }
h2 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; color: var(--action); }
h3 { font-size: 18.4px; font-weight: 700; }
.lede { font-size: 21px; line-height: 1.45; color: var(--muted); }
@media (min-width: 720px) {
  .section { padding-block: 96px; }
  h2 { font-size: 36px; }
}

/* Sticky vermilion bar */
.bar { position: sticky; top: 0; z-index: 10; background: var(--action); color: var(--on-bar); }
.bar a, .bar a:hover { color: var(--on-bar); }
.bar a:hover { text-decoration-thickness: 2px; }
.bar :focus-visible { outline-color: var(--on-bar); }
.bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-size: 18.4px; font-weight: 700; }
.mark { width: 34px; height: 34px; }
.mark-sm { width: 26px; height: 26px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 15.3px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Hero */
.hero { padding-block: 64px 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.hero-copy { flex: 999 1 480px; min-width: 0; max-width: 42rem; display: flex; flex-direction: column; gap: 24px; container-type: inline-size; }
/* Two lines, never more: each line stays whole and the size shrinks with the column so the longer one fits. */
.hero h1 { font-size: min(72px, 10.6cqi); line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.hero h1 .line { display: block; white-space: nowrap; }
.tag { align-self: flex-start; display: inline-flex; padding: 4px 10px; border-radius: 2px; background: var(--text); color: var(--bg); font-size: 13.6px; font-weight: 600; }
.tag.outline { background: none; color: var(--text); border: 1px solid var(--text); padding: 2px 8px; }

.waitlist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.waitlist label { font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
input[type="email"] { flex: 1 1 260px; min-width: 0; height: 48px; padding: 0 12px; font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--field-line); border-radius: var(--radius); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button, .button { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 20px; font: inherit; font-weight: 600; border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
.action { color: var(--on-action); background: var(--action); }
.action:hover { background: var(--action-hover); }
.button.ink { align-self: flex-start; color: var(--bg); background: var(--text); }
.button.ink:hover { color: var(--bg); background: var(--primary-hover); }
.button.outline { align-self: flex-start; color: var(--text); border: 2px solid var(--text); }
.button.outline:hover { color: var(--text); background: var(--surface-hover); }

/* The form's outcome, shown from the fragment the waitlist redirect lands on: no script needed. */
.outcome { display: none; margin-top: 8px; padding: 16px 20px; border-radius: var(--radius); }
.outcome:target { display: block; }
.joined { background: var(--text); color: var(--bg); }
.joined p:last-child { font-size: 15.3px; }
.hero-copy:has(#joined:target) .waitlist { display: none; }
.problem { background: var(--error-bg); color: var(--error-text); border-left: 4px solid var(--error-rule); }
.problem:target { display: flex; gap: 12px; align-items: flex-start; }
.problem-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--error-icon); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Phone */
.hero-phone { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }
.phone { width: 320px; max-width: 100%; padding: 10px; border-radius: 24px; background: var(--text); }
.screen { height: 600px; border-radius: 16px; overflow: hidden; background: var(--bg); color: var(--text); display: flex; flex-direction: column; }
.screen-head { display: flex; align-items: center; gap: 8px; padding: 28px 16px 12px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.screen-body { flex: 1 1 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.screen-title { font-size: 22px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13.6px; }
.icon { width: 64px; height: 64px; border-radius: 14%; display: flex; align-items: center; justify-content: center; }
.icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.ink { background: var(--text); color: var(--bg); }
.icon.paper { background: var(--surface); border: 1px solid var(--line); }
.icon.add { border: 2px dashed var(--field-line); color: var(--muted); }
.note { padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 13.6px; }
.note .strong { font-size: 15px; }
.screen-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; height: 56px; text-align: center; font-size: 12px; border-top: 1px solid var(--line); background: var(--surface); }

/* Example apps */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.appcard { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.appcard .icon { width: 48px; height: 48px; }
.appcard .icon svg { width: 22px; height: 22px; }
.appcard q { color: var(--muted); font-size: 15.3px; }
.appcard.yours { border: 2px dashed var(--field-line); background: none; }

/* Ask + install */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.panel { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.big { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; color: var(--action); }
.you { align-self: flex-start; max-width: 30rem; padding: 12px 16px; border-radius: var(--radius); background: var(--text); color: var(--bg); }
.approve { padding: 16px; border-radius: var(--radius); background: var(--bg); border: 2px solid var(--text); display: flex; flex-direction: column; gap: 8px; font-size: 15.3px; }
.approve .button { height: 40px; align-self: flex-start; font-size: 15.3px; }
.home { align-self: center; width: 240px; max-width: 100%; padding: 8px; border-radius: 22px; background: var(--text); }
.home-screen { border-radius: 15px; background: var(--bg); padding: 28px 18px 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 12px; justify-items: center; }
.home-screen .icon { width: 52px; height: 52px; border-radius: 12px; }
.home-screen .icon svg { width: 22px; height: 22px; }
.home-screen .new { outline: 3px solid var(--action); outline-offset: 3px; }
.icon.red { background: var(--action); color: var(--on-bar); }

/* Guarantees */
.intro { max-width: 40rem; display: flex; flex-direction: column; gap: 16px; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; }
.trio > div { display: flex; flex-direction: column; gap: 8px; }
.trio svg { width: 28px; height: 28px; fill: none; stroke: var(--action); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alsolist { color: var(--muted); font-size: 15.3px; }

/* Managed vs self-hosted */
pre { margin: 0; font: 13.6px/1.7 var(--mono); overflow-x: auto; }
.plans { display: flex; flex-wrap: wrap; gap: 16px; }
.plan { flex: 1 1 360px; min-width: 0; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 16px; }
.plan-managed { border: 2px solid var(--action); }
.plan-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.plan-head h3 { font-size: 22px; }
.plan-head .tag { align-self: auto; }
.code { padding: 12px 16px; border-radius: var(--radius); background: var(--surface); }

/* FAQ */
.faq { flex-direction: row; flex-wrap: wrap; gap: 48px; }
.faq h2 { flex: 1 1 280px; }
.faq-list { flex: 999 1 560px; min-width: 0; max-width: 40rem; }
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
details p { margin-top: 8px; }

/* Closing call to action */
.closer { padding-block: 64px; display: flex; flex-direction: column; gap: 20px; }
.closer > * { max-width: 40rem; }
@media (min-width: 720px) { .closer { padding-block: 96px; } }
.closer h2 { font-size: 44px; line-height: 1.05; color: var(--text); }
@media (min-width: 720px) { .closer h2 { font-size: 56px; } }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-in { padding-block: 32px 48px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 15.3px; }
.brand-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 599px) { .nav a.wide { display: none; } }
