/* ── slapp — slapp.dev ──────────────────────────────────────
   One design flow with the phone app: cream paper, warm ink,
   tilted pastel lines at -7°, serif names, mono labels, lime alive.
   Fraunces for display. The tape — the live conversation — is a
   dark canvas; the rest stays cream. No IDE aesthetics anywhere. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-normal-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2019, U+2026;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-normal-latin-ext.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2019, U+2026;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #EDE2C9;
  --paper-deep: #E4D6B8;
  --ink: #211C14;
  --ink-soft: rgba(33, 28, 20, .74);
  --ink-faint: rgba(33, 28, 20, .45);
  --red: #C4362A;
  --red-bright: #E45A4E;
  --stripe-green: #A7E197;
  --stripe-orange: #F6AE59;
  --alive: #C7E547;
  --tape: #14151a;
  --tape-line: rgba(255, 255, 255, .06);
  --rule: rgba(33, 28, 20, .25);
  --rule-light: rgba(33, 28, 20, .12);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --tilt: -7deg;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 340 17px/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--red-bright); color: var(--paper); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
svg { display: block; }
em { font-style: italic; }

/* ── nav ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 64rem; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  height: 58px;
  background: rgba(237, 226, 201, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-light);
}
.brand { font: 600 24px var(--serif); letter-spacing: -.01em; display: flex; align-items: center; gap: 9px; }
.brand .dot { color: var(--red-bright); }
/* the mark — a sheet of grid paper, from site/favicon.svg (see LOGO-NOTE.txt) */
.mark {
  width: 25px; height: 25px;
  flex: none;
}
.navlinks { display: flex; gap: clamp(13px, 2.4vw, 24px); }
.navlinks a {
  font: 400 11.5px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .15s;
}
.navlinks a:hover { color: var(--red); }

main { max-width: 64rem; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

/* ── the stripe band (full-bleed, tilted with the lines) ── */
.band { position: relative; height: 88px; overflow: hidden; }
.band-in {
  position: absolute; left: -6%; top: 16px;
  width: 112%;
  transform: rotate(var(--tilt));
}
.band-in span { display: block; height: 19px; }
.band-in span:nth-child(1) { background: var(--red-bright); }
.band-in span:nth-child(2) { background: var(--stripe-green); }
.band-in span:nth-child(3) { background: var(--stripe-orange); }

/* ── hero ── */
.hero {
  padding: 120px 0 24px;
  text-align: center;
}
/* the mark, big, on the hero — one vector, the same file as the tab icon */
.hero-mark {
  width: 96px; height: 96px;
  margin: 0 auto 30px;
  display: block;
}
.kicker {
  font: 400 11.5px var(--mono);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.kicker.red { color: var(--red); }
.hero h1 {
  font: 340 clamp(3rem, 8vw, 5.6rem)/1.02 var(--serif);
  letter-spacing: -.015em;
  margin-bottom: 22px;
}
.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 38em;
  margin: 0 auto 32px;
}
.lede strong { color: var(--ink); font-weight: 600; }

/* ── price line ── */
.price {
  margin-top: 26px;
  font: 400 12px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.price strong { color: var(--ink); font-weight: 600; letter-spacing: 0; }

/* ── the command line (a bar, not a terminal) ── */
.cmd {
  position: relative;
  display: flex; align-items: center; gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: var(--alive);
  transform: rotate(var(--tilt));
  padding: 14px 22px 16px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 14px 38px rgba(33, 28, 20, .18);
  transition: transform .18s cubic-bezier(.22,.9,.28,1), box-shadow .18s;
}
.cmd:hover { transform: rotate(var(--tilt)) translateY(-2px); box-shadow: 0 20px 48px rgba(33, 28, 20, .24); }
.cmd.wide { padding: 16px 26px 18px; }
.cmd code {
  font: 400 clamp(12.5px, 1.7vw, 14.5px)/1.4 var(--mono);
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
}
.cmd .cmd-ps1 { font: 500 14px var(--mono); color: rgba(33,28,20,.55); margin-right: 8px; }
.cmd .cmd-state {
  position: absolute; right: 14px; top: -22px;
  font: 400 10.5px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity .15s;
}
.cmd .cmd-state.on { opacity: 1; }
.cmd .cmd-meter {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 4px;
  overflow: hidden;
}
.cmd .cmd-meter span {
  display: block; height: 100%; width: 0%;
  background: rgba(33, 28, 20, .55);
}
.cmd.copied { box-shadow: 0 14px 38px rgba(33, 28, 20, .18), 0 0 0 2.5px var(--ink) inset; }
.cmd-hint {
  margin-top: 26px;
  font: 400 11px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── sections ── */
.sec { padding: clamp(56px, 8vw, 92px) 0 0; }
.sec h2 {
  font: 400 clamp(2rem, 4.2vw, 3.1rem)/1.08 var(--serif);
  letter-spacing: -.012em;
  margin-bottom: 14px;
}
.sec-sub {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 40em;
}

/* ── the phone frame ── */
.phone {
  margin: 44px auto 0;
  width: min(400px, 100%);
  background: #E6E6E6;
  border-radius: 34px;
  padding: 16px 14px 20px;
  box-shadow: 0 30px 90px rgba(33, 28, 20, .28), 0 2px 0 rgba(255,255,255,.5) inset;
  overflow: hidden;
}
.phone-screen { position: relative; padding: 8px 0 12px; }
.phone-cap {
  margin-top: 24px;
  text-align: center;
  font: 400 11px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── the tape: dark canvas, the live conversation streams on it ── */
.tape-sec { padding-top: clamp(56px, 8vw, 92px); }
.tape-phone .phone {
  background: #0c0d12;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}
.tape-phone .phone-screen { padding: 0; }
.chat {
  height: 560px;
  display: flex; flex-direction: column;
  background: var(--tape);
  color: #e9e6dc;
  padding: 0;
  overflow: hidden;
  box-shadow: inset 0 0 110px rgba(0, 0, 0, .55);
}
/* faint rolling sheen — the tape is live */
.chat::before, .chat::after {
  content: "";
  position: absolute;
  height: 2600px;
  transform: rotate(45deg);
  pointer-events: none;
}
.chat::before {
  width: 240%;
  left: -60%; top: -620px;
  background: linear-gradient(rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
}
.chat::after {
  width: 60px;
  right: -4%; bottom: -1200px;
  background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .06));
}
.chat-head {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  padding: 28px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.chat-name { font: 600 19px var(--serif); color: #f2efe6; }
.chat-ago { font: 700 11px var(--mono); color: rgba(255, 255, 255, .5); }
.chat-stop {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.chat-stop svg { width: 12px; height: 12px; fill: rgba(255, 255, 255, .8); }
.chat.running .chat-stop {
  opacity: 1;
  animation: breathe 1.1s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.chat-log {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 14px 12px;
  overflow-y: auto;
  scrollbar-width: none;
}
.chat-log::-webkit-scrollbar { display: none; }
.bub {
  max-width: 86%;
  padding: 10px 15px;
  border-radius: 22px;
  animation: riseIn .45s cubic-bezier(.22,.9,.28,1);
}
.bub .when {
  display: block;
  font: 400 9px var(--mono);
  margin-top: 4px;
  letter-spacing: .06em;
}
.bub.user {
  align-self: flex-end;
  background: #e9e6dc;
  color: #14151a;
  font: 400 14.5px/1.5 var(--sans);
}
.bub.user .when { color: rgba(20, 21, 26, .55); text-align: right; }
.bub.agent {
  align-self: flex-start;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #f2efe6;
  font: 400 15.5px/1.55 var(--serif);
}
.bub.agent .when { color: rgba(255, 255, 255, .45); }
.bub.agent.thinking {
  border-style: dashed;
  background: rgba(199, 229, 71, .08);
  border-color: rgba(199, 229, 71, .35);
}
.bub.agent.thinking .when { color: var(--alive); }
.bub.photo {
  align-self: flex-end;
  background: rgba(255, 255, 255, .1);
  padding: 8px;
}
.bub.photo .ph {
  position: relative;
  width: 190px; height: 128px;
  border-radius: 14px;
  overflow: hidden;
  background: #F6F1E4;
}
.bub.photo .ph svg { width: 100%; height: 100%; }
.bub.photo .when { color: rgba(255, 255, 255, .55); }
.chat-hint {
  position: relative; z-index: 2;
  align-self: flex-start;
  font: 400 10px var(--mono);
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .45);
  padding-left: 4px;
  animation: riseIn .45s cubic-bezier(.22,.9,.28,1);
}

.chat-input {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.chat-cam {
  width: 22px; height: 22px; flex: none;
  fill: none;
  stroke: rgba(255, 255, 255, .6);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chat-field {
  flex: 1;
  min-height: 42px;
  display: flex; align-items: center;
  padding: 8px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  font: 400 14px var(--sans);
  color: rgba(20, 21, 26, .38);
  overflow: hidden;
  white-space: nowrap;
}
.chat-field::placeholder { color: rgba(20, 21, 26, .38); }
.chat-mic {
  position: relative;
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .15s;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
}
.chat-mic svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: rgba(255, 255, 255, .85);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chat-mic .ic-wave { display: none; }
.chat-mic.rec {
  background: var(--alive);
  transform: scale(1.06);
}
.chat-mic.rec .ic-mic { display: none; }
.chat-mic.rec .ic-wave { display: block; }
.chat-mic::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--alive);
  opacity: 0;
}
.chat-mic.rec::after { animation: ripple 1.2s ease-out infinite; }
@keyframes ripple {
  from { opacity: .8; transform: scale(.9); }
  to { opacity: 0; transform: scale(1.35); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ── the SLAPP: paper key ── */
.slapp-row {
  margin-top: 48px;
  display: flex; align-items: center; gap: clamp(28px, 6vw, 64px);
  align-items: flex-start;
}
.qr-ph {
  flex: none;
  width: 200px; height: 200px;
  background: #f6f1e4;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(33, 28, 20, .2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.qr-ph-body { width: 100%; height: 100%; display: flex; flex-direction: column; }
.qr-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 3px;
  aspect-ratio: 1;
  width: 100%;
}
.qr-grid span {
  background: #1a1712;
  border-radius: 1px;
}
.qr-tag {
  margin-top: 10px;
  text-align: center;
  font: 500 9px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #4a4234;
}
.slapp-steps { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.slapp-steps h3 { font: 600 18px var(--serif); margin-bottom: 4px; }
.slapp-steps p { font: 400 14px/1.6 var(--sans); color: var(--ink-soft); }

/* ── features as bars ── */
.feats {
  margin-top: 52px;
  display: flex; flex-direction: column;
  gap: 22px;
  padding-bottom: 10px;
}
.feat {
  display: flex; align-items: center; gap: 16px;
  width: min(600px, 96%);
  margin: 0 auto;
  padding: 16px 24px;
  background: var(--c);
  border-radius: 2px;
  transform: rotate(var(--tilt));
  box-shadow: 0 12px 30px rgba(33, 28, 20, .13);
  transition: transform .2s cubic-bezier(.22,.9,.28,1), box-shadow .2s;
}
.feat:nth-child(odd) { transform: rotate(var(--tilt)) translateX(-14px); }
.feat:nth-child(even) { transform: rotate(var(--tilt)) translateX(14px); }
.feat:hover { box-shadow: 0 20px 44px rgba(33, 28, 20, .2); }
.feat svg {
  width: 24px; height: 24px; flex: none;
  fill: none;
  stroke: rgba(0, 0, 0, .72);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feat h3 { font: 600 16.5px var(--serif); color: rgba(0, 0, 0, .82); }
.feat p { font: 400 12.5px/1.5 var(--sans); color: rgba(0, 0, 0, .6); margin-top: 1px; }

/* ── self-host / honesty ── */
.self { padding-top: clamp(56px, 8vw, 92px); }
.honesty {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 3vw, 28px);
}
.honesty-bar {
  padding: 24px;
  background: rgba(33, 28, 20, .03);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  border-radius: 4px;
}
.h-title { font: 600 17px var(--serif); color: var(--ink); margin-bottom: 8px; }
.h-body { font: 400 13.5px/1.6 var(--sans); color: var(--ink-soft); }
.h-body strong { color: var(--ink); }
.h-body code { font: 400 11.5px var(--mono); color: var(--red); }
.trust {
  margin-top: 44px;
  text-align: center;
  font: 400 11.5px var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.docs {
  margin-top: 26px;
  font: 400 14px var(--serif);
  color: var(--ink-soft);
  line-height: 1.7;
}
.docs a { color: var(--red); border-bottom: 1px solid rgba(196,54,42,.35); }
.docs a:hover { border-bottom-color: var(--red); }

/* ── install ── */
.reqs {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}
.req-h {
  font: 400 11px var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule);
}
.mono-list { list-style: none; font: 400 13px/1.55 var(--mono); }
.mono-list li { margin-bottom: 10px; }
.mono-list span { display: block; color: var(--ink-faint); font-size: 11.5px; margin-top: 2px; }

/* ── footer ── */
.foot { margin-top: clamp(64px, 10vw, 110px); }
.foot-body {
  padding: 0 clamp(20px, 4vw, 40px) 60px;
  text-align: center;
}
.foot-brand {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.foot-line { font: 400 14px var(--serif); color: var(--ink-soft); margin-bottom: 22px; }
.foot-line a { color: var(--red); border-bottom: 1px solid rgba(196,54,42,.35); }
.foot-line a:hover { border-bottom-color: var(--red); }
.foot-links { display: flex; gap: 24px; justify-content: center; }
.foot-links a {
  font: 400 11.5px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color .15s;
}
.foot-links a:hover { color: var(--red); }
.foot-note {
  margin-top: 22px;
  font: 400 10px var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── responsive ── */
@media (max-width: 860px) {
  .honesty { grid-template-columns: 1fr; }
  .slapp-row { flex-direction: column; align-items: center; text-align: center; }
  .honesty-bar { padding: 20px; }
}
@media (max-width: 560px) {
  .navlinks a:not(:last-child) { display: none; }
  .hero { padding-top: 108px; }
  .cmd { padding: 12px 16px 14px; }
  .cmd .cmd-state { top: -20px; right: 10px; }
  .chat { height: 520px; }
  .bub { max-width: 92%; }
  .bub.photo .ph { width: 150px; height: 102px; }
  .qr-ph { width: 168px; height: 168px; }
  .honesty-bar { padding: 18px; }
}

/* ── motion respect ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ── scroll meter ── */
.meter-line {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: var(--alive);
  z-index: 60;
  transition: width .08s linear;
  pointer-events: none;
}

/* ── peel-in reveals (opacity-only for tilted elements; pop only for flat ones) ── */
.rv { opacity: 0; transition: opacity .7s cubic-bezier(.22,.9,.28,1); }
.rv.pop { transform: translateY(14px); transition: opacity .7s cubic-bezier(.22,.9,.28,1), transform .7s cubic-bezier(.22,.9,.28,1); }
.rv.on { opacity: 1; }
.rv.pop.on { transform: none; }

/* ── phone realism ── */
.island {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 76px; height: 20px; border-radius: 10px;
  background: #101013;
  z-index: 6;
}
.homebar {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 4px; border-radius: 2px;
  background: rgba(0, 0, 0, .30);
  z-index: 6;
}
#theBox { padding: 30px 0 18px; }
.chat-head { padding-top: 30px; }
.chat-input { padding-bottom: 16px; }
