/* ============================================================
   how-it-works.css
   Scoped to .hiw-* classes — relies on global styles for:
   .container, .section, .btn, .btn-primary, .btn-outline,
   .accent, .section-header, .section-tag, .section-title,
   .section-sub, .animate-on-scroll
   ============================================================ */

/* ---- CSS tokens (mirrors project palette) ---- */
:root {
  --hiw-orange: #F5A623;
  --hiw-orange-dark: #E0921A;
  --hiw-orange-pale: #FFF4E0;
  --hiw-dark: #1A1A2E;
  --hiw-mid: #5A5A7A;
  --hiw-light-bg: #F8F9FB;
  --hiw-border: #E8E8F0;
  --hiw-radius: 16px;
  --hiw-shadow-sm: 0 2px 12px rgba(0, 0, 0, .07);
  --hiw-shadow-md: 0 8px 32px rgba(0, 0, 0, .11);
  --hiw-shadow-hover: 0 18px 48px rgba(245, 166, 35, .18);
  --hiw-transition: .3s cubic-bezier(.4, 0, .2, 1);
}

/* ============================================================
   HERO
   ============================================================ */
.hiw-hero {
  position: relative;
  background: linear-gradient(135deg, var(--hiw-dark) 0%, #2E2E50 60%, #1A1A2E 100%);
  padding: 90px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hiw-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Decorative rings */
.hiw-hero-bg::before,
.hiw-hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 55px solid rgba(245, 166, 35, .07);
}

.hiw-hero-bg::before {
  width: 420px;
  height: 420px;
  top: -130px;
  left: -130px;
}

.hiw-hero-bg::after {
  width: 300px;
  height: 300px;
  bottom: -80px;
  right: -80px;
}

.hiw-hero-content {
  position: relative;
  z-index: 1;
}

.hiw-hero-tag {
  display: inline-block;
  background: rgba(245, 166, 35, .15);
  color: var(--hiw-orange);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 7px 20px;
  border-radius: 50px;
  border: 1.5px solid rgba(245, 166, 35, .3);
  margin-bottom: 1.2rem;
}

.hiw-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hiw-hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, .65);
  max-width: 500px;
  margin: 0 auto 2.2rem;
}

.hiw-hero-cta {
  font-size: 1rem;
  padding: 14px 38px;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(245, 166, 35, .38);
  transition: transform var(--hiw-transition), box-shadow var(--hiw-transition);
}

.hiw-hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(245, 166, 35, .45);
}

/* ============================================================
   STEPS SECTION
   ============================================================ */
.hiw-steps-section {
  background: var(--hiw-light-bg);
}

/* Track holds both the connector line and the grid */
.hiw-steps-track {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

/* Horizontal connector line — desktop only */
.hiw-steps-line {
  display: none;
  /* shown via media query below */
  position: absolute;
  top: 68px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 3px;
  background: linear-gradient(90deg, var(--hiw-orange), var(--hiw-orange-pale));
  border-radius: 2px;
  z-index: 0;
}

.hiw-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* ---- Step Card ---- */
.hiw-step-card {
  background: #fff;
  border-radius: var(--hiw-radius);
  padding: 32px 22px 28px;
  border: 1.5px solid var(--hiw-border);
  box-shadow: var(--hiw-shadow-sm);
  text-align: center;
  transition: transform var(--hiw-transition), box-shadow var(--hiw-transition), border-color var(--hiw-transition);
}

.hiw-step-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--hiw-shadow-hover);
  border-color: var(--hiw-orange);
}

/* Featured / highlighted card */
.hiw-step-featured {
  background: var(--hiw-dark);
  border-color: var(--hiw-orange);
  box-shadow: var(--hiw-shadow-md);
}

.hiw-step-featured .hiw-step-title {
  color: #fff;
}

.hiw-step-featured .hiw-step-desc {
  color: rgba(255, 255, 255, .6);
}

/* Step number badge */
.hiw-step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--hiw-orange);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 4px 16px rgba(245, 166, 35, .4);
}

/* Icon circle */
.hiw-step-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  transition: transform var(--hiw-transition);
}

.hiw-step-card:hover .hiw-step-icon {
  transform: scale(1.08);
}

.hiw-icon-green {
  background: #e6f8f2;
}

.hiw-icon-orange {
  background: var(--hiw-orange-pale);
}

.hiw-icon-teal {
  background: #e8f1ff;
}

.hiw-icon-red {
  background: #fdecea;
}

.hiw-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hiw-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hiw-step-desc {
  font-size: .88rem;
  color: var(--hiw-mid);
  line-height: 1.6;
}

/* ============================================================
   TRUST STRIP  (mirrors .cities-trust-strip)
   ============================================================ */
.hiw-trust-strip {
  background: #fff;
  border-top: 1.5px solid var(--hiw-border);
  border-bottom: 1.5px solid var(--hiw-border);
  padding: 36px 0;
}

.hiw-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hiw-trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hiw-trust-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.hiw-trust-item strong {
  display: block;
  font-size: .95rem;
  color: var(--hiw-dark);
  margin-bottom: 2px;
}

.hiw-trust-item p {
  font-size: .82rem;
  color: var(--hiw-mid);
  margin: 0;
}

/* ============================================================
   APP DOWNLOAD SECTION
   ============================================================ */
.hiw-app-section {
  background: var(--hiw-light-bg);
}

.hiw-app-inner {
  display: flex;
  align-items: center;
  gap: 64px;
  background: linear-gradient(135deg, var(--hiw-dark) 0%, #2C2C4E 100%);
  border-radius: 24px;
  padding: 56px 52px;
  overflow: hidden;
  position: relative;
}

/* Decorative ring */
.hiw-app-inner::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border: 60px solid rgba(245, 166, 35, .06);
  border-radius: 50%;
  right: -140px;
  top: -140px;
  pointer-events: none;
}

/* ---- Phone mockup ---- */
.hiw-phone-wrap {
  flex-shrink: 0;
}

.hiw-phone-frame {
  width: 190px;
  height: 360px;
  border-radius: 34px;
  border: 2.5px solid rgba(255, 255, 255, .12);
  background: linear-gradient(160deg, #2C2C4E, #1A1A2E);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4), 0 0 0 6px rgba(245, 166, 35, .1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  position: relative;
}

.hiw-phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 8px;
  background: rgba(255, 255, 255, .1);
  border-radius: 6px;
}

.hiw-phone-screen {
  text-align: center;
}

.hiw-phone-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  margin: 10px 0 4px;
}

.hiw-phone-logo span {
  color: var(--hiw-orange);
}

.hiw-phone-sub {
  font-size: .65rem;
  color: rgba(255, 255, 255, .45);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ---- App text ---- */
.hiw-app-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Override section-title alignment for this block */
.hiw-app-text .section-title {
  color: #fff;
}

.hiw-app-text .section-sub {
  color: rgba(255, 255, 255, .62);
}

/* ---- Store buttons ---- */
.hiw-store-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hiw-store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: var(--hiw-dark);
  border-radius: 12px;
  padding: 13px 22px;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, .15);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  transition: transform var(--hiw-transition), box-shadow var(--hiw-transition), background var(--hiw-transition);
}

.hiw-store-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  background: var(--hiw-orange-pale);
}

.hiw-store-label {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.hiw-store-label small {
  font-size: .63rem;
  color: var(--hiw-mid);
  letter-spacing: .04em;
}

.hiw-store-label strong {
  font-size: .88rem;
  color: var(--hiw-dark);
}

/* ============================================================
   CTA  (mirrors .cities-cta-inner)
   ============================================================ */
.hiw-cta-section {
  background: var(--hiw-light-bg);
}

.hiw-cta-inner {
  background: #fff;
  border: 1.5px solid var(--hiw-border);
  border-radius: 20px;
  padding: 52px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--hiw-shadow-sm);
}

.hiw-cta-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--hiw-dark);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .4rem;
}

.hiw-cta-text p {
  color: var(--hiw-mid);
  font-size: .97rem;
}

.hiw-cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 900px) {
  .hiw-steps-line {
    display: block;
  }
}

@media (max-width: 1024px) {
  .hiw-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hiw-steps-line {
    display: none;
  }

  .hiw-trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hiw-app-inner {
    gap: 40px;
    padding: 48px 36px;
  }
}

@media (max-width: 680px) {
  .hiw-steps-grid {
    grid-template-columns: 1fr;
  }

  .hiw-trust-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hiw-app-inner {
    flex-direction: column;
    text-align: center;
    padding: 36px 24px;
  }

  .hiw-app-text .section-title,
  .hiw-app-text .section-sub {
    text-align: center !important;
  }

  .hiw-store-buttons {
    justify-content: center;
  }

  .hiw-phone-wrap {
    order: -1;
  }

  .hiw-cta-inner {
    flex-direction: column;
    text-align: center;
    padding: 40px 24px;
  }

  .hiw-cta-actions {
    justify-content: center;
  }
}