/* ================= SECTION ================= */
.hiw-section {
  width: 100%;
  padding: 112px 0;
}

/* ================= HEADER ================= */
.hiw-header {
  text-align: center;
  margin-bottom: 64px;
}

/* ================= STEPS 1 & 2 GRID ================= */
.hiw-cards {
  max-width: 80%;
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .hiw-cards {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

/* ================= STEP CARD ================= */
.hiw-step-card {
  border-radius: 16px;
  padding: 56px 48px;
}

/* Card variants */
.hiw-step-card.light {
  background: #f3f2f3;
}

.hiw-step-card.yellow {
  background: var(--bright-yellow);
}

.hiw-step-card.purple {
  max-width: 80%;
  margin: 0 auto;
  background: var(--primary);
  color: white;
  padding-bottom: 0; /* KEY */
}

/* ================= STEP TEXT ================= */
.hiw-step-number {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hiw-step-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.hiw-step-desc {
  font-family: var(--font-poppins);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Purple text override */
.hiw-step-card.purple .hiw-step-number,
.hiw-step-card.purple .hiw-step-title,
.hiw-step-card.purple .hiw-step-desc {
  color: white;
}

/* ================= INNER CARD ================= */
.hiw-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
}

/* ================= INPUT ================= */
.hiw-input {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
}

/* ================= BUTTON ================= */
.hiw-button {
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bright-yellow);
  color: var(--primary);
  padding: 16px;
  border-radius: 12px;
}

/* ================= ANALYZING ================= */
.hiw-analyzing {
  padding: 20px;
  border-radius: 8px;
  color: white;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 16px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ================= STATES ================= */
.hiw-state {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e8e0ff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.hiw-state-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hiw-state-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--light-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.hiw-state-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bright-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================= STEP 3 LAYOUT ================= */
.hiw-step-3-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch; /* IMPORTANT */
}

.hiw-step-3-text {
  max-width: 420px;
}

.hiw-step-3-card {
  display: flex;
  align-items: flex-end; /* PUSH report to bottom */
  justify-content: flex-end;
}

/* ================= REPORT ================= */
.hiw-report {
  background: white;
  border-radius: 16px 16px 0 0; /* top-left, top-right, bottom-right, bottom-left */
  padding: 24px;
  width: 100%;
  max-width: 520px;
  color: black;
}

.hiw-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.hiw-report-sub {
  font-size: 12px;
  color: #666;
}

/* ================= TASK ================= */
.hiw-task {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.hiw-task-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #d3c2ff;
}

/* ================= MOBILE ================= */
@media (max-width: 900px) {
  .hiw-step-3-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hiw-step-3-card {
    justify-content: center;
  }
}

/* ================= SPIN ================= */
.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .hiw-state {
    padding: 14px;
    gap: 12px;
  }

  .hiw-state-name {
    font-size: 14px;
  }

  .hiw-state-sub {
    font-size: 12px;
  }

  .hiw-state-badge {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .hiw-section {
    padding: 72px 0;
  }

  .hiw-header {
    margin-bottom: 48px;
  }

  .hiw-step-card {
    padding: 36px 24px;
    border-radius: 22px;
  }

  .hiw-step-number {
    font-size: 32px;
  }

  .hiw-step-title {
    font-size: 20px;
  }

  .hiw-step-desc {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .hiw-input {
    padding: 10px;
    font-size: 13px;
  }

  .hiw-button {
    padding: 14px;
    font-size: 13px;
  }

  .hiw-section {
    overflow-x: hidden;
  }
}

@media (max-width: 900px) {
  .hiw-step-card.purple {
    margin: 0;
    max-width: 100% !important;
    margin-inline: 20px;
  }

  .hiw-step-card.light {
    margin-inline: 20px;
  }

  .hiw-step-card.yellow {
    margin-inline: 20px;
  }

  .hiw-cards {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-bottom: 56px;
    gap: 24px;
  }
  .hiw-step-3-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hiw-step-3-card {
    justify-content: center;
    align-items: center;
    margin-top: 32px;
  }

  .hiw-step-card.purple {
    padding-bottom: 56px; /* restore spacing */
  }
}

/* ================= CHIP GRID ================= */
.hiw-chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hiw-chip-box {
  border: 1px solid #e8e0ff;
  border-radius: 12px;
  padding: 14px;
  background: white;
}

.hiw-chip-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

.hiw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* MUI Chip overrides */
.hiw-chip-row .MuiChip-root {
  background: #fff3d6;
  color: #5b4b00;
  font-weight: 500;
  border-radius: 999px;
}

/* ================= MOBILE ================= */
@media (max-width: 480px) {
  .hiw-chip-grid {
    grid-template-columns: 1fr;
  }
}

.hiw-card-label {
  margin-bottom: 10px;
}

/* ================= MUI CHIP FIX (Scoped) ================= */

/* Force chip to stay horizontal */
.hiw-chip-row .MuiChip-root {
  display: inline-flex !important;
  align-items: center !important;
  height: 26px;
  background: #fff3d6;
  color: #5b4b00;
  border-radius: 999px;
  font-weight: 500;
  cursor: default;
}

/* Prevent label from becoming block */
.hiw-chip-row .MuiChip-label {
  display: inline-flex !important;
  align-items: center;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
}

/* Fix delete (X) icon layout */
.hiw-chip-row .MuiChip-deleteIcon {
  display: inline-flex !important;
  align-items: center;
  margin-right: 4px;
  margin-left: 0;
  color: #b58b00;
}

/* Prevent global svg rules from breaking layout */
.hiw-chip-row svg {
  display: inline-block !important;
}

/* Prevent button rules from column layout */
.hiw-chip-row button {
  flex-direction: row !important;
}

/* Outer wrapper to pull card upward so lines look connected */
.next-section-wrapper {
  position: relative;
  padding-bottom: 160px;
  z-index: 10;
}

/* Main card container */
.next-section-card {
  background: #ffffff;
  border-radius: 24px;
  width: 80%;
  padding: 70px 60px;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;

  /* Perfect soft shadow from Figma */
  box-shadow: 0px 40px 80px rgba(0, 0, 0, 0.03),
    0px 25px 40px rgba(0, 0, 0, 0.02);
}

/* Small purple eyebrow label */
.landingpage-question {
  color:var(--primary-bright);
  font-family: var(--font-poppins);
  font-size: clamp(14px, 0.8vw, 16px);
  font-weight: 500;
  margin-bottom: 14px;
}

/* Main title */
.landingpage-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 22px;
  margin-top:22px;

  /* Gradient text */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.7) 19.74%,
    #000000 113.82%
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Description paragraph */
.landingpage-desc {
  font-size: 16px;
  color: #1A1A1A;
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.6;
  font-family: var(--font-poppins) !important;
}

.landingpage-desc-pills{
  font-size: 16px;
  color: #1A1A1A;
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.6;
  font-family: var(--font-poppins) !important;
}

/* Black gradient CTA button */
.ns-button {
  padding: 14px 36px;
  border-radius: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;

  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, #000 100%);

  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  transition: all 0.25s ease;
}

/* Hover: lift + brighter */
.ns-button:hover {
  transform: translateY(-4px);
  box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.2);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .next-section-card {
    padding: 50px 28px;
    border-radius: 20px;
  }
  .landingpage-title {
    font-size: 28px;
  }
  .landingpage-desc {
    font-size: 15px;
  }
  .landingpage-desc-pills{
    font-size: 15px;
    width: 50%;
  }
  .next-section-wrapper {
    margin-top: -120px;
  }
}

/* Main section container */
.state-section {
  position: relative;

  width: min(1520px, calc(100vw - 320px));
  max-width: 1520px;

  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);

  flex-shrink: 0;
  margin-inline: auto;
}

@media (max-width: 1200px) {
  .state-section {
    width: 1100px;
    max-width: 1100px;
  }
}

@media (max-width: 768px) {
  .state-section {
    width: 1100px;
    max-width: 1100px;
  }
}

/* Inner content alignment */
.state-inner {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
}

/* Typography */
.tagline {
  font-size: clamp(14px, 3vw, 18px);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  margin-bottom: 16px;
}

.title {
  font-size: clamp(24px, 5vw, 46px);
  font-weight: 700;
  margin-bottom: 16px;
}

.subtitle {
  font-size: clamp(14px, 3.5vw, 18px);
  color: #555;
  max-width: 650px;
  margin: 0 auto 50px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  /* tablet */
  .subtitle {
    max-width: 480px;
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  /* mobile */
  .subtitle {
    max-width: 360px;
    font-size: 16px;
  }
}

@media(max-width: 480px){
  .landingpage-desc-pills{
    width: 32%;
  }
}
