/*
 * HrIntro — candidate side.
 *
 * Designed for one thing: a nervous person on a mid-range Android phone,
 * on mobile data, who has never seen this app before and never will again.
 * Big targets, high contrast, no clutter, nothing to learn.
 *
 * Deliberately light-only. The candidate flow is a two-minute visit; a
 * theme toggle is one more thing on screen that earns nothing.
 */

:root {
  --ink: #12191f;
  --ink-soft: #55636e;
  --line: #dde3e8;
  --bg: #f4f6f8;
  --card: #ffffff;
  --brand: #0b5d8f;
  --brand-dark: #08476d;
  --danger: #b3261e;
  --ok: #1a7f4b;
  --radius: 14px;
  --pad: 20px;
}

* { box-sizing: border-box; }

/* The page skeleton sets display on several elements, which would otherwise
   win over the hidden attribute. Visibility is toggled with el.hidden. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* One column, never wider than comfortable, centred on a desktop too. */
.shell {
  max-width: 460px;
  margin: 0 auto;
  padding: var(--pad);
  padding-bottom: 40px;
}

.brand {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 4px 0 18px;
}
.brand b { color: var(--brand); font-weight: 700; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
}

h1 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 8px;
  font-weight: 700;
}

.job {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark);
  background: #e7f1f8;
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}

p { margin: 0 0 14px; }
.muted { color: var(--ink-soft); font-size: 15px; }

/* The rules list. This screen is the product's promise, so it gets
   room to breathe rather than being squeezed into fine print. */
.rules {
  list-style: none;
  margin: 18px 0;
  padding: 0;
}
.rules li {
  position: relative;
  padding: 12px 0 12px 34px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 19px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.reassure {
  text-align: center;
  font-size: 15px;
  color: var(--ok);
  font-weight: 600;
  margin: 16px 0 0;
}

/* Buttons: full width, thumb-sized, unmistakable. */
button {
  font: inherit;
  font-weight: 600;
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  margin-top: 12px;
  padding: 12px 16px;
}
button:disabled { opacity: 0.5; cursor: default; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }

.btn-secondary {
  background: #fff;
  color: var(--brand-dark);
  border-color: var(--brand);
}

.btn-record { background: var(--danger); color: #fff; }
.btn-stop { background: var(--ink); color: #fff; }

input[type="text"] {
  font: inherit;
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input[type="text"]:focus {
  outline: 3px solid rgba(11, 93, 143, 0.35);
  border-color: var(--brand);
}

.field-error {
  color: var(--danger);
  font-size: 15px;
  margin: 8px 0 0;
  font-weight: 600;
}

/* Video stage — 3:4 portrait, which is how a phone is actually held. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #0b0f13;
  border-radius: var(--radius);
  overflow: hidden;
}
.stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The live preview is mirrored, the way a mirror behaves, so the
   candidate is not distracted by a reversed image of themselves.
   Playback is NOT mirrored — that is the real recording. */
.stage video.mirror { transform: scaleX(-1); }

/* Top RIGHT, not centred.
   Centred, it sat directly on top of the "Recording" pill in Hindi and Odia:
   both labels are wide in those scripts, and on a 375px phone the two pills
   met in the middle. Measured, not guessed — seen on the record screen in
   Hindi on 16 Sep 2026. Pinned to opposite edges they cannot collide, and
   English, which was never the problem, is unaffected. */
.timer {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 16px;
  padding: 6px 14px;
  border-radius: 999px;
}
.timer.warn { background: var(--danger); }

.rec-dot {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}
.rec-dot i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4438;
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  .rec-dot i { animation: none; }
}

/* Upload progress */
.bar {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 10px;
}
.bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--brand);
  transition: width 0.25s ease;
}

.centre { text-align: center; }

.big-tick {
  width: 62px;
  height: 62px;
  margin: 6px auto 14px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 34px;
  line-height: 62px;
  text-align: center;
}

.screen[hidden] { display: none !important; }

/* The footer note repeats the deletion promise where it matters most:
   on the record and review screens, while they are deciding. */
.promise {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

/* ------------------------------------------------------------- questions */

/* The list read before the camera opens. */
.questions {
  margin: 14px 0 20px;
  padding-left: 22px;
  line-height: 1.55;
}
.questions li { margin-bottom: 10px; }

/* The same question in English, under the candidate's language. */
.q-en {
  display: block;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.q-en[hidden] { display: none; }

/* Every line in the candidate's language carries its English underneath
   (founder, 19 Sep 2026). Inherits the colour so it reads on buttons too. */
.en-line {
  display: block;
  margin-top: 2px;
  font-size: 0.8em;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0.8;
}

/* The question being answered right now.
   Deliberately UNDER the picture rather than over it: an overlay covers the
   candidate's own face, and seeing their face is how they judge the framing. */
.question-band {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
}
.q-counter {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
}
/* Large, because it is read at arm's length by someone who is also talking. */
.q-text {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
  font-weight: 600;
}
.q-last { margin: 8px 0 0; color: var(--ink-soft); }

/* The facts screen asks for two things, so its boxes need labels. */
#screen-facts label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 15px;
}

/* The one piece of advice on the rules screen, set apart from the rules
   themselves so it reads as guidance, not as another condition. */
.tips {
  margin: 14px 0 0;
  padding: 11px 14px;
  background: #eef5fa;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.5;
}
