/* NuPath Engineering LLC — site styles
   Palette: navy #0B1F3A, teal #14B8A6 (accents only on navy or as borders),
   darker teal #0F766E for text/links on light backgrounds, off-white #F7FAFC,
   slate #334155. No web fonts. No inline styles. */

:root {
  --navy: #0b1f3a;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --off-white: #f7fafc;
  --slate: #334155;
  --white: #ffffff;
  --border: #e2e8f0;
  --error: #b91c1c;
  --header-h: 4.25rem;
  --wrap: 70rem;
  --radius: 0.5rem;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06), 0 8px 24px rgba(11, 31, 58, 0.04);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--slate);
  background: var(--off-white);
}

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

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--navy);
}

h1,
h2,
h3,
h4 {
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

:focus {
  outline: none;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  border-radius: 0 0 0.25rem 0.25rem;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--teal);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.brand:hover {
  color: var(--teal);
}

.brand img {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.brand-name {
  font-size: 0.95rem;
  line-height: 1.2;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.35rem;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav .nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--off-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}

.site-nav a:hover {
  color: var(--teal);
}

.site-nav a[aria-current="page"] {
  color: var(--teal);
}

@media (max-width: 47.99rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    flex-basis: 100%;
    display: none;
    padding: 0.25rem 0 0.85rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (min-width: 30rem) {
  .brand-name {
    font-size: 1.05rem;
  }
}

/* Hero */

.hero {
  background: var(--navy);
  color: var(--off-white);
  padding: 3.25rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
}

.hero-copy {
  max-width: 40rem;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.hero-lead {
  max-width: 40rem;
  font-size: 1.125rem;
  color: #d9e2ec;
  margin-bottom: 1.75rem;
}

.hero-visual {
  display: none;
}

.hero-visual img {
  width: 320px;
  height: 320px;
  opacity: 0.45;
}

@media (min-width: 900px) {
  .hero {
    padding: 4rem 0;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
  }

  .hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.hero-accent {
  display: block;
  width: 3.5rem;
  height: 4px;
  background: var(--teal);
  margin: 0 0 1.5rem;
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border: 2px solid var(--navy);
  border-radius: 0.35rem;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}

.btn:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

.btn-accent {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy);
}

.btn-accent:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Sections */

.section {
  padding: 3.25rem 0;
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

#about .section-intro {
  max-width: 45rem;
}

.section-kicker {
  display: block;
  color: var(--teal-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.alt {
  background: var(--white);
}

/* Services */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.alt .card {
  background: var(--off-white);
}

.card p {
  margin: 0;
  font-size: 0.98rem;
}

@media (min-width: 40rem) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 60rem) {
  .card-grid.services {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* How we work */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.7rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-copy {
  max-width: 32rem;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.hint {
  font-weight: 500;
  color: var(--slate);
  font-size: 0.9rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  background: var(--white);
  color: var(--navy);
  font: inherit;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  min-height: 1.2rem;
  margin-top: 0.3rem;
  color: var(--error);
  font-size: 0.875rem;
}

.form-status {
  margin: 0.85rem 0 0;
  font-weight: 600;
  min-height: 1.4rem;
}

.form-status.is-success {
  color: var(--teal-dark);
}

.form-status.is-error {
  color: var(--error);
}

.form-status.is-pending {
  color: var(--slate);
}

.form-privacy {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--slate);
}

@media (min-width: 56rem) {
  .contact-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3rem;
  }
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: #d9e2ec;
  padding: 2.25rem 0;
  font-size: 0.95rem;
}

.footer-inner {
  display: grid;
  gap: 0.75rem;
}

.site-footer a {
  color: var(--teal);
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer p {
  margin: 0;
}

/* Privacy */

.page-header {
  background: var(--navy);
  color: var(--off-white);
  padding: 2.5rem 0 2.25rem;
}

.page-header h1 {
  color: var(--white);
}

.page-header .meta {
  color: #d9e2ec;
  margin: 0;
}

.prose {
  max-width: 44rem;
  padding: 2.5rem 0 3.5rem;
}

.toc {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 0 0 2rem;
}

.toc h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.toc li {
  margin: 0.25rem 0;
}

.prose h2 {
  margin-top: 2.25rem;
  padding-top: 0.25rem;
}

.prose h2:first-of-type {
  margin-top: 0;
}

/* 404 */

.not-found {
  min-height: calc(100vh - 12rem);
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.not-found-inner {
  max-width: 32rem;
}

.not-found .hero-accent {
  margin-bottom: 1.25rem;
}

/* Reduced motion */

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