/* FortStack NZ — design system */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #080b10;
  --surface: #111827;
  --surface-2: #172033;
  --surface-3: #0d131f;
  --line: rgba(238,241,245,0.09);
  --line-strong: rgba(238,241,245,0.16);
  --text: #eef1f5;
  --text-muted: #8b93a1;
  --text-faint: #5a6472;
  --teal: #35b79c;
  --teal-deep: #1f8f7a;
  --teal-dim: rgba(53,183,156,0.12);
  --blue: #7aa7ff;
  --amber: #f3b35c;

  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(53,183,156,0.14), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(122,167,255,0.1), transparent 34%),
    linear-gradient(180deg, #0a0e15 0%, var(--bg) 38%, #090c11 100%);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@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; }
}

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

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

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8,11,16,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo svg { height: 30px; width: auto; display: block; }
.nav-logo-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.nav-logo-text .nz { font-size: 11px; color: var(--teal); font-weight: 600; margin-left: 1px; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.18s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -28px;
  height: 2px;
  background: var(--teal);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.nav-cta:hover { border-color: var(--teal); background: var(--teal-dim); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(238,241,245,0.03);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transition: transform 0.18s ease;
}
.site-nav.menu-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.site-nav.menu-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Eyebrow / section labels ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}
.eyebrow .node-glyph {
  width: 22px;
  height: 10px;
  flex-shrink: 0;
}

/* ---------- Type scale ---------- */

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

h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.06; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.14; }
h3 { font-size: 22px; line-height: 1.3; }
h4 { font-size: 16px; line-height: 1.4; }

p { margin: 0; color: var(--text-muted); }
.lede { font-size: 19px; line-height: 1.55; color: var(--text-muted); max-width: 640px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 13px 24px;
  border-radius: 3px;
  transition: all 0.18s ease;
  white-space: nowrap;
  min-height: 46px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal), #56d1b5);
  color: #061410;
  font-weight: 500;
  box-shadow: 0 16px 44px rgba(53,183,156,0.18);
}
.btn-primary:hover { background: #45c7ab; transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Sections ---------- */

section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-border-top { border-top: 1px solid var(--line); }
.section-muted {
  background: linear-gradient(180deg, rgba(17,24,39,0.46), rgba(8,11,16,0.42));
}

.section-head {
  max-width: 620px;
  margin-bottom: 56px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(238,241,245,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238,241,245,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
}
.hero .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 36px; }

.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.hero-console {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(238,241,245,0.06), rgba(238,241,245,0.02)),
    var(--surface-3);
  box-shadow: 0 30px 90px rgba(0,0,0,0.34);
  overflow: hidden;
}
.console-top {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
}
.console-top span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
}
.console-top span:first-child { background: var(--amber); }
.console-top span:nth-child(2) { background: var(--teal); }
.console-top span:nth-child(3) { background: var(--blue); }
.hero-diagram { width: 100%; height: auto; display: block; }
.hd-grid {
  fill: none;
  stroke: rgba(238,241,245,0.06);
  stroke-width: 1;
}
.console-readout {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-diagram .hd-line {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  opacity: 0;
}
.hero-diagram .hd-node { opacity: 0; transform-origin: center; transform: scale(0.4); }
.hero-diagram.diagram-ready .hd-line {
  animation: hd-draw 1.1s ease forwards;
}
.hero-diagram.diagram-ready .hd-node {
  animation: hd-pop 0.5s cubic-bezier(0.2,0.8,0.3,1.2) forwards;
}
.hero-diagram.diagram-ready .hd-line:nth-of-type(1) { animation-delay: 0.1s; }
.hero-diagram.diagram-ready .hd-line:nth-of-type(2) { animation-delay: 0.28s; }
.hero-diagram.diagram-ready .hd-line:nth-of-type(3) { animation-delay: 0.46s; }
.hero-diagram.diagram-ready .hd-line:nth-of-type(4) { animation-delay: 0.64s; }
.hero-diagram.diagram-ready .hd-line:nth-of-type(5) { animation-delay: 0.82s; }
.hero-diagram.diagram-ready .hd-node:nth-of-type(1) { animation-delay: 0.15s; }
.hero-diagram.diagram-ready .hd-node:nth-of-type(2) { animation-delay: 0.33s; }
.hero-diagram.diagram-ready .hd-node:nth-of-type(3) { animation-delay: 0.51s; }
.hero-diagram.diagram-ready .hd-node:nth-of-type(4) { animation-delay: 0.69s; }
.hero-diagram.diagram-ready .hd-node:nth-of-type(5) { animation-delay: 0.87s; }
.hero-diagram.diagram-ready .hd-node:nth-of-type(6) { animation-delay: 1.0s; }

@keyframes hd-draw { to { stroke-dashoffset: 0; opacity: 0.5; } }
@keyframes hd-pop { to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .hero-diagram .hd-line, .hero-diagram .hd-node { opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
}

/* ---------- Stat / meta strip ---------- */

.meta-strip {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.meta-item .meta-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--teal);
  display: block;
  margin-bottom: 6px;
}
.meta-item .meta-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.18);
}

.card {
  background: var(--surface);
  padding: 36px 32px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.card:hover { background: var(--surface-2); transform: translateY(-2px); }

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
}

.card h3 { margin-bottom: 12px; }
.card p { font-size: 14.5px; line-height: 1.65; }

.card-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ---------- Two column ---------- */

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

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}
.process-item {
  background: rgba(17,24,39,0.86);
  min-height: 260px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
}
.process-item span {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 52px;
}
.process-item h3 { font-size: 19px; margin-bottom: 10px; }
.process-item p { font-size: 14px; line-height: 1.62; }

.split-reverse { grid-template-columns: 1fr 1fr; }
.split-reverse > *:first-child { order: 2; }

/* ---------- Lists ---------- */

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--text-muted);
}
.check-list li:first-child { border-top: none; }
.check-list .tick {
  color: var(--teal);
  font-family: var(--mono);
  flex-shrink: 0;
}

/* ---------- Panel (dark card / cta) ---------- */

.panel {
  background:
    linear-gradient(135deg, rgba(53,183,156,0.07), transparent 38%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 56px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.2);
}

.panel-cta {
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

/* ---------- Approach steps ---------- */

.step-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.step-row:first-of-type { border-top: none; padding-top: 0; }
.step-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 4px;
}
.step-body h3 { margin-bottom: 10px; }
.step-body p { max-width: 560px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.footer-brand p {
  font-size: 14px;
  max-width: 300px;
  margin-top: 14px;
}
.footer-col h4 {
  font-size: 12.5px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14px; color: var(--text-muted); transition: color 0.18s ease; }
.footer-col a:hover { color: var(--teal); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Contact form ---------- */

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 13px 14px;
  border-radius: 4px;
  font-family: var(--body);
  font-size: 14.5px;
  transition: border-color 0.18s ease;
  min-height: 48px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--teal);
}
.field textarea { resize: vertical; min-height: 120px; }

.contact-info-list { list-style: none; margin: 0; padding: 0; }
.contact-info-list li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.contact-info-list li:first-child { border-top: none; }
.contact-info-list .ci-label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}
.contact-info-list .ci-value { font-size: 16px; color: var(--text); }

/* ---------- Page hero (non-home) ---------- */

.page-hero { padding: 64px 0 72px; }
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero h1 { margin-bottom: 18px; }

/* ---------- Focus visibility ---------- */

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .split, .split-reverse { grid-template-columns: 1fr; gap: 36px; }
  .split-reverse > *:first-child { order: 0; }
  .card-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav .wrap { height: 68px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 68px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    background: rgba(17,24,39,0.98);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.34);
  }
  .site-nav.menu-open .nav-links { display: flex; }
  .nav-links a {
    display: block;
    padding: 13px 12px;
    color: var(--text);
  }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-cta { display: none; }
  .step-row { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  h1 { font-size: 34px; }
  section { padding: 64px 0; }
  .hero { padding: 56px 0 72px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .meta-strip { gap: 22px; }
  .console-readout { flex-direction: column; gap: 6px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-item { min-height: 0; }
  .process-item span { margin-bottom: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .panel { padding: 32px 24px; }
  .panel-cta { flex-direction: column; align-items: flex-start; }
}
