/* ═══════════════════════════════════════════════
   NIRMAAN | Design System & Styles
   ═══════════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --bg:          #161615; /* Even darker for true premium contrast */
  --bg-elevated: #1e1e1c;
  --bg-card:     rgba(255, 255, 255, 0.02);
  --bg-card-alt: #1a1a18;
  --text:        #f4f4f2;
  --text-muted:  #9e9e9a;
  --text-dim:    #6b6b66;
  --accent:      #cfee47;
  --accent-dim:  rgba(207, 238, 71, .08);
  --border:      rgba(255,255,255,.06);
  --border-hover: rgba(255,255,255,.12);
  --radius:      16px; /* Rounded corners */
  --glow:        0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  --glow-hover:  0 12px 40px rgba(207, 238, 71, 0.06);
  --transition:  0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── RESET ─── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ─── UTILITIES ─── */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

.accent {
  color: var(--accent);
}

.section__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.section__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 80px;
  letter-spacing: -0.03em;
  max-width: 900px;
}

.section {
  padding: 160px 0;
  position: relative;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 40px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 60px; /* Fully rounded buttons */
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn--accent {
  background: var(--accent);
  color: #000;
}

.btn--accent:hover {
  background: #e1fc68;
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.15); /* Subtle white glow */
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  border-color: var(--text);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.15); /* Subtle white glow */
}

.btn--sm {
  padding: 12px 28px;
  font-size: 0.85rem;
}

/* ─── NAVIGATION ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: all var(--transition);
}

.nav.scrolled {
  background: rgba(22, 22, 21, .85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
}

.nav__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links .btn--accent {
  color: #000;
  font-weight: 600;
}

.nav__links .btn--accent:hover {
  color: #000;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--text);
  transition: all .3s;
}

.nav__toggle.active span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle.active span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 160px 0 120px;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__tag::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--text-dim);
}

.hero__headline {
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 48px;
  max-width: 1100px;
}

.hero__sub {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 64px;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ─── PROBLEM ─── */
.section--problem {
  border-top: 1px solid var(--border);
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.problem__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--glow);
}

.problem__card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-hover);
  transform: translateY(-4px);
}

.problem__icon {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
  display: block;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.problem__card h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.problem__card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── PIPELINE / SYSTEM ─── */
.section--system {
  border-top: 1px solid var(--border);
  background: var(--bg-card-alt);
}

.pipeline {
  display: flex;
  align-items: stretch;
  gap: 24px;
  background: transparent;
  border: none;
}

.pipeline__step {
  flex: 1 1 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--glow);
}

.pipeline__step:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-hover);
  transform: translateY(-4px);
}

.pipeline__number {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.pipeline__name {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.pipeline__desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.pipeline__connector {
  display: none;
}

/* ─── PROGRAMS ─── */
.section--programs {
  border-top: 1px solid var(--border);
}

.programs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.program-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--glow);
}

.program-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-hover);
  transform: translateY(-4px);
}

.program-card__header {
  margin-bottom: 40px;
}

.program-card__tag {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 24px;
}

.program-card__title {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.program-card__list {
  flex: 1;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.program-card__list li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 24px;
  position: relative;
}

.program-card__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.program-card__footer {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}

.program-card__outcome {
  font-weight: 500;
  color: var(--text);
}

/* ─── COMMUNITY ─── */
.section--community {
  border-top: 1px solid var(--border);
  background: var(--bg-card-alt);
}

.community__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.community__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 56px;
  max-width: 520px;
}

.community__principles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.principle {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
}

.principle__accent {
  color: var(--text-dim);
  font-weight: 400;
}

.community__box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 80px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow);
}

.community__stat-number {
  font-size: 5rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.04em;
  display: block;
  line-height: 1;
}

.community__stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: block;
  margin-top: 16px;
}

.community__divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 40px auto;
}

.community__note {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── VISION ─── */
.section--vision {
  border-top: 1px solid var(--border);
}

.vision__content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.vision__block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--glow);
}

.vision__block:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-hover);
  transform: translateY(-4px);
}

.vision__block h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.vision__block p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── CTA ─── */
.section--cta {
  border-top: 1px solid var(--border);
}

.cta__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.cta__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 64px 48px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--glow);
}

.cta__card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-hover);
  transform: translateY(-4px);
}

.cta__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.cta__title {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.cta__desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 400px;
}

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0;
  background: var(--bg-card-alt);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__logo-img {
  height: 48px;
  width: auto;
  display: block;
  margin-bottom: 12px;
  transition: opacity var(--transition);
}

.footer__logo-img:hover {
  opacity: 0.8;
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.footer__links {
  display: flex;
  gap: 32px;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--text);
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.problem__card:nth-child(2),
.program-card:nth-child(2),
.vision__block:nth-child(2) {
  transition-delay: 0s;
}

.problem__card:nth-child(1),
.problem__card:nth-child(3),
.program-card:nth-child(1),
.program-card:nth-child(3),
.vision__block:nth-child(1),
.vision__block:nth-child(3) {
  transition-delay: 0.15s;
}

/* Principles sequential stagger */
.principle:nth-child(1) { transition-delay: 0s; }
.principle:nth-child(2) { transition-delay: 0.15s; }
.principle:nth-child(3) { transition-delay: 0.3s; }
.principle:nth-child(4) { transition-delay: 0.45s; }

/* pipeline ripple stagger (middle outwards) */
.pipeline__step:nth-child(5) {
  transition-delay: 0s;
}
.pipeline__step:nth-child(3),
.pipeline__step:nth-child(7) {
  transition-delay: 0.15s;
}
.pipeline__step:nth-child(1),
.pipeline__step:nth-child(9) {
  transition-delay: 0.3s;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .section { padding: 120px 0; }
  .section__title { margin-bottom: 64px; }
  
  .problem__grid,
  .programs__grid,
  .vision__content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .pipeline {
    flex-direction: column;
    border: none;
    background: transparent;
    gap: 24px;
  }

  .community__layout {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .cta__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .container { padding: 0 24px; }

  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: -1;
  }

  .nav__links.open {
    opacity: 1;
    pointer-events: auto;
    z-index: 999;
  }

  .nav__links a {
    font-size: 1.5rem;
  }

  .hero {
    padding: 160px 0 80px;
  }

  .hero__headline {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  
  .hero__actions {
    flex-direction: column;
  }

  .btn { width: 100%; }

  .cta__card {
    padding: 48px 32px;
  }

  .community__box {
    padding: 64px 32px;
    border: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: transparent;
  }

  .community__stat-number {
    font-size: 4rem;
  }

  .footer__inner {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section__title { font-size: 2rem; }
  .program-card { padding: 40px 24px; }
  .program-card__title { font-size: 1.5rem; }
}