/* ==========================================================================
   CurrentSpec - Homepage visual layer (loaded only by index.html, after style.css)
   Scoped to body.home so no other page is affected.
   ========================================================================== */

body.home {
  --h-ink: #0F1F18;
  --h-deep: #123A2A;
  --h-mid: #1D5C42;
  --h-bright: #2E7D5B;
  --h-volt: #FFC83D;
  --h-volt-soft: #FFE08A;
  background:
    radial-gradient(900px 420px at 85% -80px, rgba(46, 125, 91, 0.10), transparent 70%),
    radial-gradient(700px 380px at -5% 120px, rgba(255, 200, 61, 0.08), transparent 70%),
    var(--bg-page);
}

/* ---------- HERO ---------- */
body.home .hero-omni {
  position: relative;
  max-width: none;
  margin: 24px 0 0 0;
  padding: 72px 24px 48px;
  border-radius: 24px;
  color: #fff;
  overflow: visible;
  background:
    radial-gradient(520px 260px at 88% 0%, rgba(255, 200, 61, 0.22), transparent 70%),
    radial-gradient(640px 320px at 8% 100%, rgba(80, 190, 140, 0.28), transparent 70%),
    linear-gradient(135deg, var(--h-ink) 0%, var(--h-deep) 52%, var(--h-mid) 100%);
  box-shadow: 0 24px 48px -24px rgba(15, 31, 24, 0.55);
  isolation: isolate;
}

/* Circuit-grid texture, clipped to the rounded card */
body.home .hero-omni::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 78%);
}

body.home .hero-pill-badge {
  background: rgba(255, 200, 61, 0.14);
  color: var(--h-volt-soft);
  border-color: rgba(255, 200, 61, 0.4);
  backdrop-filter: blur(4px);
  justify-content: center;
  text-align: center;
}
body.home .hero-pill-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--h-volt);
  box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.25);
}

body.home .hero-headline-omni {
  color: #fff;
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
body.home .hero-headline-omni::after {
  content: "";
  display: block;
  width: 84px;
  height: 4px;
  margin: 20px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--h-volt), rgba(255, 200, 61, 0));
}

body.home .hero-subheading-omni {
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
  margin-top: 20px;
}

body.home .hero-search-container { max-width: 760px; }
body.home .hero-search-box {
  height: 62px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
body.home .hero-search-box:focus-within {
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(255, 200, 61, 0.55);
}
body.home .hero-search-icon-svg { color: var(--h-bright); }
body.home .hero-search-input { color: var(--text-main); }
body.home .hero-search-kbd { white-space: nowrap; }

/* Quick-query pills on dark */
body.home .hero-trending-strip { margin-top: 22px; justify-content: center; }
body.home .hero-trending-label { color: rgba(255, 255, 255, 0.6); }
body.home .hero-trending-strip .trending-pill {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}
body.home .hero-trending-strip .trending-pill:hover {
  background: var(--h-volt);
  border-color: var(--h-volt);
  color: var(--h-ink);
  transform: translateY(-2px);
}

/* Stat strip (new markup) */
body.home .hero-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 820px;
  margin: 44px auto 0;
  padding: 18px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}
body.home .hero-stats li {
  padding: 4px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
body.home .hero-stats li:first-child { border-left: 0; }
body.home .hero-stat-num {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--h-volt);
  line-height: 1.1;
}
body.home .hero-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.01em;
}

/* ---------- SECTION HEADINGS ---------- */
body.home .section-title {
  position: relative;
  padding-left: 16px;
  letter-spacing: -0.02em;
}
body.home .section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--h-volt), var(--h-bright));
}
body.home .section-subtitle { padding-left: 16px; }

/* ---------- CATEGORY CARDS ---------- */
body.home .cat-card-omni {
  --cat: 46, 125, 91;
  overflow: hidden;
  border-radius: 18px;
  border-color: rgba(var(--cat), 0.16);
  background: linear-gradient(180deg, #fff 0%, #fff 55%, rgba(var(--cat), 0.045) 100%);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease, border-color 220ms ease;
}
body.home .cat-card-omni::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: rgb(var(--cat));
  opacity: 0.9;
}
body.home .cat-card-omni:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--cat), 0.55);
  box-shadow: 0 18px 32px -16px rgba(var(--cat), 0.45);
}
body.home .cat-card-icon-box {
  background: rgba(var(--cat), 0.12);
  color: rgb(var(--cat));
  border-radius: 12px;
}
body.home .cat-card-omni:nth-child(1) { --cat: 46, 125, 91; }
body.home .cat-card-omni:nth-child(2) { --cat: 196, 82, 60; }
body.home .cat-card-omni:nth-child(3) { --cat: 52, 108, 176; }
body.home .cat-card-omni:nth-child(4) { --cat: 160, 110, 20; }
body.home .cat-card-omni:nth-child(5) { --cat: 112, 78, 176; }
body.home .cat-card-omni:nth-child(6) { --cat: 205, 130, 10; }
body.home .cat-card-omni:nth-child(7) { --cat: 22, 128, 140; }
body.home .cat-card-omni:nth-child(8) { --cat: 176, 70, 120; }
body.home .cat-card-omni:nth-child(9) { --cat: 90, 105, 120; }

/* ---------- POPULAR CARDS ---------- */
body.home .popular-card-omni {
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease, border-color 200ms ease;
}
body.home .popular-card-omni::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--h-volt), var(--h-bright));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 240ms ease;
}
body.home .popular-card-omni:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 125, 91, 0.5);
  box-shadow: 0 16px 30px -16px rgba(23, 35, 30, 0.35);
}
body.home .popular-card-omni:hover::after { transform: scaleY(1); }
body.home .popular-card-badge {
  background: rgba(46, 125, 91, 0.1);
  color: var(--h-mid);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 700;
}

/* ---------- WORKBENCH ---------- */
body.home .quick-calc-workbench {
  position: relative;
  border-radius: 22px !important;
  border-color: rgba(46, 125, 91, 0.25) !important;
  background:
    radial-gradient(520px 200px at 100% 0%, rgba(255, 200, 61, 0.12), transparent 70%),
    linear-gradient(180deg, #ffffff, #F3FAF5) !important;
  box-shadow: 0 24px 44px -28px rgba(18, 58, 42, 0.45) !important;
}

/* ---------- DIRECTORY ---------- */
body.home .directory-card { border-radius: 16px; }
body.home .directory-card:hover {
  box-shadow: 0 14px 28px -18px rgba(23, 35, 30, 0.35);
}

/* ---------- METHODOLOGY ---------- */
body.home .methodology-section-omni {
  padding: 40px 32px 44px;
  border-radius: 24px;
  background: linear-gradient(180deg, #EAF6EE 0%, #F5F9F5 100%);
  border: 1px solid rgba(46, 125, 91, 0.16);
}
body.home .method-card-omni {
  border-radius: 16px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
body.home .method-card-omni:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -18px rgba(23, 35, 30, 0.3);
}
body.home .method-icon-box {
  background: linear-gradient(135deg, var(--h-mid), var(--h-bright));
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 16px -8px rgba(46, 125, 91, 0.7);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  body.home .hero-omni { padding: 52px 16px 32px; border-radius: 18px; margin-top: 12px; }
  body.home .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 14px; padding: 16px 4px; }
  body.home .hero-stats li:nth-child(3) { border-left: 0; }
  body.home .hero-search-kbd { display: none; }
  body.home .methodology-section-omni { padding: 28px 16px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body.home * { transition: none !important; }
}


/* ==========================================================================
   v2 POLISH LAYER
   ========================================================================== */

/* ---------- Hero: ambient glow, bolt watermark, load-in ---------- */
body.home .hero-omni::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 340px;
  height: 340px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M17.5 4.5L8 17.5H15.5L14 27.5L24 14.5H16.5L17.5 4.5Z' fill='%23FFC83D'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(8deg);
}
@keyframes h-glow-drift {
  0%   { background-position: 88% 0%, 8% 100%, 0 0; }
  50%  { background-position: 78% 12%, 16% 88%, 0 0; }
  100% { background-position: 88% 0%, 8% 100%, 0 0; }
}
body.home .hero-omni {
  background-size: 130% 130%, 130% 130%, 100% 100%;
  background-repeat: no-repeat;
  animation: h-glow-drift 18s ease-in-out infinite;
}
@keyframes h-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
body.home .hero-omni > * { animation: h-rise 640ms cubic-bezier(0.16, 1, 0.3, 1) both; }
body.home .hero-omni > :nth-child(2) { animation-delay: 60ms; }
body.home .hero-omni > :nth-child(3) { animation-delay: 120ms; }
body.home .hero-omni > :nth-child(4) { animation-delay: 180ms; }
body.home .hero-omni > :nth-child(5) { animation-delay: 240ms; }
body.home .hero-omni > :nth-child(6) { animation-delay: 300ms; }
body.home .hero-omni > :nth-child(7) { animation-delay: 360ms; }

body.home .hero-stat-num { font-variant-numeric: tabular-nums; }
body.home .hero-standards {
  margin: 22px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
body.home .hero-standards span.std {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- Typography & rhythm ---------- */
body.home .section-title { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
body.home .category-section-omni,
body.home .popular-section-omni { margin: 72px 0 80px; }
body.home .section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(46, 125, 91, 0.25);
  background: #fff;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
body.home .section-link:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateX(2px);
}

/* ---------- Card details ---------- */
body.home .cat-card-omni .cat-card-arrow,
body.home .popular-card-arrow { transition: transform 200ms ease; }
body.home .popular-card-omni:hover .popular-card-arrow { transform: translateX(5px); }
body.home .popular-card-title { letter-spacing: -0.015em; }
body.home .popular-card-link { color: var(--primary); font-weight: 600; }

/* ---------- Workbench ---------- */
body.home .quick-calc-workbench .form-control {
  border-radius: 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
body.home .quick-calc-workbench .form-control:focus {
  border-color: var(--h-bright);
  box-shadow: 0 0 0 4px rgba(46, 125, 91, 0.14);
  outline: none;
}
body.home .quick-calc-workbench .hero-calc-submit-btn,
body.home .quick-calc-workbench button[type="submit"],
body.home .quick-calc-workbench #hero-calc-btn {
  background: linear-gradient(180deg, var(--h-bright), var(--h-mid));
  box-shadow: 0 10px 20px -10px rgba(29, 92, 66, 0.8);
  border-radius: 10px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
body.home .quick-calc-workbench .hero-calc-submit-btn:hover,
body.home .quick-calc-workbench #hero-calc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px -10px rgba(29, 92, 66, 0.9);
}

/* ---------- Directory ---------- */
body.home .directory-section-omni .grid-3col { align-items: start; }
body.home .dir-tab-btn.active {
  background: linear-gradient(180deg, var(--h-bright), var(--h-mid));
  border-color: var(--h-mid);
}
body.home .directory-filter-input:focus {
  box-shadow: 0 0 0 4px rgba(46, 125, 91, 0.14);
}
body.home .directory-card-title { letter-spacing: -0.01em; }
body.home .directory-card-hub-link {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(46, 125, 91, 0.08);
}
body.home .directory-card-hub-link:hover { background: var(--bg-hover); }

/* ---------- Footer: bookends the hero ---------- */
body.home .footer-omni {
  margin-top: 72px;
  background: linear-gradient(160deg, var(--h-ink) 0%, var(--h-deep) 100%);
  border-top: 0;
  color: rgba(255, 255, 255, 0.78);
  position: relative;
}
body.home .footer-omni::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--h-volt), transparent);
  opacity: 0.8;
}
body.home .footer-omni .footer-brand-col span:not(.site-brand-icon):not(.footer-standards-badge span) { color: #fff !important; }
body.home .footer-brand-col p { color: rgba(255, 255, 255, 0.68); }
body.home .footer-heading { color: var(--h-volt-soft); }
body.home .footer-links-omni a { color: rgba(255, 255, 255, 0.72); }
body.home .footer-links-omni a:hover { color: #fff; text-decoration: underline; }
body.home .footer-standards-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--h-volt-soft);
}
body.home .footer-bottom-bar { border-top-color: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.55); }
body.home .footer-omni a { color: inherit; }

/* ---------- Accessibility ---------- */
body.home a:focus-visible,
body.home button:focus-visible,
body.home input:focus-visible {
  outline: 3px solid var(--h-volt);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Scroll reveal (class added by JS; content visible without JS) ---------- */
body.home .js-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--rd, 0ms);
}
body.home .js-reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  body.home .category-section-omni,
  body.home .popular-section-omni { margin: 48px 0 56px; }
  body.home .hero-omni::after { width: 220px; height: 220px; right: -30px; }
  body.home .hero-standards { font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  body.home .hero-omni,
  body.home .hero-omni > * { animation: none !important; }
  body.home .js-reveal { opacity: 1; transform: none; }
}

@media print {
  body.home .js-reveal { opacity: 1 !important; transform: none !important; }
  body.home .hero-omni { animation: none; }
}

@media (max-width: 760px) {
  body.home .hero-stat-num { font-size: 1.3rem; white-space: nowrap; }
  body.home .hero-stat-label { font-size: 0.72rem; }
}
