/* ============================================================
   Sigma South — design system
   Light-first: navy is ink, teal is action, amber is proof.
   Display: Archivo · Body: Public Sans · Labels/data: IBM Plex Mono
   ============================================================ */

:root {
  --ink: #0d1f33;
  --ink-soft: #41546a;
  --ink-faint: #6b7c8f;
  --bg: #f7f8f6;
  --card: #ffffff;
  --line: #e2e6e3;
  --teal: #0e9384;
  --teal-deep: #0b7568;
  --teal-tint: #e6f4f2;
  --teal-bright: #2dd4bf;
  --navy: #0d1f33;
  --navy-2: #14293f;
  --navy-line: #24405c;
  --amber: #d97706;
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: "Archivo", "Segoe UI", sans-serif;
  --font-body: "Public Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --shadow-card: 0 1px 2px rgba(13, 31, 51, 0.05), 0 8px 24px -12px rgba(13, 31, 51, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--teal-deep);
}

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

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: var(--teal-deep);
}

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}

.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: transparent;
}

.btn-ghost-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--teal) 0%, var(--teal-deep) 100%);
  flex-shrink: 0;
}

.brand-mark img {
  /* source PNG is black glyph on white; invert + screen renders it white on the teal tile */
  filter: invert(1);
  mix-blend-mode: screen;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav > a:not(.btn) {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav > a:not(.btn):hover {
  color: var(--teal-deep);
}

.btn-nav {
  padding: 10px 20px;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 72px;
  background-image:
    linear-gradient(rgba(13, 31, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 31, 51, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 20px;
}

.hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.55rem);
  font-weight: 800;
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal-deep);
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 34px;
}

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

.hero-phone {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 6px;
}

.hero-phone:hover {
  color: var(--teal-deep);
}

/* ---------- system diagram (signature) ---------- */

.system-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 26px 26px 18px;
}

.system-card-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 12px 0 0;
  text-align: center;
}

.system-svg {
  width: 100%;
  height: auto;
  display: block;
}

.system-svg .node {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5;
}

.system-svg .node-api {
  fill: var(--navy);
  stroke: var(--navy);
}

.system-svg .node-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  fill: var(--ink);
}

.system-svg .node-label-light {
  fill: #ffffff;
}

.system-svg .node-sub {
  font-family: var(--font-mono);
  font-size: 8.5px;
  fill: var(--ink-faint);
}

.system-svg .wire {
  stroke: var(--line);
  stroke-width: 1.5;
  fill: none;
}

.system-svg .pulse {
  stroke: var(--teal);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 10 130;
  stroke-linecap: round;
  animation: pulse-flow 2.6s linear infinite;
}

.system-svg .pulse-2 { animation-delay: 0.6s; }
.system-svg .pulse-3 { animation-delay: 1.2s; }
.system-svg .pulse-4 { animation-delay: 1.8s; }

@keyframes pulse-flow {
  to {
    stroke-dashoffset: -140;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .system-svg .pulse {
    animation: none;
    stroke-dasharray: none;
    opacity: 0.35;
  }
}

/* ---------- stats ---------- */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.stat {
  padding: 34px 28px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: none;
}

.stat dt {
  font-family: var(--font-mono);
  font-size: 2.3rem;
  font-weight: 500;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 8px;
}

.stat dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- shared section scaffolding ---------- */

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 0;
}

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-card);
}

.service-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--teal-deep);
  background: var(--teal-tint);
  border-radius: 100px;
  padding: 5px 12px;
  align-self: flex-start;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card > p {
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.service-points {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex-grow: 1;
}

.service-points li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.service-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--teal);
}

.service-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--teal-deep);
  text-decoration: none;
}

.service-link:hover {
  text-decoration: underline;
}

/* ---------- industries ---------- */

.section-industries {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.industry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  background: var(--bg);
}

.industry-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  display: block;
  margin-bottom: 10px;
}

.industry h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.industry p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- difference (dark statement band) ---------- */

.section-difference {
  background: var(--navy);
  color: #fff;
  padding: 96px 0;
}

.difference-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}

.section-difference .eyebrow {
  color: var(--teal-bright);
}

.section-difference h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 800;
  color: #fff;
}

.section-difference h2 em {
  font-style: normal;
  color: var(--teal-bright);
}

.section-difference p {
  color: #b8c6d4;
  font-size: 1.1rem;
}

.difference-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.difference-list li {
  background: var(--navy-2);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 0.98rem;
  color: #d8e1e9;
}

.difference-list strong {
  display: block;
  font-family: var(--font-display);
  color: #fff;
  margin-bottom: 2px;
}

.difference-ctas {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- final CTA ---------- */

.section-cta {
  padding: 96px 0;
  text-align: center;
}

.section-cta h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.section-cta p {
  color: var(--ink-soft);
  font-size: 1.15rem;
  max-width: 36em;
  margin: 0 auto 32px;
}

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

.cta-phone {
  font-family: var(--font-mono);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.cta-phone:hover {
  color: var(--teal-deep);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--navy);
  color: #b8c6d4;
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 2fr) minmax(0, 3fr);
  gap: 40px;
  padding-bottom: 48px;
}

.brand-footer .brand-name {
  color: #fff;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.95rem;
  max-width: 30em;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7e93a8;
  margin: 6px 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.footer-col a {
  color: #d8e1e9;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--teal-bright);
}

.footer-contact .footer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7e93a8;
  margin-bottom: 2px;
}

.footer-contact li {
  margin-bottom: 14px;
}

.footer-bottom {
  border-top: 1px solid var(--navy-line);
  padding-top: 22px;
  padding-bottom: 22px;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: #7e93a8;
}

/* ---------- interior page hero ---------- */

.page-hero {
  padding: 72px 0 64px;
  background-image:
    linear-gradient(rgba(13, 31, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 31, 51, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  max-width: 16em;
  margin-bottom: 18px;
}

.page-hero .hero-sub {
  margin-bottom: 30px;
}

/* ---------- feature grid (service detail pages) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
}

.feature h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature p {
  color: var(--ink-soft);
  font-size: 0.97rem;
  margin: 0;
}

.industries-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- services overview ---------- */

.services-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---------- blog ---------- */

.post-list {
  display: grid;
  gap: 24px;
  max-width: 780px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow-card);
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}

.post-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.post-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--teal-deep);
}

.post-card p {
  color: var(--ink-soft);
  margin-bottom: 18px;
}

/* ---------- article ---------- */

.article {
  max-width: 720px;
  margin: 0 auto;
}

.article-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.article h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
}

.article p,
.article li {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.article ul {
  padding-left: 1.3em;
  margin: 0 0 1em;
}

.article li {
  margin-bottom: 8px;
}

.article-cta {
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--teal-tint);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
}

.article-cta p {
  color: var(--ink);
  margin-bottom: 18px;
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: start;
}

.form-field {
  margin-bottom: 20px;
}

.form-field > label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: var(--card);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 3px solid var(--teal);
  outline-offset: 0;
  border-color: var(--teal);
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.97rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.checkbox-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.form-error {
  display: block;
  color: #b42318;
  font-size: 0.88rem;
  margin-top: 5px;
}

.form-success {
  background: var(--teal-tint);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 28px;
}

.form-success p {
  margin: 0;
  color: var(--ink);
}

.contact-aside {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow-card);
}

.contact-aside h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.contact-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-aside li {
  margin-bottom: 16px;
}

.contact-aside .footer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}

.contact-aside a {
  color: var(--teal-deep);
  text-decoration: none;
}

.contact-aside a:hover {
  text-decoration: underline;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid,
  .difference-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-grid,
  .process-grid,
  .feature-grid,
  .industries-grid.cols-3,
  .services-overview-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(3) {
    border-left: none;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav > a:not(.btn) {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .btn-nav {
    margin-top: 16px;
    text-align: center;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .section,
  .section-difference,
  .section-cta {
    padding: 60px 0;
  }

  .industries-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 52px 0 44px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 24px 28px;
  }

  .stat:first-child {
    border-top: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
