/* Instant Ballpark: a demo of an AI assistant Final Touch builds, for Two Rivers Yard Co., a made-up
   Calgary landscaper. Deep spruce, limestone and marigold (the highlighter the assistant reads with);
   Gloock for the voice, Onest for the app. Nothing GSAP animates has a CSS transition (the studio's
   promo renderer drives the clock frame by frame). */
:root {
  --bg: #12241d;         /* deep spruce: the page */
  --paper: #fbfaf5;      /* limestone: the phone's chat */
  --ink: #17231e;
  --ink-2: #4e5b54;
  --muted: #86918a;
  --line: #e4e3da;
  --them: #eeede5;       /* customer bubbles */
  --me: #24503f;         /* the assistant: spruce */
  --me-ink: #ffffff;
  --accent: #f0a830;     /* marigold: highlights, the range */
  --hl: rgba(240, 168, 48, .42);
  --serif: "Gloock", Georgia, serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --s: 1;
  --safe: calc(env(safe-area-inset-top, 0px) + 6px);
  --bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: #fff; background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- the phone / the page */
.device { position: fixed; inset: 0; }
.app { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; height: 100dvh; overflow: hidden; background: var(--paper); color: var(--ink); isolation: isolate; }
.sbar, .device__island, .pitch, .behind, .credit { display: none; }

@media (min-width: 561px) {
  html, body { height: auto; }
  body { min-height: 100vh; background: radial-gradient(900px 700px at 50% 30%, rgba(255,255,255,.07), transparent 70%), var(--bg); }
  .stage { min-height: 100vh; display: grid; align-items: center; justify-content: center; grid-template-columns: minmax(0, 400px) auto; grid-template-areas: "pitch device" "behind device"; column-gap: clamp(36px, 5vw, 80px); padding: 24px 40px; }
  .pitch { display: block; grid-area: pitch; align-self: end; }
  .behind { display: block; grid-area: behind; align-self: start; margin-top: 28px; }
  .device { grid-area: device; position: sticky; top: 24px; align-self: start; inset: auto; width: 414px; height: 868px; padding: 12px; border-radius: 64px; background: linear-gradient(160deg, #3a3a40, #121214 45%, #26262b); box-shadow: 0 0 0 1.5px #4a4a52, inset 0 0 0 1px rgba(255,255,255,.08), 0 60px 100px -40px rgba(0,0,0,.8); transform: scale(var(--s)); transform-origin: center; margin: calc((var(--s) - 1) * 434px) calc((var(--s) - 1) * 207px); }
  .app { width: 390px; height: 844px; border-radius: 52px; --safe: 52px; --bottom: 20px; }
  .app::after { content: ""; position: absolute; z-index: 60; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--ink); opacity: .85; pointer-events: none; }
  .sbar { display: flex; position: absolute; z-index: 50; left: 12px; right: 12px; top: 12px; height: 52px; align-items: center; justify-content: space-between; padding: 6px 34px 0 50px; color: var(--ink); font: 600 16.5px/1 -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif; pointer-events: none; }
  .device__island { display: block; position: absolute; z-index: 51; top: 23px; left: 50%; width: 122px; height: 35px; margin-left: -61px; border-radius: 20px; background: #000; }
  .credit { display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 100; left: 18px; bottom: 18px; padding: 10px 14px; border-radius: 12px; background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
  .credit__mark { color: var(--me); }
}
@media (min-width: 1180px) {
  .stage { grid-template-columns: minmax(0, 390px) auto minmax(0, 380px); grid-template-areas: "pitch device behind"; }
  .pitch, .behind { align-self: center; margin: 0; }
  .device { position: relative; top: auto; align-self: center; }
}

/* ---------------------------------------------------------------- desktop words */
.pitch__by { margin: 0; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.7); }
.pitch__by a { color: #fff; }
.pitch__title { margin: 14px 0 18px; font: 400 clamp(40px, 3.8vw, 56px)/1.02 var(--serif); letter-spacing: -0.01em; }
.pitch__lede { margin: 0 0 20px; font-size: 17px; line-height: 1.55; color: rgba(255,255,255,.75); }
.pitch__try { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 16px; color: var(--accent); }
.pitch__steps { margin: 0; padding: 0 0 0 22px; color: rgba(255,255,255,.7); font-size: 15px; line-height: 1.5; }
.pitch__steps li { padding: 6px 0; }
.pitch__steps li.is-on { color: #fff; font-weight: 600; }
.pitch__fit { margin: 22px 0 0; font-size: 15.5px; font-weight: 600; }
.pitch__fit span { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.behind__label { margin: 0; font: 400 28px/1.1 var(--serif); }
.behind__sub { margin: 6px 0 16px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.7); }
.result { min-height: 120px; }
.result__empty { margin: 0; color: var(--muted); font-size: 15px; }
.result__card { padding: 18px 20px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.result__card b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.result__card h3 { margin: 0 0 6px; font: 400 26px/1.1 var(--serif); }
.result__card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }

/* ---------------------------------------------------------------- the chat */
.chat__head { display: flex; align-items: center; gap: 12px; padding: calc(var(--safe) + 8px) 18px 12px; border-bottom: 1px solid var(--line); }
.chat__avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--me); color: var(--me-ink); font-weight: 700; }
.chat__head b { display: block; font-size: 16px; }
.chat__head small { display: block; font-size: 12.5px; color: var(--muted); }
.chat__thread { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 16px 16px 12px; }
.chat__thread > :first-child { margin-top: auto; }
.chat__thread::-webkit-scrollbar { display: none; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 20px; font-size: 16px; line-height: 1.3; visibility: hidden; }
.msg.them { align-self: flex-start; background: var(--them); color: var(--ink); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--me); color: var(--me-ink); border-bottom-right-radius: 6px; }
.msg.system { align-self: center; max-width: 100%; padding: 4px 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.msg.card { align-self: flex-end; max-width: 88%; padding: 14px 16px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); border-bottom-right-radius: 6px; }
.msg.card b { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.msg.card strong { display: block; font: 400 22px/1.1 var(--serif); margin-bottom: 4px; }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 13px 15px; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--them); visibility: hidden; }
.typing.me { align-self: flex-end; background: var(--me); border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: block; }
.typing.me i { background: rgba(255,255,255,.85); }
.chat__bar { padding: 10px 16px calc(var(--bottom) + 10px); border-top: 1px solid var(--line); }
.play { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15.5px; }
.play.is-done { background: var(--them); color: var(--ink); }

/* ---------------------------------------------------------------- Instant Ballpark */
.pitch__note { margin: -6px 0 20px; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.55); }
.msg.long { max-width: 88%; }
/* the highlighter: a marigold fill that sweeps left to right (GSAP animates background-size) */
.hl { color: inherit; background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 85% / 0% 100%; border-radius: 4px; padding: 0 2px; margin: 0 -2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.msg.picks { align-self: flex-end; max-width: 92%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 2px 0 4px; background: none; }
.msg.picks b { width: 100%; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pick { display: inline-block; padding: 7px 11px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--ink); font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.msg.quote { align-self: flex-end; width: 92%; max-width: 92%; padding: 16px 16px 12px; border-radius: 20px; border-bottom-right-radius: 6px; background: var(--me); color: #fff; }
.msg.quote b { display: block; margin-bottom: 8px; font: 400 22px/1.1 var(--serif); }
.qline { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 13.5px; }
.qline span:last-child { white-space: nowrap; opacity: .85; }
.qtotal { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; padding-top: 10px; border-top: 1.5px solid rgba(255,255,255,.4); }
.qtotal span { font-size: 13px; font-weight: 600; opacity: .8; }
.qtotal strong { font: 400 26px/1 var(--serif); color: var(--accent); }
.msg.quote small { display: block; margin-top: 10px; font-size: 11.5px; line-height: 1.35; opacity: .7; }
.msg.booked { align-self: flex-end; max-width: 88%; padding: 14px 16px; border-radius: 20px; border-bottom-right-radius: 6px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent); }
.msg.booked b { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.msg.booked strong { display: block; font: 400 22px/1.1 var(--serif); margin-bottom: 4px; }
.msg.booked span { font-size: 13.5px; color: var(--ink-2); }
.result__card ul { margin: 10px 0 12px; padding: 0; list-style: none; }
.result__card li { position: relative; padding: 5px 0 5px 22px; font-size: 14.5px; color: var(--ink-2); border-top: 1px solid var(--line); }
.result__card li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.result__line { margin: 0; padding: 8px 0 0; font-weight: 600; font-size: 15px; color: var(--ink); }
.result__line--visit { color: var(--me); }
.intro { align-self: stretch; margin-bottom: 8px; padding: 22px 20px; border-radius: 22px; background: var(--bg); color: #fff; }
.intro h2 { margin: 8px 0 10px; font: 400 32px/1.02 var(--serif); }
.intro p { margin: 0; font-size: 14.5px; line-height: 1.45; color: rgba(255,255,255,.8); }
.intro .intro__by { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.intro .intro__by a { color: inherit; }
.intro .intro__note { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.55); }
@media (min-width: 561px) { .intro { display: none; } }
