/* The pages before signing up, in the new look (Bloom ticket 9): the
   landing (/business) and a website's try page. Today's layout and motion
   (site/business/style.css) as they are, in Bloom's colours and type, on
   top of /bloom/style.css and its tokens. The try page's scripts
   (/business/reading.js, /business/try.mjs) add and remove the same
   classes they do in the classic look, so each is drawn here too.

   1. Header and page
   2. The landing
   3. Setting up an agent
   4. Meeting it: the chat, and Make it live
   5. Signed in: your businesses, notices, already on hellobolo, and live
      (Bloom ticket 10) */

/* 1. Header and page --------------------------------------------------- */

/* The header stays at the top as the page scrolls. */
.hd { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
      gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand a { display: flex; color: var(--ink); text-decoration: none; }
.brand .wordmark { display: block; width: auto; height: 20px; }
.lbl { font: 600 11px/14px var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.hd .right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hd .right a { color: var(--ink); font-size: 14px; }

main { max-width: 640px; margin: 0 auto; padding: 40px 16px 64px; display: flex; flex-direction: column; gap: 28px; }
main.intro { padding-top: 72px; }
main.step { padding-top: 56px; gap: 24px; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
strong, b { font-weight: 600; }
.mono { font: 12px/16px var(--mono); color: var(--muted); }
.muted { font-size: 13px; color: var(--muted); }
.sub { color: var(--muted); }
.lead { font-size: 17px; line-height: 1.5; color: var(--muted); }
.domain { font: 600 20px/28px var(--mono); overflow-wrap: anywhere; }
h1 .domain { font: inherit; font-family: var(--mono); letter-spacing: -0.01em; }
.col { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
form { margin: 0; }
.problem { color: var(--warn); font-size: 14px; font-weight: 600; }

/* A website typed: monospace, as it's an address. */
input[type=text] { box-sizing: border-box; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--muted);
                   border-radius: 4px; background: var(--surface); color: var(--ink); font: 15px/1.5 var(--font); }
input.mono-input { font-family: var(--mono); }
input[aria-invalid=true] { border: 1.5px solid var(--warn); }

/* Why a website couldn't be read, and Try again. */
.state { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; }
.state.err { border-color: var(--warn); background: var(--warn-soft); }
.state.err .t { color: var(--warn); line-height: 1.6; }
.state > .btn2 { align-self: flex-start; }
.btn2 { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--muted);
        border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font); text-decoration: none; }

@media (max-width: 520px) {
  .hd { padding: 14px 16px; }
  main.intro { padding-top: 48px; }
  main.step { padding-top: 40px; }
  h1 { font-size: 24px; }
}

/* 2. The landing ------------------------------------------------------- */

/* The pitch and its box beside two windows, an assistant without hellobolo
   and with it, then three points. */
main.hero { max-width: 1120px; gap: 72px; }
.hero h1 { font-size: 46px; line-height: 1.15; letter-spacing: -0.02em; }
.hero .lead { font-size: 19px; }
.pitch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.pitch > .col:first-child { gap: 22px; }
.try { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; }
.try label { font-weight: 600; }
.try .row { flex-wrap: nowrap; width: 100%; max-width: 520px; }
.try input[type=text] { flex: 1; width: auto; min-width: 0; }
.try .btn { border-radius: 6px; white-space: nowrap; }
.col.shown { gap: 0; }
.win { margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.win-bar { padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.win-bar span { font-size: 13px; font-weight: 600; color: var(--muted); }
.win-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.win.faded { margin-right: 56px; }
.win.faded .win-body { padding-bottom: 64px; }
.win.front { margin: -36px 0 0 56px; position: relative; box-shadow: var(--pop); }
/* Home's .say in /bloom/style.css (a card's text beside its ring) grows to
   fill a row; a bubble here only takes its own height. */
.say { display: flex; flex-direction: column; gap: 6px; max-width: 80%; flex: none; }
.say.agent { align-self: flex-end; align-items: flex-end; }
.say small { font-size: 12px; color: var(--muted); }
.say p { padding: 12px 16px; border-radius: 16px; background: var(--soft); color: var(--ink); font-size: 15px; line-height: 1.55; }
.say.agent p { background: var(--accent); color: var(--on-accent); }
.out { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.out svg .disc { fill: currentColor; stroke: none; }
.out svg .mark { stroke: var(--surface); stroke-width: 2.2; }
.out.bad { color: var(--warn); }
.out.good { color: var(--good); }
.three { list-style: none; margin: 0; padding: 36px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
         border-top: 1px solid var(--line); }
.three li { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 860px) {
  .pitch { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1 { font-size: 34px; }
  .three { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 520px) {
  .win.faded { margin-right: 16px; }
  .win.front { margin-left: 16px; }
  .win-body { padding: 20px; }
  .try .row { flex-wrap: wrap; }
}

/* 3. Setting up an agent ----------------------------------------------- */

/* One big line that rolls up to what it's doing now, the names of the
   pages it reads popping up under it, then the kinds it read, and "ready"
   in green. Then these fade up and the chat box rises in their place.
   With reduced motion, each change just shows. */
.setup { display: grid; justify-items: center; gap: 20px; padding: 40px 0 16px; text-align: center; }
.roll { position: relative; width: 100%; height: 1.3em; overflow: hidden; font-size: clamp(24px, 6vw, 36px); font-weight: 700;
        line-height: 1.3; letter-spacing: -0.02em; }
.roll .line { position: absolute; inset: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.roll .mono { font: inherit; font-family: var(--mono); color: inherit; letter-spacing: -0.01em; }
.roll .good { color: var(--good); }
.roll .below { transform: translateY(100%); opacity: 0; }
.roll .above { transform: translateY(-100%); opacity: 0; }
.setup > .mono { font-size: 13px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start;
         gap: 8px; width: 100%; min-height: 120px; }
.chips li { max-width: 100%; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
            font-size: 13px; line-height: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chips li.kind::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%;
                         background: var(--good); vertical-align: 1px; }
.chips li.new { opacity: 0; transform: scale(0.6) translateY(8px); }
.chips li.gone { opacity: 0; }
.setup.leaving { opacity: 0; transform: translateY(-30px); }
main.arriving > h1, main.arriving .go-live { opacity: 0; }
main.arriving .pg.meet { opacity: 0; transform: translateY(40px); }
@media (prefers-reduced-motion: no-preference) {
  .roll .line { transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.55s; }
  .chips li { transition: opacity 0.3s, transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .setup { transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  main.step.meet > h1, main.step.meet .go-live { transition: opacity 0.6s; }
  .pg.meet { transition: opacity 0.6s, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
}

/* 4. Meeting it -------------------------------------------------------- */

/* The conversation in a card: the customer's agent on the left in soft
   blue, the business's on the right in blue, in monospace as today. */
.pg { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 12px;
      background: var(--surface); color: var(--ink); font: 15px/1.55 var(--mono); }
.pg .messages { list-style: none; margin: 0; padding: 0; }
.pg .entry { display: flex; flex-direction: column; }
.pg .entry.mine { align-items: flex-end; }
.pg .entry.theirs { align-items: flex-start; }
.pg .message { display: flex; align-items: center; gap: 6px; max-width: min(80%, 32rem); margin-top: 0.6rem; }
.pg .bubble { min-width: 0; padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.55; white-space: pre-wrap;
              overflow-wrap: anywhere; background: var(--soft); color: var(--ink); }
.pg .mine .bubble { background: var(--accent); color: var(--on-accent); }
.pg .sender { margin: 0 0 6px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.pg .entry.mine .sender, .pg .entry.mine .status { text-align: right; }
/* What to note under an answer: orange where it didn't know, pink where it
   would ask back. */
.pg .status { max-width: 100%; margin: 6px 0 0; color: var(--muted); font: 600 12px/1.4 var(--font); overflow-wrap: anywhere; }
.pg .status.tone-unknown { color: var(--warn); }
.pg .status.tone-back { color: var(--ask); }
.pg .said { font: 14px/1.5 var(--font); color: var(--muted); }
.pg #enough, .pg > .said[role=status] { padding: 14px 16px; border-radius: 10px; background: var(--soft); color: var(--ink); }
.pg [hidden] { display: none; }

main.step.meet { gap: 32px; }
.pg.meet { padding: 28px; gap: 16px; }
.pg.meet .messages { display: flex; flex-direction: column; gap: 16px; }
/* The conversation scrolls in its box, laid out from the bottom up, so it
   opens on the newest message and stays there as messages come. */
.pg.meet .scroll { display: flex; flex-direction: column-reverse; flex: 0 1 auto; min-height: 0; overflow-y: auto;
                   overscroll-behavior: contain; margin-right: -12px; padding-right: 12px; scrollbar-width: thin;
                   scrollbar-color: var(--line) transparent; }
.pg.meet .scroll:hover { scrollbar-color: var(--muted) transparent; }
/* Meeting it fits the screen, so Make it live is always in view; only the
   conversation scrolls. On a screen too short for that, the page scrolls. */
body:has(> main.step.meet > .pg.meet) { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
body:has(> main.step.meet > .pg.meet) > .hd { flex: none; }
main.step.meet:has(> .pg.meet) { box-sizing: border-box; width: 100%; max-width: 672px; flex: 0 1 auto; min-height: 0;
                                 padding-top: 48px; padding-bottom: 24px; gap: 24px; }
main.step.meet > .pg.meet { flex: 0 1 auto; min-height: 0; }
main.step.meet > h1, main.step.meet > .go-live { flex: none; }
@media (max-height: 480px) {
  body:has(> main.step.meet > .pg.meet) { display: block; height: auto; }
  .pg.meet .scroll { max-height: 50vh; }
}
.pg.meet .message { margin-top: 0; max-width: min(80%, 30rem); }

/* Its typing dots while it answers, a new message rising in, and the box
   to ask more. */
.pg .typing { display: flex; gap: 5px; align-items: center; padding: 14px 16px; }
.pg .typing span { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--on-accent) 70%, transparent); }
.pg .compose { display: flex; gap: 8px; align-items: flex-end; padding-top: 20px; border-top: 1px solid var(--line); }
.pg .compose textarea { flex: 1; width: auto; min-width: 0; min-height: 40px; max-height: 160px; resize: none; padding: 8px 14px;
                        border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink);
                        font: 15px/1.5 var(--mono); }
.pg .compose textarea:focus { outline: none; border-color: var(--accent); }
.pg .compose textarea::placeholder { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg .compose button { flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
                      background: var(--accent); color: var(--on-accent); font: 15px var(--font); }
.pg .compose button:disabled { background: var(--line); color: var(--muted); cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .pg .typing span { animation: blink 1.2s infinite ease-in-out; }
  .pg .typing span:nth-child(2) { animation-delay: 0.2s; }
  .pg .typing span:nth-child(3) { animation-delay: 0.4s; }
  .pg .bubble.fresh { animation: rise 0.35s ease-out; }
}
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Make it live, with Google's own button. */
.go-live { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px;
           border-top: 1px solid var(--line); }
.go-live strong { flex: 1; font-size: 15px; }
.gsi { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--muted);
       background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.gsi svg { stroke: none; }
.gsi:hover { opacity: 1; background: var(--bg); }

@media (max-width: 520px) {
  .pg.meet { padding: 16px; }
}

/* 5. Signed in --------------------------------------------------------- */

/* A page's own button, square-cornered as the landing's Show me. */
main.step > .btn { align-self: flex-start; border-radius: 6px; }
main.step > .gsi { align-self: flex-start; }
main.step > form .link, main.step > p.muted a { color: var(--ink); font-size: 14px; }

/* Your businesses: one row each, on to its dashboard; then a box for
   another. */
.picker h2.lbl { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list > li { border-bottom: 1px solid var(--line); }
.list a.go { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px;
             color: var(--ink); text-decoration: none; }
.list a.go:hover { opacity: 1; background: var(--soft); }
.list a.go > .c { display: flex; flex-direction: column; min-width: 0; }
.list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .d { font: 12px/16px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.list .chev { color: var(--muted); }
.inline { display: flex; flex-wrap: wrap; gap: 8px; }
.inline input[type=text] { flex: 1 1 240px; width: auto; height: 46px; }
.inline .btn { min-height: 46px; border-radius: 6px; }

/* Proved: a green check pops in, then "Welcome!" and the link on rise. */
main.welcome { align-items: center; padding-top: 96px; gap: 20px; text-align: center; }
main.welcome > .col { align-items: center; gap: 12px; }
main.welcome h1 { font-size: 30px; }
.chk-pop .disc { fill: var(--good); stroke: none; }
.chk-pop .chk-draw { stroke: var(--surface); stroke-width: 3; }
.lk { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink); font-weight: 600;
      text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.lk svg { stroke-width: 2.2; }
@media (prefers-reduced-motion: no-preference) {
  .chk-pop { animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  .chk-draw { stroke-dasharray: 32; stroke-dashoffset: 32; animation: draw 0.35s 0.3s ease-out forwards; }
  .chk-in { animation: rise 0.35s ease-out both; }
  .chk-in.late { animation-delay: 0.3s; }
  .lk svg { transition: transform 0.15s; }
  .lk:hover svg { transform: translateX(3px); }
}
@keyframes pop { 0% { opacity: 0; transform: scale(0.5); } 60% { opacity: 1; transform: scale(1.1); } 100% { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 520px) {
  main.welcome { padding-top: 64px; }
  main.welcome h1 { font-size: 24px; }
}
