/* Visual system lifted from qtglobal.rw:
   Kumbh Sans, primary #054163, accent #078cb9, page #f3f7fb, cards on white. */
@import url("https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary: #054163;
  --accent: #078cb9;
  --main-bg: #ffffff;
  --sub-bg: #f3f7fb;
  --heading: #0f0d1d;
  --paragraph: #585858;
  --border: #e3e3e3;
  --border-soft: #eaecf0;
  --white: #ffffff;
  --ink: #00060c;

  --danger: #c0342c;
  --danger-bg: #fdeceb;
  --ok: #1f7a4d;
  --ok-bg: #eaf6f0;
  --warn: #b4690e;

  --shadow: 0px 4px 25px 0px #0000000f;
  --radius: 14px;
  --font: "Kumbh Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.3s ease-in-out;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sub-bg);
  color: var(--paragraph);
  font: 400 16px/1.65 var(--font);
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 560px; margin: 0 auto; padding: 24px 18px 64px; }

.card {
  background: var(--main-bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}

h1, h2, h3, strong, b { color: var(--heading); }
h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--paragraph); font-size: 0.9rem; }
.center { text-align: center; }
a { color: var(--primary); }

/* --- brand bars --------------------------------------------------------- */

.brandbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--primary);
  color: var(--white);
}
.brandbar .dot {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  flex: none;
}
.brandbar strong { color: var(--white); font-size: 1rem; font-weight: 600; }

.logobar {
  background: var(--primary);
  padding: 20px 18px;
  text-align: center;
}
.logobar img { height: 46px; width: auto; }

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

.seal {
  width: 70px; height: 70px; margin: 4px auto 16px;
  border-radius: 50%;
  background: var(--sub-bg);
  border: 2px solid var(--primary);
  display: grid; place-items: center;
  font-size: 30px;
}

label {
  display: block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--heading);
  margin: 16px 0 6px;
}

input[type="text"], input[type="email"] {
  width: 100%;
  padding: 13px 14px;
  font: 400 16px/1.4 var(--font); /* 16px stops iOS zooming on focus */
  color: var(--heading);
  background: var(--main-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--transition);
}
input::placeholder { color: #9aa5ad; }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(5, 65, 99, 0.12); }

button {
  font: 600 16px/1.4 var(--font);
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 14px 18px;
  transition: var(--transition);
}
.btn-primary { width: 100%; margin-top: 22px; background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost {
  width: 100%; margin-top: 10px;
  background: var(--main-bg); color: var(--primary);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); background: var(--sub-bg); }

/* --- reveal ------------------------------------------------------------- */

.alarm {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 20px;
  text-align: center;
  margin-bottom: 18px;
}
.alarm .siren { font-size: 46px; line-height: 1; }
.alarm h1 {
  color: var(--danger);
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-top: 10px;
}
.alarm .org {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
}

.receipt {
  background: var(--ok-bg);
  border: 1px dashed var(--ok);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
}
.receipt code {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ok);
  margin: 6px 0 4px;
}

ol.steps { padding-left: 0; list-style: none; counter-reset: step; margin: 0; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 46px;
  border-left: 2px solid var(--border-soft);
  margin-left: 14px;
}
ol.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: -15px; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 700;
}
ol.steps b { display: block; margin-bottom: 2px; }

ul.plain { padding-left: 20px; margin: 0; }
ul.plain li { margin-bottom: 6px; }

.urlbox {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  background: var(--sub-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  margin-bottom: 12px;
  color: var(--heading);
}
.urlbox .host { color: var(--danger); font-weight: 700; }

.quiz button {
  display: block; width: 100%; text-align: left;
  background: var(--main-bg); color: var(--heading);
  border-color: var(--border); margin-bottom: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem; font-weight: 500;
  overflow-wrap: anywhere;
}
.quiz button:hover:not(:disabled) { border-color: var(--primary); }
.quiz button.right { border-color: var(--ok); background: var(--ok-bg); }
.quiz button.wrong { border-color: var(--danger); background: var(--danger-bg); }
.quiz button:disabled { cursor: default; }
.verdict { font-size: 0.9rem; margin-top: 8px; min-height: 1.5em; }
.verdict.right { color: var(--ok); }
.verdict.wrong { color: var(--danger); }

.hidden { display: none !important; }

/* --- the takeover ------------------------------------------------------- */

.shock {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: #3b0a0a;
  color: #ffffff;
  /* Cover the notch and the area behind mobile browser chrome. */
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.shock.on { display: grid; }

/* 0.83 Hz. Deliberately well under the ~3 Hz threshold associated with
   photosensitive seizures — a training exercise must not hurt anyone. */
@keyframes shock-pulse {
  0%, 100% { background-color: #3b0a0a; }
  50% { background-color: #c0342c; }
}
.shock.on { animation: shock-pulse 1.2s ease-in-out infinite; }

@keyframes shock-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.shock-inner { max-width: 520px; }

.shock-siren {
  font-size: clamp(64px, 22vw, 120px);
  line-height: 1;
  animation: shock-shake 0.35s ease-in-out 6;
}

.shock-title {
  color: #ffffff;
  font-size: clamp(2rem, 11vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 14px 0 10px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.shock-sub {
  font-size: clamp(1rem, 4.5vw, 1.25rem);
  font-weight: 600;
  color: #ffffff;
  opacity: 0.95;
  margin-bottom: 26px;
}

.shock-mute, .shock-go {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 10px;
}
.shock-mute {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}
.shock-mute:hover { background: rgba(255, 255, 255, 0.12); }
.shock-go {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  /* Revealed a beat after the scare, so nobody clicks past it by reflex.
     A visibility swap rather than an opacity fade: the parent runs a
     background animation, and a half-faded button over a compositing layer
     renders unpredictably. Either it is there or it is not. */
  visibility: hidden;
}
.shock-go.ready { visibility: visible; }

/* Anyone who has asked their OS for less motion gets the message without the
   flashing or the shaking. The content is identical. */
@media (prefers-reduced-motion: reduce) {
  .shock.on { animation: none; background: #a32620; }
  .shock-siren { animation: none; }
}
