/* ==========================================================================
   CaliHub — Design tokens
   ========================================================================== */
:root {
  /* Color */
  --ink-950: #0c1220;      /* base background, deep signal-blue, not black */
  --ink-900: #10182a;
  --ink-800: #161f35;
  --ink-700: #1e2a45;
  --line: #2a3654;          /* hairline borders on dark */
  --line-soft: #1c2740;
  --paper: #eef0f4;         /* primary text on dark */
  --paper-dim: #939fb8;     /* secondary text on dark */
  --paper-faint: #5c6786;   /* tertiary / captions */
  --amber: #e8a33d;         /* signal beacon accent */
  --amber-dim: #7a5a28;
  --teal: #49a89c;          /* data / secondary accent */

  /* Type */
  --f-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --edge: clamp(20px, 5vw, 72px);
  --max: 1240px;
}

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

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

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  /* faint dot grid, the hub's coordinate field */
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(233,196,120,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

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

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

::selection { background: var(--amber); color: var(--ink-950); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,163,61,0.18);
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--paper);
}

p { margin: 0; }

.btn {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--amber);
  color: var(--ink-950);
}
.btn-primary:hover { background: #f0b055; }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--paper-dim); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12,18,32,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo-mark {
  width: 22px;
  height: 22px;
  position: relative;
  flex: none;
}
.logo-mark span {
  position: absolute;
  border-radius: 50%;
  background: var(--amber);
}
.logo-mark .n-c { width: 7px; height: 7px; top: 7.5px; left: 7.5px; background: var(--paper); }
.logo-mark .n-1 { width: 4px; height: 4px; top: 0; left: 9px; }
.logo-mark .n-2 { width: 4px; height: 4px; top: 9px; left: 18px; opacity: 0.75;}
.logo-mark .n-3 { width: 4px; height: 4px; top: 18px; left: 9px; opacity: 0.5;}
.logo-mark .n-4 { width: 4px; height: 4px; top: 9px; left: 0; opacity: 0.75;}

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 14.5px;
  color: var(--paper-dim);
}
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover { color: var(--paper); }

.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-signin { font-size: 14.5px; color: var(--paper-dim); }
.nav-signin:hover { color: var(--paper); }

.nav-toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: clamp(56px, 9vw, 108px) 0 clamp(40px, 7vw, 84px);
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.05;
  max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero-sub {
  margin-top: 22px;
  font-size: 17.5px;
  color: var(--paper-dim);
  max-width: 46ch;
  line-height: 1.65;
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--paper-faint);
}
.hero-meta strong { color: var(--paper-dim); font-weight: 500; }

/* Hub diagram */
.hub {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin: 0 auto;
}
.hub svg { width: 100%; height: 100%; overflow: visible; }

.hub-line {
  stroke: var(--line);
  stroke-width: 1.4;
  fill: none;
}
.hub-pulse {
  stroke: var(--amber);
  stroke-width: 1.4;
  fill: none;
  stroke-dasharray: 6 240;
  animation: travel 3.6s linear infinite;
}
.hub-pulse.d2 { animation-delay: 0.6s; stroke: var(--teal); }
.hub-pulse.d3 { animation-delay: 1.4s; }
.hub-pulse.d4 { animation-delay: 2.1s; stroke: var(--teal); }
.hub-pulse.d5 { animation-delay: 0.2s; }
.hub-pulse.d6 { animation-delay: 2.8s; stroke: var(--teal); }

@keyframes travel {
  0% { stroke-dashoffset: 246; opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.node-outer {
  fill: var(--ink-800);
  stroke: var(--line);
  stroke-width: 1.4;
}
.node-center {
  fill: var(--ink-800);
  stroke: var(--amber);
  stroke-width: 1.6;
}
.node-center-glow {
  fill: var(--amber);
  opacity: 0.16;
  animation: breathe 3.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes breathe {
  0%, 100% { opacity: 0.1; transform: scale(1); }
  50% { opacity: 0.22; transform: scale(1.12); }
}
.hub-label {
  font-family: var(--f-mono);
  font-size: 9.5px;
  fill: var(--paper-faint);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Stat strip
   ========================================================================== */
.stats {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--ink-900);
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 34px var(--edge);
  gap: 24px;
}
.stat { text-align: left; }
.stat-num {
  font-family: var(--f-mono);
  font-size: clamp(24px, 3vw, 32px);
  color: var(--paper);
  font-weight: 500;
}
.stat-num span { color: var(--amber); }
.stat-label {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--paper-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ==========================================================================
   Section shared
   ========================================================================== */
section { position: relative; z-index: 1; }
.section-pad { padding: clamp(72px, 9vw, 116px) 0; }
.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  margin-top: 16px;
}
.section-head p {
  margin-top: 16px;
  color: var(--paper-dim);
  font-size: 16.5px;
  line-height: 1.65;
}

/* ==========================================================================
   Features
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}
.feature {
  background: var(--ink-900);
  padding: 32px 26px;
  transition: background 0.25s ease;
}
.feature:hover { background: var(--ink-800); }
.feature-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 20px;
}
.feature-icon svg { stroke: var(--amber); }
.feature h3 {
  font-size: 16.5px;
  font-weight: 600;
}
.feature p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--paper-dim);
  line-height: 1.6;
}

/* ==========================================================================
   Process (real sequence — onboarding)
   ========================================================================== */
.process { background: var(--ink-900); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.process-item { position: relative; padding-left: 0; }
.process-num {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--amber);
  display: block;
  margin-bottom: 14px;
}
.process-item h3 { font-size: 18px; margin-bottom: 10px; }
.process-item p { color: var(--paper-dim); font-size: 14.5px; line-height: 1.65; }
.process-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, transparent 100%);
  margin-top: 20px;
}

/* ==========================================================================
   Customers
   ========================================================================== */
.logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 56px;
}
.logo-cell {
  background: var(--ink-900);
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--paper-faint);
  letter-spacing: 0.04em;
}

.testimonial {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: clamp(32px, 4vw, 52px);
  background: var(--ink-900);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.testimonial blockquote {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.5;
  font-weight: 500;
  color: var(--paper);
}
.testimonial cite {
  display: block;
  font-style: normal;
  margin-top: 20px;
  font-size: 14px;
  color: var(--paper-faint);
}
.testimonial cite strong { color: var(--paper-dim); font-weight: 600; }
.testimonial-mark {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--teal);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  white-space: nowrap;
}

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-band {
  background: var(--ink-800);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.cta-band .wrap {
  padding: clamp(56px, 7vw, 88px) var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-size: clamp(26px, 3vw, 36px);
  max-width: 16ch;
}
.cta-band-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer { padding: clamp(56px, 6vw, 80px) 0 32px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line-soft);
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p {
  color: var(--paper-faint);
  font-size: 14px;
  max-width: 32ch;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper-faint);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col a { color: var(--paper-dim); font-size: 14.5px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
  color: var(--paper-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hub { margin-top: 24px; max-width: 380px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: 1fr; gap: 32px; }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .testimonial { grid-template-columns: 1fr; }
  .testimonial-mark { justify-self: start; }
}

@media (max-width: 620px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-meta { flex-wrap: wrap; row-gap: 10px; }
  .features-grid { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
  .cta-band-actions { width: 100%; }
  .cta-band-actions .btn { flex: 1; }
}
