/* All India Tender homepage premium layer — progressive, route-scoped and reversible. */
html[data-ait-page="home"] {
  scroll-behavior: smooth;
  color-scheme: light;
}

html[data-ait-page="home"] body {
  background:
    radial-gradient(circle at 8% 12%, rgba(37, 99, 235, .10), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(249, 115, 22, .09), transparent 26rem),
    #f8fafc;
}

/* Tender results should use the available viewport instead of being locked
   to the old 1440px desktop canvas. Existing app breakpoints still control
   the mobile filter drawer and stacked layout. */
html body .tenders-layout {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding-left: clamp(12px, 1.5vw, 28px) !important;
  padding-right: clamp(12px, 1.5vw, 28px) !important;
}

@media (min-width: 1100px) {
  .tenders-layout .tenders-sidebar {
    width: clamp(290px, 18vw, 340px) !important;
  }
}

/* Results use the same edge-to-edge working canvas as live tenders. */
html[data-ait-page="results"] #root div[style*="max-width: 1400px"],
html[data-ait-page="results"] .results-layout {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding-left: clamp(12px, 1.5vw, 28px) !important;
  padding-right: clamp(12px, 1.5vw, 28px) !important;
}

@media (min-width: 1100px) {
  html[data-ait-page="results"] .results-layout {
    grid-template-columns: clamp(270px, 17vw, 330px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 899px) {
  html[data-ait-page="results"] .results-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }
  html[data-ait-page="results"] .results-sidebar {
    position: static !important;
    width: 100% !important;
    max-height: none !important;
  }
}

@media (max-width: 560px) {
  html[data-ait-page="results"] #root div[style*="max-width: 1400px"],
  html[data-ait-page="results"] .results-layout {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  html[data-ait-page="results"] main { min-width: 0 !important; }
}

html[data-ait-page="home"] #root {
  overflow: clip;
}

/* Hero: keep the current video and content, add depth and legibility. */
html[data-ait-page="home"] .hero-title {
  width: 100% !important;
  max-width: 1100px !important;
  margin-inline: auto !important;
  text-align: center !important;
  letter-spacing: -.045em !important;
  line-height: 1.04 !important;
  text-wrap: balance;
  text-shadow: 0 8px 34px rgba(15, 23, 42, .28);
  animation: ait-title-in .75s cubic-bezier(.2,.8,.2,1) both;
}

html[data-ait-page="home"] .pulse-dot {
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: ait-pulse 2.2s ease-out infinite;
}

/* Keep badge, headline, search and CTAs on one shared centre axis. */
html[data-ait-page="home"] div:has(> .pulse-dot) {
  display: flex !important;
  width: max-content !important;
  max-width: calc(100% - 32px) !important;
  position: relative;
  left: auto !important;
  right: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: none !important;
}

html[data-ait-page="home"] input,
html[data-ait-page="home"] select,
html[data-ait-page="home"] button,
html[data-ait-page="home"] a {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease,
              background-color .22s ease, color .22s ease, opacity .22s ease;
}

html[data-ait-page="home"] input:focus-visible,
html[data-ait-page="home"] select:focus-visible,
html[data-ait-page="home"] button:focus-visible,
html[data-ait-page="home"] a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28) !important;
  outline-offset: 3px !important;
}

html[data-ait-page="home"] button:hover,
html[data-ait-page="home"] a[role="button"]:hover {
  transform: translateY(-2px);
}

/* Trust numbers: visual proof instead of plain counters. */
html[data-ait-page="home"] .float-up {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .24) !important;
  border-radius: 16px !important;
  background: linear-gradient(145deg, rgba(8, 47, 107, .42), rgba(15, 23, 42, .18)) !important;
  box-shadow: 0 14px 34px rgba(8, 47, 107, .18), inset 0 1px 0 rgba(255,255,255,.12) !important;
  backdrop-filter: blur(12px) saturate(1.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  animation: ait-card-in .65s cubic-bezier(.2,.8,.2,1) both;
  color: #e0f2fe !important;
}

html[data-ait-page="home"] .float-up,
html[data-ait-page="home"] .float-up * {
  color: #dbeafe !important;
  text-shadow: 0 2px 12px rgba(2, 6, 23, .25) !important;
}

html[data-ait-page="home"] .float-up > *:first-child {
  color: #fff !important;
  letter-spacing: -.035em !important;
}

html[data-ait-page="home"] .float-up::after {
  content: "";
  position: absolute;
  inset: auto 18% -1px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #7dd3fc, #fb923c, transparent);
  opacity: .9;
}

html[data-ait-page="home"] .float-up:hover {
  transform: translateY(-5px) !important;
  border-color: rgba(255,255,255,.42) !important;
  background: linear-gradient(145deg, rgba(8, 47, 107, .55), rgba(15, 23, 42, .24)) !important;
  box-shadow: 0 22px 48px rgba(8, 47, 107, .26), inset 0 1px 0 rgba(255,255,255,.16) !important;
}

/* Discovery and proof cards. */
html[data-ait-page="home"] .feat-card,
html[data-ait-page="home"] .step-card,
html[data-ait-page="home"] .depts-grid-4 > *,
html[data-ait-page="home"] .testi-carousel {
  border: 1px solid rgba(148, 163, 184, .20) !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 32px rgba(15, 23, 42, .07) !important;
}

html[data-ait-page="home"] .feat-card,
html[data-ait-page="home"] .step-card,
html[data-ait-page="home"] .depts-grid-4 > * {
  position: relative;
  overflow: hidden;
}

html[data-ait-page="home"] .feat-card::before,
html[data-ait-page="home"] .step-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(37,99,235,.08), transparent 45%, rgba(249,115,22,.06));
  opacity: 0;
  transition: opacity .25s ease;
}

html[data-ait-page="home"] .feat-card:hover,
html[data-ait-page="home"] .step-card:hover,
html[data-ait-page="home"] .depts-grid-4 > *:hover {
  transform: translateY(-7px);
  border-color: rgba(37, 99, 235, .28) !important;
  box-shadow: 0 24px 54px rgba(15, 23, 42, .12) !important;
}

html[data-ait-page="home"] .feat-card:hover::before,
html[data-ait-page="home"] .step-card:hover::before { opacity: 1; }

html[data-ait-page="home"] section h2 {
  letter-spacing: -.035em !important;
  text-wrap: balance;
}

html[data-ait-page="home"] section h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin: 13px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #f97316);
}

html[data-ait-page="home"] .anim-bg-2 {
  animation-duration: 12s !important;
  filter: saturate(1.08);
}

@keyframes ait-title-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ait-card-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ait-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
}

@media (max-width: 768px) {
  html[data-ait-page="home"] .hero-title {
    font-size: clamp(2rem, 10vw, 3rem) !important;
    letter-spacing: -.035em !important;
    padding-inline: 8px;
  }

  html[data-ait-page="home"] .float-up,
  html[data-ait-page="home"] .feat-card,
  html[data-ait-page="home"] .step-card,
  html[data-ait-page="home"] .depts-grid-4 > * {
    border-radius: 18px !important;
  }

  html[data-ait-page="home"] .float-up:hover,
  html[data-ait-page="home"] .feat-card:hover,
  html[data-ait-page="home"] .step-card:hover,
  html[data-ait-page="home"] .depts-grid-4 > *:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ait-page="home"] *,
  html[data-ait-page="home"] *::before,
  html[data-ait-page="home"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
