:root {
  --bg: #f7f9fb;
  --paper: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9e1ea;
  --blue: #2563eb;
  --green: #18a06b;
  --green-soft: #e8f7ef;
  --shadow: 0 24px 70px rgba(24, 34, 49, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(247, 249, 251, 0.84);
  border-bottom: 1px solid rgba(217, 225, 234, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #132238;
  box-shadow: 0 10px 26px rgba(19, 34, 56, 0.18);
}

.brand-mark span {
  width: 16px;
  height: 16px;
  border: 3px solid #75e0b0;
  border-left-color: #6ea8ff;
  border-radius: 50%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  border-radius: 6px;
  padding: 8px 12px;
}

.nav a:hover {
  background: #eef3f8;
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 132px clamp(20px, 4vw, 56px) 64px;
  border-bottom: 1px solid var(--line);
}

.hero-visual {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 249, 251, 0.96) 0%, rgba(247, 249, 251, 0.7) 46%, rgba(247, 249, 251, 0.28) 100%),
    url("data:image/svg+xml,%3Csvg width='1600' height='1000' viewBox='0 0 1600 1000' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='64' height='64' patternUnits='userSpaceOnUse'%3E%3Cpath d='M64 0H0V64' fill='none' stroke='%23cad6e3' stroke-width='1' opacity='.55'/%3E%3C/pattern%3E%3ClinearGradient id='g' x1='0' x2='1' y1='0' y2='1'%3E%3Cstop stop-color='%23eaf1f8'/%3E%3Cstop offset='.48' stop-color='%23dff7ee'/%3E%3Cstop offset='1' stop-color='%23dce9ff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='1000' fill='url(%23g)'/%3E%3Crect width='1600' height='1000' fill='url(%23p)'/%3E%3Cpath d='M924 202c137 23 214 70 312 152 102 85 213 107 294 156' fill='none' stroke='%232563eb' stroke-width='8' stroke-linecap='round' opacity='.18'/%3E%3Cpath d='M801 677c95-92 219-156 381-168 146-11 259-66 340-143' fill='none' stroke='%2318a06b' stroke-width='8' stroke-linecap='round' opacity='.2'/%3E%3Ccircle cx='1020' cy='263' r='88' fill='%23ffffff' opacity='.66'/%3E%3Ccircle cx='1290' cy='503' r='116' fill='%23ffffff' opacity='.52'/%3E%3Ccircle cx='1134' cy='684' r='72' fill='%23ffffff' opacity='.7'/%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
}

.grid-map {
  position: absolute;
  right: clamp(20px, 6vw, 90px);
  bottom: 90px;
  width: min(46vw, 620px);
  height: min(44vw, 500px);
}

.node,
.line {
  position: absolute;
  display: block;
}

.node {
  width: 16px;
  height: 16px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 14px 32px rgba(19, 34, 56, 0.2);
}

.node-a {
  top: 22%;
  left: 24%;
}

.node-b {
  top: 18%;
  right: 28%;
  background: var(--blue);
}

.node-c {
  right: 14%;
  bottom: 28%;
}

.node-d {
  left: 36%;
  bottom: 18%;
  background: var(--blue);
}

.line {
  height: 2px;
  transform-origin: left center;
  background: rgba(37, 99, 235, 0.24);
}

.line-a {
  top: 24%;
  left: 27%;
  width: 42%;
  transform: rotate(-4deg);
}

.line-b {
  top: 45%;
  left: 64%;
  width: 24%;
  transform: rotate(58deg);
}

.line-c {
  bottom: 24%;
  left: 38%;
  width: 40%;
  transform: rotate(-13deg);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(46px, 7vw, 94px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  margin-bottom: 32px;
  color: #465568;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-actions,
.status-band,
.site-footer {
  display: flex;
  align-items: center;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 720;
}

.button.primary {
  background: var(--ink);
  color: #ffffff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
  color: #344054;
}

.section {
  padding: 80px clamp(20px, 4vw, 56px);
}

.section-heading {
  width: min(760px, 100%);
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.contact-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(24, 34, 49, 0.06);
}

.feature-card {
  padding: 28px;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.feature-card p,
.contact-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.status-band {
  justify-content: space-between;
  gap: 24px;
  margin: 0 clamp(20px, 4vw, 56px);
  padding: 34px;
  background: #132238;
  color: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status-band h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-radius: 999px;
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.1);
  color: #dff7ee;
  font-weight: 760;
}

.status-pill span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #75e0b0;
  box-shadow: 0 0 0 6px rgba(117, 224, 176, 0.16);
}

.contacts {
  padding-top: 74px;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.contact-panel p {
  max-width: 720px;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(20px, 4vw, 56px);
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 760px;
    padding-top: 72px;
  }

  .hero-visual {
    background:
      linear-gradient(180deg, rgba(247, 249, 251, 0.74) 0%, rgba(247, 249, 251, 0.97) 64%),
      url("data:image/svg+xml,%3Csvg width='900' height='900' viewBox='0 0 900 900' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='52' height='52' patternUnits='userSpaceOnUse'%3E%3Cpath d='M52 0H0V52' fill='none' stroke='%23cad6e3' stroke-width='1' opacity='.55'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='900' height='900' fill='%23edf4f8'/%3E%3Crect width='900' height='900' fill='url(%23p)'/%3E%3Cpath d='M108 244c120-52 246-62 377 22 87 56 176 66 294 19' fill='none' stroke='%232563eb' stroke-width='7' stroke-linecap='round' opacity='.2'/%3E%3Cpath d='M88 580c164 50 312 22 444-83 74-59 148-77 252-44' fill='none' stroke='%2318a06b' stroke-width='7' stroke-linecap='round' opacity='.2'/%3E%3Ccircle cx='642' cy='244' r='94' fill='%23fff' opacity='.58'/%3E%3Ccircle cx='328' cy='534' r='118' fill='%23fff' opacity='.48'/%3E%3C/svg%3E");
  }

  .grid-map {
    top: 110px;
    right: 18px;
    width: 74vw;
    height: 360px;
  }

  .feature-grid,
  .contact-panel,
  .status-band,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-pill {
    align-self: flex-start;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 15px;
  }

  .nav a {
    padding-inline: 9px;
  }

  .hero {
    min-height: 700px;
    padding-bottom: 42px;
  }

  .section {
    padding-block: 56px;
  }

  .feature-card,
  .contact-panel,
  .status-band {
    padding: 22px;
  }

  .button {
    width: 100%;
  }
}


/* =========================================================
   NZ Labs — Control panel authentication
   ========================================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 8%, rgba(220, 233, 255, 0.42), transparent 34%),
    var(--bg);
}

.auth-header {
  position: relative;
}

.auth-header-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 116px 20px 64px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 38px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.auth-card-heading {
  margin-bottom: 28px;
}

.auth-card h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 5vw, 42px);
  line-height: 1.05;
}

.auth-lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.help-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input::placeholder,
.help-form input::placeholder {
  color: #98a2b3;
}

.field input:focus,
.help-form input:focus {
  border-color: #8db1f7;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #667085;
  padding: 7px 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--ink);
}

.auth-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 2px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.auth-submit:hover {
  background: #0f1a2a;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.13);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-error {
  display: none;
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid #f0caca;
  border-radius: 7px;
  background: #fff7f7;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
}

.auth-error.is-visible {
  display: block;
  animation: auth-error-in 180ms ease-out;
}

@keyframes auth-error-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.help-section {
  margin-top: 25px;
  padding-top: 21px;
  border-top: 1px solid #edf0f4;
}

.help-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #667085;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.help-toggle:hover {
  color: var(--ink);
}

.help-arrow {
  flex: 0 0 auto;
  color: #98a2b3;
  transition: transform 220ms ease, color 160ms ease;
}

.help-toggle[aria-expanded="true"] .help-arrow {
  transform: rotate(90deg);
  color: var(--blue);
}

.help-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 260ms ease, opacity 180ms ease;
}

.help-panel[aria-hidden="false"] {
  grid-template-rows: 1fr;
  opacity: 1;
}

.help-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.help-copy {
  margin: 17px 0 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.help-form {
  display: flex;
  gap: 7px;
}

.help-form input {
  min-width: 0;
  min-height: 40px;
  padding-block: 8px;
  font-size: 13px;
}

.help-submit {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 13px;
  font-size: 12px;
  cursor: pointer;
}

.help-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.help-submit:disabled:hover {
  background: rgba(255, 255, 255, 0.76);
  box-shadow: none;
}

.help-form input:disabled {
  background: #f4f6f9;
  color: #98a2b3;
  cursor: not-allowed;
}

.help-success {
  display: none;
  margin-top: 13px;
  padding: 10px 11px;
  border: 1px solid #ccebdc;
  border-radius: 7px;
  background: var(--green-soft);
  color: #16764f;
  font-size: 12px;
  line-height: 1.45;
}

.help-success.is-visible {
  display: block;
  animation: auth-error-in 180ms ease-out;
}

.help-form.is-hidden {
  display: none;
}

.auth-footer-note {
  margin: 17px 0 0;
  color: #98a2b3;
  text-align: center;
  font-size: 11px;
}

.auth-site-footer {
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .auth-header {
    position: static;
  }

  .auth-header-label {
    display: none;
  }

  .auth-main {
    padding: 48px 16px 42px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .auth-card h1 {
    font-size: 34px;
  }

  .help-form {
    flex-direction: column;
  }

  .help-submit {
    width: 100%;
  }

  .auth-site-footer {
    display: none;
  }
}