/* ==========================================================
   Continental Network Corporation — deep emerald theme
   ========================================================== */

:root {
  /* Primitive palette */
  --emerald-975: #01201A;
  --emerald-950: #022C22;
  --emerald-900: #064E3B;
  --emerald-800: #065F46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10B981;
  --emerald-400: #34D399;
  --emerald-300: #6EE7B7;
  --emerald-100: #D1FAE5;
  --emerald-50:  #ECFDF5;

  /* Semantic tokens */
  --color-bg: #FFFFFF;
  --color-surface: #F3F8F6;
  --color-surface-2: #E7F1ED;
  --color-border: #D5E3DD;
  --color-text: #0B1F1A;
  --color-text-muted: #4A5E57;
  --color-primary: var(--emerald-700);
  --color-primary-hover: var(--emerald-800);
  --color-accent: var(--emerald-400);
  --color-dark: var(--emerald-950);
  --color-on-dark: #F0FAF6;
  --color-on-dark-muted: #B4D3C8;
  --color-error: #B42318;

  /* Type */
  --font-display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Spacing (8pt) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(2, 44, 34, .06);
  --shadow: 0 8px 24px -12px rgba(2, 44, 34, .25);
  --shadow-lg: 0 24px 48px -24px rgba(2, 44, 34, .4);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 150ms;
  --dur: 250ms;

  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--color-primary); }

img, svg { display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  background: var(--emerald-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 3px solid var(--emerald-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  touch-action: manipulation;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--emerald-500);
  color: var(--emerald-975);
}
.btn-primary:hover { background: var(--emerald-400); }

.btn-ghost {
  background: transparent;
  color: var(--color-on-dark);
  border-color: rgba(240, 250, 246, .45);
}
.btn-ghost:hover { border-color: var(--color-on-dark); background: rgba(240, 250, 246, .08); }

.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }

.text-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  min-height: 44px;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Utility bar ---------- */
.utility-bar {
  background: var(--emerald-975);
  color: var(--color-on-dark-muted);
  font-size: 14px;
}
.utility-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
}
.utility-item, .utility-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.utility-links { display: flex; gap: 20px; }
.utility-links a {
  color: var(--color-on-dark);
  text-decoration: none;
  min-height: 40px;
  white-space: nowrap;
}
.utility-links a:hover { color: var(--emerald-300); }
.utility-bar .icon { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}
.brand { color: var(--color-text); display: inline-flex; padding: 6px 0; }
.logo { width: 196px; height: auto; aspect-ratio: 236 / 64; fill: currentColor; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.site-nav ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}
.site-nav ul a:hover { color: var(--emerald-700); background: var(--color-surface); }
.site-nav ul a.is-active { color: var(--emerald-700); box-shadow: inset 0 -2px 0 var(--emerald-600); border-radius: 0; }

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(16, 185, 129, .22), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(6, 95, 70, .6), transparent 60%),
    var(--emerald-950);
  color: var(--color-on-dark);
  overflow: hidden;
  isolation: isolate;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(110, 231, 183, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 183, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  padding-block: 96px 104px;
}
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--emerald-700);
  margin-bottom: 16px;
}
.eyebrow-light { color: var(--emerald-300); }

.hero h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  font-weight: 800;
  max-width: 16ch;
}
.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-top: 24px;
  max-width: 58ch;
  color: var(--color-on-dark-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0;
}
.hero-facts li {
  padding: 0 28px;
  border-left: 1px solid rgba(110, 231, 183, .3);
}
.hero-facts li:first-child { padding-left: 0; border-left: 0; }
.hero-facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
}
.hero-facts span { font-size: 14px; color: var(--color-on-dark-muted); }

.hero-visual { margin: 0; }
.topology { width: 100%; height: auto; max-width: 480px; margin-inline: auto; }
.topology .node rect {
  fill: rgba(6, 78, 59, .85);
  stroke: rgba(110, 231, 183, .45);
  stroke-width: 1.25;
}
.topology .node text {
  fill: var(--color-on-dark);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}
.topology .node-title { font-size: 18px !important; font-weight: 800 !important; }
.topology .node-sub { font-size: 10px !important; font-weight: 500 !important; fill: var(--emerald-300) !important; letter-spacing: .08em !important; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section-tint { background: var(--color-surface); }
.section-dark {
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(16, 185, 129, .18), transparent 60%),
    var(--emerald-900);
  color: var(--color-on-dark);
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2, .contact-info h2, .why-copy h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
}
.section-intro {
  margin-top: 16px;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 62ch;
}

/* Industries */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.industry-card {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.industry-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--emerald-700), var(--emerald-400));
  transform: scaleX(.25);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.industry-card:hover { border-color: var(--emerald-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.industry-card:hover::before { transform: scaleX(1); }
.industry-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--emerald-50);
  color: var(--emerald-700);
  margin-bottom: 20px;
}
.industry-icon .icon { width: 24px; height: 24px; }
.industry-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--emerald-700);
}
.industry-card h3 { font-size: 1.25rem; margin: 6px 0 10px; }
.industry-card p:last-child { color: var(--color-text-muted); font-size: 15px; }

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card {
  background: var(--color-bg);
  padding: 32px 28px;
  transition: background-color var(--dur) var(--ease-out);
}
.service-card:hover { background: var(--emerald-50); }
.service-icon {
  width: 32px;
  height: 32px;
  color: var(--emerald-600);
  stroke-width: 1.5;
  margin-bottom: 20px;
}
.service-card h3 { font-size: 1.125rem; margin-bottom: 10px; }
.service-card p { color: var(--color-text-muted); font-size: 15px; }

.service-cta {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 28px;
  border-radius: var(--radius);
  background: var(--emerald-900);
  color: var(--color-on-dark);
}
.service-cta strong { color: #fff; }
.service-cta .text-link { color: var(--emerald-300); }

/* Approach */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 28px;
  border-top: 2px solid var(--color-border);
}
.step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 64px;
  height: 2px;
  background: var(--emerald-600);
}
.step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--emerald-100);
  -webkit-text-stroke: 1px var(--emerald-600);
}
.step h3 { font-size: 1.375rem; margin: 16px 0 10px; }
.step p { color: var(--color-text-muted); max-width: 40ch; }

/* Why */
.why-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.why-copy .btn { margin-top: 32px; }
.why-points { display: grid; gap: 20px; }
.why-card {
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(2, 44, 34, .55);
  border: 1px solid rgba(110, 231, 183, .2);
}
.why-icon { width: 28px; height: 28px; color: var(--emerald-300); margin-bottom: 16px; }
.why-card h3 { font-size: 1.25rem; margin-bottom: 8px; color: #fff; }
.why-card p { color: var(--color-on-dark-muted); }

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.contact-list li { display: flex; gap: 12px; }
.contact-list .icon { color: var(--emerald-600); margin-top: 3px; }
.contact-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text);
}
.contact-list span { color: var(--color-text-muted); font-size: 15px; }
.contact-list a { color: var(--color-text-muted); }
.contact-list a:hover { color: var(--emerald-700); }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.contact-form h3 { font-size: 1.5rem; }
.form-note { font-size: 14px; color: var(--color-text-muted); margin: 6px 0 24px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.req { color: var(--color-error); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--color-text);
  background: #fff;
  border: 1px solid #B9CCC4;
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .25);
}
.field [aria-invalid="true"] { border-color: var(--color-error); }
.field-help { font-size: 13px; color: var(--color-text-muted); margin-top: 6px; }
.field-error { font-size: 14px; color: var(--color-error); margin-top: 6px; font-weight: 500; }

.error-summary {
  border: 1px solid var(--color-error);
  border-left-width: 4px;
  background: #FEF3F2;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  color: var(--color-error);
  font-size: 14px;
}
.error-summary ul { margin: 6px 0 0; padding-left: 18px; }
.error-summary a { color: var(--color-error); font-weight: 600; }

.form-status { margin-top: 14px; font-size: 14px; color: var(--emerald-800); min-height: 1.4em; }

/* Footer */
.site-footer {
  background: var(--emerald-975);
  color: var(--color-on-dark-muted);
  padding-top: 72px;
  font-size: 15px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.logo-light { color: var(--color-on-dark); fill: currentColor; width: 220px; margin-bottom: 20px; }
.footer-brand p { max-width: 36ch; }
.footer-heading {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--emerald-300);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li a { display: inline-block; padding: 6px 0; }
.footer-col a { color: var(--color-on-dark); text-decoration: none; }
.footer-col a:hover { color: var(--emerald-300); text-decoration: underline; text-underline-offset: 4px; }
address { font-style: normal; line-height: 1.9; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 20px;
  border-top: 1px solid rgba(110, 231, 183, .15);
  font-size: 14px;
}
.text-link-light { color: var(--color-on-dark); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.text-link-light:hover { color: var(--emerald-300); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .industry-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 20px 24px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { width: 100%; padding: 0 12px; }
  .site-nav ul a.is-active { box-shadow: inset 3px 0 0 var(--emerald-600); }

  .hero-inner, .why-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-inner { padding-block: 64px 72px; gap: 40px; }
  .hero-visual { max-width: 420px; width: 100%; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding-block: 64px; }
  .utility-item { display: none; }
  .utility-inner { justify-content: center; }
  .utility-bar { font-size: 13px; }
  .utility-links { gap: 16px; }
  .logo { width: 160px; }
  .industry-grid, .service-grid, .field-row, .contact-list, .footer-inner { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: 1fr; gap: 16px; }
  .hero-facts li { padding: 0 0 0 16px; border-left: 2px solid rgba(110, 231, 183, .4); }
  .hero-facts li:first-child { padding-left: 16px; border-left: 2px solid rgba(110, 231, 183, .4); }
  .hero-actions .btn { flex: 1 1 100%; }
  .contact-form { padding: 24px 20px; }
  .service-cta { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
  .reveal { opacity: 1; transform: none; }
  .pulse-dots { display: none; }
}
