/* Florida AI Partners — "Build your own AI receptionist" funnel.
 *
 * Self-contained dark, premium shell (no cross-spoke CSS dependency beyond the
 * vendored brand tokens). Lifts the look of the meet web-demo card/orb/transcript and
 * extends it into the 4-step funnel. Mobile-first; WCAG 2.2 AA (focus-visible rings,
 * ≥44px targets, ≥4.5:1 text contrast on the dark surface). Brand tokens flow from
 * /vendor/tokens.css so a rebrand is a one-file swap. */

@import "/vendor/tokens.css";

:root {
  --ink: var(--color-ink, #002454);
  --brand: var(--color-brand, #009ca8);
  --brand-deep: var(--color-brand-strong, #007a83);
  --brand-bright: #3cc3da; /* teal for text/links on dark — AA on the navy card */
  --accent: var(--color-accent, #fc6000);
  --card: #0a2d52;
  --card-2: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #eef4fb;
  --muted: rgba(233, 240, 250, 0.78); /* ≥4.5:1 on the card */
  --faint: rgba(207, 227, 244, 0.6);
  --ok: #5eead4;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
  padding: clamp(1rem, 4vw, 2.5rem) 1rem 3rem;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(0, 156, 168, 0.28), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(252, 96, 0, 0.16), transparent 55%),
    linear-gradient(180deg, #002454 0%, #001a3d 100%);
  background-attachment: fixed;
}

/* Skip link — keyboard users jump straight to the form (WCAG 2.4.1). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 50;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.shell {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wordmark {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  color: #cfe3f4;
  text-align: center;
}
.wordmark .ai { color: var(--accent); }

.card {
  background: linear-gradient(180deg, rgba(10, 45, 82, 0.94), rgba(7, 33, 62, 0.94));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 24px 60px rgba(0, 8, 25, 0.5);
  backdrop-filter: blur(6px);
}

/* Step progress — three dots, current one lit. Decorative + announced via aria-label. */
.steps {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 0 0.5rem;
  list-style: none;
  padding: 0;
}
.steps li {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s, transform 0.2s;
}
.steps li[aria-current="step"] { background: var(--brand-bright); transform: scale(1.25); }
.steps li.done { background: var(--ok); }

h1.title {
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  line-height: 1.2;
  margin: 0 0 0.4rem;
}
.lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
}
.lead strong { color: #fff; }

/* Form fields */
.field { display: block; text-align: left; margin-bottom: 1rem; }
.field > span {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.field .help {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.1rem;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: #fff;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 70px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(233, 240, 250, 0.5); }
.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 156, 168, 0.35);
}

.row {
  display: flex;
  gap: 0.75rem;
}
.row .field { flex: 1; }
@media (max-width: 460px) {
  .row { flex-direction: column; gap: 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 500;
}
.btn.end { background: linear-gradient(180deg, #e0584f, #c0392b); }
.btn-row { display: flex; gap: 0.75rem; margin-top: 1.1rem; }
.btn-row .btn { width: auto; flex: 1; }

/* Accessible focus ring for every interactive element (WCAG 2.4.7) */
.btn:focus-visible,
.chip:focus-visible,
.seg button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--brand-bright);
  outline-offset: 2px;
}

.hint { margin: 0.9rem 0 0; font-size: 0.82rem; color: var(--muted); text-align: center; }
.hint a { color: var(--brand-bright); }

.status { font-size: 0.88rem; color: var(--faint); min-height: 1.2em; margin: 0.6rem 0 0; }
.status.busy { color: var(--brand-bright); }
.status.bad { color: var(--danger); }
.status.good { color: var(--ok); }

/* The "we read your site" banner that appears after a successful draft */
.drafted-note {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.3);
  color: var(--ok);
  border-radius: 11px;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.drafted-note.on { display: flex; }

/* ── Customize: the 4 levers ────────────────────────────────────────────────── */
.lever { margin-bottom: 1.25rem; }
.lever > .label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.lever > .sub { color: var(--muted); font-size: 0.82rem; margin: -0.25rem 0 0.5rem; }

/* Chips — "what should it do?" (book / capture / transfer) + voice picks */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.chip .chip-sub { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 0.15rem; }
.chip[aria-pressed="true"] {
  border-color: var(--brand-bright);
  background: rgba(0, 156, 168, 0.18);
  color: #fff;
}
.chip[aria-pressed="true"] .chip-sub { color: rgba(255, 255, 255, 0.85); }

/* Segmented control — hours (24/7 vs after-hours) */
.seg {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  overflow: hidden;
}
.seg button {
  flex: 1;
  min-height: 44px;
  padding: 0.55rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: rgba(0, 156, 168, 0.22); color: #fff; font-weight: 600; }

/* ── TEST: the live call (orb + transcript) ─────────────────────────────────── */
.orb {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0.5rem auto 1rem;
  background: radial-gradient(circle at 50% 40%, var(--ok), var(--brand));
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5);
}
.orb.speaking { animation: pulse 1.1s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5); }
  100% { box-shadow: 0 0 0 26px rgba(94, 234, 212, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .orb.speaking { animation: none; outline: 3px solid var(--ok); outline-offset: 4px; }
  .btn, .chip, .seg button, .steps li { transition: none; }
}

#transcript {
  text-align: left;
  max-height: 34vh;
  overflow-y: auto;
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
#transcript .turn { margin-bottom: 0.5rem; }
#transcript .you { color: #b9c7d6; }
#transcript .ai { color: var(--text); }
#transcript .who { font-weight: 600; opacity: 0.85; }

.preview-line {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-bright);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.preview-line strong { color: #fff; }

/* Generic step show/hide */
.step { display: none; }
.step.on { display: block; }

.footer {
  font-size: 0.8rem;
  color: var(--faint);
  margin: 0;
  text-align: center;
  max-width: 540px;
}
.footer a { color: var(--brand-bright); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
