/* ProFlow dark scheme (tokens from the FLO experience, flo.proflowmarketing.com).
   Orange is the action colour, as on FLO's primary buttons. */
:root {
  --bg: #101114;
  --fg: #f6f4f1;
  --muted: #aaaab4;
  --orange: #ff854b;
  --orange-hover: #ff9a68;
  --on-orange: #181419;
  --line: rgba(255, 255, 255, .16);
  --glass: rgba(27, 28, 33, .8);
  --panel: #1b1c21;
  --field: rgba(255, 255, 255, .04);
  --picked: rgba(255, 133, 75, .14);
  --error: #ff8a80;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.quiz-open { overflow: hidden; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg);
  font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 600; text-decoration: none; padding: 14px 24px; transition: background .15s, transform .15s, box-shadow .15s; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:focus-visible, .q-option:focus-visible, .cal-day:focus-visible, .cal-time:focus-visible, .quiz-back:focus-visible, .quiz-close:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.btn-go { background: var(--orange); color: var(--on-orange); box-shadow: 0 10px 30px rgba(255, 133, 75, .25); }
.btn-go:hover { background: var(--orange-hover); transform: translateY(-1px); }
.btn-go:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 20px 34px; font-size: 18px; }

/* ---------- header ---------- */
.topbar { position: relative; z-index: 2; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .wordmark { filter: brightness(0) invert(1); opacity: .92; }

/* ---------- hero (the whole page) ---------- */
.hero { flex: 1; display: flex; align-items: center; position: relative; overflow: hidden; padding: 40px 0 72px; }
.hero::before { content: ''; position: absolute; left: 50%; top: 58%; width: min(1100px, 140vw); aspect-ratio: 1.6; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 133, 75, .16), rgba(255, 133, 75, .05) 55%, transparent); pointer-events: none; }
.hero-inner { position: relative; max-width: 940px; text-align: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 72px); font-weight: 600; line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--orange); }
.nowrap { white-space: nowrap; }
.hero-sub { margin: 24px auto 0; max-width: 620px; font-size: clamp(17px, 1.9vw, 20px); color: var(--muted); text-wrap: pretty; }
.hero-cta { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta-note { font-size: 14px; color: var(--muted); }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 20px 0 28px; text-align: center; opacity: .8; }
.footer p + p { margin-top: 4px; }

/* ---------- pop-up ---------- */
.quiz { border: 1px solid var(--line); padding: 0; width: min(640px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); border-radius: 22px;
  background: var(--panel); color: var(--fg); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); overflow: hidden; }
.quiz::backdrop { background: rgba(8, 8, 10, .72); backdrop-filter: blur(6px); }
.quiz[open] { display: flex; animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.quiz-shell { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.quiz-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 0; }
.quiz-progress { flex: 1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.quiz-progress i { display: block; height: 100%; width: 0; background: var(--orange); border-radius: inherit; transition: width .3s ease; }
.quiz-back, .quiz-close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--field); cursor: pointer; display: grid; place-items: center; }
.quiz-back[hidden] { display: none; }
.quiz-back svg, .quiz-close svg { width: 18px; height: 18px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiz-body { overflow-y: auto; padding: 26px 32px 32px; overscroll-behavior: contain; }

.q-enter { animation: slide .26s ease-out; }
@keyframes slide { from { opacity: 0; transform: translateY(14px); } }
.q-count { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 12px; }
.q-title { font-size: clamp(26px, 4.2vw, 34px); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.q-help { margin-top: 10px; color: var(--muted); font-size: 16px; }
.q-options { margin-top: 24px; display: grid; gap: 10px; }
.q-option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 16px; border-radius: 14px; cursor: pointer;
  background: var(--field); border: 1px solid var(--line); font-weight: 500; font-size: 17px; transition: border-color .12s, background .12s; }
.q-option:hover { border-color: rgba(255, 255, 255, .4); }
.q-option[aria-checked="true"] { border-color: var(--orange); background: var(--picked); }
.q-key { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); }
.q-option[aria-checked="true"] .q-key { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.q-input { display: block; width: 100%; margin-top: 20px; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  font: 500 22px/1.3 var(--font); color: var(--fg); border-radius: 0; }
.q-input::placeholder { color: rgba(170, 170, 180, .6); }
.q-input:focus { border-bottom-color: var(--orange); outline: none; }
.q-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.q-consent input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--orange); }
.q-error { min-height: 1.4em; margin-top: 12px; color: var(--error); font-weight: 500; font-size: 15px; }
.q-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.q-hint { font-size: 13px; color: var(--muted); }

/* calendar */
.cal-body { margin-top: 22px; }
.cal-loading { color: var(--muted); padding: 30px 0; text-align: center; }
.cal-zone { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.cal-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.cal-day { flex: none; scroll-snap-align: start; width: 72px; padding: 10px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--field); cursor: pointer; display: grid; gap: 2px; }
.cal-dow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cal-dom { font-weight: 600; }
.cal-day[aria-selected="true"] { border-color: var(--fg); background: var(--fg); }
.cal-day[aria-selected="true"] span { color: var(--bg); }
.cal-times { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.cal-time { padding: 12px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--field); font-weight: 500; cursor: pointer; }
.cal-time:hover { border-color: rgba(255, 255, 255, .4); }
.cal-time[aria-checked="true"] { background: var(--picked); border-color: var(--orange); }
.cal-confirm { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.cal-confirm[hidden] { display: none; }
.cal-summary { font-weight: 600; }
.cal-other { margin-top: 4px; background: none; border: 0; padding: 6px 0; color: var(--muted); font-size: 14px; text-decoration: underline; cursor: pointer; }

/* end screens */
.q-end { text-align: center; padding: 18px 0 6px; display: flex; flex-direction: column; align-items: center; }
.q-end .btn { margin-top: 22px; }
.q-end-icon { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 18px; background: var(--orange)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23181419' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 30px no-repeat; }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar-inner { height: 64px; }
  .topbar .wordmark { display: none; }
  .hero { align-items: flex-start; padding: 36px 0 48px; }
  .btn-lg { width: 100%; padding: 19px 20px; }
  .quiz { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .quiz-body { padding: 20px 18px calc(28px + env(safe-area-inset-bottom)); }
  .q-hint { display: none; }
  .q-actions .btn { width: 100%; }
  .cal-confirm .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
