/* ============ 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: "Montserrat", sans-serif;
  --font-body: "Inter", sans-serif;

  --radius: 14px;
  --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);
  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 {
  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: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.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);
}
.btn--outline:hover { border-color: var(--white); }

.btn--ghost {
  border-color: var(--line);
  color: var(--navy);
  background: var(--white);
}
.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;
}

/* ============ Section shared ============ */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--green);
  margin-bottom: 14px;
}
.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-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}
.node-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--navy);
}
.node-card p { font-size: 14.5px; }

@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__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: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.service-detail__list li {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.service-node__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  white-space: nowrap;
}

.service-detail {
  margin-top: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 28px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.service-detail__index {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.08em;
  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; }
}

/* ============ Why ============ */
.why {
  background: var(--navy);
  padding: 90px 0;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.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; }

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

/* ============ 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;
  align-items: center;
  gap: 12px;
}
.site-footer__logo { height: 24px; width: auto; }
.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);
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-pill__dot { animation: none; }
}
