@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/cabinet-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/satoshi-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 2C General Engineering — site styles */

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.45rem, 1rem + 3.6vw, 4.25rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --font-display: "Cabinet Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Satoshi", "Segoe UI", system-ui, sans-serif;

  --max: 1200px;
  --radius: 4px;

  --color-bg: #f6f3ed;
  --color-surface: #fffdf9;
  --color-surface-2: #efeae0;
  --color-surface-offset: #e6e0d3;
  --color-border: #d7cfbf;
  --color-text: #1e1c18;
  --color-text-muted: #545044;
  --color-text-inverse: #f8f5ef;
  --color-primary: #0c4ea3;
  --color-primary-hover: #0a3e82;
  --color-ink: #141318;
  --color-focus: #0c4ea3;
  --shadow: 0 1px 2px rgba(30, 28, 24, 0.05), 0 12px 32px rgba(30, 28, 24, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #14130f;
    --color-surface: #1c1a16;
    --color-surface-2: #23211c;
    --color-surface-offset: #2b2822;
    --color-border: #3a362e;
    --color-text: #f1ede4;
    --color-text-muted: #c4bdae;
    --color-text-inverse: #14130f;
    --color-primary: #5ba0ee;
    --color-primary-hover: #7bb3f3;
    --color-ink: #0e0d0a;
    --color-focus: #7bb3f3;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

[data-theme="dark"] {
  --color-bg: #14130f;
  --color-surface: #1c1a16;
  --color-surface-2: #23211c;
  --color-surface-offset: #2b2822;
  --color-border: #3a362e;
  --color-text: #f1ede4;
  --color-text-muted: #c4bdae;
  --color-text-inverse: #14130f;
  --color-primary: #5ba0ee;
  --color-primary-hover: #7bb3f3;
  --color-ink: #0e0d0a;
  --color-focus: #7bb3f3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --color-bg: #f6f3ed;
  --color-surface: #fffdf9;
  --color-surface-2: #efeae0;
  --color-surface-offset: #e6e0d3;
  --color-border: #d7cfbf;
  --color-text: #1e1c18;
  --color-text-muted: #545044;
  --color-text-inverse: #f8f5ef;
  --color-primary: #0c4ea3;
  --color-primary-hover: #0a3e82;
  --color-ink: #141318;
  --color-focus: #0c4ea3;
  --shadow: 0 1px 2px rgba(30, 28, 24, 0.05), 0 12px 32px rgba(30, 28, 24, 0.07);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--color-primary); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--space-4);
}

.section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); }
.section-tight { padding-top: var(--space-12); }
.section-head { max-width: 62ch; margin-bottom: var(--space-12); }
.section-head h2, .h2-xl { font-size: var(--text-xl); }
.h2-lg { font-size: var(--text-lg); }
.section-head p { color: var(--color-text-muted); margin-top: var(--space-4); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  min-height: 80px;
}
.logo { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; min-width: 0; color: inherit; }
.logo:hover { color: inherit; }
.logo-mark { height: 48px; width: auto; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.logo-text strong { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.01em; }
.logo-text span { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-muted); }

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--space-6); }
.nav a {
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-text); }
.nav a[aria-current="page"] { font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-primary { background: var(--color-primary); color: #fff; }
[data-theme="dark"] .btn-primary { color: #0e0d0a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { color: #0e0d0a; }
}
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-1px); color: #fff; }
[data-theme="dark"] .btn-primary:hover { color: #0e0d0a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary:hover { color: #0e0d0a; }
}
.btn-ghost { border-color: var(--color-border); color: var(--color-text); background: transparent; }
.btn-ghost:hover { border-color: var(--color-text); color: var(--color-text); }
.btn-light { background: #fff; color: #17150f; }
.btn-light:hover { color: #17150f; background: #f3f0ea; }
.btn-outline-light { border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; }

.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  flex: none;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}
[data-theme="dark"] .theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }

.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; isolation: isolate; min-height: 28rem; }
.hero picture, .hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.hero picture { z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(12,11,8,0.9) 0%, rgba(12,11,8,0.72) 45%, rgba(12,11,8,0.28) 100%);
}
.hero-inner { padding-block: clamp(var(--space-24), 14vw, 11rem); max-width: 46rem; }
.hero h1 { font-size: var(--text-3xl); color: #fff; }
.hero p { font-size: var(--text-lg); color: rgba(255,255,255,0.9); margin: var(--space-6) 0 var(--space-8); max-width: 42ch; }
.hero .eyebrow { color: #9ec4f5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.stats {
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: clamp(var(--space-12), 6vw, var(--space-20));
  padding-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-8);
}
.stat strong { display: block; font-family: var(--font-display); font-size: var(--text-xl); color: #fff; }
.stat span { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.78); }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.card p { color: var(--color-text-muted); margin: 0 0 var(--space-4); font-size: var(--text-sm); }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--color-text-muted); font-size: var(--text-sm); }
.card li { margin-bottom: var(--space-1); }

/* ---------- Capabilities ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cap { background: var(--color-bg); padding: var(--space-8); }
.cap svg { width: 26px; height: 26px; color: var(--color-primary); margin-bottom: var(--space-4); }
.cap h3 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 700; margin-bottom: var(--space-2); letter-spacing: 0; line-height: 1.3; }
.cap p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---------- About / Code ---------- */
.about { background: var(--color-surface-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-10), 6vw, var(--space-20)); align-items: start; }
.about p { color: var(--color-text-muted); }
.about p + p { margin-top: var(--space-4); }
.about-logo { max-width: 28rem; margin: 0 0 var(--space-8); }
[data-theme="dark"] .about-logo,
:root:not([data-theme="light"]) .about-logo { /* logo already has color, works on dark */ }

.code-list {
  list-style: none; margin: var(--space-6) 0 0; padding: 0;
  border-top: 1px solid var(--color-border);
}
.code-list li {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  display: flex; gap: var(--space-3); align-items: baseline;
}
.code-list li span { color: var(--color-primary); font-weight: 700; font-size: var(--text-xs); min-width: 1.5rem; }

/* ---------- Areas ---------- */
.areas { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); }
.region { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.region h3 { font-size: var(--text-lg); }
.region p { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.region .region-tag { color: var(--color-primary); font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; margin: 0; }
.region .chip { font-size: var(--text-xs); padding: 0.3rem 0.7rem; }
.region-link { margin-top: auto; font-weight: 700; font-size: var(--text-sm); color: var(--color-primary); text-decoration: none; }
.region-link:hover { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact { background: var(--color-ink); color: #f4f0e7; }
.contact h2 { font-size: var(--text-xl); color: #f4f0e7; }
.contact .eyebrow { color: #9ec4f5; }
.contact p { color: rgba(244,240,231,0.86); }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(var(--space-10), 6vw, var(--space-20)); }
.contact-lines { margin-top: var(--space-8); display: grid; gap: var(--space-6); }
.contact-lines dt { font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,240,231,0.72); margin-bottom: var(--space-1); }
.contact-lines dd { margin: 0; font-size: var(--text-lg); font-family: var(--font-display); color: #f4f0e7; }
.contact-lines a { text-decoration: none; color: #f4f0e7; }
.contact-lines a:hover { color: #9ec4f5; }
.contact address { font-style: normal; }

.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); }
.field label { font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244,240,231,0.8); }
.field input, .field textarea, .field select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius);
  color: #f4f0e7;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: var(--text-sm);
}
.field select option { color: #1e1c18; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid #9ec4f5; outline-offset: 1px; }
.form-note { font-size: var(--text-xs); color: rgba(244,240,231,0.72); }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--color-ink); color: rgba(244,240,231,0.78); border-top: 1px solid rgba(255,255,255,0.1); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: var(--space-10);
  padding-block: var(--space-12);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); max-width: 28ch; }
.footer-brand .logo-mark { height: 52px; width: auto; }
.footer-brand p { margin: 0; font-size: var(--text-sm); color: rgba(244,240,231,0.7); }
.footer-col h2 { font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(244,240,231,0.6); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { text-decoration: none; font-size: var(--text-sm); color: rgba(244,240,231,0.86); }
.footer-col a:hover { color: #9ec4f5; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(244,240,231,0.6);
}
.footer-legal a { text-decoration: none; color: inherit; }
.footer-legal a:hover { color: #9ec4f5; }

/* ---------- Region pages ---------- */
.crumbs { padding-top: var(--space-6); font-size: var(--text-xs); color: var(--color-text-muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.35rem; color: var(--color-border); }
.crumbs a { color: var(--color-text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--color-primary); text-decoration: underline; }
.body-muted { color: var(--color-text-muted); margin: var(--space-4) 0 0; }
.cap h3 + p { margin-top: 0; }
.faq-list { max-width: 820px; border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); padding: var(--space-4) 0; }
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--color-primary); font-size: var(--text-lg); line-height: 1; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item p { color: var(--color-text-muted); margin: var(--space-3) 0 0; font-size: var(--text-sm); max-width: 70ch; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
[data-theme="dark"] .nav a.btn-primary,
[data-theme="dark"] .nav a.btn-primary:hover { color: #0e0d0a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav a.btn-primary,
  :root:not([data-theme="light"]) .nav a.btn-primary:hover { color: #0e0d0a; }
}

.related { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-4); }

.simple-page { padding-block: clamp(var(--space-16), 10vw, var(--space-32)); min-height: 60vh; }
.simple-page h1 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.simple-page p { color: var(--color-text-muted); max-width: 60ch; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn-primary:hover, .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .split, .contact-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 80px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-6) 1.25rem var(--space-8);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }
  .nav.open .btn { width: 100%; }
  .menu-btn {
    display: grid; place-items: center;
    margin-left: auto;
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    cursor: pointer;
  }
  .menu-btn svg { width: 18px; height: 18px; }
  .header-inner { position: relative; gap: var(--space-3); }
  .theme-toggle { order: 3; }
  .logo-mark { height: 40px; }
  .logo-text strong { font-size: 0.95rem; }
  .logo-text span { letter-spacing: 0.08em; }
}
@media (max-width: 560px) {
  .cap-grid, .footer-grid { grid-template-columns: 1fr; }
  .wrap { width: min(100% - 1.75rem, var(--max)); }
  .logo-text span { display: none; }
}
