/* The client pages' look, matching Ad Hoc Digital's own survey funnel
 * (adhocdigital-site, branch landing: survey-page.tsx, survey-funnel.tsx,
 * globals.css). Slate only, never navy. Gold is for review stars only.
 * Lora for headlines, Inter for everything else. */

:root {
  --b50: #f1f5f8;
  --b100: #dde7ee;
  --b200: #b9cad9;
  --b300: #94aec3;
  --b400: #6f8da8;
  --b500: #476582;
  --b600: #3a536a;
  --b700: #2d4152;
  --i300: #a8a8ad;
  --i400: #6b6b71;
  --i500: #3a3a3a;
  --i700: #1f1f23;
  --i900: #0a0a0c;
  --gold: #e0aa1e;
  --error: #dc2626;
  --shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.04), 0 8px 24px -8px rgb(0 20 49 / 0.08);
  --serif: Lora, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--i900);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--b500); color: #fff; }
a { color: var(--b500); }
p { margin: 0; }
button { font: inherit; }

.icon { width: 20px; height: 20px; flex: none; }
.icon.sm { width: 16px; height: 16px; }
.icon.xs { width: 14px; height: 14px; }

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

.inner { margin: 0 auto; padding: 0 20px; }
.card-col { max-width: 36rem; padding: 24px 16px 16px; }
.narrow { max-width: 42rem; }
.wide { max-width: 64rem; }

.demo-bar { padding: 8px 16px; background: var(--b50); text-align: center; font-size: 12px; font-weight: 500; color: var(--b600); }
.namebar { border-bottom: 1px solid var(--b100); background: #fff; }
.namebar p {
  padding: 12px 16px;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--i900);
}

.hero { background: linear-gradient(to bottom, rgb(241 245 248 / 0.7), #fff); }
.hero-text { text-align: center; }
.eyebrow {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--b500);
}
.pulse {
  position: relative;
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--b500);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--b400);
  animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }

.headline {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--i900);
}
.ul {
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--b300);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.16em;
}
.hero-sub { margin-top: 12px; color: var(--i400); font-size: 15px; line-height: 1.6; }

/* ---------------------------------------------------------------- the card */

.survey { margin-top: 20px; border-radius: 24px; scroll-margin-top: 16px; }
.survey-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--b100);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}
/* First question: a light travels around the card to invite the first tap. */
@property --glow-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes glow-spin { to { --glow-angle: 360deg; } }
.survey.glow {
  padding: 2px;
  border-radius: 26px;
  background: conic-gradient(from var(--glow-angle), var(--b100) 0deg, var(--b100) 200deg, var(--b300) 260deg, var(--b500) 300deg, var(--b300) 330deg, var(--b100) 360deg);
  animation: glow-spin 3.5s linear infinite;
  box-shadow: 0 0 0 4px rgb(71 101 130 / 0.06), 0 12px 40px -12px rgb(71 101 130 / 0.35);
}
.survey.glow .survey-card { border-color: transparent; box-shadow: none; }

.progress { padding: 20px 20px 0; }
.progress-row { display: flex; height: 24px; align-items: center; justify-content: space-between; font-size: 12px; color: var(--i400); }
.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: -4px;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--i400);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
}
.back:hover { color: var(--b500); }
.bar { margin-top: 8px; height: 6px; overflow: hidden; border-radius: 999px; background: var(--b50); }
.bar-fill { height: 100%; border-radius: 999px; background: var(--b500); transition: width 0.5s ease-out; }

.survey-body { padding: 20px 20px 24px; }
.step-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--i900);
}
.step-sub { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--i400); }
@keyframes survey-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.survey-in { animation: survey-in 0.28s ease-out both; }

.options { display: grid; gap: 10px; margin-top: 20px; }
.option {
  display: flex;
  min-height: 56px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--b100);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.option:hover { border-color: var(--b300); background: rgb(241 245 248 / 0.6); }
.option:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--b300); }
.option-label { font-size: 15px; font-weight: 500; color: var(--i900); }
.tick {
  display: flex;
  width: 24px;
  height: 24px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--b200);
  border-radius: 50%;
  color: transparent;
  transition: all 0.15s;
}
.option:hover .tick { border-color: var(--b400); }
.option[aria-pressed="true"] { border-color: var(--b500); background: var(--b50); box-shadow: 0 0 0 1px var(--b500); }
.option[aria-pressed="true"] .tick { border-color: var(--b500); background: var(--b500); color: #fff; }
.reassure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; font-size: 12px; color: var(--i400); }

/* ---------------------------------------------------------------- form */

.fields { display: grid; gap: 16px; margin-top: 20px; }
.field label { display: block; font-size: 14px; font-weight: 500; color: var(--i700); }
.soft { font-weight: 400; color: var(--i400); }
input, select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 12px 16px;
  border: 1px solid var(--b100);
  border-radius: 12px;
  background: #fff;
  color: var(--i900);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--i300); }
input:focus, select:focus, textarea:focus { border-color: var(--b500); box-shadow: 0 0 0 3px rgb(71 101 130 / 0.2); }
[aria-invalid="true"] { border-color: #f87171; }
.phone { display: flex; gap: 8px; }
.phone select { width: 6.5rem; flex: none; padding: 12px 8px; }
.error { margin-top: 4px; font-size: 12px; color: var(--error); }
.error:empty, .email-hint:empty { display: none; }
.error.center { text-align: center; }
.email-hint { margin-top: 4px; font-size: 12px; color: var(--i400); }
.link { padding: 0; border: 0; background: none; color: var(--b500); text-decoration: underline; cursor: pointer; font-size: inherit; }
.consent { margin-top: 12px; text-align: center; font-size: 11px; line-height: 1.6; color: var(--i400); }
.consent a { color: inherit; }

/* ---------------------------------------------------------------- buttons */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--b500);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: background-color 0.15s;
}
.pill:hover { background: var(--b600); }
.pill:active { background: var(--b700); }
.pill:disabled { opacity: 0.8; cursor: wait; }
.pill.big { min-height: 56px; padding: 0 28px; font-size: 16px; }
.pill.full { width: 100%; margin-top: 24px; }
.pill.ghost { background: #fff; color: var(--b500); border: 1px solid var(--b200); }
.pill.ghost:hover { background: var(--b50); }
.to-card-row { display: flex; justify-content: center; margin-top: 40px; }

/* ---------------------------------------------------------------- under the card */

.rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--i500);
  text-decoration: none;
}
.rating:hover span { text-decoration: underline; }
.stars { display: inline-flex; color: var(--gold); }
.stars svg { width: 14px; height: 14px; fill: currentColor; }
.stars.sm svg { width: 16px; height: 16px; }
.stars.xs svg { width: 12px; height: 12px; }
.call-us { margin-top: 12px; text-align: center; font-size: 14px; color: var(--i400); }

/* ---------------------------------------------------------------- sections */

.band { padding: 48px 0; }
.band.white { background: #fff; }
.band.soft { background: var(--b50); border-top: 1px solid var(--b100); border-bottom: 1px solid var(--b100); }
.band.closing { border-top: 1px solid var(--b100); background: linear-gradient(to bottom, #fff, rgb(241 245 248 / 0.6)); padding: 56px 0 64px; }
.section-title {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.875rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--i900);
}
.closing-text { max-width: 40rem; margin: 16px auto 0; text-align: center; font-size: 16px; line-height: 1.6; color: var(--i500); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  border: 1px solid var(--b100);
  border-radius: 16px;
  background: #fff;
}
.stats.n1 { grid-template-columns: 1fr; }
.stats.n3 .stat:last-child { grid-column: 1 / -1; }
.stat { padding: 20px; border-color: var(--b100); border-style: solid; border-width: 0; }
.stats .stat:nth-child(odd):not(:last-child) { border-right-width: 1px; }
.stats.n4 .stat:nth-child(-n + 2), .stats.n3 .stat:nth-child(-n + 2) { border-bottom-width: 1px; }
.stat-value { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.015em; color: var(--i900); }
.stat-label { margin-top: 4px; font-size: 12px; color: var(--i500); }

.timeline { margin: 36px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; gap: 20px; padding-bottom: 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 40px; bottom: 0; width: 1px; background: var(--b200); }
.num {
  position: relative;
  display: flex;
  width: 36px;
  height: 36px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--b200);
  border-radius: 50%;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--b500);
}
.num.sm { width: 28px; height: 28px; font-size: 13px; }
.timeline li > div { padding-top: 6px; }
.t-title { font-weight: 500; color: var(--i900); }
.t-body { margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--i500); }

.reviews { display: grid; gap: 16px; margin-top: 32px; }
.review { margin: 0; padding: 24px; border: 1px solid var(--b100); border-radius: 16px; background: #fff; box-shadow: var(--shadow-card); }
.review blockquote { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: var(--i700); }
.review figcaption { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 16px; font-size: 13px; }
.r-name { font-weight: 600; color: var(--i900); }
.r-source { color: var(--i400); }

.faq { margin-top: 32px; border-top: 1px solid var(--b100); }
.faq details { border-bottom: 1px solid var(--b100); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 500;
  color: var(--i900);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-icon { color: var(--b500); transition: transform 0.2s; }
.faq details[open] .faq-icon { transform: rotate(45deg); }
.faq details p { padding: 0 32px 18px 0; font-size: 15px; line-height: 1.6; color: var(--i500); }

.footer { border-top: 1px solid var(--b100); background: #fff; }
.footer .inner { max-width: 42rem; padding: 40px 20px 96px; text-align: center; font-size: 12px; line-height: 1.6; color: var(--i400); }
.footer p + p { margin-top: 12px; }
.footer a { color: inherit; }
.footer a:hover { color: var(--b500); }

/* Phones: the booking bar in thumb reach. */
.sticky {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--b100);
  background: rgb(255 255 255 / 0.95);
  backdrop-filter: blur(8px);
  transform: translateY(100%);
  transition: transform 0.3s;
}
.sticky.show { transform: none; }
.sticky-proof { min-width: 0; flex: 1; }
.sticky-proof p { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--i500); }
.sticky-firm { font-size: 13px !important; font-weight: 500; color: var(--i900) !important; }

/* ---------------------------------------------------------------- calendar */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--b50); font-size: 12px; color: var(--i500); }
.chip .icon { color: var(--b500); }
.sample { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--b50); font-size: 13px; color: var(--b700); }
.tz-row { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 12px; color: var(--i500); }
.tz-row label { white-space: nowrap; }
.tz-row select { width: auto; max-width: 100%; margin: 0; padding: 4px 8px; border-color: transparent; font-size: 12px; font-weight: 500; color: var(--i700); text-decoration: underline; text-decoration-color: var(--b300); background: transparent; cursor: pointer; }
.status { margin-top: 16px; font-size: 14px; color: var(--i500); }
.status:empty { display: none; }
.days { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day {
  display: flex;
  flex: 0 0 60px;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border: 1px solid var(--b100);
  border-radius: 16px;
  background: #fff;
  color: var(--i900);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.day:hover { border-color: var(--b300); }
.day-top, .day-month { font-size: 11px; color: var(--i400); }
.day-num { font-size: 18px; font-weight: 600; line-height: 1.25; }
.day[aria-pressed="true"] { border-color: var(--b500); background: var(--b500); color: #fff; }
.day[aria-pressed="true"] .day-top, .day[aria-pressed="true"] .day-month { color: var(--b100); }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.time {
  min-height: 48px;
  padding: 8px 4px;
  border: 1px solid var(--b100);
  border-radius: 12px;
  background: #fff;
  color: var(--i900);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.time:hover { border-color: var(--b300); background: rgb(241 245 248 / 0.6); }
.time[aria-pressed="true"] { border-color: var(--b500); background: var(--b500); color: #fff; }
.confirm { margin-top: 20px; padding: 16px; border: 1px solid var(--b200); border-radius: 16px; background: rgb(241 245 248 / 0.6); animation: survey-in 0.28s ease-out both; }
.confirm .pill.full { margin-top: 16px; }
.confirm-label { font-size: 14px; color: var(--i500); }
.when { margin-top: 2px; font-weight: 500; color: var(--i900); }
.when.big { margin-top: 12px; font-size: 17px; font-weight: 400; line-height: 1.5; }
.backup { margin-top: 20px; text-align: center; font-size: 14px; color: var(--i500); }

/* ---------------------------------------------------------------- thank-you */

.survey-card.ty { padding: 32px 24px; text-align: center; }
.ty-badge { display: flex; width: 48px; height: 48px; margin: 0 auto 16px; align-items: center; justify-content: center; border-radius: 50%; background: var(--b500); color: #fff; }
.ty-badge .icon { width: 24px; height: 24px; }
.ty #ty-generic { margin-top: 12px; }
.ty .sample { display: inline-block; }
.next-wrap { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--b100); text-align: left; }
.next-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.25rem; color: var(--i900); }
.next { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.next li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--i700); }

/* ---------------------------------------------------------------- larger screens */

@media (min-width: 640px) {
  .namebar p { padding: 16px; font-size: 1.5rem; }
  .card-col { padding: 40px 24px 24px; }
  .eyebrow { font-size: 12px; }
  .headline { margin-top: 16px; font-size: 3rem; }
  .ul { text-decoration-thickness: 4px; }
  .survey { margin-top: 28px; }
  .progress { padding: 28px 32px 0; }
  .survey-body { padding: 24px 32px 32px; }
  .step-title { font-size: 2rem; }
  .step-sub, .option-label { font-size: 16px; }
  .option { padding: 12px 20px; }
  .times { grid-template-columns: repeat(4, 1fr); }
  .band { padding: 56px 0; }
  .section-title { font-size: 2.25rem; }
  .section-title.big { font-size: 2.5rem; }
  .closing-text { font-size: 18px; }
  .stats.n2 { grid-template-columns: repeat(2, 1fr); }
  .stats.n3 { grid-template-columns: repeat(3, 1fr); }
  .stats.n4 { grid-template-columns: repeat(4, 1fr); }
  .stats .stat { border-width: 0 !important; }
  .stats .stat + .stat { border-left-width: 1px !important; }
  .stats.n3 .stat:last-child { grid-column: auto; }
  .stat { padding: 24px; }
  .stat-value { font-size: 2rem; }
  .stat-label { font-size: 14px; }
  .t-body { font-size: 15px; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .footer .inner { padding-bottom: 40px; }
  .sticky { display: none; }
}
@media (min-width: 960px) {
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .stat-value { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .survey.glow, .pulse::after, .survey-in, .confirm { animation: none; }
}
