/* =====================================================
   DESIGN DUAL — Design System
   A systems-integrator's visual language: everything on
   this site is built from connected nodes, the same way
   Design Dual builds connected software.
===================================================== */

:root {
  /* Color */
  --navy-950: #060B18;
  --navy-900: #0B1330;
  --navy-800: #131C3F;
  --ink: #0A0E1A;
  --white: #FFFFFF;
  --royal: #2451F5;
  --royal-light: #6E8CFF;
  --royal-dim: rgba(36, 81, 245, 0.14);
  --gray-100: #F4F6FB;
  --gray-200: #E9ECF5;
  --gray-300: #D6DBEA;
  --gray-500: #8892AB;
  --gray-700: #4B5573;

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --container: 1200px;
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
  --nav-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

p { color: var(--gray-700); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--royal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--royal);
  box-shadow: 0 0 0 4px var(--royal-dim);
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===================== BUTTONS ===================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--royal);
  color: var(--white);
  box-shadow: 0 8px 24px -8px rgba(36, 81, 245, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(36, 81, 245, 0.6); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--gray-300);
}
.btn-secondary:hover { border-color: var(--royal); color: var(--royal); transform: translateY(-2px); }
.btn-light {
  background: var(--white);
  color: var(--navy-950);
}
.btn-light:hover { transform: translateY(-2px); }
.btn-ghost-light {
  border: 1.5px solid rgba(255,255,255,0.28);
  color: var(--white);
}
.btn-ghost-light:hover { border-color: var(--white); transform: translateY(-2px); }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: rippleAnim 0.6s var(--ease);
  pointer-events: none;
}
.btn-secondary .ripple, .btn-ghost-light .ripple { background: rgba(36,81,245,0.25); }
@keyframes rippleAnim { to { transform: scale(3.2); opacity: 0; } }

/* ===================== NAVBAR ===================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.navbar.scrolled {
  border-bottom-color: var(--gray-200);
  background: rgba(255,255,255,0.88);
}
.nav-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--royal), var(--navy-900));
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before, .brand-mark::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--white);
}
.brand-mark::before { width: 6px; height: 6px; top: 7px; left: 7px; }
.brand-mark::after { width: 6px; height: 6px; bottom: 7px; right: 7px; opacity: 0.6; }
.brand small { display: block; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--gray-500); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--royal);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 20px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}
.nav-toggle span {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 999;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--royal), var(--royal-light));
  z-index: 1100;
  width: 0%;
}

/* ===================== HERO ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  background: var(--navy-950);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 40%, transparent 90%);
}
.hero-glow {
  position: absolute;
  width: 900px; height: 900px;
  top: -320px; right: -260px;
  background: radial-gradient(circle, rgba(36,81,245,0.35), transparent 65%);
  filter: blur(10px);
  animation: driftGlow 14s ease-in-out infinite alternate;
}
@keyframes driftGlow {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-60px, 40px) scale(1.08); }
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 90px 32px 60px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-copy .eyebrow { color: var(--royal-light); }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero h1 .accent { color: var(--royal-light); }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.68);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 28px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

/* Signature diagram: connected systems map */
.systems-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin: 0 auto;
}
.systems-map svg { width: 100%; height: 100%; overflow: visible; }
.map-line {
  stroke: rgba(110,140,255,0.35);
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
  animation: dashFlow 22s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -400; } }
.map-node {
  fill: var(--navy-900);
  stroke: var(--royal-light);
  stroke-width: 1.4;
}
.map-node-core {
  fill: url(#coreGradient);
}
.map-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.map-pulse {
  fill: var(--royal-light);
  opacity: 0;
  animation: pulseTravel 4.5s var(--ease) infinite;
}

/* ===================== SECTIONS COMMON ===================== */
.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }
.section-dark { background: var(--navy-950); color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.62); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-gray { background: var(--gray-100); }

.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.08rem; margin-top: 14px; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.18s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.34s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.42s; }

/* ===================== CARDS ===================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.glass-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-m);
  padding: 34px 30px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(11, 19, 48, 0.18);
  border-color: var(--royal-light);
}
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--royal-dim);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--royal); }
.glass-card h3 { margin-bottom: 10px; }
.glass-card p { font-size: 0.95rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--royal);
}
.card-link svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.glass-card:hover .card-link svg { transform: translateX(4px); }

.dark-card {
  background: var(--navy-900);
  border: 1px solid rgba(255,255,255,0.08);
}
.dark-card h3 { color: var(--white); }
.dark-card .card-icon { background: rgba(110,140,255,0.16); }

/* ===================== CTA ===================== */
.cta-band {
  background: linear-gradient(135deg, var(--royal), #17307E 78%);
  border-radius: var(--radius-l);
  padding: 70px 60px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
  top: -140px; right: -80px;
}
.cta-band h2 { color: var(--white); max-width: 480px; }
.cta-band p { color: rgba(255,255,255,0.75); margin-top: 10px; }

/* ===================== FOOTER ===================== */
.footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.6);
  padding: 80px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .brand { color: var(--white); margin-bottom: 14px; }
.footer-brand p { font-size: 0.9rem; max-width: 260px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  padding: 6px 0;
  transition: color 0.25s, transform 0.25s;
}
.footer-col a:hover { color: var(--white); transform: translateX(3px); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 14px;
}
.social-icons { display: flex; gap: 12px; }
.social-icons a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.social-icons a:hover { background: var(--royal); border-color: var(--royal); transform: translateY(-3px); }
.social-icons svg { width: 15px; height: 15px; stroke: currentColor; }

/* ===================== PAGE HERO (inner pages) ===================== */
.page-hero {
  padding: 170px 0 90px;
  background: var(--navy-950);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-hero h1 { color: var(--white); max-width: 700px; }
.page-hero p { color: rgba(255,255,255,0.65); max-width: 560px; margin-top: 16px; font-size: 1.05rem; }

/* Utility */
.text-center { text-align: center; }
.mt-lg { margin-top: 60px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

/* Responsive */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .systems-map { max-width: 340px; margin-top: 30px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 46px 28px; flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 26px; }
}
