/* O'Rielly Chevrolet bounded demo. Paper look from the video's profile (demo-video/businesses/orielly/profile.json):
   ground #F4F0E8, ink #262725, accent #478A2B (large type and fills only; small accent text uses the darker --accent-ink). */
:root {
  --ground: #F4F0E8;
  --ink: #262725;
  --ink2: #4A4A46;
  --ink3: #67665F;
  --accent: #478A2B;
  --accent-ink: #3A6F23;
  --accent-deep: #2F5C1C;
  --accent-soft: #E4EDDC;
  --surface: #FFFFFF;
  --line: rgba(38, 39, 37, .12);
  --line2: rgba(38, 39, 37, .24);
  --shadow: 0 1px 2px rgba(38, 39, 37, .07), 0 18px 44px -20px rgba(38, 39, 37, .34);
  --shadow-sm: 0 1px 2px rgba(38, 39, 37, .06), 0 10px 26px -18px rgba(38, 39, 37, .30);
  --sans: 'Geist', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body:not(.ready) .page { visibility: hidden; }
button, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

/* ---------- page ---------- */
.page {
  min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto; grid-template-areas: "ask" "foot";
  padding: 48px 48px 26px; max-width: 1560px; margin: 0 auto;
}
.out { display: none; }
.foot { grid-area: foot; text-align: center; font-size: 14px; line-height: 1.45; color: var(--ink3); padding-top: 32px; }

/* ---------- the ask (first screen: centered) ---------- */
.ask { grid-area: ask; align-self: center; justify-self: center; width: 100%; max-width: 1180px;
  display: flex; flex-direction: column; align-items: center; text-align: center; }
.lockup { display: flex; align-items: center; gap: 16px; }
.lockup .logo { display: block; height: 64px; width: auto; }
.lockup .rule { width: 1px; height: 40px; background: var(--ink); opacity: .38; }
.lockup .bowtie { display: block; height: 23px; width: auto; }   /* bowtie left of the logo, as orielly.com's header shows it */
.eyebrow { margin-top: 44px; font-size: 17px; font-weight: 600; letter-spacing: .01em; color: var(--ink2); }
h1 { margin-top: 12px; font-size: clamp(36px, 4.3vw, 80px); font-weight: 800; letter-spacing: -.042em; line-height: 1.02; text-wrap: balance; }
.scope { margin-top: 20px; max-width: 62ch; font-size: clamp(17px, 1.12vw, 21px); line-height: 1.5; color: var(--ink2); text-wrap: pretty; }

.bar {
  margin-top: 36px; width: min(940px, 100%); display: flex; align-items: flex-end; gap: 12px;
  padding: 12px 12px 12px 30px; border-radius: 38px; background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line2), var(--shadow); text-align: left; transition: box-shadow .15s;
}
.bar:focus-within { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }
.bar textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; padding: 13px 0;
  font-size: clamp(19px, 1.32vw, 25px); font-weight: 500; line-height: 1.4; max-height: 32vh; overflow-y: auto; color: var(--ink);
}
.bar textarea::placeholder { color: var(--ink3); opacity: 1; }
.go {
  flex: none; position: relative; width: 60px; height: 60px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent-ink); color: #fff; display: flex; align-items: center; justify-content: center; transition: background .15s, transform .1s;
}
.go:hover { background: var(--accent-deep); }
.go:active { transform: scale(.96); }
.go:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.go svg { width: 26px; height: 26px; }
.go .spin { display: none; position: absolute; inset: 17px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
body.busy .go svg { visibility: hidden; }
body.busy .go .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 940px; }
.chip {
  border: 0; cursor: pointer; padding: 12px 20px; border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 17px; font-weight: 500; line-height: 1.2; box-shadow: inset 0 0 0 1.5px var(--line2); transition: background .15s, box-shadow .15s;
}
.chip:active { background: var(--accent-soft); }
@media (hover: hover) { .chip:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); } }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- results ---------- */
body.has-results .out { display: block; grid-area: out; min-width: 0; }
body.has-results .page { grid-template-areas: "ask" "out" "foot"; grid-template-rows: auto auto 1fr; }
body.has-results .ask { align-self: start; }
body.busy .out { opacity: .45; transition: opacity .2s; }
.out.in { animation: rise .26s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.count .line { font-size: clamp(22px, 1.55vw, 30px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.note { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--ink2); }

.best {
  margin-top: 20px; display: grid; grid-template-columns: minmax(0, 43%) minmax(0, 1fr); background: var(--surface);
  border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
}
.ph { margin: 0; display: flex; flex-direction: column; background: var(--surface); }
.ph img { display: block; width: 100%; flex: 1; min-height: 0; aspect-ratio: 16 / 10; object-fit: cover; }
.ph figcaption { padding: 9px 16px 11px; font-size: 13px; line-height: 1.35; color: var(--ink3); }
.bd { padding: 26px 30px 28px; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.lab {
  display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
}
.ttl { text-wrap: balance; margin-top: 12px; font-size: clamp(22px, 1.55vw, 30px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.price { display: flex; align-items: baseline; gap: 10px; }
.bd .price { margin-top: 10px; }
.bd .price b { font-size: clamp(30px, 2.1vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.price span { font-size: 14px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { padding: 6px 12px; border-radius: 999px; background: var(--ground); font-size: 15px; font-weight: 500; line-height: 1.25; }
.cta {
  margin-top: 20px; border: 0; cursor: pointer; padding: 14px 26px; border-radius: 999px; background: var(--accent-ink); color: #fff;
  font-size: 17px; font-weight: 700; line-height: 1.2; transition: background .15s, transform .1s;
}
.cta:hover { background: var(--accent-deep); }
.cta:active { transform: scale(.98); }
.cta:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.resp { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); font-size: 16px; line-height: 1.45; color: var(--ink); }
.resp:not([hidden]) { animation: rise .22s ease-out; }

.label { margin: 28px 0 10px; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 22px; }
.row + .row { border-top: 1px solid var(--line); }
.rl { min-width: 0; }
.rl b { text-wrap: balance; display: block; font-size: 18px; font-weight: 600; line-height: 1.3; }
.rl span { display: block; margin-top: 3px; font-size: 14.5px; line-height: 1.35; color: var(--ink2); }
.row .price { flex: none; flex-direction: column; align-items: flex-end; gap: 1px; }
.row .price b { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.row .price span { font-size: 12.5px; }
.rows + .note { margin-top: 10px; }

.msg h2 { font-size: clamp(26px, 2vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.msg p { margin-top: 10px; max-width: 54ch; font-size: 18px; line-height: 1.5; color: var(--ink2); }

.handoff { margin-top: 26px; padding: 18px 22px 20px; border-radius: 18px; border: 1.5px dashed var(--line2); }
.tag {
  display: inline-block; padding: 5px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line2);
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); line-height: 1.2;
}
.handoff h3 { margin-top: 12px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.handoff p { margin-top: 4px; font-size: 16.5px; line-height: 1.45; color: var(--ink2); }

/* ---------- wide screens with results: the ask stays on the left, results on the right ---------- */
@media (min-width: 1100px) {
  body.has-results .page {
    grid-template-columns: minmax(360px, 480px) minmax(0, 860px); column-gap: 72px; justify-content: center;
    grid-template-areas: "ask out" "foot foot"; grid-template-rows: 1fr auto;
  }
  body.has-results .ask { position: sticky; top: 48px; align-items: flex-start; text-align: left; }
  body.has-results .lockup .logo { height: 52px; }
  body.has-results .lockup .rule { height: 32px; }
  body.has-results .lockup .bowtie { height: 19px; }
  body.has-results .eyebrow { margin-top: 36px; }
  body.has-results h1 { font-size: clamp(34px, 2.6vw, 50px); }
  body.has-results .scope { font-size: 17px; }
  body.has-results .bar { margin-top: 28px; padding-left: 24px; }
  body.has-results .bar textarea { font-size: 20px; padding: 10px 0; }
  body.has-results .go { width: 52px; height: 52px; }
  body.has-results .go .spin { inset: 14px; }
  body.has-results .chips { justify-content: flex-start; }
  body.has-results .chip { font-size: 15.5px; padding: 10px 16px; }
}
@media (min-width: 1100px) and (max-height: 960px) {
  .page { padding-top: 36px; }
  body.has-results .ask { top: 36px; }
  body.has-results .eyebrow { margin-top: 28px; }
  .best { margin-top: 16px; }
  .bd { padding: 22px 28px 24px; }
  .label { margin-top: 22px; }
  .row { padding: 12px 22px; }
  .handoff { margin-top: 20px; }
}

/* ---------- phones ---------- */
@media (max-width: 1099px) {
  body.has-results .out { margin-top: 36px; scroll-margin-top: 16px; }
}
@media (max-width: 760px) {
  .page { padding: 28px 16px 22px; }
  .lockup { gap: 12px; }
  .lockup .logo { height: 42px; }
  .lockup .rule { height: 26px; }
  .lockup .bowtie { height: 15px; }
  .eyebrow { margin-top: 30px; font-size: 15px; }
  h1 { font-size: 36px; letter-spacing: -.035em; }
  .scope { font-size: 16px; }
  .bar { margin-top: 26px; padding: 8px 8px 8px 20px; border-radius: 30px; }
  .bar textarea { font-size: 18px; padding: 11px 0; }
  .go { width: 48px; height: 48px; }
  .go svg { width: 22px; height: 22px; }
  .go .spin { inset: 12px; }
  .chips { margin-top: 16px; gap: 8px; }
  .chip { font-size: 15px; padding: 10px 14px; }
  .best { grid-template-columns: minmax(0, 1fr); border-radius: 20px; }
  .ph img { aspect-ratio: 16 / 9; flex: none; height: auto; }
  .bd { padding: 18px 18px 20px; }
  .facts li { font-size: 14px; }
  .row { padding: 13px 16px; gap: 12px; align-items: flex-start; }
  .rl b { font-size: 16px; }
  .rl span { font-size: 13.5px; }
  .row .price b { font-size: 18px; }
  .msg p { font-size: 16.5px; }
  .handoff { padding: 16px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
