/* AI Plan Kiosk — Coulter Software brand tokens (coultersoftware.ca v4).
   System fonts only: nothing loads from the network, so demo mode works offline. */

:root {
  --cs-blue-700: #1f5aa8;
  --cs-blue-500: #3871c2;
  --cs-blue-400: #4e9be8;
  --cs-blue-300: #8fc4f5;
  --cs-navy-950: #060d18;
  --cs-navy-900: #0a1526;
  --cs-navy-800: #0f2140;
  --cs-navy-700: #16304f;
  --cs-silver-050: #fcfcfd;
  --cs-silver-300: #d2deec;
  --cs-slate-400: #94a3b4;
  --cs-maple-red: #d9483b;
  --cs-success: #2fa36b;
  --cs-warning: #e0a32e;

  --surface-page: var(--cs-navy-950);
  --surface-card: rgba(20, 48, 89, 0.45);
  --surface-picked: rgba(31, 90, 168, 0.35);
  --text-strong: var(--cs-silver-050);
  --text-body: var(--cs-silver-300);
  --text-muted: var(--cs-slate-400);
  --accent: var(--cs-blue-400);
  --border: rgba(143, 196, 245, 0.18);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-card: 20px;
  --radius-button: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: radial-gradient(120% 90% at 50% -10%, var(--cs-navy-800) 0%, var(--cs-navy-900) 45%, var(--cs-navy-950) 100%);
  background-color: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* ---------- shared type */

.headline {
  color: var(--text-strong);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.title {
  color: var(--text-strong);
  font-size: 2.2rem;
  font-weight: 750;
}

.lede {
  color: var(--text-body);
  font-size: 1.4rem;
  line-height: 1.4;
}

.hint {
  color: var(--text-muted);
  font-size: 1rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-button);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.button--huge {
  min-height: 96px;
  padding: 0 40px;
  font-size: 1.6rem;
}

.button--primary {
  background: var(--cs-blue-500);
  color: var(--text-strong);
}

.button--primary:active {
  background: var(--cs-blue-700);
}

.button--secondary {
  background: transparent;
  color: var(--text-strong);
  box-shadow: inset 0 0 0 2px var(--cs-blue-400);
}

.button--link {
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: underline;
  padding: 12px;
}

.choice-buttons {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- tablet */

.view--tablet {
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 100%;
  padding: 32px 48px;
  text-align: center;
}

.screen--attract .headline {
  font-size: 3.6rem;
  max-width: 14ch;
}

/* ---------- launcher */

.launcher {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 100%;
  padding: 32px 16px;
  text-align: center;
}

/* ---------- display (sized in vw: readable from 3 m on a 50"+ monitor) */

.view--display {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: none;
}

.display-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3vw 4vw 1vw;
}

.display-brand {
  padding: 0 4vw 1.5vw;
  color: var(--text-muted);
  font-size: 1.1vw;
  text-align: right;
}

.view--display .headline {
  font-size: 4.6vw;
}

.display-attract,
.display-welcome {
  display: flex;
  flex-direction: column;
  gap: 2vw;
  animation: fade-in 600ms ease-out;
}

.display-attract__example {
  display: flex;
  flex-direction: column;
  gap: 0.8vw;
}

.display-attract__tag {
  align-self: flex-start;
  padding: 0.3vw 0.9vw;
  border-radius: 999px;
  background: rgba(78, 155, 232, 0.16);
  color: var(--cs-blue-300);
  font-size: 1.1vw;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.display-attract__cta,
.display-welcome__sub {
  color: var(--accent);
  font-size: 2vw;
  font-weight: 650;
}

.company-name {
  color: var(--text-strong);
  font-size: 2.6vw;
  font-weight: 750;
}

.company-read {
  color: var(--text-body);
  font-size: 1.6vw;
}

/* ---------- plan cards: problem first and largest, then the fix */

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6vw;
  margin-top: 1vw;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.7vw;
  padding: 1.8vw;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface-card);
}

.plan-card--picked {
  border: 3px solid var(--accent);
  background: var(--surface-picked);
}

.plan-card__picked {
  align-self: flex-start;
  padding: 0.3vw 0.9vw;
  border-radius: 999px;
  background: var(--accent);
  color: var(--cs-navy-950);
  font-size: 1.15vw;
  font-weight: 800;
}

.plan-card__label {
  color: var(--cs-maple-red);
  font-size: 1vw;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-card__label--fix {
  padding-top: 0.8vw;
  color: var(--cs-blue-300);
}

.plan-card__problem {
  /* Three lines tall, so the fixes line up across the cards. */
  min-height: 3.6em;
  color: var(--text-strong);
  font-size: 2vw;
  font-weight: 700;
  line-height: 1.2;
}

.plan-card__fix-title {
  color: var(--text-strong);
  font-size: 1.5vw;
  font-weight: 700;
}

.plan-card__fix-blurb {
  color: var(--text-body);
  font-size: 1.25vw;
  line-height: 1.35;
}

.effort {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.25vw 0.8vw;
  border-radius: 8px;
  font-size: 1vw;
  font-weight: 700;
}

.effort--quick_win {
  background: rgba(47, 163, 107, 0.2);
  color: #7fd8ab;
}

.effort--4_6_weeks {
  background: rgba(78, 155, 232, 0.2);
  color: var(--cs-blue-300);
}

.effort--larger_project {
  background: rgba(224, 163, 46, 0.2);
  color: #f1c977;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- tablet: card camera */

.screen--card {
  padding: 0;
}

.card-view {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  min-height: 100vh;
  padding: 32px 48px;
}

.card-view--camera {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #000;
}

.camera__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Business card proportions (3.5 x 2 in). The ring fills as the card steadies. */
.camera__frame {
  --steady: 0;
  position: relative;
  width: 62vw;
  max-height: 62vh;
  aspect-ratio: 1.75;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(6, 13, 24, 0.55);
  outline: 4px solid rgba(252, 252, 253, calc(0.55 + var(--steady) * 0.45));
  outline-offset: 0;
  transition: outline-color 150ms linear;
}

.camera__frame::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  height: 6px;
  width: calc(var(--steady) * 100%);
  border-radius: 3px;
  background: var(--accent);
}

.camera__prompt {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  color: var(--text-strong);
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.camera__actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

.button--capture {
  min-height: 80px;
  padding: 0 36px;
  font-size: 1.4rem;
}

.button--on-video {
  color: var(--text-strong);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.spinner {
  width: 72px;
  height: 72px;
  border: 7px solid rgba(143, 196, 245, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- tablet: email entry */

.screen--email {
  gap: 20px;
  justify-content: flex-start;
  padding-top: 28px;
}

.email-entry {
  display: flex;
  gap: 16px;
  width: min(900px, 100%);
}

.email-entry__input {
  flex: 1;
  min-height: 76px;
  padding: 0 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-button);
  background: rgba(6, 13, 24, 0.6);
  color: var(--text-strong);
  font: inherit;
  font-size: 1.7rem;
}

.email-entry__continue {
  min-width: 180px;
  font-size: 1.4rem;
}

.button:disabled {
  opacity: 0.4;
  cursor: default;
}

.keyboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(1000px, 100%);
}

.keyboard__row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.keyboard__key {
  flex: 1;
  max-width: 88px;
  min-height: 72px;
  border: 0;
  border-radius: 12px;
  background: rgba(78, 155, 232, 0.16);
  color: var(--text-strong);
  font: inherit;
  font-size: 1.6rem;
  font-weight: 600;
  touch-action: manipulation;
}

.keyboard__key:active {
  background: var(--cs-blue-500);
}

.keyboard__key--wide {
  max-width: 220px;
}

.form-error {
  display: none;
  color: #ff8a80;
  font-size: 1.1rem;
  font-weight: 600;
}

/* ---------- tablet: confirm and pain */

.screen--confirm {
  flex-direction: row;
  align-items: stretch;
  gap: 40px;
  padding: 28px 36px;
  text-align: left;
}

.confirm-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 40%;
}

.confirm-fields .title {
  margin-bottom: 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.field span {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 13, 24, 0.6);
  color: var(--text-strong);
  font: inherit;
  font-size: 1.15rem;
}

.confirm-fields .button--link {
  align-self: flex-start;
  padding-left: 0;
}

.confirm-pain {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
}

.pain-question {
  color: var(--text-strong);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
}

.pain-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pain-tile {
  min-height: 84px;
  padding: 0 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--surface-card);
  color: var(--text-strong);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  touch-action: manipulation;
}

.pain-tile--selected {
  border-color: var(--accent);
  background: var(--cs-blue-500);
}

.pain-skip {
  align-self: flex-start;
  padding: 4px 0;
}

.consent {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.1rem;
}

.consent input {
  width: 30px;
  height: 30px;
  flex: none;
  accent-color: var(--cs-blue-500);
}

.confirm-pain .button--huge {
  margin-top: auto;
}

/* ---------- tablet: company and fallback questions */

.screen--question {
  justify-content: flex-start;
  padding-top: 64px;
}

.question {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(760px, 100%);
  color: var(--text-strong);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: left;
}

.text-answer {
  width: min(760px, 100%);
  min-height: 72px;
  padding: 0 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-button);
  background: rgba(6, 13, 24, 0.6);
  color: var(--text-strong);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 500;
}

/* ---------- company header (attract examples and results) */

.company-header {
  display: flex;
  align-items: center;
  gap: 1.6vw;
}

.company-header__text {
  display: flex;
  flex-direction: column;
  gap: 0.4vw;
  min-width: 0;
}

.company-badge {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 6vw;
  height: 6vw;
  border-radius: 1vw;
  background: var(--cs-blue-700);
  overflow: hidden;
}

.company-badge__initials {
  color: var(--text-strong);
  font-size: 2.4vw;
  font-weight: 800;
}

.company-badge__logo {
  display: none;
  width: 100%;
  height: 100%;
  padding: 0.5vw;
  object-fit: contain;
}

.company-badge--logo {
  background: #fff;
}

.company-badge--logo .company-badge__initials {
  display: none;
}

.company-badge--logo .company-badge__logo {
  display: block;
}

/* ---------- display: results */

.display-results {
  display: flex;
  flex-direction: column;
  gap: 1.6vw;
  animation: fade-in 600ms ease-out;
}

.display-results .company-name {
  font-size: 3.2vw;
}

.display-results .company-read {
  font-size: 1.9vw;
}

.results-banner {
  align-self: stretch;
  padding: 1.1vw 1.6vw;
  border-radius: var(--radius-card);
  background: var(--cs-blue-500);
  color: var(--text-strong);
  font-size: 1.9vw;
  font-weight: 750;
  text-align: center;
}

/* ---------- tablet: done */

.done-headline {
  font-size: 3.4rem;
}

.operator-hint {
  position: absolute;
  bottom: 18px;
  right: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.screen--done {
  position: relative;
}

/* ---------- tablet view on narrow screens (phones, portrait) */
/* The booth tablet runs landscape at ~1180 px; below 900 px the screens stack
   into one scrolling column so the kiosk still works on a phone. */

@media (max-width: 900px) {
  .view--tablet {
    overflow-y: auto;
    background-attachment: fixed;
  }

  .screen {
    gap: 20px;
    padding: 24px 16px;
  }

  .screen--attract .headline,
  .done-headline {
    font-size: 2.4rem;
  }

  .lede {
    font-size: 1.15rem;
  }

  .choice-buttons {
    flex-direction: column;
    width: 100%;
  }

  .button--huge {
    width: 100%;
    min-height: 72px;
    padding: 0 20px;
    font-size: 1.3rem;
  }

  .title {
    font-size: 1.7rem;
  }

  /* email entry */
  .screen--email {
    padding-top: 20px;
  }

  .email-entry {
    flex-direction: column;
  }

  .email-entry__input {
    min-height: 60px;
    font-size: 1.3rem;
  }

  .email-entry__continue {
    min-height: 60px;
  }

  .keyboard,
  .keyboard__row {
    gap: 6px;
  }

  .keyboard__key {
    min-height: 52px;
    border-radius: 8px;
    font-size: 1.2rem;
  }

  /* confirm and pain: fields, then the question, stacked */
  .screen--confirm {
    flex-direction: column;
    gap: 28px;
    padding: 20px 16px 32px;
  }

  .confirm-fields {
    width: 100%;
  }

  .pain-question {
    font-size: 1.5rem;
  }

  .pain-tile {
    min-height: 64px;
    padding: 0 10px;
    font-size: 1.1rem;
  }

  .text-answer,
  .question {
    font-size: 1.2rem;
  }
}

/* ---------- tablet: operator menu (CS-846) */

.operator-hotspot {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10;
  width: 90px;
  height: 90px;
  -webkit-touch-callout: none;
}

.operator-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 13, 24, 0.92);
}

.operator-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--cs-navy-900);
}

.operator-pin-dots {
  min-height: 40px;
  color: var(--text-strong);
  font-size: 2.2rem;
  letter-spacing: 0.3em;
}

.operator-pinpad {
  display: grid;
  grid-template-columns: repeat(3, 88px);
  gap: 10px;
}

.operator-pinpad button {
  min-height: 72px;
  border: 0;
  border-radius: 12px;
  background: rgba(78, 155, 232, 0.16);
  color: var(--text-strong);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
}

.operator-message {
  display: block;
  min-height: 1.4em;
}

.operator-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.operator-menu .button {
  min-height: 56px;
  padding: 0 16px;
  font-size: 1.05rem;
}

.operator-leads {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.operator-leads__row,
.operator-leads__note {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-body);
}

.demo-badge {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 20px;
  color: var(--cs-warning);
  font-size: 0.9rem;
  font-weight: 700;
}

.screen--attract {
  position: relative;
}

/* Results on the tablet, only when the display cannot be reached. */
.done-plan {
  display: none;
  width: 100%;
}

.done-plan .plan-cards {
  gap: 12px;
}

.done-plan .plan-card {
  gap: 6px;
  padding: 14px;
}

.done-plan .plan-card__problem {
  min-height: 0;
  font-size: 1.05rem;
}

.done-plan .plan-card__fix-title {
  font-size: 0.95rem;
}

.done-plan .plan-card__fix-blurb,
.done-plan .plan-card__picked,
.done-plan .plan-card__label,
.done-plan .effort {
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .done-plan .plan-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- tablet: badge QR scan (CS-847) */

.qr__video {
  width: min(560px, 100%);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  background: #000;
  object-fit: cover;
}

.qr__message {
  font-size: 1.4rem;
}

[data-hint="qr"] {
  display: none;
}
