/* ── slapp — slapp.dev ──────────────────────────────────────
   One design flow with the phone app: cream paper, warm ink,
   tilted pastel lines at -7°, pencil stripes at 45°, serif names,
   mono labels, lime alive. Fraunces for display. No dark panels,
   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;
  --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; }
.brand .dot { color: var(--red-bright); }
.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: 140px 0 30px;
  text-align: center;
}
.hero-icon {
  width: 92px; height: 92px;
  margin: 0 auto 34px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(33, 28, 20, .18), 0 2px 8px rgba(33, 28, 20, .12);
}
.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: 26px;
}
.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 38em;
  margin: 0 auto 40px;
}

/* ── 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);
}

.soon-row {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 22px;
}
.soon {
  font: 400 11.5px var(--mono);
  letter-spacing: .08em;
  color: var(--ink-faint);
  border: 1px dashed var(--rule);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ── sections ── */
.sec { padding: clamp(60px, 8vw, 96px) 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;
}
.try {
  font: 400 12.5px var(--mono);
  color: var(--red);
  white-space: nowrap;
}

/* ── the phone frame ── */
.phone {
  margin: 48px 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 box: tilted channel bars ── */
.bar {
  position: relative;
  margin: 14px -30px;
  padding: 15px 40px 13px;
  background: var(--bar, #EAEAEA);
  transform: rotate(var(--tilt));
  border-radius: 2px;
  box-shadow: 0 10px 26px rgba(33, 28, 20, .14);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform .2s cubic-bezier(.22,.9,.28,1), box-shadow .2s;
}
.bar:hover { transform: rotate(var(--tilt)) translateY(-2px); }
.bar.holding {
  transform: rotate(var(--tilt)) scale(1.015);
  box-shadow: 0 18px 40px rgba(33, 28, 20, .22);
  cursor: grabbing;
}
.bar-head { display: flex; align-items: baseline; gap: 8px; }
.bar-name { font: 600 17px var(--serif); color: rgba(0, 0, 0, .82); }
.bar-ago { font: 400 10px var(--mono); color: rgba(0, 0, 0, .45); }
.bar-preview {
  font: 400 12.5px var(--sans);
  color: rgba(0, 0, 0, .55);
  margin-top: 2px;
}
.bar-preview.agent { font-family: var(--serif); color: rgba(0,0,0,.68); }
.meter {
  position: absolute; left: 40px; bottom: 9px;
  width: 150px; height: 4px;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .15s;
}
.bar.holding .meter { opacity: 1; }
.meter span {
  display: block; height: 100%; width: 10%;
  background: var(--alive);
  border-radius: 2px;
  transition: width .12s linear;
}
.bar-state {
  position: absolute; right: 40px; bottom: 7px;
  font: 400 10.5px var(--mono);
  color: rgba(0, 0, 0, .7);
  opacity: 0;
  transition: opacity .15s;
}
.bar.holding .bar-state { opacity: 1; }
.bar.sent .bar-preview { animation: riseIn .5s cubic-bezier(.22,.9,.28,1); }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ── the chat: the line's own color, pencil stripes at 45° ── */
.chat {
  height: 560px;
  display: flex; flex-direction: column;
  background: #6BD6ED;
  padding: 0;
  overflow: hidden;
}
/* the pencil backdrop — same pencil, tilted the OTHER way (45° rising) */
.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,.10), rgba(255,255,255,.045));
}
.chat::after {
  width: 60px;
  right: -4%; bottom: -1200px;
  background: linear-gradient(rgba(0,0,0,.05), rgba(0,0,0,.025));
}

.chat-head {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 10px;
}
.chat-name { font: 600 19px var(--serif); color: rgba(0,0,0,.85); }
.chat-ago { font: 700 11px var(--mono); color: rgba(0,0,0,.5); }
.chat-stop {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.65);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.chat-stop svg { width: 12px; height: 12px; fill: rgba(0,0,0,.75); }
.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: 6px 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: rgba(0, 0, 0, .78);
  color: #fff;
  font: 400 14.5px/1.5 var(--sans);
}
.bub.user .when { color: rgba(255,255,255,.55); text-align: right; }
.bub.agent {
  align-self: flex-start;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(0, 0, 0, .08);
  color: rgba(0, 0, 0, .82);
  font: 400 15.5px/1.55 var(--serif);
}
.bub.agent .when { color: rgba(0,0,0,.45); }
.bub.photo {
  align-self: flex-end;
  background: rgba(0, 0, 0, .78);
  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(0,0,0,.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: 10px 12px 12px;
}
.chat-cam {
  width: 22px; height: 22px; flex: none;
  fill: none;
  stroke: rgba(0,0,0,.62);
  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(0,0,0,.08);
  font: 400 14px var(--sans);
  color: rgba(0,0,0,.38);
  overflow: hidden;
  white-space: nowrap;
}
.chat-mic {
  position: relative;
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.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(0,0,0,.8);
  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); }
}

/* ── features as bars ── */
.feats {
  margin-top: 56px;
  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; }

/* ── the wire ── */
.wire-row {
  margin-top: 52px;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 2.4vw, 22px);
  flex-wrap: wrap;
  padding: 40px 0;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
}
.wire-bar {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 150px;
  padding: 15px 26px;
  background: var(--c);
  border-radius: 2px;
  transform: rotate(var(--tilt));
  box-shadow: 0 12px 30px rgba(33, 28, 20, .13);
  text-align: center;
}
.wire-name { font: 600 17px var(--serif); color: rgba(0,0,0,.82); }
.wire-sub { font: 400 10px var(--mono); color: rgba(0,0,0,.5); margin-top: 3px; letter-spacing: .08em; text-transform: uppercase; }
.wire-arr {
  width: 30px; height: 30px;
  fill: none; stroke: var(--red);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.steps {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 30px);
  list-style: none;
}
.steps li { border-top: 1px solid var(--rule); padding-top: 16px; }
.steps h3 { font: 600 18px var(--serif); margin-bottom: 6px; }
.steps p { font: 400 14px/1.6 var(--sans); color: var(--ink-soft); }

/* ── install ── */
.reqs {
  margin-top: 56px;
  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(70px, 10vw, 120px); }
.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-icon { width: 22px; height: 22px; border-radius: 5px; }
.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); }

/* ── responsive ── */
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .reqs { grid-template-columns: 1fr; }
  .feat:nth-child(odd) { transform: rotate(var(--tilt)) translateX(-6px); }
  .feat:nth-child(even) { transform: rotate(var(--tilt)) translateX(6px); }
  .wire-bar { min-width: 120px; padding: 13px 18px; }
}
@media (max-width: 560px) {
  .navlinks a:not(:last-child) { display: none; }
  .hero { padding-top: 116px; }
  .cmd { padding: 12px 16px 14px; }
  .cmd .cmd-state { top: -20px; right: 10px; }
  .bar { margin: 14px -44px; padding: 14px 50px 12px; }
  .meter { left: 50px; width: 110px; }
  .bar-state { right: 50px; }
  .chat { height: 520px; }
  .bub { max-width: 92%; }
  .bub.photo .ph { width: 150px; height: 102px; }
}

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