/* ==========================================================================
   NZ CYBER RISK CHECK — styling
   Design system lifted from anvil's bitdefender.net.fj site:
   dark glassmorphism, Space Grotesk + Barlow Condensed, red/cyan/gold accents.
   ========================================================================== */
:root {
  --bg:     #07090f;
  --bg2:    #0d1120;
  --red:    #e8001d;
  --red2:   #ff3348;
  --cyan:   #00d4f0;
  --gold:   #ffb830;
  --green:  #00e87a;
  --text:   #e8eaf0;
  --muted:  rgba(232,234,240,0.55);
  --glass:  rgba(255,255,255,0.05);
  --glass2: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.10);
  --r-sm:   12px;
  --r-md:   20px;
  --r-lg:   30px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient radial glow, same idea as the source site. */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-fx::before, .bg-fx::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(10px);
}
.bg-fx::before {
  width: 60vw; height: 60vw; top: -22vw; left: -18vw;
  background: radial-gradient(circle, rgba(232,0,29,0.22), transparent 70%);
}
.bg-fx::after {
  width: 50vw; height: 50vw; bottom: -20vw; right: -15vw;
  background: radial-gradient(circle, rgba(0,212,240,0.14), transparent 70%);
}

/* ---------- header ------------------------------------------------------- */
.site-header {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 48px);
  max-width: 1100px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-mark {
  font-family: "Barlow Condensed", sans-serif; font-weight: 800; letter-spacing: 0.18em;
  font-size: 1.35rem; color: #fff;
}
.brand-mark img { display: block; height: 28px; width: auto; }
.brand-sep { width: 1px; height: 22px; background: var(--border); }
.brand-sub { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.04em; }
.brand-partner {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px;
  transition: background .2s;
}
.brand-partner:hover { background: var(--glass2); }

/* ---------- progress bar ------------------------------------------------- */
.progress {
  position: relative; z-index: 5;
  max-width: 720px; margin: 4px auto 0; height: 4px;
  background: var(--glass); border-radius: 999px; overflow: hidden;
}
.progress-bar {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--red), var(--red2));
  border-radius: 999px; transition: width .35s ease;
}

/* ---------- app container ------------------------------------------------ */
.app {
  position: relative; z-index: 5;
  max-width: 720px; margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(18px, 5vw, 32px) 60px;
}
.screen { animation: rise .4s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- typography --------------------------------------------------- */
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem;
  font-weight: 600; color: var(--cyan); margin-bottom: 14px;
}
h1 {
  font-family: "Barlow Condensed", sans-serif; font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 0.98; letter-spacing: -0.01em;
  color: #fff; text-wrap: balance; margin-bottom: 20px;
}
h1 .accent, h2 .accent { color: var(--cyan); }
h2 {
  font-family: "Barlow Condensed", sans-serif; font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.7rem); line-height: 1.04; color: #fff;
  margin-bottom: 14px; text-wrap: balance;
}
.lead { font-size: clamp(1rem, 2vw, 1.16rem); color: rgba(232,234,240,0.82); max-width: 56ch; line-height: 1.7; }
.fineprint { margin-top: 22px; color: var(--muted); font-size: 0.84rem; }

/* ---------- intro -------------------------------------------------------- */
.intro-meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 30px 0 32px; }
.meta-chip {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 20px; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-sm); min-width: 120px;
}
.meta-num { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.5rem; color: #fff; }
.meta-lbl { color: var(--muted); font-size: 0.82rem; }

/* ---------- buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 0.96rem;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: 16px 32px; font-size: 1.04rem; }
.btn-red { background: linear-gradient(135deg, var(--red), var(--red2)); color: #fff; box-shadow: 0 8px 28px rgba(232,0,29,0.4); }
.btn-red:hover { box-shadow: 0 12px 36px rgba(232,0,29,0.6); }
.btn-ghost { background: var(--glass); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--glass2); }
.btn-dk {
  display: block; margin: 18px auto 0; background: transparent; color: var(--muted);
  border: 1px dashed var(--border); font-size: 0.86rem; padding: 9px 18px;
}
.btn-dk:hover { color: var(--text); border-color: var(--cyan); transform: none; }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ---------- question ----------------------------------------------------- */
.qcount { color: var(--cyan); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.qhelp { color: var(--muted); font-size: 0.96rem; margin-bottom: 24px; max-width: 56ch; }

.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  display: flex; align-items: center; text-align: left;
  width: 100%; padding: 18px 22px;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-family: inherit; font-size: 1.02rem; font-weight: 500;
  cursor: pointer; transition: border-color .15s, background .15s, transform .12s;
}
.option:hover { border-color: rgba(0,212,240,0.5); background: var(--glass2); transform: translateX(3px); }
.option.selected { border-color: var(--red2); background: rgba(232,0,29,0.12); box-shadow: 0 0 0 1px var(--red2) inset; }
.option-check::before {
  content: ""; flex: 0 0 20px; width: 20px; height: 20px; margin-right: 14px;
  border: 2px solid var(--border); border-radius: 6px; transition: .15s;
}
.option-check.selected::before { background: var(--red2); border-color: var(--red2); box-shadow: inset 0 0 0 3px var(--bg); }

.navrow { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }

/* ---------- endpoint table ----------------------------------------------- */
.endpoint { display: flex; flex-direction: column; gap: 10px; }
.ep-row {
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 14px 16px; transition: border-color .15s, background .15s;
}
.ep-row.on { border-color: rgba(0,212,240,0.45); background: var(--glass2); }
.ep-head { display: flex; align-items: center; gap: 14px; }
.ep-have {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px;
  border: 2px solid var(--border); background: transparent; cursor: pointer; position: relative;
  transition: .15s;
}
.ep-have.checked { background: var(--cyan); border-color: var(--cyan); }
.ep-have.checked .tick::after {
  content: ""; position: absolute; left: 8px; top: 3px; width: 6px; height: 12px;
  border: solid var(--bg); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.ep-label { display: flex; flex-direction: column; line-height: 1.2; }
.ep-label strong { font-family: "Barlow Condensed", sans-serif; font-size: 1.15rem; letter-spacing: 0.04em; }
.ep-label span { color: var(--muted); font-size: 0.8rem; }
.ep-detail { display: none; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
.ep-row.on .ep-detail { display: flex; }
.ep-vendor {
  flex: 1 1 160px; min-width: 140px; padding: 9px 14px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--text); font-family: inherit; font-size: 0.9rem;
}
.ep-vendor:focus { outline: none; border-color: var(--cyan); }
.ep-cov { display: flex; gap: 6px; flex-wrap: wrap; }
.ep-covbtn {
  padding: 8px 13px; background: var(--bg2); border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); font-family: inherit; font-size: 0.82rem; cursor: pointer; transition: .15s;
}
.ep-covbtn:hover { color: var(--text); border-color: var(--cyan); }
.ep-covbtn.selected { background: var(--cyan); color: var(--bg); border-color: var(--cyan); font-weight: 600; }

/* ---------- gate form ---------------------------------------------------- */
.qform { display: flex; flex-direction: column; gap: 16px; margin-top: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-lbl { font-size: 0.84rem; color: var(--muted); font-weight: 500; }
.field input {
  padding: 13px 16px; background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text); font-family: inherit; font-size: 1rem;
}
.field input:focus { outline: none; border-color: var(--cyan); background: var(--glass2); }
.form-err { color: var(--red2); font-size: 0.88rem; }
.qform .btn-ghost { align-self: flex-start; margin-top: 4px; }

/* ---------- result ------------------------------------------------------- */
.result { text-align: center; }
.dial {
  width: 200px; height: 200px; margin: 8px auto 26px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; background: var(--glass); border: 1px solid var(--border);
}
.dial::before {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  background: conic-gradient(var(--dial-c) calc(var(--p,0) * 1%), rgba(255,255,255,0.08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}
.dial-pass { --dial-c: var(--green); }
.dial-conditional { --dial-c: var(--gold); }
.dial-fail { --dial-c: var(--red2); }
.dial-num { font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 3.6rem; color: #fff; line-height: 1; }
.dial-num span { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.dial-band { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

.result .lead { margin: 0 auto 22px; }
.tier-band {
  display: inline-block; padding: 12px 20px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--border); font-size: 0.96rem;
  margin: 0 auto 30px; max-width: 60ch; line-height: 1.55;
}
.tier-band strong { color: var(--gold); }

.lights { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; text-align: left; margin-bottom: 28px; }
.light {
  display: flex; align-items: center; gap: 11px; padding: 13px 16px;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.light-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; }
.light-pass .light-dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.light-conditional .light-dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.light-fail .light-dot { background: var(--red2); box-shadow: 0 0 10px var(--red2); }
.light-unverified .light-dot { background: var(--muted); }
.light-area { flex: 1; font-size: 0.92rem; }
.light-verdict { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.light-pass .light-verdict { color: var(--green); }
.light-conditional .light-verdict { color: var(--gold); }
.light-fail .light-verdict { color: var(--red2); }

.deliver {
  padding: 14px 18px; border-radius: var(--r-sm); background: rgba(0,212,240,0.08);
  border: 1px solid rgba(0,212,240,0.3); font-size: 0.92rem; margin-bottom: 26px;
}
.deliver a { color: var(--cyan); }

.result-cta { padding: 26px; background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-md); }
.result-cta p { margin-bottom: 16px; color: rgba(232,234,240,0.82); }
.result-cta .btn { margin: 6px; }

/* ---------- footer ------------------------------------------------------- */
.site-footer {
  position: relative; z-index: 5; max-width: 1100px; margin: 40px auto 0;
  padding: 28px clamp(18px, 5vw, 48px) 40px; border-top: 1px solid var(--border);
}
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
.foot-brand { font-family: "Barlow Condensed", sans-serif; font-weight: 700; letter-spacing: 0.1em; color: #fff; margin-right: 12px; }
.foot-tag { color: var(--muted); font-size: 0.86rem; }
.foot-contact a { color: var(--text); text-decoration: none; margin-left: 18px; font-size: 0.9rem; }
.foot-contact a:hover { color: var(--cyan); }
.foot-fine { margin-top: 18px; color: var(--muted); font-size: 0.78rem; max-width: 70ch; }

/* ---------- responsive --------------------------------------------------- */
@media (max-width: 560px) {
  .brand-sub { display: none; }
  .result-cta .btn { display: flex; width: 100%; }
  .navrow { gap: 10px; }
}
