:root {
  --paper:#ffffff;
  --floor:#f4f4f6;
  --ink:#0b0b0c;
  --ink-2:#3a3a3f;
  --ink-3:#6f6f76;
  --hair:#e7e7ea;
  --card:#ffffff;
  --shadow-rest:0 1px 2px rgba(11,11,12,.04), 0 10px 30px -14px rgba(11,11,12,.18), 0 30px 60px -40px rgba(11,11,12,.16);
  --shadow-lift:0 1px 2px rgba(11,11,12,.05), 0 18px 40px -16px rgba(11,11,12,.24), 0 44px 80px -44px rgba(11,11,12,.22);
  --radius:22px;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
* { margin:0; padding:0; box-sizing:border-box; }
html, body { min-height:100%; }
body {
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a { color:inherit; }
:focus-visible { outline:2px solid var(--ink); outline-offset:3px; border-radius:6px; }

/* Access page */
.page {
  min-height:100vh;
  background:
    radial-gradient(120% 70% at 50% 100%, var(--floor) 0%, rgba(244,244,246,0) 60%),
    var(--paper);
}
.wrap {
  max-width:960px;
  margin:0 auto;
  padding:clamp(48px, 9vh, 96px) 24px 56px;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.masthead { text-align:center; max-width:560px; }
.logo { width:165px; height:auto; display:block; margin:0 auto 40px; }
.eyebrow {
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--ink-3);
  margin-bottom:14px;
}
.live-dot {
  width:7px; height:7px; border-radius:50%;
  background:#1fb254;
  box-shadow:0 0 0 0 rgba(31,178,84,.45);
  animation:pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow:0 0 0 0 rgba(31,178,84,.45); }
  70% { box-shadow:0 0 0 9px rgba(31,178,84,0); }
  100% { box-shadow:0 0 0 0 rgba(31,178,84,0); }
}
h1 {
  font-size:clamp(30px, 4.4vw, 40px);
  font-weight:600;
  letter-spacing:-.03em;
  line-height:1.1;
  text-wrap:balance;
}
.sub {
  color:var(--ink-3);
  font-size:16px;
  line-height:1.6;
  margin:16px auto 0;
  max-width:500px;
  text-wrap:pretty;
}

.cards {
  width:100%;
  max-width:880px;
  margin-top:52px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:22px;
}
.card {
  background:var(--card);
  border:1px solid var(--hair);
  border-radius:var(--radius);
  padding:30px 30px 28px;
  display:flex;
  flex-direction:column;
  box-shadow:var(--shadow-rest);
  transition:transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s cubic-bezier(.2,.7,.2,1), border-color .28s;
}
.cards { perspective:1200px; }
.card { transform-style:preserve-3d; }
.card:hover { transform:translateY(-4px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); box-shadow:var(--shadow-lift); border-color:#dcdce0; }
.tag {
  font-size:11px;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--ink-3);
  margin-bottom:16px;
}
.card h2 {
  font-size:22px;
  font-weight:600;
  letter-spacing:-.02em;
  line-height:1.2;
  margin-bottom:10px;
}
.card p:not(.tag) {
  color:var(--ink-2);
  font-size:14.5px;
  line-height:1.6;
  margin-bottom:26px;
  flex:1;
  text-wrap:pretty;
}
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  align-self:flex-start;
  min-height:44px;
  padding:0 20px;
  border-radius:999px;
  background:var(--ink);
  color:#fff;
  font-weight:600;
  font-size:14px;
  letter-spacing:-.005em;
  text-decoration:none;
  transition:background .2s, transform .2s;
}
.btn { gap:10px; }
.btn .arrow { width:14px; height:14px; position:relative; flex:none; transition:transform .25s cubic-bezier(.2,.7,.2,1); }
.btn .arrow::before { content:""; position:absolute; left:0; top:50%; width:12px; height:1.5px; background:currentColor; transform:translateY(-50%); }
.btn .arrow::after { content:""; position:absolute; right:1px; top:50%; width:7px; height:7px; border-top:1.5px solid currentColor; border-right:1.5px solid currentColor; transform:translateY(-50%) rotate(45deg); }
.btn:hover { background:#232326; }
.btn:hover .arrow { transform:translateX(4px); }
.btn:active { transform:scale(.98); }

/* Orchestrated reveal */
.reveal {
  opacity:0;
  transform:translateY(14px);
  animation:rise .7s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay:calc(var(--i, 0) * 90ms + 80ms);
}
.logo.reveal { transform:translateY(8px) scale(.98); }
@keyframes rise { to { opacity:1; transform:translateY(0) scale(1); } }
.card.reveal:hover { animation:none; opacity:1; }
.footer {
  margin-top:64px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--ink-3);
  font-size:12px;
  letter-spacing:.02em;
}
.footer img { height:14px; filter:invert(1); opacity:.7; }

@media (max-width:720px) {
  .wrap { padding:44px 20px 48px; }
  .logo { margin-bottom:32px; }
  .cards { grid-template-columns:1fr; gap:16px; margin-top:40px; }
  .card { padding:26px 24px 24px; }
  .btn { align-self:stretch; }
}
@media (prefers-reduced-motion:reduce) {
  .card, .btn, .btn .arrow { transition:none; }
  .card:hover { transform:none; }
  .reveal { animation:none; opacity:1; transform:none; }
  .live-dot { animation:none; }
}

/* Phone stage (chat + reputation) */
.stage {
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:28px 16px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 42%, #ffffff 0%, #f7f7f8 55%, #f1f1f3 100%);
}
.away {
  font-size:13px;
  color:var(--ink-3);
  text-decoration:none;
  letter-spacing:.01em;
}
.away:hover { color:var(--ink); }

.device {
  animation:phone-in .8s cubic-bezier(.2,.7,.2,1) both;
  position:relative;
  height:min(812px, calc(100dvh - 64px));
  aspect-ratio:393 / 812;
  width:auto;
  max-width:min(393px, calc(100vw - 24px));
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI',sans-serif;
  color:#111;
  filter:drop-shadow(0 30px 50px rgba(11,11,12,.22)) drop-shadow(0 2px 6px rgba(11,11,12,.10));
}
.hw {
  position:absolute;
  background:#1a1a1c;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
}
.hw.silent { left:-3px; top:118px; width:3px; height:22px; border-radius:2px 0 0 2px; }
.hw.vol-up { left:-3px; top:168px; width:3px; height:52px; border-radius:2px 0 0 2px; }
.hw.vol-dn { left:-3px; top:228px; width:3px; height:52px; border-radius:2px 0 0 2px; }
.hw.power { right:-3px; top:196px; width:3px; height:92px; border-radius:0 2px 2px 0; }
.bezel {
  position:absolute;
  inset:0;
  padding:11px;
  border-radius:58px;
  background:linear-gradient(160deg, #6a6a70 0%, #2c2c30 18%, #111113 46%, #2a2a2e 100%);
  box-shadow:
    inset 0 1.2px 0 rgba(255,255,255,.34),
    inset 0 -1px 0 rgba(0,0,0,.7),
    0 0 0 1px #0b0b0c;
}
.screen {
  height:100%;
  border-radius:47px;
  overflow:hidden;
  background:#fff;
  display:flex;
  flex-direction:column;
  position:relative;
  color-scheme:light;
}
.island {
  position:absolute;
  top:11px;
  left:50%;
  transform:translateX(-50%);
  width:120px;
  height:35px;
  background:#000;
  border-radius:19px;
  z-index:8;
}
.status {
  position:relative;
  z-index:7;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  padding:14px 26px 0;
  height:52px;
  font-size:15px;
  font-weight:600;
  letter-spacing:.02em;
}
.sig { display:flex; align-items:center; gap:6px; color:#111; }
.nav {
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:start;
  padding:6px 14px 8px;
  background:linear-gradient(#fff 60%, rgba(255,255,255,.86));
}
.fab {
  width:36px;
  height:36px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.12), 0 6px 16px rgba(0,0,0,.06);
  display:grid;
  place-items:center;
  color:#111;
  text-decoration:none;
  margin-top:18px;
}
.fab.ghost { pointer-events:none; }
.who { display:flex; flex-direction:column; align-items:center; margin-top:2px; }
.photo {
  width:52px;
  height:52px;
  border-radius:50%;
  object-fit:cover;
  background:#d8d8dc;
  box-shadow:0 1px 2px rgba(0,0,0,.16);
}
.name-pill {
  margin-top:-8px;
  background:#fff;
  border-radius:14px;
  padding:3px 9px 3px 11px;
  font-size:13px;
  font-weight:600;
  box-shadow:0 1px 3px rgba(0,0,0,.14);
  display:flex;
  align-items:center;
  gap:2px;
}
.caret { color:#c7c7cc; font-size:16px; line-height:1; }
.thread {
  flex:1;
  overflow:auto;
  padding:6px 10px 10px;
  display:flex;
  flex-direction:column;
  gap:3px;
  background:#fff;
}
.im-day { align-self:center; margin:10px 0 8px; font-size:12px; font-weight:600; color:#8e8e93; }
.row { display:flex; flex-direction:column; max-width:78%; animation:pop .18s ease-out; }
@keyframes pop { from { transform:scale(.94); opacity:0; } to { transform:scale(1); opacity:1; } }
.row.them { align-self:flex-start; align-items:flex-start; }
.row.me { align-self:flex-end; align-items:flex-end; }
.bubble {
  position:relative;
  padding:8px 13px;
  border-radius:18px;
  font-size:17px;
  line-height:22px;
  letter-spacing:-.02em;
  white-space:pre-wrap;
  word-wrap:break-word;
}
.row.them .bubble { background:#e9e9eb; color:#111; }
.row.me .bubble { background:#64d256; color:#111; }
.row.them.tail .bubble { border-bottom-left-radius:5px; }
.row.me.tail .bubble { border-bottom-right-radius:5px; }
.row.them.tail .bubble::before, .row.them.tail .bubble::after,
.row.me.tail .bubble::before, .row.me.tail .bubble::after { content:""; position:absolute; bottom:0; }
.row.them.tail .bubble::before { left:-7px; width:20px; height:20px; background:#e9e9eb; border-bottom-right-radius:16px; }
.row.them.tail .bubble::after { left:-10px; width:10px; height:20px; background:#fff; border-bottom-right-radius:10px; }
.row.me.tail .bubble::before { right:-7px; width:20px; height:20px; background:#64d256; border-bottom-left-radius:16px; }
.row.me.tail .bubble::after { right:-10px; width:10px; height:20px; background:#fff; border-bottom-left-radius:10px; }
.bubble a { color:#007aff; text-decoration:underline; word-break:break-all; }
.preview {
  margin-top:3px;
  width:min(230px, 70vw);
  background:#f2f2f7;
  border-radius:14px;
  padding:10px 12px;
  text-decoration:none;
  color:#111;
  display:block;
}
.preview strong { display:block; font-size:14px; }
.preview span { display:block; font-size:12px; color:#8e8e93; margin-top:2px; }
.meta, .receipt { font-size:11px; color:#8e8e93; padding:3px 6px 1px; background:none; border:0; }
.row.failed .meta { color:#ff3b30; cursor:pointer; font-weight:600; }
.typing { display:flex; gap:5px; padding:12px 16px; width:58px; }
.typing i { width:7px; height:7px; border-radius:50%; background:#8e8e93; animation:dot 1.05s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay:.14s; }
.typing i:nth-child(3) { animation-delay:.28s; }
@keyframes dot { 0%, 80%, 100% { opacity:.28; transform:translateY(0); } 40% { opacity:1; transform:translateY(-2px); } }
.bar { display:flex; align-items:center; gap:8px; padding:8px 10px 22px; background:linear-gradient(#f7f7f8, #f2f2f7); }
.plus {
  width:33px; height:33px; border-radius:50%; background:#fff;
  box-shadow:0 0 0 .5px #d8d8dc inset;
  display:grid; place-items:center;
  color:#8e8e93; font-size:22px; line-height:1; font-weight:400;
}
.bar input {
  flex:1; height:36px; border:0; background:#fff;
  box-shadow:0 0 0 .5px #d8d8dc inset; border-radius:18px;
  padding:0 14px; font:inherit; font-size:17px; outline:none;
}
.mic, .go { width:33px; height:33px; border:0; border-radius:50%; display:grid; place-items:center; flex-shrink:0; }
.mic { background:#fff; color:#8e8e93; box-shadow:0 0 0 .5px #d8d8dc inset; pointer-events:none; }
.go { background:#007aff; cursor:pointer; }
.go:disabled { opacity:.4; cursor:default; }
.setup { padding:18px 16px 0; display:flex; flex-direction:column; gap:0; }
.setup .ios-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 0 0 .5px #d8d8dc inset; margin-bottom:18px; }
.setup label { display:flex; flex-direction:column; gap:3px; padding:10px 14px 11px; border-bottom:.5px solid #e5e5ea; color:#111; position:relative; }
.setup label:last-child { border-bottom:0; }
.setup label span { color:#8e8e93; font-size:12px; font-weight:500; letter-spacing:.01em; text-transform:uppercase; }
.setup input, .setup select { width:100%; min-width:0; border:0; background:transparent; font:inherit; font-size:17px; line-height:24px; color:#111; outline:none; padding:0; }
.setup input::placeholder { color:#c7c7cc; }
.setup select { -webkit-appearance:none; appearance:none; padding-right:26px; cursor:pointer; }
.setup select:required:invalid { color:#c7c7cc; }
.setup select option { color:#111; }
.setup select option[value=""] { color:#8e8e93; }
.setup label:has(select)::after { content:""; position:absolute; right:16px; bottom:19px; width:8px; height:8px; border-right:1.5px solid #8e8e93; border-bottom:1.5px solid #8e8e93; transform:rotate(45deg); pointer-events:none; }
.ios-start { height:50px; border:0; border-radius:14px; background:#007aff; color:#fff; font:inherit; font-size:17px; font-weight:600; cursor:pointer; }
.muted { color:#8e8e93; font-size:15px; line-height:1.45; margin:8px 2px 16px; }
.err { color:#ff3b30; font-size:13px; }
.home { position:absolute; left:50%; bottom:7px; transform:translateX(-50%); width:128px; height:5px; border-radius:4px; background:#111; opacity:.9; }
#chat-wrap { flex:1; min-height:0; display:flex; flex-direction:column; }
#setup-wrap { flex:1; min-height:0; overflow:auto; }
#chat-wrap[hidden], #setup-wrap[hidden] { display:none !important; }
@keyframes phone-in { from { opacity:0; transform:translateY(22px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce) { .device { animation:none; } }
@media (max-width:480px) {
  .stage { padding:0; gap:0; background:#000; }
  .away { display:none; }
  .device { width:100%; height:100dvh; max-width:none; max-height:none; filter:none; }
  .hw { display:none; }
  .bezel { padding:0; border-radius:0; background:#000; box-shadow:none; }
  .screen { border-radius:0; }
}
