/* Best Auto Wiz for You: landing page styles.
   Mobile first. Desktop layout starts at 960px. All brand values live in :root. */

:root {
  /* Brand palette (contrast checked: see README) */
  --purple: #5B2BD6;        /* white text 7.6:1 */
  --purple-deep: #24104F;   /* main ink, white text 16.6:1 */
  --purple-soft: #EEE8FF;
  --blue: #1F5FE0;          /* white text 5.6:1 */
  --blue-soft: #E6EEFF;
  --orange: #FF8A1F;        /* call button fill, deep purple text 7.1:1 */
  --orange-dark: #C2410C;   /* orange used as text or shadow, white 5.2:1 */
  --orange-soft: #FFEBD9;
  --yellow: #FFD23F;        /* highlight, deep purple text 11.5:1 */
  --yellow-soft: #FFF4C7;
  --green: #0E7C3A;         /* white text 5.3:1 */
  --green-bright: #1DB954;  /* decorative dots only */
  --green-soft: #E2F6EA;
  --white: #FFFFFF;

  --ink: var(--purple-deep);
  --muted: #5E5873;         /* 6.7:1 on white */
  --line: #E4DEF5;
  --bg: #F6F3FF;
  --bubble-bot: var(--white);
  --bubble-user: var(--blue);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-h1: clamp(1.375rem, 1.05rem + 1.6vw, 3rem);

  /* Spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* Radii and depth */
  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-pill: 999px;
  --shadow-card: 0 10px 30px rgba(36, 16, 79, .10);
  --shadow-pop: 6px 6px 0 var(--purple-deep);

  --tap: 48px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: var(--fs-md)/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, ol, ul, figure { margin: 0; }
a { color: inherit; }
mark { background: var(--yellow); color: var(--purple-deep); padding: 0 .18em; border-radius: 4px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: var(--s3); top: -60px; z-index: 50; background: var(--purple-deep); color: var(--white);
  padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-weight: 800; text-decoration: none; }
.skip-link:focus { top: var(--s3); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top);
  -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); }
.topbar__inner { max-width: 1200px; margin: 0 auto; min-height: var(--header-h);
  padding: var(--s2) max(var(--s4), env(safe-area-inset-right)) var(--s2) max(var(--s4), env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); flex: 0 1 auto; min-width: 0; }
.logo-svg { height: 36px; width: auto; }
.hcall { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--r-pill);
  background: var(--orange); color: var(--purple-deep); font-weight: 900; font-size: var(--fs-sm);
  text-decoration: none; box-shadow: 0 3px 0 var(--orange-dark); white-space: nowrap; }
.hcall svg { width: 16px; height: 16px; fill: currentColor; }
.hcall:hover { background: #FF9B3D; }
.hcall:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--orange-dark); }

/* ---------- Layout ---------- */
.layout { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "chat" "how"; }

/* ---------- Intro (mobile: bold banner) ---------- */
.intro { grid-area: intro; position: relative; overflow: hidden; color: var(--white);
  background: linear-gradient(120deg, var(--purple) 0%, #4A36DC 55%, var(--blue) 100%);
  padding: var(--s4) var(--s4) var(--s5); }
.intro::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,63,.55), rgba(255,210,63,0) 70%); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.16); color: var(--white);
  padding: var(--s1) var(--s3); border-radius: var(--r-pill); margin-bottom: var(--s2); }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.intro h1 { font-size: var(--fs-h1); line-height: 1.15; font-weight: 900; letter-spacing: -.01em; position: relative; z-index: 1; }
.lead { display: none; }

/* ---------- Chat ---------- */
.chat { grid-area: chat; background: var(--white); display: flex; flex-direction: column; outline: none; }
.chat__head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--line); background: var(--white); }
.avatar { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; overflow: hidden; }
.avatar img { width: 44px; height: 44px; }
.who { font-weight: 900; font-size: var(--fs-lg); line-height: 1.2; }
.who__role { display: inline-block; margin-left: var(--s1); font-size: var(--fs-xs); font-weight: 800; color: var(--purple);
  background: var(--purple-soft); padding: 2px var(--s2); border-radius: var(--r-pill); vertical-align: 2px; }
.status { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--green); font-weight: 700; }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); animation: blink 1.4s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.thread { padding: var(--s4) var(--s3) var(--s3); display: flex; flex-direction: column; gap: var(--s3);
  background:
    radial-gradient(circle at 12% 8%, rgba(255,210,63,.18) 0 60px, transparent 61px),
    radial-gradient(circle at 92% 70%, rgba(31,95,224,.08) 0 80px, transparent 81px),
    var(--bg);
  min-height: 260px; }
.row { display: flex; gap: var(--s2); align-items: flex-end; max-width: 90%; scroll-margin-bottom: 150px; }
.row--bot { align-self: flex-start; }
.row--user { align-self: flex-end; flex-direction: row-reverse; }
.miniav { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; overflow: hidden; }
.miniav img { width: 30px; height: 30px; }
.bubble { padding: var(--s3) var(--s4); border-radius: var(--r-lg); font-size: var(--fs-md); line-height: 1.45;
  box-shadow: 0 1px 2px rgba(36,16,79,.08); overflow-wrap: anywhere; }
.row--bot .bubble { background: var(--bubble-bot); border-bottom-left-radius: 6px; border: 1px solid var(--line); }
.row--user .bubble { background: var(--bubble-user); color: var(--white); border-bottom-right-radius: 6px; font-weight: 700; }
.pop { animation: pop .26s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.typing .bubble { display: flex; gap: 5px; padding: 15px var(--s4); }
.typing .bubble span { width: 7px; height: 7px; border-radius: 50%; background: #B7A9E6; animation: tdot 1.2s infinite; }
.typing .bubble span:nth-child(2) { animation-delay: .2s; }
.typing .bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes tdot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Call card */
.callcard { align-self: stretch; background: var(--white); border: 2px solid var(--purple-deep); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); padding: var(--s5) var(--s4) var(--s4); text-align: center; position: relative;
  margin: var(--s2) var(--s1) var(--s2) 0; scroll-margin-bottom: 150px; }
.cc-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--green); color: var(--white);
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px var(--s3); border-radius: var(--r-pill); margin-bottom: var(--s3); }
.cc-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--white); animation: blink 1.4s infinite; }
.cc-h { font-size: 1.375rem; font-weight: 900; line-height: 1.2; margin-bottom: var(--s1); }
.cc-sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--s3); }
.holdbox { background: var(--yellow-soft); border: 2px dashed #E8B71A; border-radius: var(--r-sm); padding: var(--s2) var(--s3);
  font-size: var(--fs-sm); font-weight: 700; color: #6B4A00; margin-bottom: var(--s3); }
.holdbox b { font-variant-numeric: tabular-nums; font-size: 1.0625rem; color: var(--purple-deep); }
.bignum { display: inline-block; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.875rem); font-weight: 900; color: var(--purple);
  text-decoration: none; margin-bottom: var(--s3); letter-spacing: .01em; min-height: var(--tap); line-height: var(--tap); }
.callbtn, .dcall { display: flex; align-items: center; justify-content: center; gap: var(--s3); width: 100%;
  min-height: 60px; padding: var(--s2) var(--s4); border-radius: 14px; background: var(--orange); color: var(--purple-deep);
  font-size: 1.1875rem; font-weight: 900; text-decoration: none; text-transform: uppercase; letter-spacing: .02em;
  box-shadow: 0 5px 0 var(--orange-dark), 0 12px 26px rgba(255,138,31,.45); animation: pulse 1.8s ease-in-out infinite; }
.callbtn:hover, .dcall:hover { background: #FF9B3D; }
.callbtn svg, .dcall svg { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }
.dcall svg { animation: ring 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-14deg); } 20% { transform: rotate(12deg); } 30% { transform: rotate(-8deg); } 40% { transform: rotate(0); } }
.cc-meta { list-style: none; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s1) var(--s4);
  font-size: var(--fs-xs); color: var(--muted); font-weight: 700; margin-top: var(--s4); }
.cc-meta li { display: flex; align-items: center; gap: 5px; }
.cc-meta svg { width: 14px; height: 14px; fill: var(--green); }
.closednote { font-size: var(--fs-sm); color: #6B4A00; background: var(--yellow-soft); border-radius: var(--r-sm);
  padding: var(--s2) var(--s3); margin-top: var(--s3); font-weight: 600; }

/* Dock (answers + sticky call) */
.dock { position: sticky; bottom: 0; z-index: 10; background: var(--white); border-top: 1px solid var(--line);
  padding: var(--s3) var(--s3) calc(var(--s3) + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(36,16,79,.08); }
.dock.is-idle { padding-top: 0; padding-bottom: 0; border-top: 0; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips:empty { display: none; }
.chip { flex: 1 1 auto; min-width: 46%; min-height: 54px; padding: var(--s3) var(--s4); border-radius: var(--r-pill);
  border: 2px solid var(--blue); background: var(--white); color: var(--blue); font: 800 var(--fs-md)/1.2 var(--font);
  cursor: pointer; transition: transform .06s, background-color .15s; }
.chip:hover { background: var(--blue-soft); }
.chip:active { transform: scale(.98); }
.chip--hot { background: var(--green); border-color: var(--green); color: var(--white); box-shadow: 0 4px 0 #075226; }
.chip--hot:hover { background: #0B6B31; }
.dcall { font-size: 1.0625rem; min-height: 56px; }
.dcall[hidden], .dsub[hidden] { display: none; }
.dsub { text-align: center; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; margin-top: var(--s2); }

/* ---------- How it works ---------- */
.how { grid-area: how; padding: var(--s6) var(--s4) var(--s6); }
.how h2 { font-size: 1.5rem; font-weight: 900; margin-bottom: var(--s4); }
.steps { list-style: none; padding: 0; display: grid; gap: var(--s3); }
.step { position: relative; background: var(--white); border-radius: var(--r-md); padding: var(--s4) var(--s4) var(--s4) 76px;
  box-shadow: var(--shadow-card); border: 1px solid var(--line); min-height: 92px; }
.step h3 { font-size: var(--fs-lg); font-weight: 900; line-height: 1.25; }
.step p { font-size: var(--fs-sm); color: var(--muted); }
.step__num { display: block; font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.step__icon { position: absolute; left: var(--s4); top: var(--s4); width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; }
.step__icon svg { width: 24px; height: 24px; fill: var(--white); }
.step--purple .step__icon { background: var(--purple); } .step--purple .step__num { color: var(--purple); }
.step--orange .step__icon { background: var(--orange); } .step--orange .step__icon svg { fill: var(--purple-deep); }
.step--orange .step__num { color: var(--orange-dark); }
.step--green .step__icon { background: var(--green); } .step--green .step__num { color: var(--green); }
.pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0; }
.pill { font-size: var(--fs-sm); font-weight: 800; padding: var(--s2) var(--s4); border-radius: var(--r-pill); }
.pill--yellow { background: var(--yellow); color: var(--purple-deep); }
.pill--blue { background: var(--blue-soft); color: #1747A8; }
.pill--green { background: var(--green-soft); color: var(--green); }
.photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); position: relative;
  border: 4px solid var(--white); aspect-ratio: 16 / 10; background: var(--purple-soft); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 35%; }

/* ---------- Footer ---------- */
.footer { background: var(--purple-deep); color: #DCD3FF; padding: var(--s6) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom)); }
.footer__inner { max-width: 1200px; margin: 0 auto; display: grid; gap: var(--s4); }
.footer__logo { height: 57px; width: auto; }
.disc { font-size: var(--fs-xs); line-height: 1.6; max-width: 72ch; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.footer__links a { color: var(--white); font-size: var(--fs-xs); font-weight: 700; min-height: var(--tap);
  display: inline-flex; align-items: center; }
.copy { font-size: var(--fs-xs); }
.noscript { text-align: center; padding: var(--s4); background: var(--yellow-soft); }

/* ---------- Small phones ---------- */
@media (max-width: 359px) {
  .logo-svg { height: 30px; }
  .hcall { padding: 0 var(--s3); }
  .chip { min-width: 100%; }
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .intro { padding: var(--s5) var(--s5) var(--s6); }
  .chat { margin: 0 var(--s5); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--shadow-card); }
  .how { padding: var(--s7) var(--s5); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { padding: var(--s5) var(--s4) var(--s4); }
  .step__icon { position: static; margin-bottom: var(--s3); }
}

/* ---------- Desktop: story on the left, chat card on the right ---------- */
@media (min-width: 960px) {
  body {
    background:
      radial-gradient(circle at 6% 18%, rgba(255,210,63,.35) 0 120px, transparent 121px),
      radial-gradient(circle at 46% 92%, rgba(29,185,84,.14) 0 160px, transparent 161px),
      radial-gradient(circle at 96% 8%, rgba(255,138,31,.18) 0 140px, transparent 141px),
      var(--bg);
  }
  .logo-svg { height: 42px; }
  .topbar__inner { padding-left: var(--s5); padding-right: var(--s5); }
  .footer { padding-left: 0; padding-right: 0; }
  .footer__inner { padding: 0 var(--s5); }
  .layout { grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: auto 1fr;
    grid-template-areas: "intro chat" "how chat"; column-gap: var(--s7); padding: var(--s7) var(--s5) var(--s8); }
  .intro { background: none; color: var(--ink); padding: var(--s4) 0 0; overflow: visible; }
  .intro::after { display: none; }
  .eyebrow { background: var(--purple-soft); color: var(--purple); font-size: var(--fs-sm); padding: var(--s2) var(--s4); margin-bottom: var(--s4); }
  .eyebrow__dot { background: var(--orange); }
  .intro h1 { line-height: 1.08; max-width: 14ch; }
  .lead { display: block; font-size: 1.1875rem; color: var(--muted); max-width: 46ch; margin-top: var(--s4); }
  .how { padding: var(--s6) 0 0; }
  .how h2 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .06em; color: var(--purple); }
  .photo { aspect-ratio: 16 / 7; }

  .chat { grid-area: chat; margin: 0; align-self: start; position: sticky; top: calc(var(--header-h) + var(--s5));
    height: min(760px, calc(100vh - var(--header-h) - 48px)); border-radius: 28px; overflow: hidden;
    border: 2px solid var(--purple-deep); box-shadow: 10px 10px 0 var(--purple), 0 30px 60px rgba(36,16,79,.18); }
  .chat__head { background: var(--purple-deep); color: var(--white); border-bottom: 0; padding: var(--s4); }
  .who__role { background: rgba(255,255,255,.14); color: var(--yellow); }
  .chat .status { color: #9EF0BC; }
  .thread { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
  .dock { position: static; box-shadow: none; }
}

@media (min-width: 1280px) {
  .layout { grid-template-columns: minmax(0, 1fr) 460px; column-gap: var(--s8); }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
