/* ============ Design tokens ============ */
:root {
  --navy: #0A2540;
  --navy-deep: #071A2E;
  --green: #28B463;
  --green-bright: #34CE77;
  --bg: #F7F8FA;
  --ink: #10151C;
  --slate: #5A6472;
  --line: #E3E7EC;
  --white: #FFFFFF;

  --font-display: "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 10px;
  --wrap: 1160px;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
}

p { margin: 0; line-height: 1.6; color: var(--slate); }

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

/* ============ Buttons ============ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
/* corner-pad marks — the one bracket accent reserved for primary actions */
.btn--primary::before,
.btn--primary::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  opacity: 0.55;
}
.btn--primary::before { top: -4px; left: -4px; border-right: none; border-bottom: none; }
.btn--primary::after { bottom: -4px; right: -4px; border-left: none; border-top: none; }
.btn--primary::before,
.btn--primary::after { animation: pad-glow 2.4s ease-in-out infinite; }
.btn--primary {
  background: var(--green);
  color: var(--white);
}
.btn--primary:hover { background: var(--green-bright); transform: translateY(-1px); }

.btn--outline {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
  border-radius: 4px;
}
.btn--outline:hover { border-color: var(--white); }

.btn--ghost {
  border-color: var(--line);
  color: var(--navy);
  background: var(--white);
  border-radius: 4px;
}
.btn--ghost:hover { border-color: var(--navy); }

.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--full { width: 100%; padding: 14px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(10px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand__logo { height: 26px; width: auto; }

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.site-nav a:hover { color: var(--green-bright); }

.site-header__cta { flex-shrink: 0; }

@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  overflow: hidden;
  padding: 110px 0 130px;
}
.hero--short { padding: 90px 0; }

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 0 rgba(52, 206, 119, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 206, 119, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 206, 119, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 206, 119, 0); }
}

.hero__title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
}

.hero__sub {
  margin-top: 20px;
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero__ticker {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 32px;
  padding: 11px 16px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  max-width: 480px;
}
.hero__ticker-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--green-bright);
}
.hero__ticker-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
  animation: pulse 2s infinite;
}
.hero__ticker-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  transition: opacity 0.25s ease;
}
.hero__ticker-text.is-swapping { opacity: 0; }

@media (max-width: 480px) {
  .hero__ticker { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__ticker-label::before { animation: none; }
}

/* ============ Section shared ============ */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 14px;
}
.section-eyebrow::before { content: "// "; opacity: 0.6; }
.section-eyebrow--light { color: var(--green-bright); }

.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  color: var(--ink);
  max-width: 620px;
  margin-bottom: 48px;
}

/* ============ Services / node grid ============ */
.services { padding: 100px 0; }

.node-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.node-card {
  background: var(--white);
  padding: 32px 26px;
  position: relative;
}
.node-card__index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}
.node-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--navy);
}
.node-card p { font-size: 14.5px; }
.node-card__list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.node-card__list li {
  position: relative;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  padding-left: 18px;
}
.node-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

@media (max-width: 900px) {
  .node-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .node-grid { grid-template-columns: 1fr; }
}

/* ============ Interactive service diagram ============ */
.node-grid--mobile { display: none; }

.service-diagram {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 800 / 460;
}

.service-diagram__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.service-line {
  stroke: var(--line);
  stroke-width: 2;
  transition: stroke 0.25s ease, stroke-width 0.25s ease;
}
.service-line.is-active {
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-dasharray: 6 6;
  animation: dashFlow 1.2s linear infinite;
}
@keyframes dashFlow {
  to { stroke-dashoffset: -24; }
}

.service-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px var(--bg), 0 8px 24px rgba(10,37,64,0.15);
  z-index: 2;
}
.service-hub img { width: 40px; height: 40px; }

.service-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
  min-width: 120px;
}
.service-node:hover,
.service-node:focus-visible {
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow: 0 10px 24px rgba(10,37,64,0.1);
}
.service-node.is-active {
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(40,180,99,0.15);
}
.service-node.is-active::before,
.service-node.is-active::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--green);
}
.service-node.is-active::before { top: -4px; left: -4px; border-right: none; border-bottom: none; }
.service-node.is-active::after { bottom: -4px; right: -4px; border-left: none; border-top: none; }
.service-node.is-active::before,
.service-node.is-active::after { animation: pad-glow 2.4s ease-in-out infinite; }
.service-node__icon {
  width: 32px;
  height: 32px;
  color: var(--navy);
  transition: color 0.2s ease;
}
.service-node__icon svg { width: 100%; height: 100%; }
.service-node .node-icon-accent { stroke: var(--green); }
.service-node.is-active .service-node__icon { color: var(--green); }

.service-line-pulse {
  fill: var(--green);
  opacity: 0;
  transform-origin: center;
  animation: linePulse 2.4s ease-out infinite;
}
@keyframes linePulse {
  0%   { opacity: 0.7; transform: scale(1); }
  70%  { opacity: 0; transform: scale(3.2); }
  100% { opacity: 0; transform: scale(3.2); }
}

.service-detail__list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-detail__list li {
  position: relative;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
  padding-left: 24px;
}
.service-detail__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.service-node__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  white-space: nowrap;
}

.service-detail {
  position: relative;
  margin-top: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 32px 36px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.service-detail::before,
.service-detail::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--green);
  opacity: 0.7;
}
.service-detail::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.service-detail::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.service-detail__index {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.service-detail h3 {
  font-size: 19px;
  color: var(--navy);
  margin-bottom: 10px;
}
.service-detail p { font-size: 14.5px; }

@media (max-width: 780px) {
  .service-diagram { display: none; }
  .node-grid--mobile { display: grid; }
}

/* ============ Process ("How it works") ============ */
.process { padding: 100px 0; background: var(--white); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.process-step {
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.process-step__index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.process-step h3 {
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 8px;
}
.process-step p { font-size: 14px; }

@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* ============ Why ============ */
.why {
  background: var(--navy);
  padding: 90px 0;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.why-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--green-bright);
  margin-bottom: 16px;
}
.why-item__icon svg { width: 100%; height: 100%; }
.why-item h3 {
  color: var(--white);
  font-size: 18px;
  margin-bottom: 10px;
}
.why-item p { color: rgba(255,255,255,0.65); font-size: 14.5px; }
.why-item__fact {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85) !important;
  font-size: 13.5px !important;
  font-weight: 500;
}

@media (max-width: 760px) {
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============ FAQ ============ */
.faq { padding: 100px 0; }
.faq-list {
  max-width: 760px;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--green);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "\2212"; transform: rotate(180deg); }
.faq-item p {
  margin-top: 14px;
  font-size: 15px;
  max-width: 640px;
}

/* ============ Contact ============ */
.contact { padding: 100px 0; }
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact__copy p { margin-top: 18px; font-size: 15.5px; max-width: 420px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.form-row { margin-bottom: 18px; }
.form-row--hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.form-row label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  min-height: 20px;
}
.form-status--ok { color: var(--green); }
.form-status--err { color: #C0392B; }

@media (max-width: 820px) {
  .contact__inner { grid-template-columns: 1fr; }
}

/* ============ Footer ============ */
.site-footer {
  background: var(--navy-deep);
  padding: 48px 0;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.site-footer__logo { height: 24px; width: auto; }
.site-footer__address {
  font-style: normal;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.site-footer__address a { color: rgba(255,255,255,0.55); }
.site-footer__address a:hover { color: var(--green-bright); }
.site-footer__links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.site-footer__links a:hover { color: var(--green-bright); }
.site-footer__meta {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

/* ============ Circuit trace divider — real brand asset, now carrying a signal ============ */
.trace-divider {
  position: relative;
  height: 22px;
  overflow: hidden;
}
.trace-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/assets/signature/circuit-divider.png');
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 100%;
  opacity: 0.3;
}
/* the moving part: a colour sweep, visible only where the trace lines are,
   via the same PNG used as an alpha mask */
.trace-divider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(52, 206, 119, 0.9) 7%,
    rgba(230, 255, 240, 0.95) 9%,
    rgba(52, 206, 119, 0.9) 11%,
    transparent 20%);
  background-repeat: repeat-x;
  background-size: 240% 100%;
  -webkit-mask-image: url('/assets/signature/circuit-divider.png');
  mask-image: url('/assets/signature/circuit-divider.png');
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: auto 100%;
  mask-size: auto 100%;
  animation: trace-sweep-h 5s linear infinite;
}
@keyframes trace-sweep-h {
  from { background-position: -140% 0; }
  to   { background-position: 140% 0; }
}

/* ============ Shared pulse/glow keyframes ============ */
@keyframes pad-glow {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-pill__dot,
  .hero__ticker-label::before,
  .trace-divider::after,
  .btn--primary::before,
  .btn--primary::after,
  .service-node.is-active::before,
  .service-node.is-active::after {
    animation: none;
  }
}
