/* Sign-up. One column, one question at a time: most of this is filled in on a phone, standing in the shop. */

@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  --ink: #23262b;
  --ink-soft: #5c6068;
  --ink-faint: #878c94;
  --line: #dfe3e9;
  --line-soft: #edf0f4;
  --paper: #ffffff;
  --ground: #eef0f3;
  --brand: #f2701c;
  --brand-dark: #d65510;
  --brand-tint: #fff3ea;
  --danger: #c0341a;
  --danger-tint: #fdf0ed;
  --ok: #1d7a4c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 24, 30, .06), 0 8px 24px -12px rgba(20, 24, 30, .18);
  --font: "Helvetica Neue", Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Kannada", "Noto Sans Tamil", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% 0%, #fff, var(--ground) 62%, #e4e7ec 100%);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- shell */

.boot, .noscript {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--ink-soft);
  text-align: center;
  padding: 24px;
}

.brand-mark, .boot-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--ink-faint); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
h1:focus { outline: none; }

h2 { font-size: 17px; margin: 24px 0 10px; }

.lead { margin: 0 0 22px; color: var(--ink-soft); }

.muted { color: var(--ink-faint); font-size: 14px; }

/* ---------------------------------------------------------------- progress through the steps */

.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.steps li {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: var(--line);
}
.steps li.is-done { background: var(--brand); }
.steps li.is-current { background: linear-gradient(90deg, var(--brand) 50%, var(--line) 50%); }

/* ---------------------------------------------------------------- forms */

.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.hint { display: block; color: var(--ink-faint); font-size: 13px; margin-top: 6px; }

input[type=text], input[type=email], input[type=tel], input[type=password], select {
  width: 100%;
  padding: 12px 13px;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
input::placeholder { color: #aeb3bb; }

.field.has-error input, .field.has-error select { border-color: var(--danger); }
.error {
  display: block;
  color: var(--danger);
  font-size: 13px;
  margin-top: 6px;
}
.form-error {
  background: var(--danger-tint);
  border: 1px solid #f0c7bd;
  color: #8c2512;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 18px;
  font-size: 14px;
}

.row { display: flex; gap: 10px; }
.row > .grow { flex: 1; }
.row > .shrink { flex: 0 0 auto; }

/* The phone field: country picker glued to the number so they read as one thing. */
.phone { display: flex; gap: 8px; }
.phone select { flex: 0 0 auto; width: auto; max-width: 44%; }
.phone input { flex: 1 1 auto; }

/* A code is short, fixed-width and typed under pressure: make it big and unambiguous. */
.code-input {
  font-size: 28px;
  letter-spacing: .32em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 14px 13px;
}

button {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 12px 18px;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
button[disabled] { cursor: default; opacity: .55; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover:not([disabled]) { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover:not([disabled]) { border-color: #c9cfd7; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); padding: 8px 10px; }
.btn-ghost:hover:not([disabled]) { color: var(--ink); background: var(--line-soft); }

.btn-block { display: block; width: 100%; }

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.actions .spacer { flex: 1; }

/* ---------------------------------------------------------------- pickable lists */

.choices { display: grid; gap: 10px; margin: 0 0 8px; padding: 0; list-style: none; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  color: inherit;
}
.choice:hover { border-color: #c9cfd7; }
.choice[aria-pressed="true"], .choice.is-selected {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.choice-title { font-weight: 600; }
.choice-sub { display: block; font-size: 13px; color: var(--ink-faint); font-weight: 400; }

/* Services and staff: a row with a control on the left and a remove on the right. */
.list { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px 8px 14px;
}
.list-row.is-off { opacity: .55; }
.list-row input[type=text] { border: none; padding: 4px 0; background: transparent; }
.list-row input[type=text]:focus-visible { outline-offset: 4px; }
.list-row .grow { flex: 1; min-width: 0; }

.tickbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.tickbox input { width: 18px; height: 18px; accent-color: var(--brand); flex: 0 0 auto; }

.person-name { font-weight: 600; }
.person-meta { font-size: 13px; color: var(--ink-faint); }

.count-note { font-size: 13px; color: var(--ink-faint); margin: 0 0 16px; }

/* ---------------------------------------------------------------- notices */

.callout {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin: 0 0 18px;
  border: 1px solid;
}
.callout-info { background: #f2f6fb; border-color: #d6e2f0; color: #26455f; }
.callout-good { background: #f0f8f3; border-color: #cbe6d7; color: #17563a; }
.callout-warn { background: var(--brand-tint); border-color: #f5d6bf; color: #8a4410; }

.id-badge {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .01em;
  background: var(--brand-tint);
  border: 1px solid #f5d6bf;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 4px 0 12px;
  word-break: break-all;
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  z-index: 50;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  background: #23262b;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
}
.toast.is-bad { background: #8c2512; }

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

.lang-select {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  font-size: 14px;
  width: auto;
}

/* ---------------------------------------------------------------- the build screen */

.deploy { text-align: center; padding-top: 8px; }
.deploy .stage { margin: 26px 0 18px; }
.deploy-steps {
  list-style: none;
  margin: 22px auto 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 420px;
  text-align: left;
}
.deploy-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 15px;
}
.deploy-steps li.is-current { color: var(--ink); font-weight: 600; }
.deploy-steps li.is-done { color: var(--ink-soft); }
.deploy-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
}
.deploy-steps li.is-current .deploy-dot { background: var(--brand); }
.deploy-steps li.is-done .deploy-dot { background: var(--ok); }

/* ---------------------------------------------------------------- glass loader
   Ported from reference-items/glass-loader.html. Ids are per-instance (see glass-loader.js); everything the
   JavaScript touches is addressed by class. */

.glass-loader {
  --h: 104px;
  --wall: 12px;
  --r: calc(var(--h) / 2);
  --ri: calc(var(--r) - var(--wall));
  --p: 0;
  --x: calc(var(--p) * 1%);
  --lit: calc(var(--p) / 100);
  --wob: 0px;

  position: relative;
  width: 100%;
  max-width: 560px;
  height: var(--h);
  margin: 0 auto;
  isolation: isolate;
}
.glass-loader *, .glass-loader *::before { box-sizing: border-box; }

.gl-underglow {
  position: absolute;
  left: -6%; right: -6%; top: 72%; height: 120%;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(44% 42% at calc(6% + var(--p) * .86%) 24%,
    rgba(255, 152, 60, .62), rgba(255, 110, 46, .24) 44%, rgba(255, 100, 46, 0) 74%);
  filter: blur(22px);
  opacity: calc(.12 + .88 * var(--lit));
}
.gl-mirror, .gl-mirror-warm {
  position: absolute;
  left: 1.5%; right: 1.5%;
  top: calc(100% + 1px); height: 56%;
  z-index: -1;
  border-radius: var(--r);
  filter: blur(10px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 72%);
}
.gl-mirror { background: linear-gradient(180deg, rgba(203, 210, 221, .5), rgba(203, 210, 221, 0)); }
.gl-mirror-warm {
  background: linear-gradient(90deg, #d6382a, #f9820d 45%, #ffc32e);
  clip-path: inset(0 calc(100% - var(--x)) 0 0 round var(--r));
  opacity: calc(.06 + .26 * var(--lit));
}

.gl-tube {
  position: absolute;
  inset: 0;
  padding: var(--wall);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .34) 42%, rgba(255, 255, 255, .72));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .95),
    inset 0 2px 3px rgba(255, 255, 255, .9),
    inset 0 -3px 8px rgba(146, 158, 176, .28),
    0 0 0 1px rgba(178, 188, 203, .42),
    0 16px 26px -16px rgba(92, 74, 64, .42),
    0 34px 56px -26px rgba(255, 122, 44, calc(.55 * var(--lit)));
}
.gl-bore {
  position: relative;
  width: 100%; height: 100%;
  border-radius: var(--ri);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #f4f6f9 0%, #ffffff 46%, #e9ecf1 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .9),
    inset 0 3px 7px rgba(122, 134, 155, .20),
    inset 0 -7px 13px rgba(150, 161, 178, .14);
}
.gl-liquid { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

.gl-spill {
  position: absolute;
  top: -25%; bottom: -25%;
  left: calc(var(--x) + var(--wob));
  width: 26%;
  background: radial-gradient(58% 50% at 0% 50%,
    rgba(255, 152, 54, .5), rgba(255, 126, 44, .16) 44%, rgba(255, 126, 44, 0) 78%);
  filter: blur(14px);
  opacity: clamp(0, calc(var(--p) / 6), 1);
}
.gl-label {
  position: absolute;
  top: 50%; right: 7%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .34em;
  text-indent: .34em;
  white-space: nowrap;
  color: #6c6f75;
  mix-blend-mode: multiply;
  transition: opacity .17s ease;
  max-width: 64%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gl-label.is-swapping { opacity: 0; }

.gl-sheen-top, .gl-sheen-bottom, .gl-rim { position: absolute; pointer-events: none; }
.gl-sheen-top {
  left: 4%; right: 4%; top: 7%; height: 17%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .01));
  filter: blur(5px);
}
.gl-sheen-bottom {
  left: 8%; right: 8%; bottom: 5%; height: 8%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .45));
  filter: blur(4px);
}
.gl-rim {
  inset: 0;
  border-radius: var(--r);
  background: linear-gradient(90deg,
    rgba(255, 132, 52, calc(.14 * var(--lit))) 0%,
    rgba(255, 186, 92, calc(.18 * var(--lit))) var(--x),
    rgba(255, 255, 255, 0) calc(var(--x) + 9%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), inset 0 0 26px rgba(255, 255, 255, .5);
}

@media (max-width: 480px) {
  .page { padding: 16px 14px 48px; }
  .card { padding: 22px 17px; border-radius: 12px; }
  h1 { font-size: 21px; }
  .glass-loader { --h: 84px; --wall: 10px; }
  .gl-label { font-size: 11px; letter-spacing: .24em; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

