/* =====================================================
 * page-talk-to-sales — page-scoped styles
 * Built on v5 tokens. Local classes namespaced `tts-`.
 * Two-step flow: lead capture → schedule a call (cal.com).
 * ===================================================== */

/* ── Page shell ─────────────────────────────────────── */
.tts-page {
  position: relative;
  padding: clamp(56px, 9vh, 104px) 0 var(--section-lg);
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
/* subtle grid wash behind the form column */
.tts-page::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 52% 70% at 82% 28%, black 6%, transparent 64%);
          mask-image: radial-gradient(ellipse 52% 70% at 82% 28%, black 6%, transparent 64%);
  pointer-events: none;
  z-index: 0;
}
.tts-page::after {
  content: '';
  position: absolute;
  right: -6%; top: -4%;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.06) 0%, transparent 66%);
  pointer-events: none;
  z-index: 0;
}

.tts-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  gap: clamp(48px, 5vw, 88px);
  align-items: start;
}
@media (max-width: 920px) {
  .tts-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ── Left — pitch ───────────────────────────────────── */
.tts-pitch { animation: fade-up 0.6s var(--ease) both; }
.tts-pitch .eyebrow { margin-bottom: var(--sp-6); }

.tts-h1 {
  font-family: var(--font-sans);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--weight-semibold);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tightest);
  color: var(--text-strong);
  margin-bottom: var(--sp-5);
}
.tts-h1 .mute { color: var(--g8); display: block; }

.tts-lead {
  font-size: clamp(var(--text-base), 1.3vw, var(--text-md));
  line-height: var(--leading-relaxed);
  color: var(--g9);
  max-width: 46ch;
  margin-bottom: var(--sp-8);
}
.tts-lead strong { color: var(--text-strong); font-weight: var(--weight-semibold); }

/* numbered value bullets */
.tts-bullets {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding-top: var(--sp-8);
  margin-top: var(--sp-2);
  border-top: 1px solid var(--hairline);
}
.tts-bullet {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--sp-4);
  align-items: flex-start;
}
.tts-bullet .ix {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  flex-shrink: 0;
}
.tts-bullet h4 {
  font-size: 15px;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  color: var(--text-strong);
  margin-bottom: 3px;
}
.tts-bullet p {
  font-size: 13.5px;
  line-height: var(--leading-normal);
  color: var(--g9);
  margin: 0;
}

/* contact meta */
.tts-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--hairline);
}
@media (max-width: 480px) {
  .tts-meta { grid-template-columns: 1fr; gap: var(--sp-4); }
}
.tts-meta .lbl {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--g7);
  margin-bottom: 6px;
}
.tts-meta .val { font-size: 14px; color: var(--text-strong); }
.tts-meta a {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--g5);
  transition: text-decoration-color var(--duration-base) var(--ease);
}
.tts-meta a:hover { text-decoration-color: var(--accent); }

/* ── Right — stepper card ───────────────────────────── */
.tts-card {
  position: sticky;
  top: 84px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
@media (max-width: 920px) {
  .tts-card { position: static; }
}

/* stepper header */
.tts-steps {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-subtle);
}
.tts-step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--g7);
  transition: color var(--duration-base) var(--ease);
}
.tts-step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--hairline-strong);
  background: var(--bg);
  color: var(--g8);
  font-size: 11px;
  transition: transform var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease);
}
.tts-step.is-active { color: var(--text-strong); }
.tts-step.is-active .num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tts-step.is-done .num {
  background: var(--text-strong);
  border-color: var(--text-strong);
  color: #fff;
}
.tts-step.is-done { color: var(--g9); }
.tts-step-line {
  flex: 1;
  height: 1px;
  background: var(--hairline-strong);
  position: relative;
  overflow: hidden;
}
.tts-step-line::after {
  content: '';
  position: absolute; inset: 0 100% 0 0;
  background: var(--accent);
}
.tts-card.step-2 .tts-step-line::after { right: 0; }

/* panel body */
.tts-body { padding: var(--sp-8) var(--sp-8) var(--sp-8); }
@media (max-width: 520px) { .tts-body { padding: var(--sp-6) var(--sp-5); } }

.tts-panel { opacity: 1; }
.tts-panel.tts-enter { animation: tts-panel-in 0.4s var(--ease) both; }
@keyframes tts-panel-in {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}
.tts-panel[hidden] { display: none; }

.tts-panel-head { margin-bottom: var(--sp-6); }
.tts-panel-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  margin-bottom: var(--sp-2);
}
.tts-panel-sub {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--g9);
}

/* ── Form ───────────────────────────────────────────── */
.tts-form { display: flex; flex-direction: column; gap: var(--sp-5); }
.tts-row { display: grid; gap: var(--sp-4); }
.tts-row-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .tts-row-2 { grid-template-columns: 1fr; } }

.tts-field { display: flex; flex-direction: column; gap: var(--sp-2); }
.tts-field > span {
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--text);
  letter-spacing: var(--tracking-snug);
}
.tts-opt {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--g6);
}

.tts-field input,
.tts-field select,
.tts-field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-strong);
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  transition: border-color var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.tts-field textarea { resize: vertical; min-height: 88px; line-height: var(--leading-normal); }
.tts-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
  cursor: pointer;
}
.tts-field input::placeholder,
.tts-field textarea::placeholder { color: var(--g6); }
.tts-field input:focus,
.tts-field select:focus,
.tts-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tts-field input[aria-invalid="true"],
.tts-field select[aria-invalid="true"] {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}
.tts-field em {
  font-style: normal;
  font-size: 12px;
  color: #DC2626;
  min-height: 0;
}
.tts-field em:empty { display: none; }

/* enterprise callout */
.tts-callout {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: var(--leading-normal);
  color: var(--g10);
}
.tts-callout[hidden] { display: none; }
.tts-callout .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}
.tts-callout b { color: var(--accent); font-weight: var(--weight-semibold); }

/* consent */
.tts-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: start;
  font-size: 12.5px;
  line-height: var(--leading-normal);
  color: var(--g9);
}
.tts-check input {
  width: 16px; height: 16px;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
}
.tts-check a {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--g5);
}
.tts-check a:hover { text-decoration-color: var(--accent); }
.tts-check em {
  grid-column: 1 / -1;
  font-style: normal;
  font-size: 12px;
  color: #DC2626;
}
.tts-check em:empty { display: none; }

/* honeypot */
.tts-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* actions */
.tts-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-1);
}
.tts-submit { justify-content: center; }
.tts-submit:disabled { opacity: 0.7; cursor: default; transform: none; }
.tts-submit-loader { display: inline-flex; }
.tts-submit-loader[hidden] { display: none; }
.tts-submit--success {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}
.tts-fineprint {
  font-size: 12px;
  color: var(--g7);
}
.tts-fineprint a { color: var(--text-strong); text-decoration: underline; text-underline-offset: 2px; }

/* top-level error */
.tts-error {
  padding: var(--sp-3) var(--sp-4);
  background: rgba(220,38,38,0.06);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: #B91C1C;
}
.tts-error[hidden] { display: none; }

/* ── Schedule panel (step 2) ────────────────────────── */
.tts-confirm {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4);
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-6);
}
.tts-confirm-check {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tts-confirm-check svg { width: 16px; height: 16px; }
.tts-confirm-txt { font-size: 13px; line-height: var(--leading-normal); color: var(--g10); }
.tts-confirm-txt b { color: var(--text-strong); font-weight: var(--weight-semibold); }

/* cal.com embed shell */
.tts-cal-wrap {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-subtle);
  min-height: 520px;
  position: relative;
}
.tts-cal {
  width: 100%;
  min-height: 520px;
  height: 100%;
  overflow: auto;
}
/* loading / fallback state shown until cal mounts */
.tts-cal-state {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  text-align: center;
  padding: var(--sp-8);
  background: var(--bg-subtle);
}
.tts-cal-state[hidden] { display: none; }
.tts-cal-spinner {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--accent-mid);
  border-top-color: var(--accent);
  animation: tts-spin 0.8s linear infinite;
}
@keyframes tts-spin { to { transform: rotate(360deg); } }
.tts-cal-state-txt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--g7);
}

/* footer of schedule step */
.tts-sched-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--hairline);
}
.tts-sched-note {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  color: var(--g9);
}
.tts-sched-note .dot-live { background: var(--accent); }
.tts-link-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--g8);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: var(--tracking-snug);
  transition: color var(--duration-base) var(--ease);
}
.tts-link-btn:hover { color: var(--text-strong); }

/* edit details chip */
.tts-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-wide);
  color: var(--g7);
}
.tts-edit b { color: var(--text-strong); font-weight: var(--weight-medium); }

/* ── Upcoming call (returning visitor) ──────────────── */
.tts-booking {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-5);
  background: var(--bg-subtle);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.tts-booking-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: var(--sp-3);
  align-items: center;
}
.tts-booking-ico {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tts-booking-ico i, .tts-booking-ico svg { width: 18px; height: 18px; }
.tts-booking-when {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  line-height: var(--leading-snug);
}
.tts-booking-tz {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--g7);
  margin-top: 2px;
}
.tts-booking-title {
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
  line-height: var(--leading-snug);
}
.tts-booking-with {
  font-size: 13px;
  color: var(--g9);
  margin-top: 1px;
  word-break: break-word;
}

.tts-booking-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.tts-booking-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.tts-booking-cta i, .tts-booking-cta svg { width: 15px; height: 15px; }
.tts-booking-cancel {
  margin-left: auto;
  text-decoration: none;
  color: var(--g7);
}
.tts-booking-cancel:hover { color: #B91C1C; }
@media (max-width: 520px) {
  .tts-booking-actions { flex-direction: column; align-items: stretch; }
  .tts-booking-cta { justify-content: center; }
  .tts-booking-cancel { margin-left: 0; text-align: center; }
}

/* cancel confirmation (return-from-cal.com sync) */
.tts-cancel-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-subtle);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
}
.tts-cancel-confirm[hidden] { display: none; }
.tts-cancel-confirm-q {
  font-size: 13px;
  color: var(--text-strong);
  font-weight: var(--weight-medium);
}
.tts-cancel-confirm-btns { display: flex; align-items: center; gap: var(--sp-4); }
#ttsCancelYes { color: #B91C1C; }
#ttsCancelYes:hover { color: #991B1B; }
.tts-cancel-no { color: var(--g7); }
