/* ================================================================
   WHO IT'S FOR — "The Interactive Accordion"
   Five tall glass pillars sit side-by-side. In the closed state,
   only a glowing icon is visible in each narrow column.
   On hover, the targeted pillar smoothly expands to reveal the text
   while all others compress — pure CSS flex mechanics, no JS needed.
================================================================ */

/* ── Section shell ──────────────────────────────────────────── */
.hs-wif {
  padding-block: var(--hs-section-pad-y-lg);
  /* Clinical Frost: Soft light environment */
  background: linear-gradient(
    180deg,
    #F8FAFC 0%,
    #E0F2FE 100%
  );
}

/* ── Header ─────────────────────────────────────────────────── */
.hs-wif__header {
  text-align: center;
  max-width: var(--hs-container-sm);
  margin-inline: auto;
  padding-inline: var(--hs-container-pad-x);
  margin-bottom: var(--hs-space-16);
}

.hs-wif__eyebrow {
  display: block;
  width: fit-content;
  margin-inline: auto;
  color: var(--hs-color-text-accent);
  letter-spacing: var(--hs-tracking-wider);
  margin-bottom: var(--hs-space-4);
}

.hs-wif__headline {
  font-family: var(--hs-font-display);
  font-size: var(--hs-text-section-h);
  font-weight: var(--hs-font-extrabold);
  line-height: var(--hs-leading-heading);
  letter-spacing: var(--hs-tracking-tight);
  color: var(--hs-color-text-brand);
}

/* ── Accordion container ─────────────────────────────────────── */
.hs-wif__accordion {
  display: flex;
  gap: var(--hs-space-2);
  height: 280px;
  padding-inline: var(--hs-container-pad-x);
  max-width: var(--hs-container-xl, 1440px);
  margin-inline: auto;
}

/* ── Panoramic image strip ───────────────────────────────────── */
.hs-wif__image-strip {
  max-width: calc(var(--hs-container-xl, 1440px) - (2 * var(--hs-container-pad-x)));
  margin-inline: auto;
  margin-top: var(--hs-space-2);
  height: 360px;
  border-radius: var(--hs-radius-2xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  width: calc(100% - (2 * var(--hs-container-pad-x)));
}

.hs-wif__image-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Individual glass pillar ─────────────────────────────────── */
.hs-wif__pillar {
  /*
   * Phase 2: Flex mechanics.
   * Closed: flex 1 (equal narrow slivers).
   * Hovered: flex 5 (dominant, wide panel).
   * All siblings of hovered: flex 1 (compress equally).
   *
   * cubic-bezier gives that "heavy glass sliding door" feel.
   */
  flex: 1;
  transition:
    flex 0.65s cubic-bezier(0.25, 1, 0.5, 1),
    background 0.45s ease,
    box-shadow 0.45s ease;

  /* Glass surface (Light Theme) */
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--hs-radius-2xl);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 1) inset,
    0 8px 32px rgba(10, 31, 68, 0.06);

  /* Layout: stack icon + content vertically, centred by default */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--hs-space-6);
  overflow: hidden;
  cursor: pointer;
  position: relative;

  /* Edge-light gradient */
  isolation: isolate;
}

/* Inner edge highlight */
.hs-wif__pillar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.3) 30%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

/* ── Pillar hover state ──────────────────────────────────────── */
.hs-wif__accordion:hover .hs-wif__pillar:hover {
  flex: 5;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 1px rgba(43, 197, 241, 0.3) inset,
    0 0 40px rgba(43, 197, 241, 0.15),
    0 12px 48px rgba(10, 31, 68, 0.12);
}

.hs-wif__accordion:hover .hs-wif__pillar:hover::before {
  opacity: 1;
}

/* Compress un-hovered siblings */
.hs-wif__accordion:hover .hs-wif__pillar:not(:hover) {
  flex: 1;
}

/* ── Icon ────────────────────────────────────────────────────── */
.hs-wif__pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hs-space-14);
  height: var(--hs-space-14);
  flex-shrink: 0;

  background: rgba(43, 197, 241, 0.15);
  border: 1px solid rgba(43, 197, 241, 0.30);
  border-radius: var(--hs-radius-xl);
  padding: var(--hs-space-3);

  color: var(--hs-color-text-brand);
  transition:
    transform 0.55s cubic-bezier(0.25, 1, 0.5, 1),
    background 0.45s ease,
    box-shadow 0.45s ease;
}

/* On hover: icon shifts upward to open space for expanded content */
.hs-wif__pillar:hover .hs-wif__pillar-icon {
  background: rgba(43, 197, 241, 0.28);
  box-shadow:
    0 0 28px rgba(43, 197, 241, 0.35),
    0 0  8px rgba(43, 197, 241, 0.20);
}

/* ── Index number (top-left, appears only when expanded) ─────── */
.hs-wif__pillar-num {
  position: absolute;
  top: var(--hs-space-5);
  left: var(--hs-space-6);
  font-family: var(--hs-font-mono);
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-font-bold);
  letter-spacing: var(--hs-tracking-widest);
  color: var(--hs-palette-accent-600);
  opacity: 0;
  transition: opacity 0.3s ease 0.18s;
  pointer-events: none;
}

.hs-wif__pillar:hover .hs-wif__pillar-num {
  opacity: 1;
}

/* ── Short label — visible in collapsed state ────────────────── */
.hs-wif__pillar-tag {
  font-family: var(--hs-font-body);
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-font-semibold);
  letter-spacing: var(--hs-tracking-wide);
  text-transform: uppercase;
  color: var(--hs-color-text-tertiary);
  text-align: center;
  white-space: nowrap;
  transition:
    opacity  0.35s ease,
    color    0.35s ease,
    transform 0.35s ease;
}

/* Compressed siblings hide their tag when another is active */
.hs-wif__accordion:hover .hs-wif__pillar:not(:hover) .hs-wif__pillar-tag {
  opacity: 0;
}

/* Expanded: tag becomes the bold accent category heading */
.hs-wif__pillar:hover .hs-wif__pillar-tag {
  color: var(--hs-palette-accent-700);
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-font-extrabold);
  letter-spacing: var(--hs-tracking-wider);
}

/* ── Pillar content (hidden until expanded) ──────────────────── */
.hs-wif__pillar-content {
  max-width: 32ch;
  opacity: 0;
  transition:
    opacity   0.35s ease 0.22s,
    transform 0.35s ease 0.22s;
  white-space: normal;
  overflow: hidden;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hs-space-4);
}

.hs-wif__pillar:hover .hs-wif__pillar-content {
  opacity: 1;
  pointer-events: auto;
}

.hs-wif__pillar-text {
  font-family: var(--hs-font-body);
  font-size: var(--hs-text-base);
  font-weight: var(--hs-font-normal);
  line-height: var(--hs-leading-relaxed);
  color: var(--hs-color-text-secondary);
}

/* ── "Sound like you?" cue line ──────────────────────────────── */
.hs-wif__pillar-cue {
  display: inline-flex;
  align-items: center;
  gap: var(--hs-space-2);
  font-family: var(--hs-font-body);
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-font-semibold);
  letter-spacing: var(--hs-tracking-wide);
  color: var(--hs-palette-accent-700);
  font-style: italic;
  padding: var(--hs-space-1-5) var(--hs-space-4);
  border: 1px solid rgba(43, 197, 241, 0.30);
  border-radius: var(--hs-radius-full);
  background: rgba(43, 197, 241, 0.07);
}

/* ── "Not For You" anchor block ─────────────────────────────── */
/*
 * High-contrast amber warning block beneath the accordion.
 * Uses the same visual language as the "Cost of Delay" card.
 */
.hs-wif__not-for {
  max-width: var(--hs-container-md);
  margin-inline: auto;
  margin-top: var(--hs-space-12);
  padding: var(--hs-space-8) var(--hs-space-10);

  text-align: center;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: var(--hs-radius-2xl);
  box-shadow:
    0 0 0 1px rgba(217, 119, 6, 0.1) inset,
    0 4px 30px rgba(217, 119, 6, 0.06);
}

.hs-wif__not-for-label {
  font-family: var(--hs-font-body);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-font-semibold);
  letter-spacing: var(--hs-tracking-wider);
  text-transform: uppercase;
  color: var(--hs-palette-amber-600);
  margin-bottom: var(--hs-space-4);
}

.hs-wif__not-for-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--hs-space-2);
}

.hs-wif__not-for-item {
  font-family: var(--hs-font-body);
  font-size: var(--hs-text-base);
  line-height: var(--hs-leading-relaxed);
  color: var(--hs-color-text-secondary);
}

/* ── Tablet: 1024px — horizontal accordion, minor sizing ─────── */
@media (max-width: 1024px) {
  .hs-wif__accordion {
    height: 280px;
  }

  .hs-wif__pillar-content {
    max-width: 22ch;
  }

  .hs-wif__pillar-text {
    font-size: var(--hs-text-base);
  }
}

/* ── 768px — vertical list ───────────────────────────────────── */
@media (max-width: 768px) {
  /* Index and tag are redundant in the always-visible list layout */
  .hs-wif__pillar-num,
  .hs-wif__pillar-tag,
  .hs-wif__pillar-cue {
    display: none;
  }
  .hs-wif__header {
    margin-bottom: var(--hs-space-10);
  }

  .hs-wif__accordion {
    flex-direction: column;
    height: auto;
    gap: var(--hs-space-2);
  }

  .hs-wif__pillar {
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--hs-space-4);
    padding: var(--hs-space-8) var(--hs-space-6);
    text-align: center;
  }

  .hs-wif__pillar:hover .hs-wif__pillar-icon {
    transform: none;
  }

  .hs-wif__pillar-icon {
    width: var(--hs-space-12);
    height: var(--hs-space-12);
    flex-shrink: 0;
  }

  .hs-wif__pillar-content {
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
    max-width: none;
    white-space: normal;
    text-align: center;
  }

  .hs-wif__pillar-text {
    font-size: var(--hs-text-sm);
  }

  .hs-wif__image-strip {
    height: 240px;
  }

  .hs-wif__not-for {
    margin-top: var(--hs-space-8);
    padding: var(--hs-space-6);
  }
}

/* ── Mobile: ≤425px ──────────────────────────────────────────── */
@media (max-width: 425px) {
  .hs-wif__header {
    margin-bottom: var(--hs-space-8);
  }

  .hs-wif__headline {
    font-size: var(--hs-text-2xl);
  }

  .hs-wif__pillar {
    gap: var(--hs-space-3);
    padding: var(--hs-space-4) var(--hs-space-5);
  }

  .hs-wif__pillar-icon {
    width: var(--hs-space-10);
    height: var(--hs-space-10);
    padding: var(--hs-space-2);
  }

  .hs-wif__pillar-text {
    line-height: var(--hs-leading-snug);
  }

  .hs-wif__image-strip {
    height: 180px;
  }
}

/* ── Reduced motion fallback ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hs-wif__pillar,
  .hs-wif__pillar::before,
  .hs-wif__pillar-icon,
  .hs-wif__pillar-content {
    transition: none;
  }

  .hs-wif__pillar-content {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
