/* ==========================================================================
   DISEG — Decision Architecture
   Premium, minimalistic, editorial design system
   ========================================================================== */

:root {
  --black: #111214;
  --ink: #1a1c1f;
  --gray-900: #2b2e33;
  --gray-700: #52565d;
  --gray-500: #83878f;
  --gray-300: #c7cad0;
  --gray-100: #eceef1;
  --gray-050: #f6f7f8;
  --white: #ffffff;
  --navy: #0d2a52;
  --navy-light: #1e4d8c;
  --accent: #1c4e8c;
  --accent-soft: #e7edf6;
  --red: #d1382e;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-w: 1180px;
  --pad: clamp(24px, 5vw, 64px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

.section-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--black);
}

.section-title {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  margin-bottom: 64px;
  max-width: 760px;
}

p { margin: 0 0 16px; color: var(--gray-700); }

/* Noise overlay for subtle texture */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.35s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -8px rgba(13, 42, 82, 0.45);
}

.btn-ghost {
  border: 1px solid var(--gray-300);
  color: var(--ink);
  padding: 10px 22px;
  font-size: 13.5px;
}
.btn-ghost:hover {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.btn-text {
  padding: 14px 4px;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.btn-text span { transition: transform 0.3s var(--ease); display: inline-block; }
.btn-text:hover span { transform: translateX(4px); }
.btn-text:hover { color: var(--accent); }

.btn-invert {
  background: var(--white);
  color: var(--black);
}
.btn-invert:hover {
  background: var(--navy-light);
  color: var(--white);
  transform: translateY(-1px);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--gray-100);
}

.header-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 24px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; }
.brand-logo { height: 72px; width: auto; }

.main-nav {
  display: flex;
  gap: 34px;
  margin: 0 auto;
}
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
}
.main-nav a:hover { color: var(--black); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav a:hover::after { transform: scaleX(1); }

.header-cta { flex-shrink: 0; }

.lang-switch {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 7px 13px;
  transition: all 0.25s var(--ease);
}
.lang-switch:hover {
  border-color: var(--black);
  color: var(--black);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--black);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 8px var(--pad) 20px;
}
.mobile-nav a {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--gray-050);
  color: var(--ink);
}

@media (max-width: 880px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav.open { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fdfdfe 60%, #f9fafb 100%);
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 60px var(--pad) 100px;
  width: 100%;
}

.hero-headline {
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-bottom: 30px;
}

.hero-sub {
  max-width: 620px;
  margin-bottom: 44px;
}
.hero-sub p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--gray-700);
}
.hero-sub .hero-lede {
  font-size: 20px;
  color: var(--ink);
  font-weight: 500;
}
.hero-sub .hero-emphasis {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--black);
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-actions-arrow {
  color: var(--gray-500);
  font-size: 16px;
}

.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 1px;
  height: 60px;
  background: var(--gray-300);
}
.hero-scroll-cue span {
  position: absolute;
  top: 0; left: -2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: scrollDot 2.2s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 0; opacity: 0; }
  20% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 55px; opacity: 0; }
}

/* ==========================================================================
   Philosophy
   ========================================================================== */

.philosophy {
  padding: 150px 0;
  border-top: 1px solid var(--gray-100);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
}

.philosophy-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.25;
  position: sticky;
  top: 130px;
}

.philosophy-body .lede {
  font-size: 21px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.55;
}
.philosophy-body p { font-size: 17px; }

.philosophy-body .highlight {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-style: italic;
  color: var(--black);
  line-height: 1.4;
  margin: 36px 0 48px;
}

.philosophy-callout {
  margin: 0 0 40px;
  padding: 24px 28px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
}
.philosophy-callout p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--navy);
}

.diagram-wrap { margin-top: 20px; }
.line-diagram { width: 100%; height: auto; overflow: visible; }
.line-diagram .node { fill: var(--gray-300); }
.line-diagram .node-strong { fill: var(--accent); }
.line-diagram .node-final { fill: var(--navy); }
.line-diagram .edge {
  stroke: var(--gray-300);
  stroke-width: 1;
  stroke-dasharray: 6 4;
}

@media (max-width: 880px) {
  .philosophy-grid { grid-template-columns: 1fr; gap: 40px; }
  .philosophy-head h2 { position: static; }
}

/* ==========================================================================
   How We Work
   ========================================================================== */

.how-we-work {
  padding: 150px 0;
  background: var(--gray-050);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.section-lede {
  font-size: 18px;
  color: var(--gray-700);
  line-height: 1.6;
  margin-top: -40px;
  margin-bottom: 64px;
  max-width: 500px;
}

.process-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}

.process-line {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-300) 8%, var(--gray-300) 92%, transparent);
}

.process-step {
  position: relative;
  padding-top: 64px;
}

.process-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  color: var(--accent);
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300);
  z-index: 2;
}
.process-icon svg { width: 24px; height: 24px; }

.process-index {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.process-step h3 {
  font-size: 20px;
  margin-bottom: 12px;
}
.process-step p {
  font-size: 14.5px;
  line-height: 1.6;
}

.process-tags {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}
.process-tags li {
  font-size: 14px;
  color: var(--gray-700);
  padding: 5px 0 5px 16px;
  position: relative;
  border-bottom: 1px dashed var(--gray-100);
}
.process-tags li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}
.process-tags li:last-child { border-bottom: none; }

.process-note {
  font-size: 13px;
  font-style: italic;
  color: var(--gray-500);
  margin-top: 8px;
}

@media (max-width: 980px) {
  .process-track { grid-template-columns: 1fr 1fr; }
  .process-line { display: none; }
}
@media (max-width: 560px) {
  .process-track { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Principles
   ========================================================================== */

.principles { padding: 150px 0; }

.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gray-100);
  border: 1px solid var(--gray-100);
}

.principle-card {
  background: var(--white);
  padding: 44px 34px;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
  position: relative;
}
.principle-card:hover {
  background: var(--gray-050);
}

.principle-mark {
  display: block;
  width: 30px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 26px;
  transition: width 0.35s var(--ease);
}
.principle-card:hover .principle-mark { width: 50px; }

.principle-card h3 {
  font-size: 18px;
  margin-bottom: 14px;
}
.principle-card p {
  font-size: 14.5px;
}

@media (max-width: 880px) {
  .principles-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .principles-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Case Studies / Timeline
   ========================================================================== */

.case-studies {
  padding: 150px 0;
  background: var(--gray-050);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.timeline {
  position: relative;
  max-width: 860px;
}

.timeline-line {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 1px;
  background: var(--gray-300);
}

.timeline-item {
  position: relative;
  padding: 0 0 68px 56px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  top: 6px;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--accent);
}
.timeline-dot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.4s var(--ease);
}
.timeline-item.in-view .timeline-dot::after { transform: scale(1); }

.timeline-number {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.timeline-content h3 {
  font-size: clamp(22px, 2.4vw, 27px);
  margin-bottom: 12px;
  max-width: 620px;
}
.timeline-content p {
  font-size: 16px;
  max-width: 560px;
}

.case-pointer {
  color: var(--gray-300);
  font-size: 15px;
  margin: 6px 0 10px;
}

.case-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--black);
  padding: 10px 20px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
}
.case-tag-label {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ==========================================================================
   What We Build
   ========================================================================== */

.what-we-build {
  padding: 150px 0;
}

.build-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
.build-tags span {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 12px 22px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}
.build-tags span:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* ==========================================================================
   Quote
   ========================================================================== */

.quote-section {
  padding: 160px 0;
  text-align: center;
}
.quote-eyebrow {
  text-align: center;
}
.quote-section blockquote {
  margin: 0 auto;
  max-width: 900px;
}
.quote-section p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--black);
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.4;
  margin: 0 0 8px;
}

/* ==========================================================================
   Final statement
   ========================================================================== */

.final-statement {
  position: relative;
  background: var(--black);
  color: var(--white);
  padding: 160px 0;
  overflow: hidden;
}

#final-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.final-inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.final-statement h2 {
  color: var(--white);
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.25;
  margin-bottom: 40px;
}

.final-lede {
  color: var(--white);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 24px;
}

.final-body {
  color: rgba(255,255,255,0.65);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.contact-block {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.contact-eyebrow {
  color: rgba(255,255,255,0.5);
}
.contact-heading {
  color: var(--white);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.3;
  margin-bottom: 32px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-mark {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.footer-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--white);
}

.footer-wordmark small {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}

.footer-tags {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5);
}

.footer-nav {
  display: flex;
  gap: 22px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  transition: color 0.25s var(--ease);
}
.footer-nav a:hover { color: var(--white); }

.footer-legal-nav {
  grid-column: 1 / -1;
  display: flex;
  gap: 20px;
  justify-content: center;
  padding-top: 20px;
}
.footer-legal-nav a {
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  transition: color 0.25s var(--ease);
}
.footer-legal-nav a:hover { color: var(--white); }

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 14px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

@media (max-width: 780px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-tags, .footer-nav { justify-content: center; }
}

/* ==========================================================================
   Reveal animations
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children within process/principles/timeline handled via JS delay */
