/* ── HRLytics — Pure HTML/CSS Stylesheet ── */

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: hidden; }
body {
  font-family: 'Figtree', sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  overflow-x: hidden;
}

/* ── CSS Keyframe Animations (no JS needed) ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.anim       { animation: fadeInUp 0.6s ease both; }
.anim-fade  { animation: fadeIn 0.7s ease both; }
.anim-scale { animation: scaleIn 0.6s ease both; }
.anim-left  { animation: slideLeft 0.45s ease both; }
.hero-anim  { animation: fadeInUp 0.6s ease both; }

/* Stagger delays (animation-delay) */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── Navbar ── */
#navbar { box-shadow: none; transition: box-shadow 0.3s ease; }
#navbar:hover { box-shadow: 0 2px 16px rgba(0,0,0,0.06); }

/* ── Desktop Ecosystem Dropdown (CSS hover) ── */
.nav-ecosystem { position: relative; }
.eco-dropdown {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  margin-top: 0.625rem;
  width: 13rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border: 1px solid #f3f4f6;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}
.nav-ecosystem:hover .eco-dropdown,
.nav-ecosystem:focus-within .eco-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-ecosystem:hover .eco-chevron { transform: rotate(180deg); }
.eco-chevron { transition: transform 0.2s ease; }

/* ── Mobile Navigation (CSS checkbox) ── */
.nav-mobile-toggle {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.mob-nav-drawer {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.nav-mobile-toggle:checked ~ .mob-nav-drawer {
  max-height: 640px; opacity: 1;
}
.nav-mob-open  { display: block; }
.nav-mob-close { display: none; }
.nav-mobile-toggle:checked + .nav-bar-inner .nav-mob-open  { display: none; }
.nav-mobile-toggle:checked + .nav-bar-inner .nav-mob-close { display: block; }

/* Mobile sub-dropdown (details/summary) */
details.mob-eco summary { list-style: none; cursor: pointer; }
details.mob-eco summary::-webkit-details-marker { display: none; }
details.mob-eco .mob-eco-items { display: none; }
details.mob-eco[open] .mob-eco-items { display: flex; flex-direction: column; }
details.mob-eco[open] .mob-eco-chevron { transform: rotate(180deg); }
.mob-eco-chevron { transition: transform 0.2s ease; }

/* ── Booking Modal (CSS :target) ── */
.booking-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.52);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.booking-overlay:target { display: flex; }
.booking-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  width: 100%; max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: scaleIn 0.25s ease both;
}
.booking-card form { display: flex; flex-direction: column; gap: 0.75rem; }
.booking-card input,
.booking-card select,
.booking-card textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: 'Figtree', sans-serif;
  color: #132E18;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.booking-card input:focus,
.booking-card select:focus,
.booking-card textarea:focus { border-color: #539165; }
.booking-card textarea { resize: vertical; min-height: 80px; }
.booking-close {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.booking-close:hover { background: #e5e7eb; color: #111827; }
#book-sentinel { display: block; height: 0; }

/* ── HR-Tech Tabs (CSS radio) ── */
.hr-tab-radio { position: absolute; opacity: 0; width: 0; height: 0; }

/* Default: all panels hidden */
.hr-panel { display: none; }

/* Show the right panel when radio is checked */
#htab-0:checked ~ .hr-tab-layout .hr-panel[data-panel="0"] { display: block; }
#htab-1:checked ~ .hr-tab-layout .hr-panel[data-panel="1"] { display: block; }
#htab-2:checked ~ .hr-tab-layout .hr-panel[data-panel="2"] { display: block; }
#htab-3:checked ~ .hr-tab-layout .hr-panel[data-panel="3"] { display: block; }

/* Style the active sidebar button */
#htab-0:checked ~ .hr-tab-layout label[for="htab-0"],
#htab-1:checked ~ .hr-tab-layout label[for="htab-1"],
#htab-2:checked ~ .hr-tab-layout label[for="htab-2"],
#htab-3:checked ~ .hr-tab-layout label[for="htab-3"] {
  background: #132E18 !important;
  color: white !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
#htab-0:checked ~ .hr-tab-layout label[for="htab-0"] img,
#htab-1:checked ~ .hr-tab-layout label[for="htab-1"] img,
#htab-2:checked ~ .hr-tab-layout label[for="htab-2"] img,
#htab-3:checked ~ .hr-tab-layout label[for="htab-3"] img {
  filter: brightness(0) invert(1);
}

/* ── Hero image stack effect ── */
.hero-img-stack {
  position: relative;
  border-radius: 14px;
  display: inline-block;
  width: 100%;
  box-shadow:
    8px 8px 0 0 rgba(83,145,101,0.13),
    16px 16px 0 0 rgba(83,145,101,0.06);
}
.hero-img-stack::before,
.hero-img-stack::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(83,145,101,0.18);
  background: #fff;
  z-index: -1;
}
.hero-img-stack::before { transform: translate(8px, 8px); }
.hero-img-stack::after  { transform: translate(16px, 16px); opacity: 0.55; }

.hero-img-main {
  display: block;
  width: 100% !important;
  height: 340px !important;
  object-fit: cover;
  object-position: left top;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.09);
  background: #f8faf9;
}

/* ── Home Hero Tabs (CSS radio) ── */
.hero-tab-radio { position: absolute; opacity: 0; width: 0; height: 0; }
.hero-tab-wrap { display: block; }
.hero-panel { display: none; padding-right: 20px; padding-bottom: 20px; }
#htero-0:checked ~ .hero-tab-wrap .hero-panel[data-panel="0"] { display: block; }
#htero-1:checked ~ .hero-tab-wrap .hero-panel[data-panel="1"] { display: block; }
#htero-2:checked ~ .hero-tab-wrap .hero-panel[data-panel="2"] { display: block; }
#htero-3:checked ~ .hero-tab-wrap .hero-panel[data-panel="3"] { display: block; }
#htero-4:checked ~ .hero-tab-wrap .hero-panel[data-panel="4"] { display: block; }
#htero-5:checked ~ .hero-tab-wrap .hero-panel[data-panel="5"] { display: block; }
#htero-6:checked ~ .hero-tab-wrap .hero-panel[data-panel="6"] { display: block; }
#htero-7:checked ~ .hero-tab-wrap .hero-panel[data-panel="7"] { display: block; }
#htero-8:checked ~ .hero-tab-wrap .hero-panel[data-panel="8"] { display: block; }
#htero-0:checked ~ .hero-tab-wrap label[for="htero-0"],
#htero-1:checked ~ .hero-tab-wrap label[for="htero-1"],
#htero-2:checked ~ .hero-tab-wrap label[for="htero-2"],
#htero-3:checked ~ .hero-tab-wrap label[for="htero-3"],
#htero-4:checked ~ .hero-tab-wrap label[for="htero-4"],
#htero-5:checked ~ .hero-tab-wrap label[for="htero-5"],
#htero-6:checked ~ .hero-tab-wrap label[for="htero-6"],
#htero-7:checked ~ .hero-tab-wrap label[for="htero-7"],
#htero-8:checked ~ .hero-tab-wrap label[for="htero-8"] {
  background: #539165 !important;
  border-color: #539165 !important;
  color: white !important;
}

/* ── Hero Tab Button Pills ── */
.hero-tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.hero-tab-btn:hover {
  color: #539165;
  border-color: rgba(83,145,101,0.5);
}

/* ── Reveal sections (:target) ── */
#mtech-section-wrap { display: none; }
#mtech-section-wrap:target { display: block; }
#cert-section-wrap  { display: none; }
#cert-section-wrap:target  { display: block; }

/* ── Dot pattern ── */
.dot-pattern {
  background-image: radial-gradient(circle, rgba(83,145,101,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Partners — Logo Mosaic ── */
.logo-mosaic {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  background: #d4e4da;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(19,46,24,0.08);
  width: 100%;
  box-sizing: border-box;
}
.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 30px;
  height: 130px;
  min-width: 0;
}
.logo-tile img {
  max-height: 58px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
}
@media (min-width: 481px) and (max-width: 640px) {
  .logo-mosaic { grid-template-columns: repeat(3, 1fr); }
  .logo-tile { height: 100px; padding: 14px 16px; }
  .logo-tile img { max-height: 40px; max-width: 100px; }
}
@media (max-width: 480px) {
  .logo-mosaic {
    grid-template-columns: repeat(2, 1fr);
    background: transparent;
    border-radius: 0;
    overflow: visible;
    gap: 8px;
    box-shadow: none;
  }
  .logo-tile {
    height: 90px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(19,46,24,0.07);
    box-shadow: 0 1px 6px rgba(19,46,24,0.06);
  }
  .logo-tile img { max-height: 46px; max-width: 130px; }
}

/* ── Utilities ── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.hover-lift:hover { transform: translateY(-4px); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  outline: none;
  font-family: 'Figtree', sans-serif;
  color: #132E18;
}
input[type="text"]:focus, input[type="email"]:focus,
input[type="tel"]:focus, textarea:focus { border-color: #539165; }

/* ── Mobile responsive fixes ── */
@media (max-width: 640px) {
  /* Prevent hero-img-stack shadow from causing horizontal overflow */
  .hero-img-stack {
    box-shadow: 4px 4px 0 0 rgba(83,145,101,0.13);
    overflow: hidden;
  }
  .hero-img-stack::before { transform: translate(4px, 4px); }
  .hero-img-stack::after  { display: none; }
  /* Reduce fixed hero image height on small screens */
  .hero-img-main {
    height: 240px !important;
  }
  /* Clip any shadow bleed in hero tab wrap */
  .hero-tab-wrap {
    overflow: hidden;
  }
}
