/**
 * GTRS Visual Phase 5B — How It Works R1 (`assets/how-it-works-r1.css`)
 * Scoped exclusively to `.gtrs-hiw-page` on `/how-it-works/`.
 * Continues the approved GTRS editorial visual system:
 * white, graphite, muted sage-grey, restrained warm-grey, tabular technical typography.
 */

.gtrs-hiw-page {
  --hiw-bg: #ffffff;
  --hiw-surface: #f6f7f5;
  --hiw-surface-warm: #f3f2ee;
  --hiw-surface-dark: #151a1c;
  --hiw-surface-dark-2: #1d2427;
  --hiw-ink: #14191b;
  --hiw-ink-muted: #505c5a;
  --hiw-ink-subtle: #6b7775;
  --hiw-sage: #dce2de;
  --hiw-sage-strong: #b9c4be;
  --hiw-sage-tint: #eef1ef;
  --hiw-accent: #25302e;
  --hiw-focus: #14191b;
  background-color: var(--hiw-bg);
  color: var(--hiw-ink);
  overflow-x: clip;
}

.gtrs-hiw-page *,
.gtrs-hiw-page *::before,
.gtrs-hiw-page *::after {
  box-sizing: border-box;
}

.gtrs-hiw-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Focus visibility */
.gtrs-hiw-page a:focus-visible,
.gtrs-hiw-page button:focus-visible {
  outline: 2px solid var(--hiw-focus);
  outline-offset: 3px;
}

/* Typography & Eyebrows */
.gtrs-hiw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hiw-ink-subtle);
  margin: 0 0 14px;
}

.gtrs-hiw-eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background-color: var(--hiw-sage-strong);
}

.gtrs-hiw-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 32px;
  align-items: end;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--hiw-sage);
}

.gtrs-hiw-section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 650;
  color: var(--hiw-ink);
  overflow-wrap: break-word;
}

.gtrs-hiw-section-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.62;
  color: var(--hiw-ink-muted);
}

/* Buttons & Links */
.gtrs-hiw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.gtrs-hiw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--hiw-ink);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.gtrs-hiw-btn--primary {
  background-color: var(--hiw-ink);
  color: #ffffff;
}

.gtrs-hiw-btn--primary:hover {
  background-color: #283235;
  border-color: #283235;
  color: #ffffff;
}

.gtrs-hiw-btn--secondary {
  background-color: transparent;
  color: var(--hiw-ink);
  border-color: var(--hiw-sage-strong);
}

.gtrs-hiw-btn--secondary:hover {
  background-color: var(--hiw-surface);
  border-color: var(--hiw-ink);
}

.gtrs-hiw-btn--light {
  background-color: #ffffff;
  color: var(--hiw-ink);
  border-color: #ffffff;
}

.gtrs-hiw-btn--light:hover {
  background-color: var(--hiw-sage-tint);
  border-color: var(--hiw-sage-tint);
}

.gtrs-hiw-btn--outline-light {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.36);
}

.gtrs-hiw-btn--outline-light:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
}

.gtrs-hiw-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--hiw-sage);
}

.gtrs-hiw-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--hiw-ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--hiw-ink);
}

.gtrs-hiw-inline-link:hover {
  color: var(--hiw-ink-muted);
  border-bottom-color: var(--hiw-ink-muted);
}

/* ==========================================================================
   SECTION 2: EDITORIAL HERO
   ========================================================================== */
.gtrs-hiw-hero {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--hiw-sage);
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f5 100%);
}

.gtrs-hiw-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}

.gtrs-hiw-hero__title {
  margin: 0 0 20px;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 680;
  color: var(--hiw-ink);
}

.gtrs-hiw-hero__intro {
  margin: 0 0 28px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.58;
  color: var(--hiw-ink-muted);
  max-width: 600px;
}

.gtrs-hiw-hero__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hiw-sage);
}

.gtrs-hiw-hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gtrs-hiw-hero__meta-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hiw-ink-subtle);
}

.gtrs-hiw-hero__meta-val {
  font-size: 14px;
  font-weight: 650;
  color: var(--hiw-ink);
}

.gtrs-hiw-hero__media {
  margin: 0;
  border: 1px solid var(--hiw-sage);
  background-color: #ffffff;
  padding: 14px;
}

.gtrs-hiw-hero__img-wrap {
  position: relative;
  overflow: hidden;
  background-color: var(--hiw-surface-dark);
  aspect-ratio: 4 / 3;
}

.gtrs-hiw-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gtrs-hiw-hero__caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  font-size: 12px;
  color: var(--hiw-ink-muted);
}

.gtrs-hiw-hero__caption strong {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hiw-ink);
}

/* ==========================================================================
   SECTION 3: PROCESS OVERVIEW (01 - 07)
   ========================================================================== */
.gtrs-hiw-overview {
  padding: 72px 0;
  border-bottom: 1px solid var(--hiw-sage);
  background-color: #ffffff;
}

.gtrs-hiw-overview__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--hiw-sage);
  border-left: 1px solid var(--hiw-sage);
}

.gtrs-hiw-overview__step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 18px;
  border-right: 1px solid var(--hiw-sage);
  border-bottom: 1px solid var(--hiw-sage);
  background-color: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.16s ease;
}

.gtrs-hiw-overview__step:hover {
  background-color: var(--hiw-surface);
}

.gtrs-hiw-overview__num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--hiw-ink-subtle);
  margin-bottom: 14px;
}

.gtrs-hiw-overview__label {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.3;
  color: var(--hiw-ink);
}

.gtrs-hiw-overview__summary {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hiw-ink-muted);
}

.gtrs-hiw-overview__jump {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hiw-ink);
  margin-top: auto;
}

.gtrs-hiw-boundary-bar {
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid var(--hiw-sage);
  border-left: 3px solid var(--hiw-ink);
  background-color: var(--hiw-surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gtrs-hiw-boundary-bar p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hiw-ink);
}

.gtrs-hiw-boundary-bar strong {
  font-weight: 700;
}

/* ==========================================================================
   STAGE SECTIONS (01 - 07)
   ========================================================================== */
.gtrs-hiw-stage {
  padding: 76px 0;
  border-bottom: 1px solid var(--hiw-sage);
}

.gtrs-hiw-stage--alt {
  background-color: var(--hiw-surface);
}

.gtrs-hiw-stage--warm {
  background-color: var(--hiw-surface-warm);
}

.gtrs-hiw-stage__layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.gtrs-hiw-stage__rail {
  padding-top: 4px;
  border-top: 2px solid var(--hiw-ink);
}

.gtrs-hiw-stage__num {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--hiw-ink-subtle);
}

.gtrs-hiw-stage__heading {
  margin: 8px 0 12px;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 660;
  color: var(--hiw-ink);
}

.gtrs-hiw-stage__tag {
  display: inline-block;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background-color: var(--hiw-sage-tint);
  border: 1px solid var(--hiw-sage);
  color: var(--hiw-ink-muted);
}

.gtrs-hiw-stage__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.gtrs-hiw-stage__copy {
  margin: 0;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.6;
  color: var(--hiw-ink);
  max-width: 780px;
}

.gtrs-hiw-stage__subcopy {
  margin: -12px 0 0;
  font-size: 15px;
  line-height: 1.62;
  color: var(--hiw-ink-muted);
  max-width: 760px;
}

/* Cards & Grids inside stages */
.gtrs-hiw-cards-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.gtrs-hiw-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gtrs-hiw-cards-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gtrs-hiw-card {
  padding: 24px;
  background-color: #ffffff;
  border: 1px solid var(--hiw-sage);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gtrs-hiw-card__kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hiw-ink-subtle);
}

.gtrs-hiw-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 660;
  line-height: 1.3;
  color: var(--hiw-ink);
}

.gtrs-hiw-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.58;
  color: var(--hiw-ink-muted);
}

.gtrs-hiw-list {
  margin: 4px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hiw-ink);
}

.gtrs-hiw-list li::marker {
  color: var(--hiw-ink-subtle);
}

/* Media Strips inside stages */
.gtrs-hiw-media-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.gtrs-hiw-media-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gtrs-hiw-figure {
  margin: 0;
  background-color: #ffffff;
  border: 1px solid var(--hiw-sage);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gtrs-hiw-figure__frame {
  position: relative;
  overflow: hidden;
  background-color: var(--hiw-surface-dark);
  aspect-ratio: 4 / 3;
}

.gtrs-hiw-figure__frame--portrait {
  aspect-ratio: 4 / 5;
}

.gtrs-hiw-figure__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gtrs-hiw-figure__caption {
  font-size: 12px;
  line-height: 1.45;
  color: var(--hiw-ink-muted);
}

.gtrs-hiw-figure__caption strong {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hiw-ink);
  margin-bottom: 3px;
}

/* Policy Box (Stage 04 Payment) */
.gtrs-hiw-policy-box {
  background-color: var(--hiw-surface-dark);
  color: #ffffff;
  padding: 32px;
  border: 1px solid var(--hiw-surface-dark-2);
}

.gtrs-hiw-policy-box__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.gtrs-hiw-policy-box__title {
  margin: 0;
  font-size: 18px;
  font-weight: 660;
  color: #ffffff;
}

.gtrs-hiw-policy-box__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #dce2de;
}

.gtrs-hiw-policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gtrs-hiw-policy-item {
  padding: 18px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.gtrs-hiw-policy-item__num {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #9fb0aa;
  margin-bottom: 8px;
}

.gtrs-hiw-policy-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #f3f5f4;
}

/* ==========================================================================
   SECTION 11: FINAL CTA
   ========================================================================== */
.gtrs-hiw-final-cta {
  padding: 80px 0;
  background-color: var(--hiw-surface-dark);
  color: #ffffff;
}

.gtrs-hiw-final-cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: center;
}

.gtrs-hiw-final-cta__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9fb0aa;
  margin-bottom: 12px;
}

.gtrs-hiw-final-cta__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 660;
  color: #ffffff;
}

.gtrs-hiw-final-cta__desc {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: #c7d0cd;
  max-width: 620px;
}

.gtrs-hiw-final-cta__routes {
  padding: 26px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gtrs-hiw-final-cta__routes-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9fb0aa;
}

.gtrs-hiw-final-cta__route-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.gtrs-hiw-final-cta__route-link:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.gtrs-hiw-final-cta__route-link:hover {
  color: #dce2de;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (1440 / 768 / 390)
   ========================================================================== */
@media (max-width: 1180px) {
  .gtrs-hiw-overview__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .gtrs-hiw-stage__layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
  }
  .gtrs-hiw-cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .gtrs-hiw-container {
    padding: 0 24px;
  }
  .gtrs-hiw-section-head,
  .gtrs-hiw-hero__grid,
  .gtrs-hiw-stage__layout,
  .gtrs-hiw-final-cta__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .gtrs-hiw-overview__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gtrs-hiw-cards-3,
  .gtrs-hiw-policy-grid,
  .gtrs-hiw-media-trio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .gtrs-hiw-container {
    padding: 0 18px;
  }
  .gtrs-hiw-hero {
    padding: 36px 0 44px;
  }
  .gtrs-hiw-overview,
  .gtrs-hiw-stage,
  .gtrs-hiw-final-cta {
    padding: 52px 0;
  }
  .gtrs-hiw-hero__meta,
  .gtrs-hiw-overview__grid,
  .gtrs-hiw-cards-2,
  .gtrs-hiw-cards-3,
  .gtrs-hiw-cards-4,
  .gtrs-hiw-policy-grid,
  .gtrs-hiw-media-pair,
  .gtrs-hiw-media-trio {
    grid-template-columns: minmax(0, 1fr);
  }
  .gtrs-hiw-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .gtrs-hiw-btn {
    width: 100%;
  }
  .gtrs-hiw-policy-box {
    padding: 22px 18px;
  }
}
