/* Outbox · r4 · final — the wordmark tells it.
   Page rules only; brand tokens + shared components live in ../brand/. */

/* ── Top bar (floats over the hero, scrolls away) ─────── */
.top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad); z-index: 90; }
.top .brand { text-decoration: none; color: inherit; }
.top-wm { font-size: 24px; white-space: nowrap; padding-right: .2em; }
.top nav { display: flex; align-items: center; gap: 18px; }
.lnk { color: var(--g700); text-decoration: none; font-size: 15px; }
.lnk:hover { color: var(--ink); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14.5px; }

/* Waitlist confirmation replaces the form */
.wl-ok { display: inline-flex; align-items: center; gap: 8px; background: #fff; box-shadow: var(--ring), var(--lift-1); border-radius: 999px; padding: 13px 22px; font-size: 15px; color: var(--ink); }
.wl-ok .ic { width: 16px; height: 16px; color: var(--cobalt); }

/* ── The story: one sticky stage ─────────────────────── */
.js #story { height: 860svh; }
html:not(.js) #story { height: auto; }
.js .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
html:not(.js) .stage { min-height: 100svh; }

.hero-col { position: relative; z-index: 41; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 2.6svh, 34px); padding: 64px var(--pad) 40px; text-align: center; }
.js .hero-col { position: absolute; inset: 0; min-height: 0; padding-bottom: 72px; }

.word-wrap { position: relative; z-index: 40; pointer-events: none; line-height: 1; }

/* The giant wordmark, built so "out" can roll to "in" (a reel in a clipped window). */
.word { display: inline-flex; align-items: flex-end; font-size: min(24vw, 30svh); line-height: 1; transform-origin: 50% 0; will-change: transform; }
.word .roll { position: relative; display: block; height: 1.12em; overflow: hidden; flex: none; }
.word .reel { display: flex; flex-direction: column; align-items: flex-start; }
.word .r { width: max-content; }
.word .r, .word .bo, .word .wm-x { display: block; height: 1.12em; padding-top: .12em; line-height: 1em; }

.hero-h { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 3.2vw, 50px); letter-spacing: -.03em; line-height: 1.22; margin: 0; }
.hero-h .ln { display: inline-block; }
.hero-copy .lede { margin: 14px auto 0; text-align: center; max-width: 60ch; }

.scroll-hint { position: absolute; right: var(--pad); bottom: calc(22px + var(--safe-b)); margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--g500); white-space: nowrap; z-index: 42; }
.scroll-hint i { width: 1.5px; height: 24px; border-radius: 2px; background: var(--g300); }

/* Captions under the word */
.cap { position: absolute; top: var(--capTop, 240px); left: 50%; width: min(760px, 92vw); text-align: center; opacity: 0; z-index: 45; will-change: opacity, transform; }
.cap-h { font-family: var(--display); font-weight: 900; font-size: clamp(24px, 2.6vw, 40px); letter-spacing: -.025em; line-height: 1.08; margin: 0; }
.cap-s { margin: 10px auto 0; color: var(--g700); font-size: clamp(14.5px, 1.15vw, 18px); line-height: 1.45; max-width: 48ch; }
.cap-s b { color: var(--ink); font-weight: 500; }
.cap-s .tn { font-variant-numeric: tabular-nums; }

/* The field: falling emails, the bots */
.fx { position: absolute; inset: 0; pointer-events: none; }
.fx .mail { position: absolute; left: 0; top: 0; margin: 0; will-change: transform, opacity; transform-origin: 50% 50%; }

/* The bots stand in a row above the pile, always in front of every card.
   Name and count sit ABOVE each bot, so the emails come in from below. */
.sb { position: absolute; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0; will-change: transform, opacity; }
.sb .blob { --s: 92px; }
.sb-bot { position: relative; display: block; line-height: 0; }
/* the count, as a notification badge on the bot (like an app icon): ink, a white ring, one calm pop */
.sb-badge { position: absolute; top: 2%; right: 0; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; display: grid; place-items: center;
  background: var(--ink); color: #fff; box-shadow: 0 0 0 3px #fff; font: 600 13.5px/1 "Switzer", system-ui, sans-serif; font-variant-numeric: tabular-nums; z-index: 2; }
.sb-badge[hidden] { display: none; }
.sb-badge.pop { animation: sb-pop .34s var(--ease-out); }
@keyframes sb-pop { from { transform: scale(.6); } to { transform: scale(1); } }
.sb-l { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.sb-n { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.sb-t { font-size: 12.5px; color: var(--g500); font-variant-numeric: tabular-nums; min-height: 1.2em; }

/* The private email's chip, under the locked card */
.lockchip { position: absolute; z-index: 30; margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; box-shadow: var(--ring), var(--lift-1); font-size: 13.5px; color: var(--g700); white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.lockchip b { color: var(--ink); font-weight: 500; }
.lockchip .lk { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.lockchip .lk .ic { width: 13px; height: 13px; }

/* ── 5 · What needs your approval ───────────────────────
   One anatomy, three times: the receipt sentence on top; under it the email with the
   passage highlighted → a dashed line → the agent → a dashed line → the proposal. */
.ap { --cw: min(400px, calc((100vw - 2 * var(--pad) - 250px) / 2)); text-align: center; }
.js .ap { position: absolute; left: 0; right: 0; top: var(--apTop, 230px); z-index: 50; display: flex; flex-direction: column; align-items: center; opacity: 0; pointer-events: none; }
.ap-eye { margin: 0; display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--g500); }
.ap-n { display: inline-flex; gap: 5px; }
.ap-n i { width: 6px; height: 6px; border-radius: 50%; background: var(--g300); transition: background-color .3s, transform .3s var(--ease-out); }
.ap-n i[data-on] { background: var(--ink); transform: scale(1.15); }
html:not(.js) .ap-n, html:not(.js) .ap-rc { display: none; }
.ap-rc { font-size: clamp(26px, 2.6vw, 38px); margin: 12px auto 0; text-align: center; }
.ap-rc .rs-line { line-height: 1.3; }
.ap-exs { display: grid; margin-top: calc(clamp(18px, 3.4svh, 34px) + var(--apGap, 0px)); width: 100%; }
.js .ap-ex { grid-area: 1 / 1; }
html:not(.js) .ap-ex { margin: 0 0 56px; }
.ap-static { font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: -.02em; margin: 26px 0 18px; }
.js .ap-static { display: none; }

[data-ic] { display: inline-flex; }
.ap-row { display: flex; align-items: center; justify-content: center; }
.ap-mail { width: var(--cw); background: #fff; border-radius: 20px; box-shadow: var(--ring), var(--lift-1); padding: 14px 18px 16px; text-align: left; }
.ap-mh { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ap-mh .mail-txt { line-height: 1.3; }
.ap-mh .mail-subj { font-size: 13.5px; }
.ap-body { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--g700); }
.ap-q { color: var(--ink); background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 0 / var(--hs, 100%) 100%; --hl: color-mix(in srgb, var(--ac) 24%, transparent);
  padding: .1em .16em; margin: 0 -.16em; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ap-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; }

.ap-line { flex: 0 0 44px; height: 2px; display: block; }
.ap-line i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--ac) 55%, transparent 0) 0 0 / 8px 2px repeat-x; clip-path: inset(0 calc((1 - var(--ln, 1)) * 100%) 0 0); }
.ap-who { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; }
.ap-who .blob { --s: 84px; }
.ap-wn { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }

.ap-prop { width: var(--cw); text-align: left; padding: 16px 20px 18px; transform-origin: 0 50%; }
.ap-ph { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--g700); }
.ap-ph b { color: var(--ink); font-weight: 500; }
.ap-kic { width: 28px; height: 28px; border-radius: 9px; background: var(--ac); color: var(--on); display: grid; place-items: center; flex: none; }
.ap-kic .ic { width: 15px; height: 15px; }
.ap-title { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.015em; line-height: 1.2; margin: 10px 0 6px; color: var(--ink); }
.ap-pb { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--g700); }
.ap-f { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink); }
.ap-f li { display: flex; align-items: center; gap: 8px; }
.ap-f .ic, .ap-foot .ic { width: 15px; height: 15px; flex: none; color: var(--g500); }
.ap-foot { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--g700); }
.ap-opts { display: flex; gap: 8px; margin: 12px 0 0; flex-wrap: wrap; }
.ap-opts span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 13px; background: var(--g100); font-size: 14px; font-weight: 500; color: var(--ink); }

/* ── Try it ───────────────────────────────────────────── */
.try { display: flex; align-items: center; justify-content: center; }
.try-in { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 5svh var(--pad) calc(5svh + var(--safe-b)); width: 100%; }
.try .h2 { font-size: clamp(34px, 4vw, 58px); }
.try .h2, .try .lede { text-align: center; }
.deck-wrap { margin-top: 10px; display: flex; justify-content: center; width: 100%; }

/* ── Bring your own agent (r2 B · In→Out layout) ─────── */
.byo { display: flex; align-items: center; justify-content: center; padding: 96px 0; border-top: 1px solid var(--line); }
.byo-in { max-width: 1040px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; padding: 0 var(--pad); }
.tagpill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 11px; border-radius: 999px; background: var(--g100); color: var(--ink); font-size: 14.5px; font-weight: 500; }
.tagpill .ic { width: 16px; height: 16px; }
.byo .h2 { max-width: 16ch; }
.hns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hns .hn { font-size: 16px; padding: 10px 18px 10px 12px; }
.hns .hn.hn-text { padding: 10px 18px; }
.hns .hn img { width: 22px; height: 22px; }
.mcp { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; }
.mcp-l { margin: 0; font-size: 17px; line-height: 1.5; color: var(--g700); max-width: 44ch; }
.mcp-c { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; overflow-x: auto; white-space: nowrap; padding: 12px 18px; border-radius: 14px; background: var(--g50); box-shadow: inset 0 0 0 1px var(--line); font: 500 14.5px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink); }
.mcp-p { color: var(--g500); user-select: none; }
.byo-l { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 0; padding: 0; text-align: left; }
.byo-l li { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; }
.byo-l p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--g700); }
.byo-l b { color: var(--ink); font-weight: 500; }
.byo-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--g100); color: var(--ink); display: grid; place-items: center; }
.byo-ic .ic { width: 19px; height: 19px; }

/* ── Close ───────────────────────────────────────────── */
/* The close fills the screen; the word, line and form sit in the middle, the footer on the bottom edge. */
.close { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 28px; text-align: center; min-height: 100svh; padding: 8svh var(--pad) calc(20px + var(--safe-b)); }
.close-big { margin-top: auto; }
.close-big { line-height: 1; width: min(100%, 1100px); display: flex; justify-content: center; }
/* the canvas word (shared/inbox-wordmark.js) replaces the DOM word once it is ready */
.close-big.iwm-on .word-close { display: none; }
.close-big .iwm { display: block; touch-action: pan-y; }
.close .wl, .close .wl-ok { margin-bottom: auto; }
.close .word { font-size: min(22vw, 30svh); }
.close-line { font-family: var(--display); font-weight: 700; font-size: clamp(21px, 2.3vw, 32px); letter-spacing: -.015em; margin: 0; }
.foot { width: 100%; display: flex; justify-content: space-between; margin-top: 3svh; font-size: 12.5px; color: var(--g500); }

/* ── No-JS fallback: readable, nothing hidden behind JS ─ */
html:not(.js) .fx, html:not(.js) .cap, html:not(.js) .scroll-hint { display: none; }
html:not(.js) .ap { padding: 40px var(--pad) 20px; }

@media (max-width: 1100px) and (min-width: 721px) { .byo-l { grid-template-columns: 1fr; max-width: 620px; } }

/* ── Phone ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .mcp-l { font-size: 15.5px; }
  .mcp-c { font-size: 12.5px; padding: 11px 14px; gap: 8px; }
  .js #story { height: 760svh; }
  .top { padding: 10px 16px; }
  .top nav .lnk { display: none; }
  .scroll-hint { display: none; }
  .word { font-size: min(24vw, 15svh); }
  .js .hero-col { padding-bottom: 56px; }
  .cap-s { font-size: 14.5px; }
  .sb .blob { --s: 58px; }
  .sb-badge { min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; font-size: 11.5px; box-shadow: 0 0 0 2px #fff; right: -4px; }
  .sb-n { font-size: 14px; }
  .sb-t { font-size: 11.5px; }
  .lockchip { font-size: 12.5px; padding: 5px 12px 5px 5px; gap: 6px; }
  .lockchip .lk { width: 22px; height: 22px; }

  .ap { --cw: 100%; padding: 0 16px; }
  .js .ap { padding: 0 16px; }
  .ap-eye { font-size: 12.5px; }
  .ap-rc { font-size: 21px; margin-top: 8px; }
  .ap-exs { margin-top: 12px; }
  .ap-row { flex-direction: column; align-items: stretch; }
  .ap-mail { padding: 11px 14px 12px; border-radius: 18px; }
  .ap-mh .mail-ava { width: 24px; height: 24px; font-size: 11px; }
  .ap-mh .mail-from { font-size: 13px; }
  .ap-mh .mail-subj { font-size: 12.5px; }
  .ap-body { font-size: 13px; line-height: 1.5; margin-top: 7px; }
  .ap-line { flex: 0 0 14px; width: 2px; height: 14px; margin: 0 auto; }
  .ap-line i { background: linear-gradient(180deg, var(--ac) 55%, transparent 0) 0 0 / 2px 7px repeat-y; clip-path: inset(0 0 calc((1 - var(--ln, 1)) * 100%) 0); }
  .ap-who { flex-direction: row; justify-content: center; width: auto; gap: 8px; }
  .ap-who .blob { --s: 40px; }
  .ap-wn { font-size: 14px; }
  .ap-prop { padding: 12px 14px 13px; transform-origin: 50% 0; border-radius: 18px; }
  .ap-ph { font-size: 12.5px; gap: 8px; }
  .ap-kic { width: 22px; height: 22px; border-radius: 7px; }
  .ap-kic .ic { width: 12px; height: 12px; }
  .ap-title { font-size: 16px; margin: 7px 0 4px; }
  .ap-pb, .ap-f { font-size: 13px; }
  .ap-f { gap: 5px; }
  .ap-foot { font-size: 12px; margin-top: 8px; padding-top: 8px; }
  .ap-opts { margin-top: 8px; gap: 6px; }
  .ap-opts span { height: 32px; font-size: 12.5px; padding: 0 11px; border-radius: 11px; }

  .byo { padding: 72px 0; }
  .byo-in { gap: 22px; }
  .byo-l { grid-template-columns: 1fr; }
  .byo-l li { flex-direction: row; align-items: flex-start; padding: 16px; }
  .byo-l p { font-size: 15px; }
  .byo-ic { flex: none; }
  .hns .hn { font-size: 14.5px; padding: 8px 14px 8px 10px; }
  .hns .hn.hn-text { padding: 8px 14px; }
  .foot { flex-direction: column; gap: 6px; align-items: center; margin-top: 4svh; }
  .close .word { font-size: 24vw; }
  .close-big { width: calc(100% + 24px); margin-left: -12px; margin-right: -12px; }
}

