/* ==========================================================================
   NEXUS COLLECTIVE — Style System
   Modern Editorial Corporate Website
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

/* ---------- Variables ---------- */
:root {
  --navy: #0a1628;
  --navy-light: #162038;
  --charcoal: #1e293b;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-subtle: rgba(37, 99, 235, 0.08);
  --white: #ffffff;
  --off-white: #f8f9fb;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --text-primary: #0a1628;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --section-padding: 120px;
  --container-max: 1200px;
  --nav-height: 80px;
  --nav-height-scrolled: 64px;
}

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

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
}

p {
  color: var(--text-secondary);
  max-width: 640px;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
}

.nav.scrolled {
  height: var(--nav-height-scrolled);
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.98);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo img,
.nav-logo svg {
  height: 36px;
  width: auto;
  transition: height var(--transition-base);
}

.nav.scrolled .nav-logo img,
.nav.scrolled .nav-logo svg {
  height: 30px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--blue);
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--white) !important;
  background: var(--navy);
  padding: 10px 24px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--blue);
  color: var(--white) !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.mobile-menu a:hover {
  color: var(--blue);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: 6px;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
  background: var(--white);
}

.hero-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

#networkCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.hero-content {
  position: relative;
}

.hero-label {
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 32px;
}

.hero h1 span {
  color: var(--blue);
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  transition: all var(--transition-base);
  position: relative;
}

.hero-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  transform: translateY(-4px);
}

.hero-card-icon {
  color: var(--blue);
  margin-bottom: 14px;
}

.hero-card-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hero-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hero-text {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 48px;
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

/* ---------- Section Common ---------- */
section {
  padding: var(--section-padding) 0;
}

.section-header {
  margin-bottom: 64px;
}

.section-header .label {
  margin-bottom: 16px;
  display: block;
}

.section-header p {
  margin-top: 20px;
  font-size: 1.0625rem;
}

.section-divider {
  width: 48px;
  height: 1.5px;
  background: var(--blue);
  margin-top: 24px;
}

/* ---------- Trusted / Positioning ---------- */
.trusted {
  background: var(--off-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trusted-content {
  text-align: center;
}

.trusted-statement {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 800px;
  margin: 0 auto 48px;
}

.trusted-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.metric {
  text-align: center;
}

.metric-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 8px;
}

.metric-number .suffix {
  color: var(--blue);
  font-weight: 700;
}

.metric-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- What We Do ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card {
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--blue);
  transition: height var(--transition-slow);
}

.service-card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 8px 32px rgba(10, 22, 40, 0.06);
  transform: translateY(-4px);
}

.service-card:hover::before {
  height: 100%;
}

.service-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ---------- Approach ---------- */
.approach {
  background: var(--navy);
  color: var(--white);
}

.approach .section-header h2 {
  color: var(--white);
}

.approach .section-header p {
  color: var(--gray-400);
}

.approach .label {
  color: var(--blue-light);
}

.approach-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.approach-steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--gray-600);
}

.approach-step {
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.step-dot {
  width: 12px;
  height: 12px;
  background: var(--blue);
  border-radius: 50%;
  margin: 0 auto 32px;
  position: relative;
  z-index: 2;
}

.step-dot::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  opacity: 0.3;
}

.approach-step h3 {
  color: var(--white);
  font-size: 1.125rem;
  margin-bottom: 12px;
}

.approach-step p {
  font-size: 0.875rem;
  color: var(--gray-400);
  line-height: 1.7;
}

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.process-item {
  position: relative;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

.process-item:hover {
  border-top-color: var(--blue);
}

.process-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 16px;
}

.process-item h3 {
  margin-bottom: 12px;
}

.process-item p {
  font-size: 0.9375rem;
}

/* ---------- Why Nexus ---------- */
.why {
  background: var(--off-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.why-content h2 {
  margin-bottom: 24px;
}

.why-content > p {
  margin-bottom: 32px;
  font-size: 1.0625rem;
}

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

.why-item {
  display: flex;
  gap: 16px;
  align-items: start;
}

.why-icon {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background: var(--blue);
  border-radius: 50%;
  margin-top: 8px;
}

.why-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.why-item p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.why-visual {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.why-stat {
  text-align: center;
}

.why-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
}

.why-stat-number .accent {
  color: var(--blue);
}

.why-stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---------- Team / People ---------- */
.team-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.team-quote {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.team-quote span {
  color: var(--blue);
}

.team-text {
  font-size: 1.0625rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

.team-values {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.team-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.team-value::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
}

/* ---------- CTA / Contact Section ---------- */
.cta-section {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 20px;
}

.cta-section p {
  color: var(--gray-400);
  margin: 0 auto 40px;
  font-size: 1.0625rem;
  max-width: 500px;
}

.cta-section .btn-primary {
  background: var(--blue);
}

.cta-section .btn-primary:hover {
  background: var(--blue-light);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  text-align: left;
}

.contact-text p {
  margin: 0 0 0;
  max-width: 480px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-500);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  background: rgba(255,255,255,0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.form-success {
  display: none;
  text-align: center;
  color: var(--blue-light);
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 8px 0 0;
}

.form-success.visible {
  display: block;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .contact-text p {
    margin: 0 auto;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-top: 16px;
  color: var(--gray-500);
}

.footer h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-bottom: 20px;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul a {
  font-size: 0.875rem;
  color: var(--gray-500);
  transition: color var(--transition-fast);
}

.footer ul a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--gray-600);
}

.footer-legal {
  display: flex;
  gap: 16px;
}

.footer-legal a {
  font-size: 0.8125rem;
  color: var(--gray-600);
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--blue-light);
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js-loaded .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    max-width: 480px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .approach-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .approach-steps::before {
    display: none;
  }

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

  .why-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

@media (max-width: 768px) {
  :root {
    --section-padding: 64px;
    --nav-height: 68px;
    --nav-height-scrolled: 60px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 60px;
  }

  .hero-layout {
    padding: 40px 0;
  }

  .hero-visual {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
  }

  .hero-card {
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
  }

  .hero-card-icon {
    margin-bottom: 0;
    min-width: 24px;
  }

  .hero-card-desc {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    text-align: center;
    justify-content: center;
  }

  .trusted-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .approach-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .approach-step {
    text-align: left;
    padding: 0;
    display: flex;
    gap: 20px;
  }

  .step-dot {
    margin: 4px 0 0;
    min-width: 12px;
  }

  .team-values {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 48px;
  }

  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .service-card {
    padding: 28px;
  }

  .metric-number {
    font-size: 2rem;
  }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }

  .reveal, .js-loaded .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}
