/* How It Works page — enhanced to match mockup */

/* --- Page hero --- */
.hiw-hero {
  padding-block: var(--space-3xl) var(--space-4xl);
  background: var(--color-white);
}

.hiw-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hiw-hero__label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.hiw-hero__title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hiw-hero__title-navy,
.hiw-hero__title-accent {
  display: block;
}

.hiw-hero__title-navy {
  color: var(--color-navy);
}

.hiw-hero__title-accent {
  color: var(--color-primary);
}

.hiw-hero__body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 34rem;
}

.hiw-hero__visual {
  margin: 0;
}

.hiw-hero__snapshot {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-white);
}

.hiw-hero__image {
  display: block;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  vertical-align: middle;
}

.hiw-hero__ui {
  position: absolute;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 2;
  max-width: 52%;
  pointer-events: none;
  user-select: none;
}

.hiw-hero__card {
  min-width: 210px;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 26, 63, 0.22);
  border: 1px solid rgba(216, 222, 232, 0.9);
}

.hiw-hero__card-heading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.hiw-hero__profile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.hiw-hero__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.hiw-hero__profile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hiw-hero__card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.2;
}

.hiw-hero__card-meta {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.hiw-hero__stats-block {
  margin-bottom: var(--space-md);
  padding-block: var(--space-sm);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.hiw-hero__stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 0.3rem;
}

.hiw-hero__stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.hiw-hero__stat-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-navy);
}

.hiw-hero__badge {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  background: #fde8ec;
  color: #c62828;
  margin-bottom: var(--space-sm);
}

.hiw-hero__card-cta {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  line-height: 1.2;
  cursor: default;
}

/* --- Steps intro --- */
.hiw-steps-intro {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.hiw-steps-intro__title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
}

.hiw-steps-intro__subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Step cards --- */
.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1060px;
  margin-inline: auto;
}

.hiw-step-arrow {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) 0;
  color: var(--color-border);
}

.hiw-step-arrow svg {
  width: 24px;
  height: 24px;
}

.step-card {
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 45%);
  gap: var(--space-xl) var(--space-2xl);
  align-items: center;
  padding: var(--space-xl) var(--space-2xl);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 12px rgba(0,26,63,0.06);
}

.step-card__lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.step-card__number {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 900;
  font-size: 1.05rem;
  border-radius: 50%;
}

.step-card__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card__icon {
  width: 80px;
  height: 80px;
}

.step-card__content h3 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
}

.step-card__leadline {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.step-card__content p:not(.step-card__leadline) {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.step-card__graphic {
  min-width: 0;
}

/* ============================================
   GRAPHIC: POS logos
   ============================================ */
.graphic-pos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.graphic-pos__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

.graphic-pos__logo--toast { color: #ff4500; }
.graphic-pos__logo--lightspeed { color: #ff3d00; }
.graphic-pos__logo--square { color: #1a1a1a; }
.graphic-pos__logo--clover { color: #2e7d32; }
.graphic-pos__logo--more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ============================================
   GRAPHIC: Customer Activity (Step 2)
   ============================================ */
.graphic-activity-v2 {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.gact-header {
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-muted);
  border-bottom: 1px solid var(--color-border);
}

.gact-profile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.gact-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
}

.gact-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0 0 2px;
}

.gact-meta {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin: 0;
}

.gact-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-navy);
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-white);
}

.gact-rows {
  padding: var(--space-xs) 0;
}

.gact-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.45rem var(--space-lg);
  border-bottom: 1px solid rgba(216,222,232,0.5);
  font-size: 0.78rem;
}

.gact-row:last-child { border-bottom: none; }

.gact-icon { flex-shrink: 0; }

.gact-label {
  flex: 1;
  color: var(--color-text-muted);
  font-weight: 500;
}

.gact-value {
  font-weight: 700;
  color: var(--color-navy);
}

/* ============================================
   GRAPHIC: Live Audiences (Step 3)
   ============================================ */
.graphic-audiences-v2 {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.gaud-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.gaud-avatars {
  display: flex;
  flex-shrink: 0;
}

.gaud-info {
  min-width: 0;
}

.gaud-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0 0 1px;
}

.gaud-sub {
  font-size: 0.67rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin: 0 0 2px;
}

.gaud-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

/* ============================================
   GRAPHIC: Campaigns (Step 4)
   ============================================ */
.graphic-campaigns-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
}

/* Email */
.gcam-email {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(160deg, #1a1a2e 0%, #2d2d50 100%);
  box-shadow: var(--shadow-md);
}

.gcam-email-body {
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.gcam-email-title {
  font-size: 1rem;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-xs);
}

.gcam-email-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
  margin: 0 0 4px;
}

.gcam-email-code {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  margin: 0 0 var(--space-sm);
}

.gcam-email-code strong {
  color: #fff;
  letter-spacing: 0.05em;
}

.gcam-email-btn {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: default;
}

/* SMS bubble */
.gcam-sms {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  box-shadow: var(--shadow-sm);
}

.gcam-sms-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.gcam-sms-avatar {
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.gcam-sms-from {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0;
}

.gcam-sms-time {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  margin: 0;
}

.gcam-sms-bubble {
  background: var(--color-bg-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: var(--space-sm);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-text);
}

.gcam-sms-bubble p { margin: 0; }

/* ============================================
   GRAPHIC: Performance (Step 5)
   ============================================ */
.graphic-performance-v2 {
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.gperf-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 var(--space-md);
}

.gperf-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-md);
}

.gperf-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gperf-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.gperf-value {
  font-size: 1rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1;
}

.gperf-chart-wrap {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
}

.gperf-chart {
  width: 100%;
  height: 70px;
  display: block;
}

/* ============================================
   CTA Section
   ============================================ */
.hiw-cta {
  background: var(--color-navy-dark);
  padding: var(--space-4xl) 0;
  color: var(--color-white);
}

.hiw-cta__grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hiw-cta__cartoon {
  display: flex;
  justify-content: center;
}

.hiw-cta__dog {
  max-width: 240px;
  width: 100%;
  height: auto;
}

.hiw-cta__center {
  text-align: center;
}

.hiw-cta__title {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: var(--space-xl);
  color: var(--color-white);
}

.hiw-cta .text-highlight {
  color: #6b9fff;
}

.hiw-cta__btns {
  justify-content: center;
}

.hiw-cta__storefront {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hiw-cta__storefront svg {
  width: min(100%, 180px);
  height: auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .step-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .step-card__graphic {
    grid-column: 1 / -1;
  }

  .graphic-campaigns-v2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hiw-hero__grid {
    grid-template-columns: 1fr;
  }

  .hiw-hero__visual {
    order: -1;
  }

  .hiw-hero__ui {
    max-width: 52%;
  }

  .hiw-hero__title {
    font-size: clamp(2rem, 6vw, 2.8rem);
  }

  .step-card {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
    text-align: center;
  }

  .step-card__lead {
    align-items: center;
  }

  .hiw-cta__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hiw-cta__cartoon {
    order: 0;
  }
  .hiw-cta__center {
    order: 1;
  }
  .hiw-cta__storefront {
    order: 2;
  }

  .gact-row {
    padding-inline: var(--space-md);
  }
}

@media (max-width: 480px) {
  .hiw-hero__ui {
    max-width: 55%;
  }

  .graphic-audiences-v2 {
    gap: var(--space-xs);
  }

  .gperf-metrics {
    gap: var(--space-xs) var(--space-md);
  }
}
