/* ═══════════════════════════════════════════════════════
   NEXUS FLOW — Design System & Styles
   Font: Clash Display (Fontshare)
   Palette: #FFFFFF / #000000 / #3A3A3C (slate) / #0071E3 (electric blue)
   ═══════════════════════════════════════════════════════ */

/* ── 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: 'Clash Display', system-ui, -apple-system, sans-serif;
  font-weight: 200;
  color: #000;
  background: #fff;
  overflow-x: hidden;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

/* ── Utility ───────────────────────────────────────── */
.text-bold {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-extralight {
  font-weight: 200;
  letter-spacing: 0.05em;
}

/* ── Reveal Animation ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* stagger children inside friction */
.friction__item.reveal:nth-child(2) { transition-delay: 0.15s; }
.friction__item.reveal:nth-child(3) { transition-delay: 0.30s; }

/* ── Section Base ──────────────────────────────────── */
.section {
  padding: 150px 64px;
  position: relative;
}

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

/* ═══════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #000;
  z-index: 1100;
  transition: width 0.1s linear, background 0.4s ease;
  transform-origin: left;
}

.scroll-progress--dark {
  background: #fff;
}

/* ═══════════════════════════════════════════════════════
   1. NAVIGATION
   ═══════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 64px;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s ease,
              border-color 0.4s ease;
}

/* Shrink slightly after scrolling */
.nav--scrolled {
  height: 60px;
}

.nav--dark {
  background: rgba(0, 0, 0, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav--dark .nav__logo {
  color: #fff;
}

.nav--dark .nav__link {
  color: rgba(255, 255, 255, 0.65);
}

.nav--dark .nav__link::after {
  background: #fff;
}

.nav--dark .nav__link:hover,
.nav--dark .nav__link.active {
  color: #fff;
}

.nav--dark .btn--nav {
  background: #fff;
  color: #000;
}

.nav--dark .btn--nav:hover {
  background: #0071E3;
  color: #fff;
}

.nav--dark .nav__hamburger-bar {
  background: #fff;
}

.nav__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo */
.nav__logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #000;
  transition: color 0.4s ease;
  flex-shrink: 0;
}

/* Desktop nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0 auto;
}

.nav__link {
  font-family: inherit;
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.55);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

/* Animated underline */
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__link:hover {
  color: #000;
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: scaleX(1);
}

.nav__link.active {
  color: #000;
}

/* Hamburger — hidden on desktop */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  z-index: 1200;
}

.nav__hamburger-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #000;
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              background 0.4s ease;
  transform-origin: center;
}

/* Hamburger → X morphing */
.nav--menu-open .nav__hamburger-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav--menu-open .nav__hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav--menu-open .nav__hamburger-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Mobile nav overlay ────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.mobile-menu__link {
  font-weight: 700;
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  transition: color 0.3s ease,
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu__link:hover {
  color: #fff;
}

.mobile-menu.open .mobile-menu__link {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger each link */
.mobile-menu.open .mobile-menu__link:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu.open .mobile-menu__link:nth-child(2) { transition-delay: 0.14s; }
.mobile-menu.open .mobile-menu__link:nth-child(3) { transition-delay: 0.20s; }
.mobile-menu.open .mobile-menu__link:nth-child(4) { transition-delay: 0.26s; }

.mobile-menu__cta {
  margin-top: 16px;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding: 14px 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  opacity: 0;
  transform: translateY(20px);
  transition: color 0.3s ease,
              border-color 0.3s ease,
              background 0.3s ease,
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.34s;
}

.mobile-menu.open .mobile-menu__cta {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu__cta:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Responsive breakpoints */
@media (max-width: 860px) {
  .nav {
    padding: 0 32px;
  }
  .nav__links {
    display: none;
  }
  .btn--nav {
    display: none;
  }
  .nav__hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0 20px;
    height: 60px;
  }
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn--pill {
  padding: 12px 28px;
  border-radius: 100px;
}

.btn--nav {
  background: #000;
  color: #fff;
  font-size: 0.8rem;
  padding: 10px 24px;
}

.btn--nav:hover {
  background: #0071E3;
}

.btn--dark {
  background: #000;
  color: #fff;
  font-size: 0.95rem;
  padding: 16px 40px;
}

.btn--dark:hover {
  background: #0071E3;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 113, 227, 0.25);
}

/* ═══════════════════════════════════════════════════════
   2. HERO
   ═══════════════════════════════════════════════════════ */
.section--hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  padding-top: 72px;
  overflow: hidden;
}

.hero__orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  pointer-events: none;
  will-change: transform;
  opacity: 0.6;
  animation: orbitPulse 8s ease-in-out infinite alternate;
}

@keyframes orbitPulse {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { transform: translate(-50%, -50%) scale(1.04) rotate(6deg); }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__headline {
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  line-height: 0.95;
  margin-bottom: 36px;
}

.hero__headline .text-bold {
  display: block;
}

.hero__headline .text-extralight {
  display: block;
  font-size: 0.9em;
}

.hero__sub {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #3a3a3c;
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════
   3. FRICTION
   ═══════════════════════════════════════════════════════ */
.section--friction {
  background: #000;
  color: #fff;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.friction__inner {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.friction__item {
  display: flex;
  align-items: baseline;
  gap: 32px;
}

.friction__num {
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.8);
  color: transparent;
  flex-shrink: 0;
}

.friction__text {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.friction__slash {
  font-weight: 200;
  font-size: 1.4rem;
  opacity: 0.35;
}

.friction__text p {
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .friction__item {
    flex-direction: column;
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════════════════
   4. SOLUTIONS (Bento Grid)
   ═══════════════════════════════════════════════════════ */
.section--solutions {
  background: #fff;
}

.bento {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.bento__card {
  background: #f7f7f8;
  border-radius: 20px;
  padding: 52px 44px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bento__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}



.bento__label {
  display: inline-block;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0071E3;
  margin-bottom: 20px;
}

.bento__title {
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.bento__body {
  font-weight: 200;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  letter-spacing: 0.04em;
  color: #3a3a3c;
  line-height: 1.7;
  max-width: 380px;
}

.node-tree svg {
  width: 100%;
  max-width: 480px;
}

@media (max-width: 768px) {
  .bento {
    grid-template-columns: 1fr;
  }

  .bento__card {
    padding: 36px 28px;
  }
}

/* ═══════════════════════════════════════════════════════
   5. PROOF / STATS
   ═══════════════════════════════════════════════════════ */
.section--proof {
  background: #000;
  color: #fff;
}

.stats {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat {
  padding: 48px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: border-color 0.4s ease;
}

.stat:hover {
  border-color: #0071E3;
}

.stat__number {
  display: block;
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}

.stat__label {
  font-weight: 400;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  letter-spacing: 0.06em;
  color: #fff;
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ═══════════════════════════════════════════════════════
   6. PROJECT SPOTLIGHT
   ═══════════════════════════════════════════════════════ */
.section--spotlight {
  background: #fff;
}

.spotlight__heading {
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 64px;
  text-align: center;
}

.spotlight__grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.spotlight__tile {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0a0a;
  color: #fff;
  min-height: 420px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight__tile:hover {
  transform: scale(1.02);
}

.spotlight__tile-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
}

.spotlight__tag {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.spotlight__title {
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.spotlight__desc {
  font-weight: 200;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

/* Subtle unique backgrounds per tile */
.spotlight__tile:nth-child(1) {
  background: linear-gradient(160deg, #0a0a0a 0%, #111 100%);
}
.spotlight__tile:nth-child(2) {
  background: linear-gradient(160deg, #0d0d0d 0%, #0a0a0a 100%);
}
.spotlight__tile:nth-child(3) {
  background: linear-gradient(160deg, #080808 0%, #0e0e0e 100%);
}

@media (max-width: 900px) {
  .spotlight__grid {
    grid-template-columns: 1fr;
  }
  .spotlight__tile {
    min-height: 320px;
  }
}

/* ═══════════════════════════════════════════════════════
   7. FOOTER & CTA
   ═══════════════════════════════════════════════════════ */
.section--footer {
  background: #fafafa;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.footer-cta {
  text-align: center;
  margin-bottom: 120px;
}

.footer-cta__headline {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.footer-cta__form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 100px;
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.footer-cta__form:focus-within {
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.footer-cta__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 16px 24px;
  color: #000;
}

.footer-cta__input::placeholder {
  color: #999;
}

.footer-cta__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: none;
  background: #000;
  color: #fff;
  border-radius: 50%;
  margin-right: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.35s ease, transform 0.35s ease;
}

.footer-cta__submit:hover {
  background: #0071E3;
  transform: scale(1.08);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 64px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__col-title {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 4px;
}

.footer__link {
  font-weight: 200;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #3a3a3c;
  transition: color 0.3s ease;
}

.footer__link:hover {
  color: #0071E3;
}

.footer__copy {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.footer__copy p {
  font-weight: 200;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #999;
}

@media (max-width: 600px) {
  .footer__bottom {
    gap: 36px;
  }
  .footer__copy {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}
