/* Layout: the customer's chat message on the left becomes a delivery-note draft on the right; everything below runs in one calm reading column. */
:root {
  --bg: #F1F4EE;
  --surface: #FFFFFF;
  --ink: #14201A;
  --muted: #4E5D55;
  --line: #D3DAD1;
  --accent: #C68A14;
  --accent-ink: #7A5205;
  --bubble: #DCEED5;
  --bubble-ink: #14201A;
  --paper: #FFF2B3;
  --paper-ink: #2B2610;
  --paper-line: #E2CF72;
  --stamp: #1E6A48;
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1612; --surface: #15201A; --ink: #E6EEE8; --muted: #A2B1A8; --line: #29372F;
    --accent: #E2A834; --accent-ink: #F2C86C; --bubble: #1C3828; --bubble-ink: #E6EEE8;
    --paper: #3A3315; --paper-ink: #F6ECC0; --paper-line: #5B5021; --stamp: #72D4A4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1612; --surface: #15201A; --ink: #E6EEE8; --muted: #A2B1A8; --line: #29372F;
  --accent: #E2A834; --accent-ink: #F2C86C; --bubble: #1C3828; --bubble-ink: #E6EEE8;
  --paper: #3A3315; --paper-ink: #F6ECC0; --paper-line: #5B5021; --stamp: #72D4A4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.col { max-width: 68ch; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-weight: 850; font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.1; }
h3 { font-weight: 750; font-size: 1.15rem; line-height: 1.25; }
p { margin: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* header */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.mark { font-family: var(--font-display); font-stretch: 125%; font-weight: 900; font-size: 1.25rem; letter-spacing: 0.01em; display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.mark-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--accent); display: inline-block; }

.btn {
  font: inherit; font-weight: 650; cursor: pointer; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg); padding: 0.8rem 1.35rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem; transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 0.55rem 1rem; font-size: 0.95rem; }

/* hero */
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(1.5rem, 5vw, 4rem); }
.hero-copy { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.hero-copy .sub { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.trade { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 0.35rem 0.9rem; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }
.hero-actions small { color: var(--muted); font-size: 0.88rem; }

/* demo: bubble -> note */
.demo { display: grid; grid-template-columns: 1fr; gap: 0.9rem; min-width: 0; }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.chat-head { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }
.bubble { background: var(--bubble); color: var(--bubble-ink); border-radius: 4px 16px 16px 16px; padding: 0.7rem 0.9rem; max-width: 34ch; font-size: 0.98rem; line-height: 1.45; }
.bubble-time { display: block; text-align: right; font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; font-family: var(--font-mono); }
.flow { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); padding-left: 1rem; }
.flow svg { flex: none; }
.note {
  position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 4px;
  padding: 1.3rem 1.2rem 1.1rem; font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.5;
  box-shadow: 0 1px 0 var(--paper-line), 0 12px 28px -18px rgba(0,0,0,.35);
}
.note::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: radial-gradient(circle at 6px 0, var(--bg) 3.5px, transparent 4px) 0 0 / 12px 8px repeat-x;
}
.note-head { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; letter-spacing: 0.06em; border-bottom: 1px dashed var(--paper-line); padding-bottom: 0.55rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.note dl { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.9rem; margin: 0 0 0.7rem; }
.note dt { opacity: 0.75; }
.note dd { margin: 0; font-weight: 500; }
.note table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.note th { text-align: left; font-weight: 600; opacity: 0.75; border-bottom: 1px solid var(--paper-line); padding: 0.2rem 0; }
.note td { padding: 0.3rem 0; border-bottom: 1px dashed var(--paper-line); vertical-align: top; }
.note td.qty { width: 4.2rem; font-weight: 600; }
.note-hint { margin-top: 0.6rem; }
.note-foot { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-top: 0.9rem; flex-wrap: wrap; }
.note-foot span { opacity: 0.75; font-size: 0.78rem; }
.stamp {
  font-family: var(--font-display); font-stretch: 100%; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--stamp); border: 2.5px solid var(--stamp); border-radius: 6px; padding: 0.25rem 0.6rem; font-size: 0.82rem;
  transform: rotate(-4deg); display: inline-block;
}
.note-foot .stamp { opacity: 1; font-size: 0.82rem; }
@media (prefers-reduced-motion: no-preference) {
  .stamp.hit { animation: stamp .45s cubic-bezier(.2,.9,.3,1.4); }
  @keyframes stamp { from { transform: rotate(-4deg) scale(1.35); } to { transform: rotate(-4deg) scale(1); } }
}

/* sections */
section.block .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); display: flex; flex-direction: column; gap: 1.5rem; }
section.block + section.block .wrap { border-top: 1px solid var(--line); }
.lead { color: var(--muted); font-size: 1.1rem; }

.inbox { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.inbox li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.inbox .when { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent-ink); font-weight: 600; letter-spacing: 0.04em; }
.inbox .what { font-size: 1rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { display: flex; flex-direction: column; gap: 0.5rem; counter-increment: step; min-width: 0; }
.steps li::before { content: counter(step); font-family: var(--font-display); font-stretch: 125%; font-weight: 900; font-size: 2.4rem; line-height: 1; color: var(--accent); }
.steps p { color: var(--muted); }

.gets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.gets div { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.gets p { color: var(--muted); }
.tag { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.5rem; align-self: flex-start; }

.price { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.price-num { font-family: var(--font-display); font-stretch: 112%; font-weight: 850; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.price-num small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }
.price p { color: var(--muted); }
.price strong { color: var(--ink); }

/* form */
.signup { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.signup-copy { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.signup-copy p { color: var(--muted); }
form { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
label, legend { font-weight: 600; font-size: 0.95rem; }
.opt { font-weight: 400; color: var(--muted); }
input[type="email"], input[type="text"], select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: 0.65rem 0.75rem; width: 100%;
}
input:focus, select:focus { border-color: var(--ink); outline: none; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.checks { display: flex; flex-wrap: wrap; gap: 0.45rem 1.1rem; }
.checks label, .consent { font-weight: 400; display: inline-flex; gap: 0.45rem; align-items: center; }
.consent { align-items: flex-start; font-size: 0.92rem; color: var(--muted); }
.consent input { margin-top: 0.3rem; }
.consent a { color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-msg { font-size: 0.95rem; }
.form-msg:empty { display: none; }
.form-msg.err { color: var(--accent-ink); font-weight: 600; }
.done { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
/* honeypot: hidden from people, visible to naive bots */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* faq */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 0.5rem; max-width: 64ch; }

footer .wrap { padding-block: 2rem 2.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; color: var(--muted); font-size: 0.88rem; }
footer nav { display: flex; gap: 1rem; }

/* legal pages */
.legal .wrap.page { padding-block: 2rem 4rem; display: flex; flex-direction: column; gap: 1.25rem; }
.legal .page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal .page h2 { font-size: 1.25rem; margin-top: 0.75rem; }
.legal .page p, .legal .page li { max-width: 68ch; color: var(--muted); }
.legal .page ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.todo { background: var(--paper); color: var(--paper-ink); border: 1px dashed var(--paper-line); border-radius: 8px; padding: 0.9rem 1rem; font-family: var(--font-mono); font-size: 0.88rem; max-width: 68ch; }

@media (max-width: 860px) {
  .hero .wrap, .signup { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .inbox, .gets, .two { grid-template-columns: 1fr; }
  .price { grid-template-columns: 1fr; }
  .top .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
