/* Apex Engineering Solutions — static site styles (no external dependencies) */
:root {
  --navy-900: #06101f;
  --navy-800: #0a192f;
  --navy-700: #112240;
  --navy-600: #1d3557;
  --teal: #64ffda;
  --teal-600: #14b8a0;
  --teal-700: #0d8f7c;
  --ink: #16202e;
  --muted: #5b6678;
  --line: #e3e8ef;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(10, 25, 47, .06), 0 1px 3px rgba(10, 25, 47, .08);
  --shadow-md: 0 8px 24px rgba(10, 25, 47, .10);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 1rem; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-700); text-underline-offset: 3px; }
a:hover { color: var(--navy-600); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6rem; color: var(--navy-800); letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--teal-600); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.accent { color: var(--teal); }
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-700); font-weight: 600; margin-bottom: .75rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--teal); color: var(--navy-900); padding: .6rem 1rem; z-index: 200; font-weight: 700; }
.skip-link:focus { left: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(10, 25, 47, .94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(100, 255, 218, .12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 500; font-size: 1.1rem; letter-spacing: -.01em; }
.brand svg { color: var(--teal); flex: none; }
.brand b { font-weight: 800; }
.brand:hover { color: #fff; }
.site-nav ul { list-style: none; display: flex; gap: .25rem; align-items: center; }
.site-nav a { display: block; padding: .5rem .85rem; color: #c9d4e5; text-decoration: none; font-weight: 600; font-size: .94rem; border-radius: 8px; transition: color .15s, background .15s; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.site-nav a[aria-current="page"] { color: var(--teal); background: rgba(100, 255, 218, .09); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; width: 44px; height: 44px; padding: 0; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.4rem; border-radius: 10px; font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, background .15s, color .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: var(--navy-900); }
.btn-primary:hover { background: #8affe6; color: var(--navy-900); box-shadow: 0 6px 18px rgba(100, 255, 218, .28); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.section .btn-ghost, .quote-calculator .btn-ghost { color: var(--navy-800); border-color: var(--line); background: #fff; }
.section .btn-ghost:hover, .quote-calculator .btn-ghost:hover { border-color: var(--teal-600); color: var(--teal-700); }
.section .btn-primary { background: var(--navy-800); color: #fff; }
.section .btn-primary:hover { background: var(--navy-600); color: #fff; box-shadow: var(--shadow-md); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn-row.center { justify-content: center; }

/* Hero */
.hero, .page-hero, .error-hero, .cta { color: #fff; background: radial-gradient(900px 400px at 85% -10%, rgba(100, 255, 218, .16), transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-700)); position: relative; overflow: hidden; }
.hero::before, .page-hero::before, .error-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(100, 255, 218, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 255, 218, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, #000 20%, transparent 95%); -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%); pointer-events: none; }
.hero h1, .page-hero h1, .error-hero h1, .cta h2 { color: #fff; }
.hero .eyebrow, .page-hero .eyebrow, .cta .eyebrow { color: var(--teal); }
.hero-inner { position: relative; padding: clamp(4rem, 10vw, 7.5rem) 0; }
.hero-inner > * { max-width: 820px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #b7c4d9; max-width: 62ch; }
.page-hero .container { position: relative; padding: clamp(3rem, 7vw, 5rem) 0; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }

/* Stats */
.stats { background: var(--navy-800); border-top: 1px solid rgba(100, 255, 218, .12); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid div { padding: 1.75rem 1rem; text-align: center; border-left: 1px solid rgba(255, 255, 255, .08); }
.stats-grid div:first-child { border-left: 0; }
.stats-grid strong { display: block; font-size: 1.9rem; color: var(--teal); font-weight: 800; letter-spacing: -.02em; }
.stats-grid span { font-size: .88rem; color: #9fb0c9; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: #eef2f8; }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfe9e4; }
.card p { color: var(--muted); margin-bottom: 0; }
.icon { width: 48px; height: 48px; border-radius: 12px; background: var(--navy-800); display: grid; place-items: center; margin-bottom: 1rem; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-wide p { margin-bottom: 1rem; }
.ticks { list-style: none; display: grid; gap: .4rem; }
.ticks li { position: relative; padding-left: 1.6rem; font-size: .95rem; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 6px; border-left: 2px solid var(--teal-600); border-bottom: 2px solid var(--teal-600); transform: rotate(-45deg); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: s; }
.steps li { position: relative; padding-top: 1.25rem; border-top: 2px solid var(--navy-800); }
.steps li p { color: var(--muted); }
.step-num { font-family: var(--mono); font-size: .85rem; color: var(--teal-700); font-weight: 700; display: block; margin-bottom: .4rem; }

/* CTA */
.cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 3.5rem 0; flex-wrap: wrap; }
.cta p { color: #b7c4d9; margin: 0; }
.cta .btn-row { margin: 0; }

/* Estimator */
.quote-calculator { background: var(--surface); padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-md); max-width: 820px; }
.quote-calculator fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .75rem; }
.quote-calculator legend, .field-row > label { font-weight: 700; color: var(--navy-800); margin-bottom: .75rem; padding: 0; }
.option { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; margin: 0; }
.option:hover { border-color: var(--teal-600); }
.option:has(input:checked) { border-color: var(--teal-600); background: #f0fdfa; }
.option input { width: 20px; height: 20px; accent-color: var(--teal-700); flex: none; }
.option-body { flex: 1; display: grid; }
.option-title { font-weight: 650; color: var(--navy-800); }
.option-desc { font-size: .88rem; color: var(--muted); }
.option-price { font-family: var(--mono); font-weight: 700; color: var(--navy-800); }
.field-row { display: grid; margin-bottom: 1.5rem; }
select, input[type="text"], input[type="email"], textarea { width: 100%; font: inherit; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 3px rgba(20, 184, 160, .2); }
.quote-summary { background: var(--navy-800); color: #fff; border-radius: 12px; padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.quote-items { list-style: none; display: grid; gap: .4rem; font-size: .93rem; padding-bottom: 1rem; border-bottom: 1px dashed rgba(255, 255, 255, .2); margin-bottom: 1rem; }
.quote-items li { display: flex; justify-content: space-between; gap: 1rem; }
.quote-items .muted { color: #9fb0c9; }
.quote-items .mono { font-family: var(--mono); }
.quote-total { display: flex; align-items: baseline; justify-content: space-between; }
.quote-total span { color: #9fb0c9; font-weight: 600; }
.quote-total h3 { color: var(--teal); font-size: 2rem; margin: 0; font-variant-numeric: tabular-nums; }

/* Portfolio */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { font: inherit; font-weight: 650; font-size: .9rem; padding: .5rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--navy-800); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--teal-600); }
.chip.is-active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project[hidden] { display: none; }
.project-art { height: 150px; background-color: var(--navy-800); background-size: cover; position: relative; }
.art-1 { background-image: radial-gradient(circle at 20% 120%, rgba(100, 255, 218, .45), transparent 55%), repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 18px), linear-gradient(135deg, #0a192f, #1d3557); }
.art-2 { background-image: radial-gradient(circle at 80% -20%, rgba(100, 255, 218, .4), transparent 55%), linear-gradient(rgba(100, 255, 218, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 255, 218, .09) 1px, transparent 1px), linear-gradient(135deg, #06101f, #112240); background-size: auto, 22px 22px, 22px 22px, auto; }
.art-3 { background-image: radial-gradient(circle at 50% 130%, rgba(100, 255, 218, .4), transparent 60%), radial-gradient(rgba(255, 255, 255, .12) 1.5px, transparent 1.5px), linear-gradient(135deg, #112240, #0a192f); background-size: auto, 20px 20px, auto; }
.project-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.project-body p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.tags span { font-family: var(--mono); font-size: .72rem; padding: .2rem .6rem; border-radius: 6px; background: #e6faf6; color: var(--teal-700); font-weight: 600; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; font-size: .9rem; color: var(--navy-800); }

/* Team */
.member { text-align: left; }
.avatar { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: var(--teal); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 1.15rem; margin-bottom: 1rem; }
.member p { margin-bottom: 1rem; }
.grid-3 .member:nth-child(4) { grid-column: auto; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.75rem; align-items: start; }
.contact-info { display: grid; gap: 1.5rem; }
.info-list { list-style: none; display: grid; gap: 1rem; margin-top: 1rem; }
.info-label { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.form { padding: clamp(1.4rem, 3vw, 2.2rem); }
.form:hover { transform: none; }
.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.field label { font-weight: 650; font-size: .92rem; color: var(--navy-800); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #d64545; }
.error { color: #c0392b; font-size: .83rem; min-height: 0; }
.form-note { font-size: .85rem; margin: 1rem 0 0; }

/* 404 */
.error-hero .container { position: relative; text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.error-hero .lead { margin-inline: auto; }
.error-code { font-family: var(--mono); font-weight: 800; font-size: clamp(5rem, 18vw, 10rem); line-height: 1; margin: 0 0 .5rem; color: transparent; -webkit-text-stroke: 2px var(--teal); letter-spacing: -.04em; }
.error-links { display: flex; gap: 1.5rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.error-links a { color: #9fb0c9; font-size: .92rem; }
.error-links a:hover { color: var(--teal); }

/* Footer */
.site-footer { background: var(--navy-900); color: #9fb0c9; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-grid h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; font-family: var(--mono); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; display: grid; gap: .5rem; font-size: .93rem; }
.footer-grid a { color: #c9d4e5; text-decoration: none; }
.footer-grid a:hover { color: var(--teal); }
.footer-grid .muted { color: #8091ab; margin-top: 1rem; max-width: 36ch; font-size: .93rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1.25rem 0; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* Scroll reveal (progressive enhancement) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid div:nth-child(3) { border-left: 0; }
  .stats-grid div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .08); }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-800); border-bottom: 1px solid rgba(100, 255, 218, .15); max-height: 0; overflow: hidden; transition: max-height .3s ease; }
  .site-nav.is-open { max-height: 420px; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; gap: .15rem; }
  .site-nav a { padding: .8rem .9rem; }
  .grid-2, .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .option { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
