/* ============================================
   NOMDERS — Design Tokens
   Dark, on-chain-native palette built around Base Blue.
   ============================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-surface-2: #fbfbfc;
  --color-surface-offset: #eceef1;
  --color-surface-offset-2: #e3e6ea;
  --color-surface-dynamic: #dde1e6;
  --color-divider: rgba(10, 14, 20, 0.08);
  --color-border: rgba(10, 14, 20, 0.12);

  /* Text */
  --color-text: #0b0d10;
  --color-text-muted: #565d66;
  --color-text-faint: #9aa1aa;
  --color-text-inverse: #f4f5f7;

  /* Primary accent — Base Blue */
  --color-primary: #0052ff;
  --color-primary-hover: #003ecc;
  --color-primary-active: #002c99;
  --color-primary-highlight: rgba(0, 82, 255, 0.08);

  /* Secondary — used only for tiny positive/growth indicators */
  --color-growth: #00996b;
  --color-growth-highlight: rgba(0, 153, 107, 0.12);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 260 / 0.06);
  --shadow-md: 0 4px 16px oklch(0.2 0.02 260 / 0.08);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 260 / 0.14);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  --font-display: 'Clash Display', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
}

[data-theme='dark'] {
  --color-bg: #0a0b0d;
  --color-surface: #101318;
  --color-surface-2: #14171d;
  --color-surface-offset: #1a1e25;
  --color-surface-offset-2: #20242c;
  --color-surface-dynamic: #262b34;
  --color-divider: rgba(255, 255, 255, 0.07);
  --color-border: rgba(255, 255, 255, 0.11);

  --color-text: #edeef1;
  --color-text-muted: #9aa1ac;
  --color-text-faint: #5c626d;
  --color-text-inverse: #0a0b0d;

  --color-primary: #3d84ff;
  --color-primary-hover: #629bff;
  --color-primary-active: #8ab2ff;
  --color-primary-highlight: rgba(61, 132, 255, 0.16);

  --color-growth: #2fd39c;
  --color-growth-highlight: rgba(47, 211, 156, 0.14);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 24px 56px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a0b0d;
    --color-surface: #101318;
    --color-surface-2: #14171d;
    --color-surface-offset: #1a1e25;
    --color-surface-offset-2: #20242c;
    --color-surface-dynamic: #262b34;
    --color-divider: rgba(255, 255, 255, 0.07);
    --color-border: rgba(255, 255, 255, 0.11);
    --color-text: #edeef1;
    --color-text-muted: #9aa1ac;
    --color-text-faint: #5c626d;
    --color-text-inverse: #0a0b0d;
    --color-primary: #3d84ff;
    --color-primary-hover: #629bff;
    --color-primary-active: #8ab2ff;
    --color-primary-highlight: rgba(61, 132, 255, 0.16);
    --color-growth: #2fd39c;
    --color-growth-highlight: rgba(47, 211, 156, 0.14);
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 8px 24px oklch(0 0 0 / 0.45);
    --shadow-lg: 0 24px 56px oklch(0 0 0 / 0.55);
  }
}

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.65vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.3rem + 2.3vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.2rem + 3.6vw, 4.5rem);
  --text-hero: clamp(2.75rem, 0.9rem + 6vw, 6.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ============================================
   Base type
   ============================================ */

body {
  font-family: var(--font-body), 'Inter', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

h1,
h2,
h3 {
  font-family: var(--font-display), 'Helvetica Neue', sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.mono {
  font-family: var(--font-mono), monospace;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono), monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
}

/* ============================================
   Layout primitives
   ============================================ */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-10));
}

.container--narrow {
  max-width: var(--content-default);
}

section {
  position: relative;
}

.section-pad {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}

.section-pad-tight {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}

.divider-line {
  border: none;
  border-top: 1px solid var(--color-divider);
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.header--hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.brand-name {
  font-family: var(--font-display), sans-serif;
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width var(--transition-interactive);
}

.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.mobile-nav {
  border-top: 1px solid var(--color-divider);
  background: var(--color-bg);
}

.mobile-nav-links {
  list-style: none;
  display: grid;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-10));
}

.mobile-nav-links a {
  display: block;
  padding: var(--space-4) 0;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-divider);
}

.mobile-nav-links li:last-child a {
  border-bottom: none;
}

.mobile-nav-cta {
  display: none;
  max-width: var(--content-wide);
  margin: var(--space-2) auto var(--space-6);
  margin-inline: clamp(var(--space-5), 4vw, var(--space-10));
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
.btn-primary:active {
  background: var(--color-primary-active);
  transform: translateY(1px);
}

.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-ghost:hover {
  border-color: var(--color-text-faint);
  background: var(--color-surface-offset);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

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

.hero {
  padding-top: clamp(var(--space-20), 12vw, var(--space-32));
  padding-bottom: clamp(var(--space-16), 8vw, var(--space-24));
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-10);
  align-items: end;
}

.hero-copy {
  max-width: 46rem;
}

.hero-eyebrow {
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: var(--text-hero);
  line-height: 1.02;
  margin-bottom: var(--space-6);
}

.hero-title em {
  font-style: normal;
  color: var(--color-primary);
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 40rem;
  margin-bottom: var(--space-8);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-divider);
}

.stat-value {
  font-family: var(--font-mono), monospace;
  font-size: var(--text-3xl);
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ============================================
   Logos strip
   ============================================ */

.logos-section {
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.logos-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.logos-head h2 {
  font-size: var(--text-lg);
  font-family: var(--font-body), sans-serif;
  font-weight: 500;
  color: var(--color-text-muted);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.logo-cell {
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-faint);
}

.logo-cell svg {
  width: 36px;
  height: 36px;
  color: currentColor;
}

.logo-cell span {
  font-family: var(--font-mono), monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

.logo-cell:hover {
  color: var(--color-primary);
}

.logos-caption {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
}

/* ============================================
   Services
   ============================================ */

.services-head {
  max-width: 42rem;
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}

.services-head h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-4);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.service-card {
  padding: clamp(var(--space-6), 4vw, var(--space-8));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.service-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ============================================
   CTA / Contact
   ============================================ */

.cta-section {
  text-align: left;
}

.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 42rem;
}

.cta-title {
  font-size: var(--text-2xl);
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.cta-copy {
  color: var(--color-text-muted);
  max-width: 34rem;
  margin-bottom: var(--space-8);
}

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

.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.footer-tagline {
  color: var(--color-text-muted);
  max-width: 24rem;
  font-size: var(--text-sm);
}

.footer-cols {
  display: flex;
  gap: var(--space-16);
}

.footer-col h4 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  display: grid;
  gap: var(--space-3);
  list-style: none;
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer-socials {
  display: flex;
  gap: var(--space-4);
}

.footer-socials a {
  color: var(--color-text-faint);
}
.footer-socials a:hover {
  color: var(--color-primary);
}

/* ============================================
   Scroll reveal
   ============================================ */

.reveal {
  opacity: 1;
}

@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .header-cta {
    display: none;
  }
  .mobile-nav-cta {
    display: inline-flex;
  }
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    max-width: none;
    padding-top: var(--space-6);
  }
  .stat-value {
    font-size: var(--text-xl);
    margin-bottom: var(--space-1);
  }
  .stat-label {
    font-size: 0.6875rem;
    line-height: 1.3;
  }
  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-top {
    flex-direction: column;
  }
  .footer-cols {
    gap: var(--space-10);
  }
}

@media (max-width: 560px) {
  .logo-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-cols {
    flex-direction: column;
    gap: var(--space-6);
  }
}

/* real client marks */
.logo-cell img { width: 34px; height: 34px; border-radius: 50%; filter: saturate(.75); opacity: .9; transition: filter .3s, opacity .3s; }
.logo-cell:hover img { filter: none; opacity: 1; }
.logo-cell-text { justify-content: center; }

/* four services = 2x2 box on desktop */
@media (min-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* hero description */
.hero-sub { color: var(--text-secondary, #9aa1ad); font-size: 1.05rem; line-height: 1.6; max-width: 54ch; margin: 20px 0 28px; }

/* bigger marks, brighter labels */
.logo-cell img { width: 52px; height: 52px; }
.logo-cell span { font-size: var(--text-sm); color: #eef1f6; letter-spacing: 0.06em; }
