/* Chit landing page. Single committed theme: the app's own paper. */

:root {
  --paper: #fffcf3;
  --paper-deep: #f4efe1;
  --ink: #1b2a4a;
  --ink-soft: #55607a;
  --ink-faint: #8e97aa;
  --rule: #c9d3e3;
  --margin: #b83a3a;
  --margin-soft: #e8a9a9;
  --amber: #9a6414;
  --green: #2f6f4f;
  --white: #ffffff;

  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --measure: 62ch;
  --gutter: 20px;
  --row: 56px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  padding-inline: var(--gutter);
  padding-block: 0 64px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--margin); outline-offset: 3px; }

.wrap { max-width: 1040px; margin: 0 auto; }

h1, h2, h3, .brand, .btn {
  font-family: var(--display);
  font-stretch: 75%;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(40px, 6.4vw, 72px); font-weight: 800; line-height: 0.98; margin: 0 0 20px; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.02; margin: 0 0 18px; text-wrap: balance; }
h3 { font-size: 22px; font-weight: 700; line-height: 1.15; margin: 0 0 8px; }
p { margin: 0 0 16px; max-width: var(--measure); }
ul { margin: 0 0 16px; padding-left: 22px; max-width: var(--measure); }
li { margin-bottom: 6px; }
li::marker { color: var(--margin); }
strong { font-weight: 600; }
.muted { color: var(--ink-soft); }
.small { font-size: 15px; }

/* ---- header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px 8px;
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.top nav { display: flex; gap: 22px; font-family: var(--display); font-stretch: 75%; font-weight: 600; font-size: 17px; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

/* ---- hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-block: 40px 56px;
  border-bottom: 2px solid var(--ink);
}
.hero .lede { font-size: 21px; max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 26px; }
/* The price line is its own row under the buttons, not a column beside them. */
.cta .price-line { flex-basis: 100%; margin: 0; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: #24365f; }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.price-line { font-size: 16px; color: var(--ink-soft); line-height: 1.4; }

/* ---- the pad (hero demo) */
.phone {
  justify-self: center;
  width: min(360px, 100%);
  aspect-ratio: 9 / 18;
  border-radius: 40px;
  background: #0f1420;
  padding: 12px;
  box-shadow: 0 30px 60px -30px rgba(27, 42, 74, 0.55), 0 0 0 1px rgba(0,0,0,0.25);
}
.screen {
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
}
.screen .chrome {
  height: 44px;
  background: #f3efe4;
  border-bottom: 1px solid #e1dacb;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 13px;
}
.screen .chrome .tab { background: var(--ink); color: var(--paper); border-radius: 999px; padding: 4px 12px; }
.screen .chrome .plus { color: var(--ink-soft); padding: 4px 8px; }
.pad {
  flex: 1;
  position: relative;
  background:
    linear-gradient(to right, transparent 43px, var(--margin-soft) 43px, var(--margin-soft) 45px, transparent 45px),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--row) - 1px), var(--rule) calc(var(--row) - 1px), var(--rule) var(--row));
}
.pad .seatlbl {
  position: absolute; left: 0; top: 4px; width: 44px; text-align: center;
  font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 9px; letter-spacing: 2px; color: var(--margin-soft);
}
.row { position: absolute; left: 0; right: 0; height: var(--row); }
.row .ink {
  position: absolute; left: 54px; top: 2px; right: 10px;
  font-family: var(--hand); font-weight: 700; font-size: 34px; line-height: 1; color: var(--ink);
  white-space: nowrap; overflow: hidden;
  width: 0;
}
.row .ink.indent { left: 92px; }
.row .ink.head { font-size: 30px; }
.row .gut {
  position: absolute; left: 0; width: 44px; bottom: 6px; text-align: center;
  font-family: var(--hand); font-weight: 700; font-size: 28px; color: var(--ink);
  opacity: 0;
}
.row .rule {
  position: absolute; left: 60px; right: 40px; top: 50%; height: 3px; background: var(--ink); opacity: 0.7; border-radius: 2px;
  width: 0;
}
.row .cap {
  position: absolute; right: 10px; bottom: 3px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  opacity: 0;
}
.row .cap.amber { color: var(--amber); text-decoration: underline dotted; }
.row .cap.red { color: var(--margin); font-weight: 500; }
.row .cap.faint { color: var(--ink-faint); font-style: italic; }
.row .seat { position: absolute; left: 0; width: 44px; bottom: 2px; text-align: center; font-family: var(--display); font-stretch: 75%; font-size: 11px; font-weight: 700; color: var(--margin); opacity: 0; }
.toolbar {
  height: 52px; background: #f3efe4; border-top: 1px solid #e1dacb;
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
  font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 14px;
}
.toolbar .ticket { background: var(--ink); color: var(--paper); border-radius: 10px; padding: 8px 14px; }
.toolbar .undo { background: #ebe5d5; border-radius: 10px; padding: 8px 12px; }

/* One orchestrated sequence: ink writes, then the caption appears. */
@media (prefers-reduced-motion: no-preference) {
  .row .ink { animation: write 0.9s steps(18, end) forwards; animation-delay: var(--d, 0s); }
  .row .gut { animation: pop 0.25s ease-out forwards; animation-delay: var(--d, 0s); }
  .row .rule { animation: draw 0.5s ease-out forwards; animation-delay: var(--d, 0s); }
  .row .cap, .row .seat { animation: pop 0.3s ease-out forwards; animation-delay: calc(var(--d, 0s) + 1.1s); }
}
@media (prefers-reduced-motion: reduce) {
  .row .ink { width: 100%; }
  .row .rule { width: auto; }
  .row .cap, .row .gut, .row .seat { opacity: 1; }
}
@keyframes write { from { width: 0; } to { width: 100%; } }
@keyframes draw { from { width: 0; } to { width: calc(100% - 100px); } }
@keyframes pop { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---- sections */
section { padding-block: 56px; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* the reading table: what you write / what it reads */
.reads { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 17px; }
.reads th { text-align: left; font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 16px; padding: 10px 12px 10px 0; border-bottom: 2px solid var(--ink); }
.reads td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.reads td.w { font-family: var(--hand); font-weight: 700; font-size: 28px; line-height: 1; white-space: nowrap; width: 42%; }
.reads td.w .gutter-digit { display: inline-block; width: 34px; margin-right: 10px; color: var(--margin); border-right: 2px solid var(--margin-soft); }
.reads td.w .ind { display: inline-block; width: 46px; }
.reads td.w .line { display: inline-block; width: 120px; height: 3px; background: var(--ink); vertical-align: middle; border-radius: 2px; opacity: 0.7; }
.reads td.r { color: var(--ink); }
.reads td.r .note { display: block; color: var(--ink-soft); font-size: 15px; margin-top: 2px; }

/* steps: this content IS a sequence */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: none; }
.steps li { margin: 0; padding-top: 14px; border-top: 2px solid var(--ink); }
.steps h3 { margin-top: 0; }
.steps p { margin-bottom: 0; font-size: 17px; }

/* privacy band: the kitchen-view black on white, the app's own contrast mode */
.band {
  background: var(--ink);
  color: var(--paper);
  border-radius: 18px;
  padding: 40px clamp(20px, 4vw, 48px);
  margin-block: 8px;
}
.band h2 { color: var(--paper); }
.band p { color: #d9dde8; }
.band a { color: var(--paper); }
.band ul { color: #d9dde8; }
.band li::marker { color: var(--margin-soft); }

/* pricing: one number, quiet */
.price { display: grid; grid-template-columns: auto 1fr; gap: 28px 40px; align-items: baseline; }
.price .amount { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: clamp(56px, 9vw, 96px); line-height: 0.9; }
.price .amount small { font-size: 0.42em; font-weight: 700; color: var(--ink-soft); margin-left: 4px; }
.price ul { margin-top: 6px; }

/* faq */
details { border-top: 1px solid var(--rule); padding: 14px 0; max-width: var(--measure); }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-family: var(--display); font-stretch: 75%; font-weight: 700; font-size: 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--margin); font-weight: 800; }
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; margin-bottom: 4px; }

/* footer */
footer { padding-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--ink-soft); font-size: 15px; }
footer nav { display: flex; gap: 18px; }
footer a { color: var(--ink-soft); }

/* legal pages */
.doc { max-width: 68ch; padding-block: 24px 40px; }
.doc h1 { font-size: clamp(34px, 5vw, 52px); }
.doc h2 { font-size: 26px; margin-top: 34px; }
.doc .updated { color: var(--ink-soft); font-size: 15px; margin-top: -8px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 24px 40px; }
  .phone { order: 2; }
  .two { grid-template-columns: 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .price { grid-template-columns: 1fr; gap: 8px; }
  .top nav { gap: 14px; font-size: 15px; }
  .reads td.w { font-size: 24px; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  :root { --row: 50px; }
  .row .ink { font-size: 30px; }
  .reads td.w { width: 48%; white-space: normal; }
}
