/* ==========================================================================
   WordPress vs. custom code (.wv-*) — the comparison page only.
   Reads the site tokens from site.css; adds nothing global. Logical
   properties throughout, so RTL and LTR share every rule.
   ========================================================================== */

/* The hero runs straight into the two cards, so it does not need the full
   page-hero bottom padding under it as well. */
.wv-hero { padding-block-end: clamp(1.6rem, 3.5vw, 2.6rem); }
.wv-hero .wv-hero__copy {
  display: grid;
  justify-items: center;
  gap: .15rem;
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}
.wv-hero h1 {
  margin: .7rem 0 .6rem;
  font-size: clamp(1.85rem, 4.4vw, 3.05rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  text-wrap: balance;
}
/* The question is the headline; the subtitle is the answer's promise, so it
   sits a clear step below it rather than competing at nearly the same size. */
.wv-hero .lead {
  margin: 0;
  max-width: 48ch;
  color: var(--text-muted);
  font-size: clamp(.98rem, 1.3vw, 1.1rem);
  line-height: 1.8;
}

/* --- The two approaches, with VS between them ---------------------------- */
/* Three real cells: card · badge · card. The badge used to be absolutely
   positioned over the gap, so it hung off the container's midpoint instead of
   the cards' and drifted whenever they changed height. */
.wv-sides {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(.6rem, 1.6vw, 1.1rem);
  max-width: 1000px;
  margin: clamp(1.5rem, 3.4vw, 2.4rem) auto 0;
}
.wv-side {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: .28rem;
  padding: clamp(1.25rem, 2.6vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, var(--surface-2), var(--surface) 76%);
  box-shadow: var(--shadow);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease-out),
              box-shadow var(--t-slow) var(--ease);
}
.wv-side:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.wv-side__ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-block-end: .55rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--glass);
  color: var(--text-secondary);
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease), color var(--t) var(--ease);
}
/* Only the custom-code side carries the brand colour. Tinting both would make
   the accent meaningless, and the page is not arguing for either. */
.wv-side--code { border-color: var(--primary-line); }
.wv-side--code:hover { border-color: var(--primary); box-shadow: var(--shadow-md), 0 26px 52px -38px var(--primary-glow); }
.wv-side--code .wv-side__ic { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); }
.wv-side--wp:hover { border-color: var(--border-strong); }
.wv-side--wp:hover .wv-side__ic { border-color: var(--border-strong); color: var(--text-primary); }

.wv-side__name { font-size: clamp(1.15rem, 2.3vw, 1.4rem); font-weight: 700; line-height: 1.35; }
.wv-side__label {
  margin: 0;
  padding: .2rem .6rem;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  color: var(--text-faint);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.wv-side--code .wv-side__label { background: var(--primary-soft); color: var(--primary); }
.wv-side__text { margin: .6rem 0 0; color: var(--text-muted); font-size: .92rem; line-height: 1.85; }

/* The badge sits in its own column with a rail running out of either side, so
   it reads as the join between the two cards rather than a sticker on top. */
.wv-sides__vs {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  width: 52px;
  height: 52px;
  flex: none;
}
/* The rail only has to bridge the gap to each card. It also cannot use
   z-index:-1 to duck under the badge: neither .wv-sides nor .page-hero opens
   a stacking context, so a negative layer would slide behind the hero's own
   background and vanish. The badge is lifted over it instead. */
.wv-sides__vs::before {
  content: "";
  position: absolute;
  inset-inline: -1.4rem;
  inset-block-start: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.wv-sides__vs i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-secondary);
  font-family: var(--font-num);
  font-size: .8rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .05em;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
}

@media (max-width: 760px) {
  /* Stacked, the badge becomes a divider row between the two cards. */
  .wv-sides { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .wv-sides__vs { width: 100%; height: 46px; }
  .wv-sides__vs::before { inset-inline: 0; }
  .wv-sides__vs i { width: 46px; height: 46px; }
}

/* --- The comparison ------------------------------------------------------ */
.wv-table {
  --wv-cols: minmax(0, .82fr) minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: linear-gradient(175deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.wv-table__head,
.wv-row {
  display: grid;
  grid-template-columns: var(--wv-cols);
  gap: clamp(.7rem, 2vw, 1.4rem);
  padding: clamp(.75rem, 1.6vw, 1rem) clamp(1rem, 2.2vw, 1.6rem);
}
.wv-table__head {
  align-items: center;
  padding-block: clamp(.95rem, 2vw, 1.3rem);
  border-block-end: 1px solid var(--border-strong);
  background: var(--glass);
}
.wv-table__col { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.wv-table__col b { font-size: 1rem; font-weight: 700; }
.wv-table__colic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--glass-2);
  color: var(--text-secondary);
}
.wv-table__col--code .wv-table__colic { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); }

/* A hairline between rows and a faint wash on alternate ones: enough to track
   across a twelve-row table, not enough to turn it into a spreadsheet. */
.wv-row { position: relative; transition: background-color var(--t-fast) var(--ease); }
.wv-row + .wv-row { border-block-start: 1px solid var(--border); }
.wv-row:nth-child(even) { background: var(--glass); }
.wv-row:hover { background: var(--glass-2); }
.wv-row__label {
  display: flex;
  align-items: center;
  gap: .6rem;
  align-self: center;
  margin: 0;
  min-width: 0;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--text-primary);
}
.wv-row__ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--glass-2);
  color: var(--primary);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.wv-row:hover .wv-row__ic { border-color: var(--primary-line); background: var(--primary-soft); }
.wv-row__ic .icon { width: 16px; height: 16px; }
.wv-cell { min-width: 0; align-self: center; }
.wv-cell p { margin: 0; color: var(--text-secondary); font-size: .92rem; line-height: 1.75; }
.wv-cell--code p { color: var(--text-primary); }

/* Desktop: the header row names the columns, so the per-answer tag only has
   to exist for assistive tech. Never display:none — that hides it from screen
   readers too and leaves the answers unlabelled. */
.wv-cell__tag {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Below 820px two sentences cannot share a row, so each criterion becomes its
   own block with the answers stacked and labelled. */
@media (max-width: 820px) {
  .wv-table { border-radius: var(--r-lg); }
  .wv-table__head { display: none; }
  .wv-row {
    grid-template-columns: minmax(0, 1fr);
    gap: .55rem;
    padding: clamp(.95rem, 3.6vw, 1.25rem);
  }
  .wv-row:hover { background: inherit; }
  .wv-row:nth-child(even) { background: var(--glass); }
  .wv-row__label { font-size: .98rem; }
  .wv-cell {
    padding: .7rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
  }
  .wv-cell--code { border-color: var(--primary-line); background: var(--primary-soft); }
  .wv-cell p { font-size: .89rem; line-height: 1.7; }
  .wv-cell__tag {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 .25rem;
    clip: auto;
    clip-path: none;
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--text-faint);
  }
  .wv-cell--code .wv-cell__tag { color: var(--primary); }
}

/* --- Who each one is for -------------------------------------------------- */
.wv-fit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.5rem);
  align-items: start;
}
.wv-fit__card {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 2.6vw, 1.7rem);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, var(--surface-2), var(--surface) 76%);
  box-shadow: var(--shadow);
  transition: border-color var(--t) var(--ease), box-shadow var(--t-slow) var(--ease);
}
.wv-fit__card:hover { box-shadow: var(--shadow-md); }
.wv-fit__card--code { border-color: var(--primary-line); }
.wv-fit__card--code:hover { box-shadow: var(--shadow-md), 0 26px 52px -40px var(--primary-glow); }
.wv-fit__card h3 {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.45;
}
.wv-fit__ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--glass);
  color: var(--text-secondary);
}
.wv-fit__card--code .wv-fit__ic { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); }

/* Six short points read faster as two columns of three than as one long
   list — the card stops being a wall and becomes something you scan. */
.wv-fit__card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wv-fit__card li {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  padding: .5rem .65rem;
  border-radius: var(--r-xs);
  background: var(--glass);
  color: var(--text-secondary);
  font-size: .88rem;
  line-height: 1.5;
}
.wv-fit__tick { flex: none; fill: none; stroke: var(--primary); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1060px) {
  .wv-fit__card ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .wv-fit { grid-template-columns: minmax(0, 1fr); }
  /* One card wide again, so the points can pair up once more. */
  .wv-fit__card ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  /* Two columns of ~190px start breaking the longer points onto a second
     line; below this the list reads better as a single column. */
  .wv-fit__card ul { grid-template-columns: minmax(0, 1fr); }
}

/* --- Closing call to action ---------------------------------------------- */
/* This is the page's only ending: it is excluded from the footer's CTA card
   (partials/footer.php), so it carries both actions that card offered. */
.sv-sec--cta { padding-block-end: clamp(2.4rem, 5vw, 3.6rem); }
.wv-cta {
  display: grid;
  justify-items: center;
  gap: .45rem;
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(1.7rem, 3.6vw, 2.4rem) clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--primary-line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 140% at 50% 0%, var(--primary-soft), transparent 62%),
    linear-gradient(165deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.wv-cta__ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-block-end: .5rem;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--primary-hover), var(--primary));
  color: #FFFFFF;
  box-shadow: 0 14px 30px -14px var(--primary-glow);
}
.wv-cta h2 { font-size: clamp(1.3rem, 2.8vw, 1.7rem); font-weight: 700; line-height: 1.4; }
.wv-cta p { margin: 0; max-width: 44ch; color: var(--text-muted); font-size: .95rem; line-height: 1.8; }
.wv-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-block-start: 1.1rem;
}

@media (max-width: 420px) {
  /* Side by side these two drop to about 130px each and start truncating. */
  .wv-cta__actions { flex-direction: column; align-items: stretch; width: 100%; }
  .wv-cta__actions .fq-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .wv-side, .wv-fit__card, .wv-row { transition: none; }
  .wv-side:hover { transform: none; }
}
