/* ============ HOW IT WORKS PAGE ============ */
.hw-section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.hw-tag {
  font-family: var(--font-body);
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}

.hw-h2 {
  font-family: var(--font-display);
  font-size: var(--fs-44);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.hw-h2 .hl,
.hw-h2 span { color: var(--primary); }
.hw-h2 .hl-muted { color: var(--text-muted); }

.hw-lead {
  color: var(--text-muted);
  font-size: var(--fs-18);
  line-height: 1.6;
  max-width: 560px;
  margin-top: var(--s-4);
}

/* ---------- HERO ---------- */
.hw-hero {
  background:
    linear-gradient(180deg, var(--primary-soft) 0%, #fff 100%);
  padding: var(--s-9) var(--s-7) var(--s-8);
  text-align: center;
}

.hw-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.hw-hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-56);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin-bottom: var(--s-4);
}

.hw-hero-title span { color: var(--primary); }

.hw-hero-desc {
  color: var(--text-muted);
  font-size: var(--fs-18);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto var(--s-7);
}

.hw-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5) var(--s-6);
  box-shadow: var(--shadow-sm);
}

.hw-hero-stat { text-align: center; }
.hw-hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-32);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.hw-hero-stat span {
  font-size: var(--fs-12);
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- PROBLEM ---------- */
.hw-problem {
  padding: var(--s-9) var(--s-7);
  background: #fff;
}

.hw-problem-head { text-align: center; margin-bottom: var(--s-7); }
.hw-problem-head .hw-lead { margin: var(--s-4) auto 0; text-align: center; }

.hw-problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}

.hw-problem-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  transition: border-color 0.2s, transform 0.2s;
}
.hw-problem-card:hover { border-color: rgba(26,164,232,0.4); transform: translateY(-2px); }

.hw-problem-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-4);
}

.hw-problem-card h3 {
  font-family: var(--font-display);
  font-size: var(--fs-18);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.hw-problem-card p {
  color: var(--text-muted);
  font-size: var(--fs-14);
  line-height: 1.55;
}

/* ---------- STEPS ---------- */
.hw-steps {
  padding: var(--s-9) var(--s-7);
  background: var(--surface-soft);
}

.hw-steps-head { text-align: center; margin-bottom: var(--s-8); }
.hw-steps-head .hw-lead { margin: var(--s-4) auto 0; text-align: center; }

.hw-steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
}

.hw-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: center;
}

.hw-step-reverse .hw-step-media { order: 2; }

.hw-step-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-md);
}

.hw-step-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hw-step-diagram {
  background: var(--primary-soft);
  box-shadow: none;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hw-step-diagram svg { width: 100%; height: 100%; }

.hw-step-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.hw-step-body h3 {
  font-family: var(--font-display);
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: var(--s-3);
}

.hw-step-body p {
  color: var(--text-muted);
  font-size: var(--fs-16);
  line-height: 1.65;
}

/* ---------- MINERALS ---------- */
.hw-minerals {
  padding: var(--s-9) var(--s-7);
  background: #fff;
}

.hw-minerals-head { text-align: center; margin-bottom: var(--s-7); }
.hw-minerals-head .hw-lead { margin: var(--s-4) auto 0; text-align: center; }

.hw-minerals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.hw-mineral {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-6);
  text-align: center;
}

.hw-mineral-sym {
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--m) 14%, #fff);
  color: var(--m);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s-4);
  border: 1.5px solid color-mix(in srgb, var(--m) 35%, #fff);
}

.hw-mineral h3 {
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hw-mineral-role {
  color: var(--primary);
  font-weight: 600;
  font-size: var(--fs-12);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 4px 0 var(--s-3);
}

.hw-mineral p:last-child {
  color: var(--text-muted);
  font-size: var(--fs-14);
  line-height: 1.6;
}

/* ---------- COMPARE TABLE ---------- */
.hw-compare {
  padding: var(--s-9) var(--s-7);
  background: var(--surface-soft);
}

.hw-compare-head { text-align: center; margin-bottom: var(--s-7); }

.hw-table {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.hw-table-head,
.hw-tr {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.hw-table-head {
  border-bottom: 1px solid var(--border);
}

.hw-th, .hw-th-label {
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--fs-14);
}

.hw-th-ionsx {
  background: var(--primary-soft);
}
.hw-th-ionsx img { height: 22px; }

.hw-th-other { color: var(--text-muted); }

.hw-tr {
  border-bottom: 1px solid var(--border);
}
.hw-tr:last-child { border-bottom: none; }

.hw-td-label {
  padding: var(--s-4) var(--s-5);
  font-weight: 600;
  color: var(--text);
  font-size: var(--fs-14);
  display: flex;
  align-items: center;
}

.hw-td {
  padding: var(--s-4) var(--s-5);
  font-size: var(--fs-14);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hw-td-label ~ .hw-td.hw-good {
  background: rgba(26,164,232,0.05);
}

.hw-good {
  color: var(--text);
  font-weight: 600;
}
.hw-good::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'><polyline points='20 6 9 17 4 12'/></svg>") center / 12px no-repeat;
}

.hw-bad {
  color: var(--text-muted);
}
.hw-bad::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #E4ECF4 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B8AAF' stroke-width='3.5'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>") center / 11px no-repeat;
}

/* ---------- INNOVATION ---------- */
.hw-innovation {
  padding: var(--s-9) var(--s-7);
  background: #fff;
}

.hw-innovation-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s-8);
  align-items: center;
}

.hw-innovation-text em { color: var(--primary); font-style: italic; }

.hw-innovation-list {
  list-style: none;
  margin: var(--s-6) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.hw-innovation-list li {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}

.hw-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.hw-innovation-list li div {
  color: var(--text-muted);
  font-size: var(--fs-14);
  line-height: 1.6;
}
.hw-innovation-list strong { color: var(--text); font-weight: 700; }

/* Core card */
.hw-core-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--s-5);
  align-items: center;
}

.hw-core-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hw-core-labels {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.hw-core-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.hw-core-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.hw-core-label strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: var(--fs-14);
}
.hw-core-label span {
  color: var(--text-muted);
  font-size: var(--fs-12);
}

/* ---------- CTA ---------- */
.hw-cta {
  padding: var(--s-9) var(--s-7);
  background:
    linear-gradient(135deg, rgba(26,164,232,0.92), rgba(14,120,181,0.95)),
    url('background1.png') center/cover no-repeat;
  text-align: center;
}

.hw-cta-inner { max-width: 640px; margin: 0 auto; }

.hw-cta-title {
  font-family: var(--font-display);
  font-size: var(--fs-44);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: var(--s-3);
}

.hw-cta-desc {
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-18);
  margin-bottom: var(--s-6);
}

.hw-cta-actions {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
}

.hw-cta .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.hw-cta .btn-primary:hover {
  background: rgba(255,255,255,0.9);
  color: var(--primary);
}

.hw-cta-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.hw-cta-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hw-problem-grid { grid-template-columns: repeat(2, 1fr); }
  .hw-minerals-grid { grid-template-columns: 1fr; }
  .hw-step, .hw-innovation-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hw-step-reverse .hw-step-media { order: 0; }
  .hw-hero-stats { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}
