/* Automate Monday - booking funnel
 *
 * Brand tokens come from ../styles.css. The marketing site uses a 4px radius
 * throughout; the funnel deliberately does not. Sharp corners on stacked
 * options make every screen read as a form, and this is meant to read as a
 * conversation, so radii, spacing and shadows are all softened here.
 */

:root {
  --grad: linear-gradient(135deg, #F0158A 0%, #7C3AED 100%);
  --pink: #F0158A;
  --r-lg: 16px;
  --r-md: 13px;
  --shadow-1: 0 1px 2px rgba(24, 20, 15, 0.04), 0 2px 8px rgba(24, 20, 15, 0.03);
  --shadow-2: 0 2px 6px rgba(24, 20, 15, 0.05), 0 10px 26px rgba(24, 20, 15, 0.07);
}

html, body { height: 100%; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 50% -8%, rgba(240, 21, 138, 0.045), transparent 70%),
    var(--bg);
}

/* ---------- progress ---------- */

.progress-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 244, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 18px 0 16px;
}
.progress-row {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  box-shadow: inset 0 1px 2px rgba(24, 20, 15, 0.06);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 15%;
  border-radius: 999px;
  background: var(--grad);
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* The honest counter. A non-linear fill is only defensible while the true
   step count is on screen - see README, "Progress bar". */
.progress-count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- layout ---------- */

.funnel-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 52px 28px 72px;
}
.stage { width: 100%; max-width: 640px; }

.screen { display: none; }
.screen.is-active { display: block; animation: rise 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: none; }
  .progress-fill { transition: none; }
}

/* ---------- speaker + callback ---------- */

.speaker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
}
.speaker-badge {
  flex: none;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--grad);
  color: #FBFAF7;
  display: grid;
  place-items: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-1);
}
.speaker-badge img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.speaker-badge img[hidden] { display: none; }

/* Same badge, used again beside the booking ask on the last screen. */
.speaker-inline {
  margin: 0 0 20px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.speaker-inline .speaker-who { font-size: 15px; }
.speaker-who { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.speaker-who small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* The acknowledgement sits in the heading block, not in a separate bubble.
   Two boxes talking at once made the screen feel like a chat widget bolted
   onto a form. */
.q-lead {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.q-lead:empty { display: none; }

/* ---------- questions ---------- */

.q {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 33px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.q-sub {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 30px;
}

.field {
  width: 100%;
  padding: 19px 22px;
  font-family: inherit;
  font-size: 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: none;
  box-shadow: var(--shadow-1);
  transition: border-color 180ms, box-shadow 180ms;
}
.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.11), var(--shadow-1);
}
.field::placeholder { color: #ADA697; }

/* ---------- tiles ---------- */

.tiles { display: grid; gap: 11px; }
.tiles.two-up { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .tiles.two-up { grid-template-columns: 1fr; } }

.tile {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  text-align: left;
  padding: 19px 22px;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: border-color 180ms, transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms;
}
.tile:hover {
  border-color: rgba(124, 58, 237, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.tile:active { transform: translateY(0); }
.tile.is-picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.13), var(--shadow-1);
}
.tile-key {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 180ms, color 180ms;
}
.tile:hover .tile-key { background: #EDE7FB; color: var(--accent); }
.tile.is-picked .tile-key { background: var(--grad); color: #FBFAF7; }

/* On a multi-select screen the badge becomes a tick, so it is obvious that
   more than one answer is allowed and which ones are on. */
.tiles[data-multi="true"] .tile.is-picked .tile-key { font-size: 0; }
.tiles[data-multi="true"] .tile.is-picked .tile-key::after {
  content: '\2713';
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.tile-group + .tile-group { margin-top: 30px; }
.tile-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 13px;
}

/* ---------- actions ---------- */

/* Full width, always. A small auto-width pill under a stack of full-width
   options is the single thing that made this read as a form. */
.actions { margin-top: 30px; }
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  padding: 20px 30px;
  border: none;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: #FBFAF7;
  background: var(--grad);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(240, 21, 138, 0.22);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms, opacity 180ms;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(240, 21, 138, 0.28);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.32; cursor: not-allowed; box-shadow: none; }

/* Back sits under the CTA on every screen past the first. */
.nav-back { margin-top: 18px; text-align: center; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.btn-back:hover { background: var(--bg-alt); color: var(--ink); }

.reassure {
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- the maths reveal ---------- */

.maths {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.maths-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.maths-row:last-child { border-bottom: none; }
.maths-row .lbl { color: var(--ink-soft); }
.maths-row .lbl small { display: block; font-size: 12.5px; opacity: 0.85; margin-top: 3px; }
.maths-row .val { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.maths-row.is-gap { background: var(--bg-alt); }
.maths-row.is-gap .val { font-size: 19px; }

.headline-figure {
  margin-top: 20px;
  padding: 32px 28px;
  border-radius: var(--r-lg);
  background: var(--grad);
  color: #FBFAF7;
  box-shadow: 0 6px 26px rgba(240, 21, 138, 0.22);
}
.headline-figure .fig {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.headline-figure .cap { margin-top: 11px; font-size: 15px; opacity: 0.93; }

.assumptions {
  margin-top: 16px;
  padding: 20px 22px;
  background: var(--bg-alt);
  border-radius: var(--r-lg);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.assumptions-head { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.assume-ctl { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.assume-ctl label { flex: none; min-width: 190px; }
.assume-ctl input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
}
.assume-ctl output {
  flex: none; min-width: 50px; text-align: right;
  font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}

/* ---------- booking ---------- */

.recap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-1);
}
.recap-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.recap-line { display: flex; gap: 11px; font-size: 15.5px; line-height: 1.7; }
.recap-line .dot { color: var(--pink); flex: none; }

.cal-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-1);
}
.cal-wrap iframe { display: block; width: 100%; height: 620px; border: 0; }
/* An author rule beats the UA [hidden] rule, so display:none has to be
   restated or the un-mounted iframe leaves a 620px hole. */
.cal-wrap iframe[hidden] { display: none; }
.cal-fallback { padding: 44px 28px; text-align: center; }
.cal-fallback .btn-primary { text-decoration: none; }

.funnel-foot {
  border-top: 1px solid var(--border);
  padding: 22px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

@media (max-width: 600px) {
  .q { font-size: 26px; }
  .funnel-main { padding: 34px 20px 60px; }
  .headline-figure .fig { font-size: 37px; }
  .assume-ctl { flex-wrap: wrap; }
  .assume-ctl label { min-width: 0; width: 100%; }
  .progress-row { padding: 0 20px; gap: 14px; }
}
