/*
 * Webdev Zimbabwe — /upgrades router (v2026)
 * Load AFTER webdev-base.css. Primitives live there; this file adds only the
 * blocks specific to the upgrade router.
 *
 * Block letters follow Upgrades_Umbrella_Brief_v1 §5:
 *   A hero (no CTA) · B four routes · C "not sure?" router
 *   D what stays the same · E required vs optional · F final fallback
 *
 * The brief's non-negotiables shape this file: routing must be visible within
 * the first scroll, one CTA per route, and the page must load in under two
 * seconds — so there is no hero image, no carousel and no decorative motion.
 */

/* ---------- BLOCK A — hero ----------
 * Uses the shared .wd-subhero component in webdev-base.css.
 *
 * .wd-subhero--upgrades MOVED to webdev-base.css — /email-office-upgrade and
 * /managed-website-upgrade share the same artwork, and those run the migration
 * template, so base is the only layer all three load.
 */

/* .wd-chips lives in webdev-base.css — shared with the migration pages. */

/* ---------- BLOCK B — four upgrade routes ---------- */

.wd-routes {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/*
 * Photo-topped card. The photo runs edge to edge, so the card drops its own
 * padding and hands it to .wd-route__body; overflow clips the photo to the
 * card's rounded corners. `.wd-page .wd-route` matches the specificity of
 * `.wd-page .wd-card` in base and wins on load order.
 */
.wd-page .wd-route {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

/* Shallow banner crop, per the client's reference. Each <img> sets its own
   object-position so the subject stays in frame. */
.wd-route__media {
  aspect-ratio: 9 / 2;
  background: var(--wd-charcoal-900);
  border-bottom: 4px solid var(--wd-orange-500);
  overflow: hidden;
  position: relative;
}

.wd-route__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--wd-ease);
  width: 100%;
}

/* White tile over the photo's top-left corner — keeps the product mark legible
   on any image. */
.wd-route__badge {
  align-items: center;
  background: var(--wd-white);
  border-radius: var(--wd-radius-md);
  box-shadow: var(--wd-shadow-sm);
  color: var(--wd-charcoal-900);
  display: inline-flex;
  height: 3rem;
  justify-content: center;
  left: clamp(1rem, 1.6vw, 1.375rem);
  position: absolute;
  top: clamp(1rem, 1.6vw, 1.25rem);
  width: 3rem;
}

.wd-route__badge .wd-icon {
  height: 1.625rem;
  stroke-width: 1.4;
  width: 1.625rem;
}

/* Supplied product marks sit in the same plate as the outline icons. Height is
   fixed and width is free, because these are vendor logos with their own
   proportions — a square box would letterbox the wider ones. */
.wd-route__badge img {
  height: 1.75rem;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

/* ---------- cycling badge ----------
 * The Email & Office card routes to three destinations — Zoho, Microsoft 365,
 * Google Workspace — and no one mark represents that, so the plate shows each
 * in turn.
 *
 * Deliberately CSS, not JavaScript: it costs nothing, survives a script
 * failure, and the reduced-motion rule below is the whole opt-out. The marks
 * are stacked on top of each other and cross-faded, so the plate never changes
 * size as they swap.
 */
.wd-route__badge--cycle img {
  animation: wd-badge-cycle 9s infinite;
  left: 50%;
  opacity: 0;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Negative delays start each mark part-way through the same loop, so one is
   always at full opacity and the thirds stay evenly spaced. */
.wd-route__badge--cycle img:nth-child(2) {
  animation-delay: -6s;
}

.wd-route__badge--cycle img:nth-child(3) {
  animation-delay: -3s;
}

@keyframes wd-badge-cycle {
  0%,
  28% {
    opacity: 1;
  }

  33%,
  95% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* Motion off: hold the first mark and drop the rest. A badge that swaps logos
   on a loop is exactly the kind of ambient movement this preference exists to
   stop. */
@media (prefers-reduced-motion: reduce) {
  .wd-route__badge--cycle img {
    animation: none;
  }

  .wd-route__badge--cycle img:first-child {
    opacity: 1;
  }
}

.wd-route__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 2.4vw, 1.875rem) clamp(1.25rem, 2.4vw, 1.875rem) clamp(1.25rem, 2vw, 1.625rem);
}

@media (hover: hover) and (pointer: fine) {
  .wd-route:hover .wd-route__media img {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wd-route__media img,
  .wd-route:hover .wd-route__media img {
    transform: none;
    transition: none;
  }
}

/* Single column on phones: the card is narrow, so a 9:2 crop would leave a
   thin strip. Give the photo more height there. */
@media (max-width: 575.98px) {
  .wd-route__media {
    aspect-ratio: 12 / 5;
  }

  /* "See your Managed Website upgrade" wraps at ~400px; the button's 1.0
     line-height would stack the two lines on top of each other. */
  .wd-route__foot .wd-btn {
    line-height: 1.3;
    text-align: center;
  }
}

/* The behavioural question, not the product name — customers do not know their
   SKU, so this is what they scan for (brief §3, critical content rule). Set as
   a small uppercase kicker above the heading. */
.wd-route__q {
  color: var(--wd-orange-700);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

.wd-route__head {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.wd-route h3 {
  font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
}

.wd-route .wd-body {
  margin-top: 0;
}

.wd-route__foot {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
}

.wd-route__foot .wd-btn {
  flex: 1 1 auto;
}

/*
 * .wd-route--lead is intentionally UNSTYLED. The Email & Office card led the
 * priority order and used to carry an orange outline plus a "Required at next
 * renewal" badge; the client removed both, so all four routes now read as
 * equal-weight choices. The class is kept as a hook in case that emphasis is
 * wanted back.
 */

/* ---------- BLOCK C — "not sure?" router ---------- */

.wd-quiz {
  display: grid;
  gap: clamp(1rem, 2.5vw, 2rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.wd-quiz__intro h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}

.wd-quiz__panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wd-quiz__count {
  color: var(--wd-grey-500);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.wd-quiz__q {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  font-weight: 650;
  margin: 0;
}

.wd-quiz__answers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.wd-quiz__answers .wd-btn {
  min-width: 6.5rem;
}

/*
 * Without JavaScript every question is shown as a plain list with a direct link,
 * so the router never dead-ends. The script hides the list and drives one
 * question at a time instead.
 */
.wd-quiz__list {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-quiz__list li {
  border-top: 1px solid var(--wd-grey-200);
  padding-top: 1rem;
}

.wd-quiz__list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.wd-quiz__list p {
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.wd-quiz__fallback {
  color: var(--wd-grey-500);
  font-size: 0.9375rem;
  margin: 0.25rem 0 0;
}

.wd-quiz__fallback a {
  color: var(--wd-orange-700);
  font-weight: 600;
}

.wd-quiz__fallback a:hover,
.wd-quiz__fallback a:focus-visible {
  text-decoration: underline !important;
  text-underline-offset: 0.22em;
}

/* ---------- BLOCK D — what stays the same ---------- */

.wd-stays {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-stays .wd-icon {
  color: var(--wd-orange-600);
  margin-bottom: 0.875rem;
}

.wd-stays h3 {
  font-size: 1.0625rem;
}

.wd-stays p {
  color: var(--wd-grey-700);
  font-size: 0.9375rem;
  margin: 0.375rem 0 0;
}

.wd-stays__note {
  align-items: center;
  color: var(--wd-charcoal-900);
  display: flex;
  font-weight: 600;
  gap: 0.5rem;
  justify-content: center;
  margin: clamp(2rem, 3.5vw, 3rem) 0 0;
  text-align: center;
}

.wd-stays__note .wd-icon {
  color: var(--wd-success-600);
  margin: 0;
}

/* ---------- BLOCK E — required vs optional ----------
 * Every SECTION on this page sits on the one page ground (the tinted and white
 * stripes were removed at the client's request for a single consistent
 * surface). This card is the one deliberate exception: it takes .wd-panel--dark,
 * which is --wd-slate-600, the same grey as the stuck header — so the accent
 * reads as part of the chrome rather than as another background colour.
 */

.wd-policy {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.wd-policy h2 {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
}

.wd-policy p {
  color: var(--wd-grey-200);
  margin: 0.875rem 0 0;
}

.wd-policy__legend {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-policy__legend li {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}

/*
 * Scoped to the description, NOT a bare `span`: a bare selector also matched the
 * badge spans and overrode their text colour to light grey on a light pill,
 * making both badges unreadable.
 */
.wd-policy__note {
  color: var(--wd-grey-200);
  font-size: 0.9375rem;
}

/* Timing language: "at your next renewal" only — never an internal date. */
.wd-policy__timing {
  border-top: 1px solid rgb(255 255 255 / 14%);
  color: var(--wd-grey-300);
  font-size: 0.9375rem;
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.25rem;
}

/* ---------- BLOCK F — final fallback ---------- */

.wd-final {
  text-align: center;
}

.wd-final__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: clamp(1.5rem, 2.5vw, 2rem);
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
  .wd-routes {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-quiz,
  .wd-policy {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-stays {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2rem;
  }
}

@media (max-width: 575.98px) {
  .wd-stays {
    grid-template-columns: minmax(0, 1fr);
  }

  .wd-route__foot .wd-btn,
  .wd-final__actions .wd-btn {
    width: 100%;
  }

  .wd-quiz__answers .wd-btn {
    flex: 1 1 auto;
  }
}

/* Route card icon: now the white .wd-route__badge over the photo (Block B). */

/*
 * All four route buttons are identical: same size (550x44) and the same filled
 * orange pill, per the client's reference. The lead card keeps its emphasis
 * through the orange card border and the "Required at next renewal" badge.
 */
.wd-route__foot .wd-btn {
  justify-content: center;
  width: 100%;
}


/*
 * ART variant of the upgrade routes -- illustrations instead of photographs,
 * with a numbered marker replacing the product-logo plate.
 *
 * The plate on card one cycled the Zoho / Microsoft 365 / Google marks in pure
 * CSS so the card did not appear to pick a winner. That plate is gone from the
 * markup, so .wd-route__badge--cycle is now unused on this page -- the three
 * platforms are still named in the card's own copy.
 */
.wd-routes--art .wd-route__media {
  aspect-ratio: 16 / 9;
  background: var(--wd-orange-050);
  overflow: hidden;
  position: relative;
}

/*
 * `height` is !important because Antler's custom.css forces `li img` to 42px
 * above 768px. These cards are <div>s today, but the same guard is on every
 * other band in this codebase and it costs nothing if the markup ever moves
 * into a list.
 */
.wd-routes--art .wd-route__media img {
  display: block;
  height: 100% !important;
  object-fit: cover;
  width: 100%;
}

/* Sits in the corner of the band, where the logo plate used to. */
.wd-route__no {
  align-items: center;
  background: var(--wd-orange-500);
  border-radius: 50%;
  color: var(--wd-white);
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 700;
  height: 2.5rem;
  justify-content: center;
  letter-spacing: 0.02em;
  position: absolute;
  right: clamp(0.75rem, 1.5vw, 1rem);
  top: clamp(0.75rem, 1.5vw, 1rem);
  width: 2.5rem;
}

/*
 * ART variant of the router -- illustration under the intro, matching the
 * chooser sections on /email-office and /hosting.
 *
 * The panel itself is untouched. Its markup is the no-JS fallback and the
 * script hooks [data-wd-quiz], #wd-quiz-list and .wd-quiz__fallback by name,
 * so only the surrounding layout and the generated pieces are styled here.
 */
.wd-quiz--art .wd-quiz__intro {
  align-content: start;
  display: grid;
  gap: 0.75rem;
}

.wd-quiz__art {
  border-radius: var(--wd-card-radius);
  display: block;
  margin-top: clamp(0.75rem, 2vw, 1.25rem);
  overflow: hidden;
}

/* !important for the usual reason: custom.css clamps `li img` to 42px above
   768px, and this component sits near list markup. */
.wd-quiz__art img {
  display: block;
  height: 100% !important;
  object-fit: cover;
  width: 100%;
}

/*
 * The generated question block. The script writes .wd-quiz__count,
 * .wd-quiz__q and .wd-quiz__answers into the panel, so these style output that
 * only exists once the script has run -- the no-JS list is unaffected.
 */
.wd-quiz--art .wd-quiz__count {
  color: var(--wd-orange-700);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.wd-quiz--art .wd-quiz__q {
  color: var(--wd-charcoal-900);
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 0.375rem 0 0;
}

.wd-quiz--art .wd-quiz__answers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1rem;
}

.wd-quiz--art .wd-quiz__fallback {
  border-top: 1px solid var(--wd-grey-200);
  margin-top: auto;
  padding-top: 1rem;
}

/* Stacked, the picture sits between the copy and the questions, which pushes
   the router itself below the fold on a phone. It goes. */
@media (max-width: 767.98px) {
  .wd-quiz__art {
    display: none;
  }
}