/* How Vybridge Works — guide page (UX polish) */

.hiw-page {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(124, 58, 237, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 40% at 90% 0%, rgba(6, 182, 212, 0.07), transparent 50%),
    var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Hero ── */

.hiw-hero {
  padding: 56px 0 32px;
}

.hiw-hero__eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple-dark);
}

.hiw-hero__title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 16ch;
}

.hiw-hero__pillars {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  max-width: 40rem;
}

.hiw-hero__pillars p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.hiw-hero__pillars strong {
  color: var(--text);
}

.hiw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hiw-hero__secondary {
  margin: 0;
  font-size: 14px;
}

.hiw-hero__secondary a {
  color: var(--purple-dark);
  font-weight: 600;
  text-decoration: none;
}

.hiw-hero__secondary a:hover,
.hiw-hero__secondary a:focus-visible {
  text-decoration: underline;
}

/* ── Value strip ── */

.hiw-value-strip {
  padding: 0 0 8px;
}

.hiw-value-strip__grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) {
  .hiw-value-strip__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hiw-value-strip__card {
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.hiw-value-strip__card--advertiser {
  border-top: 3px solid var(--purple);
}

.hiw-value-strip__card--publisher {
  border-top: 3px solid var(--green);
}

.hiw-value-strip__card--referrer {
  border-top: 3px solid #0891b2;
}

.hiw-value-strip__card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.hiw-value-strip__lead {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  font-weight: 500;
}

.hiw-value-strip__card ul {
  margin: 0;
  padding-left: 1.05rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.hiw-value-strip__card li + li {
  margin-top: 4px;
}

/* ── TOC ── */

.hiw-toc {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 5;
  margin: 24px 0 32px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.hiw-toc__label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.hiw-toc__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hiw-toc__list a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.hiw-toc__list a:hover,
.hiw-toc__list a:focus-visible {
  color: var(--purple-dark);
  text-decoration: underline;
}

/* ── Sections ── */

.hiw-section {
  padding: 44px 0;
  border-top: 1px solid var(--border);
}

.hiw-section--model {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.03) 0%, transparent 100%);
}

.hiw-section--referral {
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(124, 58, 237, 0.1), transparent 70%),
    linear-gradient(180deg, #faf5ff 0%, var(--bg) 100%);
  border-top-color: rgba(124, 58, 237, 0.15);
}

.hiw-section--limits {
  background: #fffbeb;
  border-top-color: #fde68a;
}

.hiw-section__kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple-dark);
}

.hiw-section__kicker--green {
  color: var(--green-dark);
}

.hiw-section__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hiw-section__lead {
  margin: 0 0 24px;
  max-width: 44rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ── Pipeline (big picture) ── */

.hiw-pipeline {
  margin-bottom: 20px;
}

.hiw-pipeline__label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.hiw-pipeline__track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hiw-pipeline__node {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: var(--purple-light);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
}

.hiw-pipeline__node--green {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--green-tint);
}

.hiw-pipeline__node--end {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.hiw-pipeline__node--green.hiw-pipeline__node--end {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.hiw-pipeline__arrow {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.hiw-pipeline--publisher {
  margin-bottom: 0;
}

/* ── Step groups ── */

.hiw-groups {
  display: grid;
  gap: 28px;
}

.hiw-group {
  padding: 0;
  border: none;
  background: transparent;
}

.hiw-group__header {
  margin-bottom: 14px;
}

.hiw-group__tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple-dark);
  background: var(--purple-light);
}

.hiw-group__tag--green {
  color: var(--green-dark);
  background: var(--green-tint);
}

.hiw-group__title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hiw-group__steps {
  margin: 0 0 16px;
  padding-left: 1.2rem;
  display: grid;
  gap: 12px;
}

.hiw-group__steps li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

.hiw-group__steps li > strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 15px;
}

.hiw-group__visuals {
  display: grid;
  gap: 14px;
}

@media (min-width: 760px) {
  .hiw-group__visuals {
    grid-template-columns: 1fr 1fr;
  }
}

.hiw-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.hiw-note--muted {
  color: var(--text-muted);
}

.hiw-bullets {
  margin: 16px 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 44rem;
}

.hiw-bullets li + li {
  margin-top: 6px;
}

/* ── Visual / screenshot containers ── */

.hiw-visual {
  margin: 16px 0 0;
  max-width: 52rem;
}

.hiw-visual--half {
  max-width: none;
}

.hiw-visual__frame {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
  line-height: 0;
}

.hiw-visual__frame img {
  width: 100%;
  height: auto;
  display: block;
}

.hiw-visual__frame--compact {
  aspect-ratio: auto;
  min-height: 0;
  padding: 12px;
  background: var(--bg-muted);
  text-align: center;
}

.hiw-visual__frame--compact img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.hiw-visual--compact {
  max-width: 28rem;
}

.hiw-pay-line {
  display: inline;
}

@media (min-width: 900px) {
  .hiw-group__visuals:has(.hiw-visual:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hiw-group__visuals--pricing {
  margin-top: 20px;
}

.hiw-bullets--referral {
  margin-bottom: 12px;
}

.hiw-tech--referral {
  margin: 0 0 16px;
  max-width: 44rem;
}

.hiw-tech--referral .hiw-bullets {
  margin-top: 8px;
}

.hiw-visual__caption {
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
}

.hiw-visual__caption p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.hiw-visual__caption strong {
  color: var(--text);
}

/* ── Compare cards ── */

.hiw-compare {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .hiw-compare {
    grid-template-columns: 1fr 1fr;
  }
}

.hiw-compare__card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg);
}

.hiw-compare__card--warn {
  border-color: #fde68a;
  background: #fff;
}

.hiw-compare__card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.hiw-compare__card p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.hiw-compare__card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.hiw-compare__card li + li {
  margin-top: 6px;
}

.hiw-example {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--purple-tint);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.hiw-example--green {
  background: var(--green-tint);
}

/* ── Callouts ── */

.hiw-callout {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--purple-light);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.hiw-callout--warn {
  border-left-color: #d97706;
  background: #fffbeb;
}

/* ── GEO ── */

.hiw-geo-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.hiw-geo-bars {
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
  max-width: 32rem;
}

.hiw-geo-bar {
  display: grid;
  grid-template-columns: minmax(72px, 110px) 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.hiw-geo-bar__track {
  height: 10px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.hiw-geo-bar__fill {
  height: 100%;
  background: var(--purple);
  border-radius: 999px;
}

.hiw-geo-note {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 44rem;
}

/* ── Currency ── */

.hiw-currency {
  display: grid;
  gap: 12px;
  max-width: 28rem;
  margin: 16px 0 0;
}

.hiw-currency__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.hiw-currency__primary {
  font-weight: 700;
  font-size: 1.05rem;
}

.hiw-currency__approx {
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Referral block ── */

.hiw-referral-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
}

.hiw-referral-flow__node {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.hiw-referral-flow__node--highlight {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.hiw-referral-flow__arrow {
  color: var(--text-muted);
  font-weight: 700;
}

.hiw-referral-highlight {
  margin: 0 0 20px;
  padding: 24px 20px;
  border-radius: var(--radius-xl);
  border: 2px solid var(--purple);
  background: #fff;
  text-align: center;
  max-width: 28rem;
}

.hiw-referral-highlight__stat {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--purple-dark);
}

.hiw-referral-highlight__label {
  margin: 6px 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.hiw-referral-highlight__detail {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.hiw-referral-highlight__clarify {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.hiw-math {
  margin: 16px 0;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.55;
  max-width: 28rem;
}

.hiw-math strong {
  color: var(--text);
}

/* ── Why Vybridge ── */

.hiw-value {
  display: grid;
  gap: 14px;
}

@media (min-width: 800px) {
  .hiw-value {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hiw-value__card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.hiw-value__card--advertiser {
  border-top: 3px solid var(--purple);
}

.hiw-value__card--publisher {
  border-top: 3px solid var(--green);
}

.hiw-value__card--referrer {
  border-top: 3px solid #0891b2;
}

.hiw-value__card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.hiw-value__hook {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.hiw-value__card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.hiw-value__card li + li {
  margin-top: 6px;
}

/* ── FAQ ── */

.hiw-faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 0 14px;
  margin: 0 0 10px;
}

.hiw-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 600;
  font-size: 15px;
}

.hiw-faq summary::-webkit-details-marker {
  display: none;
}

.hiw-faq summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
  font-weight: 700;
}

.hiw-faq details[open] summary::after {
  content: "−";
}

.hiw-faq summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.hiw-faq details p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ── CTA ── */

.hiw-cta {
  margin: 24px 0 48px;
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  background: var(--brand-gradient);
  color: #fff;
  text-align: center;
}

.hiw-cta h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.hiw-cta p {
  margin: 0 0 18px;
  opacity: 0.92;
}

.hiw-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.hiw-cta .btn--white {
  background: #fff;
  color: var(--purple-dark);
}

.hiw-cta .btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

/* ── Technical expand ── */

.hiw-tech {
  margin-top: 14px;
}

.hiw-tech summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--purple-dark);
}

.hiw-tech summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.hiw-tech[open] {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}

.hiw-tech p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Mobile ── */

@media (max-width: 640px) {
  .hiw-hero {
    padding-top: 36px;
  }

  .hiw-toc {
    position: static;
  }

  .hiw-pipeline__track {
    gap: 4px;
  }

  .hiw-pipeline__node {
    font-size: 12px;
    padding: 8px 10px;
  }

  .hiw-pipeline__arrow {
    font-size: 12px;
  }

  .hiw-geo-bar {
    grid-template-columns: minmax(64px, 88px) 1fr 34px;
    font-size: 12px;
  }

  .hiw-referral-highlight {
    max-width: none;
  }

  .hiw-group__visuals {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .hiw-hero__pillars p {
    font-size: 1rem;
  }

  .hiw-pipeline__node {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .hiw-pipeline__arrow {
    display: none;
  }
}
