/* Zentrya One awareness platform
   Palette: brand red, true black, white, neutral ramp. */

:root {
  --red: #e4192a;
  --red-deep: #a70f1d;
  --red-wash: #fdeceE;
  --black: #000000;
  --white: #ffffff;

  --grey-100: #f4f4f5;
  --grey-200: #e6e6e9;
  --grey-300: #d8d8dc;
  --grey-500: #8a8a92;
  --grey-700: #6b6b72;

  --green: #14733f;

  --measure: 66ch;
  --shell: 1120px;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.34rem + 0.78vw, 2rem);
  --step-3: clamp(1.95rem, 1.6rem + 1.7vw, 3rem);
  --step-4: clamp(2.5rem, 1.9rem + 2.9vw, 4.4rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Components below set their own display value, so hidden must outrank them. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: Archivo, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-synthesis-weight: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

a {
  color: var(--black);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--red);
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}

.skip:focus {
  left: 0;
}

/* ---- masthead --------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--grey-200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 20;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--black);
}

.wordmark__mark {
  width: 0.62rem;
  height: 1.42rem;
  background: var(--red);
  display: inline-block;
  transform: skewX(-11deg);
  position: relative;
  top: 0.18rem;
}

.wordmark__sub {
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--grey-700);
}

.masthead__nav {
  display: flex;
  gap: 1.6rem;
  align-items: center;
  font-size: var(--step--1);
  font-weight: 500;
}

.masthead__nav a {
  text-decoration: none;
  color: var(--grey-700);
}

.masthead__nav a:hover {
  color: var(--black);
}

/* ---- hero ------------------------------------------------------------- */

.hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--grey-200);
}

.hero__lead {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 19ch;
  line-height: 0.98;
}

.hero__rule {
  width: 5.5rem;
  height: 0.5rem;
  background: var(--red);
  margin: 1.9rem 0 1.6rem;
}

.hero__body {
  font-size: var(--step-1);
  color: var(--grey-700);
  max-width: 52ch;
  line-height: 1.45;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--grey-200);
}

.hero__stat b {
  display: block;
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero__stat span {
  font-size: var(--step--1);
  color: var(--grey-700);
}

/* ---- section headings ------------------------------------------------- */

.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.section__head {
  margin-bottom: 2.2rem;
}

.section__head h2 {
  font-size: var(--step-2);
}

.section__head p {
  color: var(--grey-700);
  margin-top: 0.7rem;
}

/* ---- domain rows: the primary device ---------------------------------- */

.domains {
  border-top: 1px solid var(--grey-200);
}

.domain {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem 2rem;
  width: 100%;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  border: 0;
  border-bottom: 1px solid var(--grey-200);
  border-left: 5px solid var(--red);
  background: var(--white);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-left-color 140ms ease, border-left-width 140ms ease,
    background-color 140ms ease, padding-left 140ms ease;
}

.domain:hover,
.domain:focus-visible {
  border-left-color: var(--red);
  border-left-width: 14px;
  padding-left: 1.3rem;
  background: var(--grey-100);
  color: var(--black);
}

.domain__name {
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.domain__summary {
  margin: 0.35rem 0 0;
  color: var(--grey-700);
  font-size: var(--step--1);
  max-width: 58ch;
}

.domain__count {
  font-size: var(--step--1);
  color: var(--grey-700);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.domain[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.55;
  border-left-color: var(--grey-300);
}

.domain[aria-disabled='true']:hover {
  border-left-color: var(--grey-300);
  border-left-width: 5px;
  padding-left: 1.75rem;
  background: var(--white);
}

/* ---- buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  border: 2px solid var(--black);
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.005em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease,
    color 120ms ease;
}

.btn:hover:not(:disabled) {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--black);
  border-color: var(--grey-300);
}

.btn--ghost:hover:not(:disabled) {
  background: transparent;
  border-color: var(--black);
  color: var(--black);
}

.btn--red {
  background: var(--red);
  border-color: var(--red);
}

.btn--red:hover:not(:disabled) {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

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

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--grey-300);
  border-radius: 0;
  background: var(--white);
  font: inherit;
  font-size: var(--step-0);
  color: var(--black);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--black);
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.field__hint {
  font-size: var(--step--1);
  color: var(--grey-700);
  margin: 0.35rem 0 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 1.25rem;
}

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

.notice {
  padding: 0.9rem 1.1rem;
  border-left: 5px solid var(--red);
  background: var(--red-wash);
  font-size: var(--step--1);
  margin-bottom: 1.25rem;
}

.notice[hidden] {
  display: none;
}

.notice--quiet {
  border-left-color: var(--grey-300);
  background: var(--grey-100);
}

/* ---- quiz ------------------------------------------------------------- */

.quiz {
  padding: clamp(2rem, 5vw, 3.5rem) 0 5rem;
}

.progress {
  display: flex;
  gap: 4px;
  margin-bottom: 0.85rem;
}

.progress__tick {
  height: 6px;
  flex: 1;
  background: var(--grey-200);
}

.progress__tick--done {
  background: var(--black);
}

.progress__tick--current {
  background: var(--red);
}

.progress__label {
  display: flex;
  justify-content: space-between;
  font-size: var(--step--1);
  color: var(--grey-700);
  margin-bottom: 2.4rem;
  font-variant-numeric: tabular-nums;
}

.question {
  max-width: 46rem;
}

.question__prompt {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.9rem;
  max-width: 30ch;
}

.options {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 2.2rem;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--grey-300);
  background: var(--white);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.option:hover {
  border-color: var(--black);
}

.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.option__key {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid var(--grey-300);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.option__text {
  padding-top: 0.15rem;
}

.option:has(input:checked) {
  border-color: var(--red);
  background: var(--red-wash);
}

.option:has(input:checked) .option__key {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.option:has(input:focus-visible) {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.quiz__actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 1.6rem;
  border-top: 1px solid var(--grey-200);
}

.quiz__actions .spacer {
  flex: 1;
}

/* ---- results ---------------------------------------------------------- */

.score {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--grey-200);
  margin-bottom: 2.5rem;
}

.score__figure {
  font-size: clamp(4.5rem, 14vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.82;
  font-variant-numeric: tabular-nums;
}

.score__figure sup {
  font-size: 0.32em;
  font-weight: 600;
  top: -1.6em;
  margin-left: 0.1em;
}

.score--pass .score__figure {
  color: var(--black);
}

.score--fail .score__figure {
  color: var(--red);
}

.score__verdict {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.score__detail {
  color: var(--grey-700);
  margin: 0;
}

.review__item {
  padding: 1.5rem 0 1.5rem 1.25rem;
  border-top: 1px solid var(--grey-200);
  border-left: 5px solid var(--grey-300);
  margin-bottom: 0;
}

.review__item--correct {
  border-left-color: var(--green);
}

.review__item--wrong {
  border-left-color: var(--red);
}

.review__verdict {
  font-size: var(--step--1);
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.review__item--correct .review__verdict {
  color: var(--green);
}

.review__item--wrong .review__verdict {
  color: var(--red);
}

.review__prompt {
  font-weight: 600;
  margin-bottom: 0.7rem;
  max-width: 60ch;
}

.review__answer {
  font-size: var(--step--1);
  margin: 0.2rem 0;
  color: var(--grey-700);
}

.review__answer b {
  color: var(--black);
  font-weight: 600;
}

.review__why {
  font-size: var(--step--1);
  margin: 0.8rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--grey-100);
  max-width: 66ch;
  line-height: 1.5;
}

/* ---- certificate ------------------------------------------------------ */

.certificate {
  border: 2px solid var(--black);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin: 2.5rem 0;
  position: relative;
}

.certificate::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: var(--red);
}

.certificate__label {
  font-size: var(--step--1);
  color: var(--grey-700);
  margin-bottom: 0.6rem;
}

.certificate__name {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0.5rem;
}

.certificate__line {
  color: var(--grey-700);
  margin-bottom: 0.3rem;
}

.certificate__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--grey-200);
  font-size: var(--step--1);
  color: var(--grey-700);
}

/* ---- footer ----------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--grey-200);
  padding: 2.5rem 0 3.5rem;
  font-size: var(--step--1);
  color: var(--grey-700);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}

/* ---- utility ---------------------------------------------------------- */

.stack > * + * {
  margin-top: 1.15rem;
}

.muted {
  color: var(--grey-700);
}

.centred {
  max-width: 34rem;
  margin-inline: auto;
}

.loading {
  padding: 3rem 0;
  color: var(--grey-700);
}

@media (max-width: 620px) {
  .domain {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .score {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .masthead__nav {
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .masthead,
  .footer,
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
  }

  .certificate {
    border-color: #000;
    page-break-inside: avoid;
  }
}

/* ---- question and explanation images ---------------------------------- */

.question__image {
  margin: 0 0 1.9rem;
  border: 1px solid var(--grey-300);
  background: var(--grey-100);
  padding: 0.6rem;
}

.question__image img {
  width: 100%;
  height: auto;
  max-height: 26rem;
  object-fit: contain;
  margin-inline: auto;
}

.review__image {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 20rem;
  object-fit: contain;
  border: 1px solid var(--grey-300);
  background: var(--grey-100);
  padding: 0.4rem;
  margin: 0 0 0.9rem;
}

.review__why {
  font-size: var(--step--1);
  margin: 0.8rem 0 0;
  padding: 0.95rem 1.1rem;
  background: var(--grey-100);
  border-left: 3px solid var(--grey-300);
  max-width: 66ch;
  line-height: 1.5;
}

.review__why p {
  margin: 0;
  max-width: none;
}

.review__why-image {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 22rem;
  object-fit: contain;
  margin-top: 0.9rem;
  border: 1px solid var(--grey-300);
  background: var(--white);
  padding: 0.4rem;
}

.review__item--correct .review__why {
  border-left-color: var(--green);
}

.review__item--wrong .review__why {
  border-left-color: var(--red);
}

/* ---- logo ------------------------------------------------------------- */

.wordmark__logo {
  height: 2.2rem;
  width: 2.2rem;
  display: block;
  flex-shrink: 0;
}

.wordmark__name {
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

@media print {
  .question__image img,
  .review__image,
  .review__why-image {
    max-height: 12rem;
  }
}
