/* =========================================================================
   HADES — A Ruzo LLM
   Palette + type derived from the HADES wordmark:
   near-black ground, metallic silver text, a single Ruzo-blue accent.
   ========================================================================= */

:root {
  /* Color */
  --bg:            #000308;
  --bg-2:          #05070f;
  --silver:        #c7cfdb;   /* body-ish metallic */
  --silver-bright: #eef2f8;   /* headings */
  --slate:         #8a93a6;   /* dim / secondary */
  --slate-dim:     #565f72;
  --blue:          #3d7dff;   /* the accent dot / RUZO blue */
  --blue-soft:     #6fa0ff;
  --blue-glow:     rgba(61, 125, 255, 0.45);
  --hairline:      rgba(255, 255, 255, 0.09);
  --hairline-2:    rgba(255, 255, 255, 0.05);

  /* Type */
  --display: "Chakra Petch", system-ui, sans-serif;
  --body:    "Space Grotesk", system-ui, sans-serif;

  /* Scale */
  --max: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Each panel below opts in with scroll-snap-align; proximity (not
     mandatory) so tall panels like .domains can still be scrolled through
     freely instead of fighting the user. */
  scroll-snap-type: y proximity;
}

body {
  background: var(--bg);
  color: var(--silver);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The canvas warp field sits behind all content */
#warp {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* A faint vignette so text stays legible over the stars */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%,
      transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

main, .nav, .footer { position: relative; z-index: 2; }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: background 0.4s ease, backdrop-filter 0.4s ease,
              border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(3, 5, 12, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline-2);
}
.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.42em;
  font-size: 1.05rem;
  color: var(--silver-bright);
  padding-left: 0.2em;
}
.nav__brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  color: var(--slate-dim);
  margin-top: 0.45rem;
  padding-left: 0.22em;
}
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); }
.nav__links a {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--slate);
  text-transform: uppercase;
  transition: color 0.25s ease;
}
.nav__links a:hover { color: var(--silver-bright); }
.nav__cta {
  color: var(--silver-bright) !important;
  border: 1px solid var(--hairline);
  padding: 0.55rem 1.1rem;
  border-radius: 100px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
              color 0.25s ease;
}
.nav__cta:hover {
  border-color: var(--blue);
  box-shadow: 0 0 24px -6px var(--blue-glow);
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem var(--pad) 4rem;
  scroll-snap-align: start;
}
.hero__inner { max-width: 860px; position: relative; }
.hero__logo {
  width: min(680px, 88vw);
  height: auto;
  /* screen blend drops the JPG's pure-black background so the metallic
     wordmark sits directly on the starfield with no visible box */
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 60px rgba(61, 125, 255, 0.14));
  animation: rise 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero__thesis {
  margin-top: 2.4rem;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  color: var(--slate);
  line-height: 1.7;
  letter-spacing: 0.02em;
  animation: rise 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
.hero__thesis span { color: var(--silver-bright); }

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--slate-dim);
  animation: fade 1.4s ease 0.8s both;
}
.hero__scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--slate-dim), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(var(--blue-soft), transparent);
  animation: scrollPulse 1.9s ease-in-out infinite;
}

/* =========================================================================
   IDLE READABILITY GRADIENT
   The warp field is busiest (and text hardest to read) while the page is
   actively scrolling. main.js toggles body.is-idle ~200ms after scrolling
   stops; each panel then fades in a soft gradient behind its own content.
   ========================================================================= */
.hero::before,
.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 55% at 50% 45%,
    rgba(5, 7, 15, 0.8) 0%,
    rgba(5, 7, 15, 0.45) 48%,
    transparent 80%);
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
body.is-idle .hero::before,
body.is-idle .section::before {
  opacity: 1;
}

/* =========================================================================
   SECTION SCAFFOLD
   ========================================================================= */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 9rem) var(--pad);
  /* One panel per section: settles the section in the viewport as its own
     "slide" while scrolling, without trapping the user on taller ones. */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 1.4rem;
}
.eyebrow--center { text-align: center; }
.section__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--silver-bright);
  max-width: 18ch;
}
.section__title--center {
  max-width: none;
  text-align: center;
  margin-inline: auto;
}
.section__lead {
  margin-top: 1.6rem;
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--slate);
}
.section__lead--center { margin-inline: auto; text-align: center; }

/* =========================================================================
   MODEL STATS
   ========================================================================= */
.stats {
  margin-top: 3.6rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline-2);
  border: 1px solid var(--hairline-2);
  border-radius: 14px;
  overflow: hidden;
}
.stat {
  background: rgba(5, 7, 15, 0.6);
  padding: 2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.stat__value {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--silver-bright);
  letter-spacing: 0.02em;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stat__value--live { color: var(--blue-soft); font-size: clamp(1.2rem, 2.4vw, 1.7rem); }
.stat__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 var(--blue-glow);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.stat__label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--slate-dim);
  text-transform: uppercase;
}

/* =========================================================================
   DOMAINS
   ========================================================================= */
.domain-grid {
  margin-top: 3.4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.domain {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 2.2rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              border-color 0.4s ease, box-shadow 0.4s ease;
}
.domain:hover {
  transform: translateY(-4px);
  border-color: rgba(61,125,255,0.4);
  box-shadow: 0 20px 60px -30px var(--blue-glow);
}
.domain__index {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--blue);
}
.domain__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--silver-bright);
  margin: 1rem 0 0.8rem;
  letter-spacing: 0.03em;
}
.domain__body { color: var(--slate); font-size: 0.98rem; }

/* =========================================================================
   INDIA
   ========================================================================= */
.india { position: relative; text-align: center; }
/* A whisper-thin tricolour rule — the only place saffron/green appear */
.india__band {
  width: 120px;
  height: 3px;
  margin: 0 auto 2.4rem;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #ff9933 0%, #ff9933 33%,
    #ffffff 33%, #ffffff 66%,
    #138808 66%, #138808 100%);
  opacity: 0.85;
  box-shadow: 0 0 30px -8px rgba(255,153,51,0.5);
}

/* =========================================================================
   ACCESS / CTA
   ========================================================================= */
.access {
  text-align: center;
  max-width: 680px;
}
.access__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--silver-bright);
  letter-spacing: 0.02em;
}
.access__lead {
  margin: 1.2rem auto 2.4rem;
  color: var(--slate);
  max-width: 46ch;
}
.access__form {
  display: flex;
  gap: 0.6rem;
  max-width: 460px;
  margin: 0 auto;
}
.access__form input {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--hairline);
  border-radius: 100px;
  padding: 0.9rem 1.3rem;
  color: var(--silver-bright);
  font-family: var(--body);
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.access__form input::placeholder { color: var(--slate-dim); }
.access__form input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(61,125,255,0.15);
}
.access__form button {
  background: var(--silver-bright);
  color: #05070f;
  border: none;
  border-radius: 100px;
  padding: 0 1.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.access__form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px -14px rgba(255,255,255,0.4);
}
.access__note {
  margin-top: 1.1rem;
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: var(--blue-soft);
  letter-spacing: 0.04em;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  border-top: 1px solid var(--hairline-2);
  padding: 2.6rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__brand { display: flex; flex-direction: column; line-height: 1; }
.footer__name {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--silver-bright);
  padding-left: 0.2em;
}
.footer__sub {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--slate-dim);
  margin-top: 0.55rem;
  text-transform: uppercase;
}
.footer__legal { font-size: 0.8rem; color: var(--slate-dim); }

/* =========================================================================
   REVEAL ON SCROLL
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1),
              transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollPulse {
  0%   { transform: translateY(0); }
  100% { transform: translateY(280%); }
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 var(--blue-glow); }
  70%  { box-shadow: 0 0 0 10px rgba(61,125,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,125,255,0); }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .domain-grid { grid-template-columns: 1fr; }
  .nav__links a:not(.nav__cta) { display: none; }
}
@media (max-width: 480px) {
  .access__form { flex-direction: column; }
  .access__form button { padding: 0.9rem; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* Respect reduced-motion: kill non-essential motion, keep the page usable */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
