/* Two people, two halves of the screen, one phone on the seam. --voice is sound, --typed is what the user wrote. */
:root {
  --ink: #18203A;
  --mute: #4C5572;
  --rule: #D5D8E6;
  --me-half: #EDEFFC;
  --them-half: #0B4F4C;
  --orgs: #0F2A42;
  --voice: #A9F0DF;
  --typed: #D3CDFF;
  --wire: rgba(255,255,255,.26);
  --screen: #fff;
  --screen-ink: #18203A;
  --screen-rule: #E5E7F2;
  --them-bg: #DDF4EE;
  --them-ink: #0A4A45;
  --me-bg: #5C4BE0;
  --me-ink: #fff;
  --ghost: #5C4BE0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: #fff; color: var(--ink); font: 400 18px/1.5 "Rubik", system-ui, sans-serif; }
h1, h2, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; inset-block-start: -80px; inset-inline-start: 16px; z-index: 30; padding: 12px 16px; background: var(--ink); color: #fff; }
.skip:focus { inset-block-start: 8px; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 26px; background: var(--ink); color: #fff; font-weight: 500; text-decoration: none; }
.btn.alt { background: none; box-shadow: 0 0 0 1.5px var(--ink) inset; color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.iconbtn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: 0 0 0 1.5px rgba(255,255,255,.6) inset; color: #fff; cursor: pointer; transition: background .15s; }
.iconbtn:hover { background: rgba(255,255,255,.14); }
.iconbtn[hidden] { display: none; }
.iconbtn svg { grid-area: 1 / 1; }
.iconbtn .on, .iconbtn[data-on] .off { display: none; }
.iconbtn[data-on] .on { display: block; }

/* The call */
.stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: max(100vh, 740px); overflow: hidden; }
canvas#wave { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.half-me { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 96px 64px 64px 210px; background: var(--me-half); }
.half-them { position: relative; display: flex; flex-direction: column; justify-content: flex-start; padding: 130px 210px 64px 64px; background: var(--them-half); color: #fff; }
.logo { position: absolute; top: 24px; inset-inline-start: 64px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 22px; font-weight: 600; color: var(--ink); direction: ltr; text-decoration: none; }
.logo svg { display: block; }
h1 { font-weight: 500; font-size: clamp(38px, 3.9vw, 56px); line-height: 1.1; letter-spacing: -.015em; }
.ctas { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-block-start: 34px; }
.agent-bar { position: absolute; z-index: 3; top: 22px; inset-inline-end: 64px; display: flex; align-items: center; gap: 10px; }
.who { margin-inline-end: 6px; font-size: 17px; }
#bigline { min-height: 5.6em; font-size: clamp(28px, 2.8vw, 40px); font-weight: 400; line-height: 1.2; }
#bigline span { display: inline-block; white-space: pre; }
#src { position: absolute; left: 0; top: 50%; width: 2px; height: 2px; }
.half-them figure { margin: 0; }
figcaption { position: absolute; bottom: 30px; inset-inline-end: 64px; inset-inline-start: 210px; z-index: 3; font-size: 18px; line-height: 1.3; }

/* The phone */
.phone { position: absolute; z-index: 3; top: 50%; left: 50%; width: 300px; height: 610px; margin: -305px 0 0 -150px; padding: 11px; border-radius: 50px; background: linear-gradient(145deg, #3B4346, #15191B 45%, #2A3033); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 2px 3px rgba(255,255,255,.18) inset, 0 50px 90px -24px rgba(0,0,0,.55), 0 18px 36px -18px rgba(0,0,0,.45); }
.phone::before { content: ""; position: absolute; inset-inline-end: -3px; top: 150px; width: 3px; height: 74px; border-radius: 2px 0 0 2px; background: #23282A; }
.screen { position: relative; display: flex; flex-direction: column; height: 100%; padding: 46px 14px 14px; overflow: hidden; border-radius: 40px; background: var(--screen); color: var(--screen-ink); }
.island { position: absolute; top: 12px; inset-inline-start: 50%; width: 86px; height: 25px; margin-inline-start: -43px; border-radius: 14px; background: #06080A; }
.ph-top { display: flex; align-items: center; gap: 10px; padding-block-end: 12px; border-block-end: 1px solid var(--screen-rule); }
.ph-top i { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--them-bg); color: var(--them-ink); font-style: normal; font-weight: 600; font-size: 15px; }
.ph-top span { flex: 1; font-size: 15px; font-weight: 500; line-height: 1.25; }
.ph-top small { display: block; font-size: 13px; font-weight: 400; opacity: .68; }
.feed { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; padding-block: 12px; }
.b { flex: none; max-width: 90%; padding: 10px 14px; border-radius: 18px; font-size: 18px; line-height: 1.32; }
.b span { display: inline-block; white-space: pre; }
.b.them { align-self: flex-end; background: var(--them-bg); color: var(--them-ink); border-start-end-radius: 5px; }
.b.me { align-self: flex-start; background: var(--me-bg); color: var(--me-ink); border-start-start-radius: 5px; }
.chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.chips:not(:empty) { padding-block-end: 8px; }
.chip { max-width: 100%; padding: 6px 12px; border-radius: 16px; box-shadow: 0 0 0 1.5px var(--me-bg) inset; color: var(--me-bg); font-size: 15px; line-height: 1.3; transition: background .15s, color .15s; }
.chip.picked { background: var(--me-bg); color: var(--me-ink); }
.draft { display: flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1.5px solid var(--screen-rule); border-radius: 22px; font-size: 15px; color: #5A6178; }
.ghost { position: fixed; z-index: 9; font-size: 18px; white-space: pre; color: var(--ghost); pointer-events: none; }

/* The two paths */
.offers { display: grid; grid-template-columns: 1fr 1fr; }
.offers > div { padding: 64px; }
.offers h2 { font-size: 32px; font-weight: 500; margin-block-end: 20px; }
#orgs { background: var(--orgs); color: #fff; }
#orgs .btn { background: #fff; color: var(--orgs); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; padding-block: 20px 32px; font-size: 16px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }

/* Inner pages */
.bar { display: flex; justify-content: space-between; align-items: center; padding-block: 16px; }
.bar a { display: inline-flex; align-items: center; min-height: 44px; }
.mark { font-size: 24px; font-weight: 600; text-decoration: none; }
.doc { max-width: 40em; padding-block: 32px 64px; }
.doc h1 { font-size: clamp(32px, 4vw, 44px); margin-block-end: 20px; }
.doc h2 { font-size: 24px; font-weight: 500; margin-block: 32px 8px; }
.doc p + p { margin-block-start: 10px; }
.doc ul { padding-inline-start: 22px; margin: 0; }
.doc .btn { margin-block-start: 24px; }
.updated { margin-block-start: 28px; color: var(--mute); }
.wrap > .foot { border-block-start: 1px solid var(--rule); }

/* Small screens: the device in the visitor's hand is the phone, so no phone is drawn. The first screen is the call itself:
   the agent's voice above, the visitor's words below. */
@media (max-width: 1080px) {
  :root { --screen: var(--me-half); --screen-rule: rgba(24,32,58,.12); --them-bg: #fff; }
  .stage { display: flex; flex-direction: column; height: calc(100vh - 64px); height: calc(100svh - 64px); min-height: 600px; background: var(--them-half); color: #fff; }
  .half-me { padding: 14px 20px 0; background: none; color: #fff; }
  .logo { position: static; align-self: flex-start; color: #fff; }
  .logo svg { fill: currentColor; }
  h1 { margin-block-start: 16px; font-size: clamp(27px, 7.6vw, 40px); line-height: 1.14; text-wrap: balance; }
  .ctas, #bigline, .who { display: none; }
  .half-them { position: static; flex: 1; min-height: 0; padding: 10px 20px 0; background: none; }
  .agent-bar { top: 14px; inset-inline-end: 20px; gap: 8px; }
  .half-them figure { flex: none; }
  figcaption { position: static; min-height: 1.4em; font-size: 16px; font-weight: 500; line-height: 1.4; opacity: .85; }
  #src { position: static; display: block; flex: 1; min-height: 72px; width: calc(100% + 40px); margin-inline: -20px; }
  .phone { position: relative; flex: 0 0 clamp(360px, 48%, 480px); top: auto; left: auto; width: 100%; height: auto; min-height: 340px; margin: 0; padding: 0; border-radius: 24px 24px 0 0; background: none; box-shadow: none; }
  .phone::before, .island { display: none; }
  .screen { padding: 12px max(16px, calc(50% - 280px)) 14px; border-radius: 24px 24px 0 0; }
  .ph-top { padding-block-end: 10px; }
  .feed { padding-block: 10px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14px); mask-image: linear-gradient(to bottom, transparent, #000 14px); }
  .b { max-width: 82%; }
  .chip { background: #fff; }
  .draft { background: #fff; border-color: var(--screen-rule); }
  .offers { grid-template-columns: 1fr; }
  .offers > div { padding: 30px 20px 44px; }
  .wrap { padding-inline: 20px; }
  .offers h2 { font-size: 28px; }
  .offers .btn { display: flex; justify-content: center; min-height: 56px; border-radius: 28px; }
  .foot { flex-direction: column; align-items: flex-start; padding-block: 16px 24px; }
}
/* Short phones: the whole call has to fit, so the next section stops peeking in. */
@media (max-width: 1080px) and (max-height: 620px) {
  .stage { height: 100vh; height: 100svh; min-height: 540px; }
  .phone { flex-basis: 330px; min-height: 330px; }
  .half-me { padding-block-start: 12px; }
  h1 { margin-block-start: 10px; }
}
/* Enlarged text or zoom narrows the page past any real phone. Nothing is clipped here: the call grows and the page scrolls. */
@media (max-width: 300px) {
  .stage { height: auto; min-height: 0; }
  .half-me { padding-block-start: 66px; }
  .half-them { flex: none; }
  #src { flex: none; height: 90px; }
  .phone { flex: none; min-height: 0; }
  .screen { height: auto; overflow: visible; }
  .feed { flex: none; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .b { max-width: 100%; }
  .offers .btn { padding-block: 8px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
