/* Harmony Fire — Life Guard Risk Health Check
   Brand interpretation: deep petrol-teal "ink" + warm fire accent.
   (Built self-contained; swap in official Harmony Fire tokens/logo when available.) */

/* Fonts are self-hosted for offline kiosk use — see fonts/fonts.css, loaded
   from index.html. (Originally an @import of Google Fonts.) */

:root {
  --font: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  --ink:        #0C2E35;
  --ink-700:    #103B44;
  --ink-600:    #1A4C55;

  --surface:        #FFFFFF;
  --surface-page:   #E9EEEE;
  --surface-subtle: #F3F7F7;
  --surface-wash:   #ECF4F3;

  --border:        #D6E1E1;
  --border-strong: #B9C9C9;

  --text:  #0C2E35;
  --muted: #5C7176;
  --faint: #8499A0;

  --teal:    #0E8C8C;   /* primary action */
  --teal-700:#0A6E6E;
  --accent:  #F26A2E;   /* fire — key facts / energy */
  --accent-700:#D8551B;

  /* 1–5 diverging scale */
  --s1: #D64550;
  --s2: #E8803C;
  --s3: #ECB73C;
  --s4: #5FAE86;
  --s5: #1F9D6B;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 2px 8px rgba(12,46,53,.07);
  --shadow:    0 12px 34px rgba(12,46,53,.13);
  --shadow-lg: 0 26px 70px rgba(12,46,53,.22);

  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(120% 80% at 50% -10%, #163e47 0%, #0a2329 60%, #07191e 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---- stage / scaling ---- */
#stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
#canvas {
  width: 1080px; height: 1920px;
  position: relative;
  transform-origin: center center;
  background: var(--surface-page);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.5);
}

/* ---- screens ---- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .42s var(--ease-out);
}
.screen.active { opacity: 1; pointer-events: auto; }
.screen.dark { background: var(--ink); color: #fff; }

/* entrance for inner content */
.screen .rise { transform: translateY(26px); opacity: 0; }
.screen.active .rise {
  transform: none; opacity: 1;
  transition: transform .6s var(--ease-out), opacity .6s var(--ease-out);
}
.screen.active .rise.d1 { transition-delay: .06s; }
.screen.active .rise.d2 { transition-delay: .13s; }
.screen.active .rise.d3 { transition-delay: .2s; }
.screen.active .rise.d4 { transition-delay: .27s; }
@media (prefers-reduced-motion: reduce) {
  .screen, .screen .rise { transition: none !important; }
  .screen .rise { transform: none; opacity: 1; }
}

/* ---- brand lockup ---- */
.lockup { display: flex; align-items: center; gap: 16px; width: fit-content; }
.lockup .wordmark, .lockup .wordmark .w1, .lockup .wordmark .w2 { white-space: nowrap; }
.lockup .mark {
  width: 54px; height: 54px; border-radius: 13px;
  display: grid; place-items: center; flex: none;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-700) 100%);
  box-shadow: 0 6px 18px rgba(242,106,46,.4);
}
.lockup .mark svg { width: 30px; height: 30px; display: block; }
.lockup .wordmark { line-height: 1; }
.lockup .wordmark .w1 { font-weight: 800; font-size: 27px; letter-spacing: -.01em; }
.lockup .wordmark .w2 {
  display: block; margin-top: 5px;
  font-size: 12px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  opacity: .62;
}

.eyebrow {
  font-size: 17px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
}

/* ---- buttons ---- */
.btn {
  font-family: var(--font); font-weight: 700; font-size: 25px;
  border: none; cursor: pointer; border-radius: 999px;
  padding: 25px 46px; display: inline-flex; align-items: center; gap: 14px;
  transition: transform .12s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 14px 30px rgba(242,106,46,.34); }
.btn-primary:hover { background: var(--accent-700); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 14px 30px rgba(14,140,140,.3); }
.btn-teal:hover { background: var(--teal-700); }
.btn-ghost { background: transparent; color: inherit; border: 2px solid currentColor; box-shadow: none; }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,.34); }
.btn-quiet {
  background: transparent; color: var(--muted); font-weight: 600; font-size: 21px;
  padding: 16px 20px; box-shadow: none;
}
.btn-quiet:hover { color: var(--text); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn svg { width: 24px; height: 24px; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 11px; }
.field label { font-size: 21px; font-weight: 600; color: var(--ink-700); }
.field .req { color: var(--accent); }
.field input {
  font-family: var(--font); font-size: 26px; color: var(--text);
  padding: 24px 26px; border-radius: var(--radius);
  border: 2px solid var(--border); background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input::placeholder { color: var(--faint); }
.field input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(14,140,140,.16);
}
.field input.invalid { border-color: var(--s1); }
.field .err { font-size: 17px; color: var(--s1); font-weight: 600; min-height: 0; }

/* consent */
.consent {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 26px; border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--surface-subtle); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.consent:hover { border-color: var(--border-strong); }
.consent.checked { border-color: var(--teal); background: var(--surface-wash); }
.consent .box {
  width: 40px; height: 40px; flex: none; border-radius: 10px;
  border: 2.5px solid var(--border-strong); background: #fff;
  display: grid; place-items: center; transition: all .15s var(--ease);
}
.consent.checked .box { background: var(--teal); border-color: var(--teal); }
.consent .box svg { width: 24px; height: 24px; color: #fff; opacity: 0; transform: scale(.5); transition: all .15s var(--ease-out); }
.consent.checked .box svg { opacity: 1; transform: none; }
.consent .txt { font-size: 19px; line-height: 1.5; color: var(--ink-700); }
.consent .txt a { color: var(--teal-700); font-weight: 700; }

/* ---- progress ---- */
.progressbar { height: 8px; background: rgba(12,46,53,.1); border-radius: 999px; overflow: hidden; }
.progressbar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s var(--ease-out); }

/* quadrant pips */
.pips { display: flex; gap: 10px; }
.pips .pip {
  flex: 1; height: 7px; border-radius: 999px; background: rgba(255,255,255,.18);
  position: relative; overflow: hidden;
}
.pips .pip.done { background: rgba(255,255,255,.5); }
.pips .pip.active > i { position: absolute; inset: 0; background: var(--accent); border-radius: 999px; }

/* ---- 1–5 scale options ---- */
.scale { display: flex; flex-direction: column; gap: 16px; }
.opt {
  display: flex; align-items: center; gap: 24px;
  padding: 26px 28px; border-radius: var(--radius-lg);
  border: 2px solid var(--border); background: #fff; cursor: pointer;
  text-align: left; width: 100%; font-family: var(--font);
  transition: transform .12s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.opt:hover { border-color: var(--border-strong); transform: translateX(4px); }
.opt:active { transform: scale(.99); }
.opt .num {
  width: 64px; height: 64px; flex: none; border-radius: 16px;
  display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff;
}
.opt .lab { display: flex; flex-direction: column; gap: 3px; }
.opt .lab b { font-size: 27px; font-weight: 700; color: var(--text); }
.opt .lab span { font-size: 18px; color: var(--muted); font-weight: 500; }
.opt .tick {
  margin-left: auto; width: 38px; height: 38px; border-radius: 999px; flex: none;
  border: 2px solid var(--border-strong); display: grid; place-items: center;
}
.opt .tick svg { width: 22px; height: 22px; color: #fff; opacity: 0; }
.opt.selected { box-shadow: var(--shadow); border-color: currentColor; }
.opt.selected .tick svg { opacity: 1; }

/* dots variant — each score is a labelled column so the whole scale reads at a glance */
.dots { display: flex; gap: 14px; align-items: flex-start; }
.dotcol {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 16px;
  background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.dotcol .dot-circle {
  width: 100%; max-width: 150px; aspect-ratio: 1; border-radius: 50%;
  border: 3px solid var(--border-strong); background: #fff;
  display: grid; place-items: center; font-size: 44px; font-weight: 800; color: var(--muted);
  transition: transform .12s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.dotcol .dot-cap { font-size: 20px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.2; transition: color .15s var(--ease); }
.dotcol:hover .dot-circle { transform: translateY(-5px); border-color: var(--faint); }
.dotcol:active .dot-circle { transform: scale(.96); }
.dotcol.selected .dot-circle { color: #fff; border-color: transparent; box-shadow: var(--shadow); }

/* ---- chips / band ---- */
.scorebadge {
  font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.03em;
}
.bandchip {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 22px;
}
.qbreak { display: flex; flex-direction: column; gap: 18px; }
.qrow { display: flex; align-items: center; gap: 20px; }
.qrow .qname { width: 320px; flex: none; font-size: 20px; font-weight: 600; color: var(--ink-700); line-height: 1.25; }
.qrow .qbar { flex: 1; height: 16px; border-radius: 999px; background: rgba(12,46,53,.08); overflow: hidden; }
.qrow .qbar > i { display: block; height: 100%; border-radius: 999px; transition: width .8s var(--ease-out); }
.qrow .qval { width: 78px; text-align: right; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }

/* idle / reset hint */
.kioskhint { font-size: 16px; color: var(--faint); font-weight: 600; }

/* ---- live customiser panel (viewport-fixed, portalled to body) ---- */
.cz-fab {
  position: fixed; left: 24px; bottom: 24px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 14px 22px; font: 600 16px var(--font); cursor: pointer;
  box-shadow: 0 12px 30px rgba(8,25,30,.35); transition: transform .12s var(--ease), background .15s var(--ease);
}
.cz-fab:hover { background: var(--ink-600); }
.cz-fab:active { transform: scale(.96); }
.cz-fab svg { width: 20px; height: 20px; }
.cz-overlay { position: fixed; inset: 0; z-index: 9998; background: rgba(8,25,30,.38); animation: czFade .22s var(--ease); }
@keyframes czFade { from { opacity: 0; } to { opacity: 1; } }
.cz-panel {
  position: fixed; left: 24px; bottom: 24px; z-index: 10000;
  width: 360px; max-width: calc(100vw - 48px);
  background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(8,25,30,.42);
  font-family: var(--font); color: var(--ink); overflow: hidden;
  animation: czIn .3s var(--ease-out);
}
@keyframes czIn { from { transform: translateY(22px); } to { transform: none; } }
.cz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.cz-head h4 { margin: 0; font-size: 19px; font-weight: 800; }
.cz-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.cz-close { width: 34px; height: 34px; flex: none; border-radius: 999px; border: none; background: var(--surface-subtle); cursor: pointer; display: grid; place-items: center; color: var(--muted); transition: all .15s var(--ease); }
.cz-close:hover { background: var(--surface-wash); color: var(--ink); }
.cz-close svg { width: 18px; height: 18px; }
.cz-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 22px; max-height: 70vh; overflow-y: auto; }
.cz-row { display: flex; flex-direction: column; gap: 11px; }
.cz-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cz-swatches { display: flex; gap: 12px; }
.cz-swatch { width: 40px; height: 40px; border-radius: 11px; border: 3px solid transparent; cursor: pointer; transition: transform .12s var(--ease); padding: 0; }
.cz-swatch:hover { transform: scale(1.08); }
.cz-swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.cz-seg { display: flex; gap: 6px; background: var(--surface-subtle); padding: 5px; border-radius: 12px; }
.cz-seg button { flex: 1; border: none; background: none; padding: 11px 8px; border-radius: 8px; font: 600 15px var(--font); color: var(--muted); cursor: pointer; transition: all .15s var(--ease); }
.cz-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(8,25,30,.12); }
.cz-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cz-switch { width: 52px; height: 30px; flex: none; border-radius: 999px; background: var(--border-strong); border: none; cursor: pointer; position: relative; transition: background .15s var(--ease); }
.cz-switch.on { background: var(--teal); }
.cz-switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; transition: left .18s var(--ease-out); }
.cz-switch.on i { left: 25px; }
.cz-reset { background: none; border: none; color: var(--muted); font: 600 14px var(--font); cursor: pointer; text-decoration: underline; padding: 0; align-self: flex-start; }
.cz-reset:hover { color: var(--ink); }
