/* Home: "Why Choose Us" scroll-stacked cards (prefix: hw-). */
.hw-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(25, 151, 194, .14);
  color: #bfeeff;
  font: 500 13px/1 "Poppins", sans-serif;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.hw-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35c8f5;
  box-shadow: 0 0 0 0 rgba(53, 200, 245, .6);
  animation: hw-ping 2s ease-out infinite;
}

.hw-pill--light {
  border-color: rgba(25, 151, 194, .28);
  background: rgba(25, 151, 194, .09);
  color: #0f6f93;
}

@keyframes hw-ping {
  70%, 100% { box-shadow: 0 0 0 10px rgba(53, 200, 245, 0); }
}
@keyframes hw-float {
  50% { transform: translateY(-12px); }
}

/* ---------- Section 2: why choose us (scroll-stacked cards) ---------- */
.hw-why {
  position: relative;
  background:
    radial-gradient(700px 420px at 8% 12%, rgba(25, 151, 194, .13), transparent 70%),
    radial-gradient(600px 400px at 95% 80%, rgba(25, 151, 194, .1), transparent 70%),
    #fff;
}

.hw-why__track {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  column-gap: clamp(32px, 5vw, 90px);
  width: min(1520px, calc(100% - 64px));
  margin-inline: auto;
  padding: 90px 0;
}

.hw-why__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: center;
}

.hw-why__stage {
  display: flex;
  align-items: center;
}

.hw-why__cards { width: 100%; }

.hw-why__intro h2 {
  margin: 22px 0 0;
  color: var(--ink);
  font: 600 clamp(28px, 2.7vw, 42px)/1.12 "Poppins", sans-serif;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.hw-why__intro h2 span { color: var(--blue); }

.hw-why__intro > p {
  max-width: 540px;
  margin: 20px 0 0;
  color: var(--muted);
  font: 400 16px/1.7 "Poppins", sans-serif;
}

.hw-why__nav {
  display: grid;
  gap: 6px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.hw-why__nav button {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: none;
  color: rgba(29, 29, 29, .38);
  font: 600 19px/1.3 "Poppins", sans-serif;
  text-align: left;
  cursor: pointer;
  transition: color .35s ease, transform .35s ease;
}

.hw-why__nav button span {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}

.hw-why__nav button:hover { color: rgba(29, 29, 29, .7); }
.hw-why__nav button.is-active { color: var(--ink); transform: translateX(8px); }
.hw-why__nav button.is-active span { border-color: var(--blue); background: var(--blue); color: #fff; }

.hw-why__bar {
  width: 100%;
  max-width: 320px;
  height: 4px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(29, 29, 29, .09);
}

.hw-why__bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1997c2, #35c8f5);
  transform: scaleX(var(--p, .34));
  transform-origin: left;
}

/* Cards */
.hw-why__cards {
  display: grid;
  gap: 24px;
}

.hw-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  min-height: 460px;
  padding: clamp(24px, 2.6vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 28px;
  box-shadow: 0 40px 80px -30px rgba(0, 10, 32, .55);
  color: #fff;
}

.hw-card--navy { background: radial-gradient(120% 90% at 100% 0%, #06477a 0%, transparent 60%), linear-gradient(145deg, #000a20, #021e3b); }
.hw-card--blue { background: radial-gradient(120% 90% at 100% 0%, #54d0f5 0%, transparent 60%), linear-gradient(145deg, #1997c2, #0b6182); }
.hw-card--slate { background: radial-gradient(120% 90% at 100% 0%, #3a5a85 0%, transparent 60%), linear-gradient(145deg, #162133, #26354d); }

.hw-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: #000a20;
  opacity: var(--dim, 0);
  pointer-events: none;
}

.hw-card__body { position: relative; z-index: 1; }

.hw-card__num {
  position: absolute;
  top: -22px;
  right: 0;
  color: rgba(255, 255, 255, .09);
  font: 700 clamp(90px, 9vw, 150px)/1 "Poppins", sans-serif;
  letter-spacing: -.06em;
  pointer-events: none;
}

.hw-card__icon {
  position: relative;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hw-card__icon svg { width: 28px; height: 28px; }

.hw-card h3 {
  position: relative;
  margin: 26px 0 0;
  color: #fff;
  font: 600 clamp(26px, 2.5vw, 38px)/1.15 "Poppins", sans-serif;
  letter-spacing: -.03em;
}

.hw-card p {
  position: relative;
  max-width: 480px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .8);
  font: 400 17px/1.7 "Poppins", sans-serif;
}

.hw-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.hw-card__tags li {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font: 500 13px/1 "Poppins", sans-serif;
}

.hw-card__visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* Card images: fill the column, never taller than the card allows, keep their proportions. */
.hw-card__visual img {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  max-height: min(430px, 56vh);
  object-fit: contain;
  animation: hw-float 6s ease-in-out infinite;
}

/* Enhanced (JS) scroll-stack mode: tall track, pinned intro + pinned stage, overlapping cards. */
.hw-why.is-enhanced .hw-why__track { padding: 0; }

.hw-why.is-enhanced .hw-why__intro {
  position: sticky;
  top: 0;
  align-self: start;
  justify-content: center;
  height: 100vh;
  height: 100svh;
}

.hw-why.is-enhanced .hw-why__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: clip;
}

.hw-why.is-enhanced .hw-why__cards {
  position: relative;
  display: block;
  height: min(500px, 74vh);
}

.hw-why.is-enhanced .hw-card {
  position: absolute;
  inset: 0;
  min-height: 0;
  will-change: transform;
  backface-visibility: hidden;
}

.hw-why.is-enhanced .hw-card:nth-child(1) { z-index: 1; }
.hw-why.is-enhanced .hw-card:nth-child(2) { z-index: 2; }
.hw-why.is-enhanced .hw-card:nth-child(3) { z-index: 3; }

/* Tablet and below: single column, intro scrolls normally, only the cards pin. */
@media (max-width: 1199.98px) {
  .hw-why__track { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .hw-why__intro { padding-bottom: 32px; }
  .hw-why__intro > p { max-width: 680px; }
  .hw-why__nav, .hw-why__bar { display: none; }
  .hw-why__intro h2 { font-size: clamp(26px, 5vw, 40px); }
  .hw-why.is-enhanced .hw-why__intro { position: static; height: auto; padding: 64px 0 28px; }
  .hw-why.is-enhanced .hw-why__stage {
    top: max(12px, calc((100svh - var(--hw-cards-h, 480px)) / 2));
    height: auto;
    overflow: visible;
    overflow-x: clip;
  }
  .hw-why.is-enhanced .hw-why__cards { height: var(--hw-cards-h, min(540px, 74vh)); }
  .hw-card__visual img { max-height: min(400px, 52vh); }
}

/* Phones: stacked card layout with the image under the text. */
@media (max-width: 767.98px) {
  .hw-why__track { width: calc(100% - 30px); padding: 56px 0; }
  .hw-why.is-enhanced .hw-why__intro { padding: 48px 0 20px; }
  .hw-why__intro > p { font-size: 15px; }
  .hw-card { grid-template-columns: 1fr; min-height: 0; padding: 24px 20px; border-radius: 22px; gap: 10px; }
  .hw-card__visual img { width: auto; max-width: 100%; max-height: clamp(150px, 30vh, 300px); margin-inline: auto; }
  .hw-card__icon { width: 46px; height: 46px; border-radius: 14px; }
  .hw-card__icon svg { width: 24px; height: 24px; }
  .hw-card h3 { margin-top: 14px; font-size: 23px; }
  .hw-card p { margin-top: 10px; font-size: 15px; line-height: 1.55; }
  .hw-card__tags { margin-top: 14px; gap: 8px; }
  .hw-card__tags li { padding: 7px 12px; font-size: 12px; }
  .hw-card__num { top: -4px; font-size: 76px; }
  .hw-why.is-enhanced .hw-card { align-content: center; }
}

@media (max-width: 380px) {
  .hw-card { padding: 20px 16px; }
  .hw-card h3 { font-size: 21px; }
  .hw-card p { font-size: 14px; }
  .hw-why__intro h2 { font-size: 24px; }
}

/* Short viewports (small laptops, landscape phones/tablets): trim extras so everything still fits. */
@media (min-width: 1200px) and (max-height: 780px) {
  .hw-why__nav, .hw-why__bar { display: none; }
  .hw-why__intro > p { font-size: 15px; }
  .hw-card__visual img { max-height: 46vh; }
  .hw-card h3 { margin-top: 18px; }
}

@media (max-width: 1199.98px) and (max-height: 640px) {
  .hw-card__num, .hw-card__tags { display: none; }
  .hw-card__icon { width: 44px; height: 44px; }
  .hw-card h3 { margin-top: 12px; font-size: 22px; }
  .hw-card p { font-size: 14px; }
  .hw-card__visual img { max-height: 40vh; }
}

@media (prefers-reduced-motion: reduce) {
  .hw-why *, .hw-why *::before, .hw-why *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Sticky needs body not to be a scroll container; clip avoids that. Scoped to pages using this section. */
html:has(.hw-why) body {
  overflow-x: clip;
}

/* JS measuring pass: lay the cards out in normal flow to read each card's natural height. */
.hw-why.is-measuring .hw-why__cards { height: auto !important; }
.hw-why.is-measuring .hw-card {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  visibility: visible !important;
}
