/* ============================================
   Klyper HRMS  -  Key Features (bento)
   ============================================ */

.hrms-features {
  --hf-navy: #071428;
  --hf-navy-2: #0a2048;
  --hf-royal: #1d5eff;
  --hf-cyan: #22d3ee;
  --hf-muted: #5b6b80;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 108px);
  background:
    linear-gradient(180deg, #eef6ff 0%, #f5f9fd 45%, #eaf3fb 100%);
  color: var(--hf-navy);
}

.hrms-features__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hrms-features__wave {
  position: absolute;
  opacity: 0.55;
}

.hrms-features__wave--tl {
  display: none;
  background: none;
  opacity: 0;
  filter: none;
}

.hrms-features__wave--br {
  display: none;
  background: none;
  opacity: 0;
  filter: none;
}

.hrms-features > .container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
}

/* ---------- Header ---------- */
.hrms-features__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(36px, 4.5vw, 52px);
}

.hrms-features__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(160, 196, 240, 0.9);
  box-shadow: 0 6px 16px rgba(29, 94, 255, 0.06);
  font-family: var(--font-display, "Poppins", sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hf-royal);
}

.hrms-features__badge svg {
  width: 15px;
  height: 15px;
}

.hrms-features__title {
  margin: 0 0 14px;
  font-family: var(--font-display, "Poppins", sans-serif);
  font-size: clamp(1.85rem, 1.3rem + 1.8vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--hf-navy);
}

.hrms-features__title-accent {
  position: relative;
  display: inline-block;
  color: var(--hf-royal);
  
}

.hrms-features__title-underline {
  position: absolute;
  left: 0;
  right: -2%;
  bottom: 0;
  width: 102%;
  height: 0.28em;
  overflow: visible;
  pointer-events: none;
}

.hrms-features__lead {
  margin: 0 auto;
  max-width: 38rem;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.06rem);
  line-height: 1.65;
  font-weight: 500;
  color: var(--hf-muted);
}

/* ---------- Bento grid ---------- */
.hrms-features__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}

.hf-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(14px, 1.5vw, 20px);
  align-items: center;
  min-height: 0;
  padding: clamp(14px, 1.6vw, 20px) clamp(16px, 1.8vw, 22px);
  border-radius: 20px;
  border: 1px solid rgba(186, 214, 245, 0.85);
  box-shadow:
    0 3px 6px rgba(15, 40, 90, 0.04),
    0 14px 30px rgba(15, 50, 110, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease,
    border-color 0.35s ease;
}

.hf-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  z-index: 2;
  pointer-events: none;
}

.hf-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 180, 240, 0.95);
  box-shadow:
    0 8px 16px rgba(15, 40, 90, 0.06),
    0 24px 44px rgba(15, 50, 110, 0.12),
    inset 0 1px 0 #ffffff;
}

.hf-card__wave {
  display: none;
  background: none;
  opacity: 0;
  filter: none;
}

.hf-card--wide {
  grid-column: span 7;
  min-height: 158px;
  padding: clamp(14px, 1.7vw, 18px) clamp(16px, 1.9vw, 22px);
}

.hf-card--side {
  grid-column: span 5;
  min-height: 158px;
}

.hf-card--third {
  grid-column: span 4;
  min-height: 148px;
  grid-template-columns: minmax(88px, 1fr) 1.15fr;
  align-items: center;
  gap: 10px 12px;
}

/* Light panels */
.hf-card--light {
  background:
    linear-gradient(165deg, #ffffff 0%, #f5f9ff 55%, #eaf2fc 100%);
  color: var(--hf-navy);
}

.hf-card--light .hf-card__title {
  color: var(--hf-navy);
}

.hf-card--light .hf-card__desc {
  color: var(--hf-muted);
}

/* Dark panels */
.hf-card--dark {
  background:
    radial-gradient(ellipse 70% 55% at 92% 10%, rgba(56, 140, 220, 0.22), transparent 52%),
    linear-gradient(150deg, #050d1c 0%, #0a2048 42%, #123a7a 78%, #0a1a40 100%);
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow:
    0 4px 8px rgba(5, 15, 40, 0.18),
    0 16px 36px rgba(7, 25, 70, 0.3);
  color: #ffffff;
}

.hf-card--dark::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.hf-card--dark:hover {
  border-color: rgba(147, 197, 253, 0.4);
  box-shadow:
    0 10px 20px rgba(5, 15, 40, 0.22),
    0 28px 52px rgba(7, 25, 70, 0.38);
}

.hf-card--dark .hf-card__wave {
  display: none;
  background: none;
  opacity: 0;
  filter: none;
}

.hf-card--dark .hf-card__title {
  color: #ffffff;
}

.hf-card--dark .hf-card__desc {
  color: rgba(220, 232, 248, 0.88);
}

/* Left illustration slot  -  no nested card chrome */
.hf-card__visual {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  width: auto;
  height: auto;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hf-card__visual::before,
.hf-card__visual::after {
  display: none;
}

.hf-card:hover .hf-card__visual {
  transform: scale(1.04);
}

.hf-card--wide .hf-card__visual,
.hf-card--side .hf-card__visual {
  width: auto;
  height: auto;
  padding: 0;
}

.hf-card__body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hf-card__title {
  margin: 0 0 6px;
  font-family: var(--font-display, "Poppins", sans-serif);
  font-size: clamp(0.98rem, 0.92rem + 0.25vw, 1.14rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.hf-card__desc {
  margin: 0;
  font-size: clamp(0.78rem, 0.74rem + 0.12vw, 0.86rem);
  line-height: 1.5;
  font-weight: 500;
}

.hf-card--third .hf-card__title {
  font-size: clamp(0.92rem, 0.88rem + 0.2vw, 1.05rem);
}

.hf-card--third .hf-card__desc {
  font-size: 0.78rem;
  line-height: 1.45;
}

/* ---------- Mini illustrations  -  premium 3D, static ---------- */
.hf-illu {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.25))
    drop-shadow(0 12px 20px rgba(15, 45, 100, 0.24));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.hf-card--dark .hf-illu {
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12))
    drop-shadow(0 14px 22px rgba(0, 0, 0, 0.42));
}

.hf-card:hover .hf-illu {
  transform: scale(1.05);
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.3))
    drop-shadow(0 16px 26px rgba(15, 45, 100, 0.28));
}

.hf-card--dark:hover .hf-illu {
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.16))
    drop-shadow(0 16px 26px rgba(0, 0, 0, 0.48));
}

.hf-illu--face {
  width: clamp(128px, 14.5vw, 160px);
}

.hf-illu--map {
  width: clamp(164px, 18.5vw, 200px);
}

.hf-illu--cal,
.hf-illu--shift,
.hf-illu--pay,
.hf-illu--exp,
.hf-illu--roles,
.hf-illu--chart {
  width: clamp(128px, 14vw, 160px);
}

.hf-card--third .hf-card__visual {
  width: auto;
  max-width: none;
}

/* ---------- Motion ---------- */
.hrms-features .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.hrms-features .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hrms-features .reveal-delay-1 { transition-delay: 0.06s; }
.hrms-features .reveal-delay-2 { transition-delay: 0.12s; }
.hrms-features .reveal-delay-3 { transition-delay: 0.18s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hrms-features {
    padding: clamp(48px, 6vw, 80px) 0;
  }

  .hf-card--wide,
  .hf-card--side {
    grid-column: span 6;
  }

  .hf-card--third {
    grid-column: span 4;
  }
}

@media (max-width: 900px) {
  .hrms-features__head {
    margin-bottom: 28px;
  }

  .hrms-features__title {
    font-size: clamp(1.55rem, 3.5vw, 2.1rem);
  }

  .hrms-features__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hf-card--wide,
  .hf-card--side,
  .hf-card--third {
    grid-column: span 1;
    min-height: 0;
  }

  .hf-card--wide,
  .hf-card--side {
    grid-template-columns: auto 1fr;
  }

  .hf-card--third {
    grid-template-columns: minmax(64px, 0.85fr) 1.2fr;
  }

  .hf-card__visual {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .hrms-features {
    padding: 40px 0 48px;
  }

  .hrms-features__head {
    margin-bottom: 22px;
  }

  .hrms-features__title {
    font-size: clamp(1.4rem, 6.5vw, 1.85rem);
  }

  .hrms-features__lead {
    font-size: 0.9rem;
  }

  .hrms-features__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hf-card--wide,
  .hf-card--side,
  .hf-card--third {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 14px;
    border-radius: 16px;
  }

  .hf-card__visual {
    justify-self: start;
  }

  .hf-card__title {
    font-size: 1rem;
  }

  .hf-card__desc {
    font-size: 0.84rem;
  }

  .hf-illu--face {
    width: 112px;
  }

  .hf-illu--map {
    width: 140px;
  }

  .hf-illu--cal,
  .hf-illu--shift,
  .hf-illu--pay,
  .hf-illu--exp,
  .hf-illu--roles,
  .hf-illu--chart {
    width: 112px;
  }
}

@media (max-width: 400px) {
  .hf-card--wide,
  .hf-card--side,
  .hf-card--third {
    padding: 14px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hrms-features .reveal,
  .hf-card,
  .hf-card__visual {
    transition: none;
  }

  .hrms-features .reveal {
    opacity: 1;
    transform: none;
  }

  .hf-card:hover,
  .hf-card:hover .hf-card__visual,
  .hf-illu,
  .hf-card:hover .hf-illu {
    transform: none;
  }
}

/* Dark theme */
html[data-theme="dark"] .hrms-features {
  background:
    linear-gradient(180deg, #07111f 0%, #0a1628 50%, #081320 100%);
}

html[data-theme="dark"] .hrms-features__badge {
  background: rgba(15, 30, 55, 0.9);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

html[data-theme="dark"] .hrms-features__title {
  color: #e8f0ff;
}

html[data-theme="dark"] .hrms-features__lead {
  color: #94a3b8;
}

html[data-theme="dark"] .hf-card--light {
  background: linear-gradient(165deg, #0f1c33 0%, #12243f 100%);
  border-color: rgba(59, 130, 246, 0.22);
}

html[data-theme="dark"] .hf-card--light .hf-card__title {
  color: #e8f0ff;
}

html[data-theme="dark"] .hf-card--light .hf-card__desc {
  color: #94a3b8;
}
