/* National Civil Engineering, LLC — site styles
   Brand: NCE Blue #013478 / White / Old Glory Red #B31942
   Type: Cinzel (classical display), Source Serif 4 (body), Montserrat (brand, nav, buttons) */

:root {
  --blue: #013478;
  --blue-deep: #012254;
  --blue-soft: #E8EEF7;
  --red: #B31942;
  --red-deep: #8E1230;
  --stone: #F7F5F0;
  --white: #FFFFFF;
  --paper: #F3F5F8;
  --ink: #1E2633;
  --ink-soft: #4A5568;
  --rule: #D5DCE6;

  --font-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-classic: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--blue);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1, h2 { font-family: var(--font-classic); letter-spacing: 0.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.15rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--red); color: var(--blue-deep); padding: 8px 14px; z-index: 100; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 92px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 58px; height: 58px; }
.brand-name {
  font-family: var(--font-head); font-weight: 700; color: var(--blue);
  font-size: 1.42rem; letter-spacing: 0.06em; line-height: 1.05;
}
.brand-name small {
  display: block; font-weight: 600; font-size: 0.86rem; letter-spacing: 0.3em; color: var(--red); margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-head); font-weight: 500; font-size: 0.9rem;
  color: var(--ink); text-decoration: none; padding: 10px 9px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--red); }
.nav .btn { margin-left: 10px; border-bottom: 0; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule); border-radius: 4px;
  font-family: var(--font-head); font-weight: 600; color: var(--blue); padding: 8px 12px; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; padding: 13px 22px; border-radius: 3px; border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease;
}
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-deep); color: var(--white); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); color: var(--white); }
.btn-line { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-line:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-line-blue { border-color: var(--blue); color: var(--blue); }
.btn-line-blue:hover { background: var(--blue-soft); }

/* ---------- Hero (home) ---------- */
.hero { background: var(--blue); color: var(--white); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px;
  padding-top: clamp(56px, 9vw, 110px); padding-bottom: clamp(56px, 9vw, 110px);
}
.hero h1 { color: var(--white); max-width: 13ch; }
.hero-rule { width: 72px; height: 4px; background: var(--red); margin: 0 0 28px; border: 0; }
.hero p.lead { font-size: 1.22rem; color: #DCE5F2; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }


/* ---------- Credentials strip ---------- */
.creds { background: var(--white); border-bottom: 1px solid var(--rule); }
.creds ul {
  list-style: none; margin: 0; padding: 26px 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.creds li {
  font-family: var(--font-head); font-weight: 500; font-size: 0.98rem; color: var(--ink);
  padding: 4px 24px; border-left: 3px solid var(--red);
}
.creds li strong { display: block; color: var(--blue); font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-paper { background: var(--paper); }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head p { color: var(--ink-soft); }

/* Service list (home) */
.svc-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; border-top: 2px solid var(--blue); }
.svc-list a {
  display: block; text-decoration: none; color: var(--ink);
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.svc-list a h3 { margin-bottom: 4px; }
.svc-list a p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.svc-list a:hover h3 { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

.more { margin-top: 32px; }

/* Split block */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split blockquote {
  margin: 0; font-family: var(--font-head); font-weight: 600; color: var(--blue);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.3;
  border-left: 4px solid var(--red); padding-left: 24px;
}

/* CTA band */
.cta-band { background: var(--blue-deep); color: var(--white); }
.cta-band .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding-top: 56px; padding-bottom: 56px;
}
.cta-band h2 { color: var(--white); margin: 0 0 6px; }
.cta-band p { color: #C9D4E6; margin: 0; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Inner page header ---------- */
.page-head { background: var(--blue); color: var(--white); }
.page-head .wrap { padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(40px, 6vw, 64px); }
.page-head h1 { color: var(--white); font-size: clamp(2.1rem, 4.5vw, 3.2rem); max-width: 20ch; }
.page-head p { color: #DCE5F2; font-size: 1.18rem; max-width: 60ch; margin: 0; }
.page-head .hero-rule { margin-bottom: 22px; }

/* ---------- Services page ---------- */
.svc-layout { display: grid; grid-template-columns: 250px 1fr; gap: 56px; align-items: start; }
.svc-index { position: sticky; top: 124px; border-left: 2px solid var(--rule); }
.svc-index p { font-family: var(--font-head); font-weight: 700; color: var(--blue); font-size: .95rem; margin: 0 0 8px 16px; }
.svc-index a {
  display: block; font-family: var(--font-head); font-size: .88rem; color: var(--ink-soft);
  text-decoration: none; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent;
}
.svc-index a:hover { color: var(--blue); border-left-color: var(--red); }

.svc { padding: 0 0 44px; margin-bottom: 44px; border-bottom: 1px solid var(--rule); scroll-margin-top: 120px; }
.svc:last-child { border-bottom: 0; margin-bottom: 0; }
.svc h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); }
.svc ul { padding-left: 1.2em; margin: 0 0 1em; max-width: 66ch; }
.svc li { margin-bottom: 6px; }
.svc li::marker { color: var(--red); }

.code-note {
  background: var(--paper); border-left: 4px solid var(--blue); padding: 20px 24px; margin: 20px 0; max-width: 70ch;
}
.code-note h3 { font-size: 1.05rem; margin-bottom: 8px; }
.code-note p { font-size: 1rem; margin-bottom: .6em; }
.code-note p:last-child { margin-bottom: 0; }
.cite { font-family: var(--font-head); font-weight: 600; font-size: .9em; color: var(--blue); white-space: nowrap; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.fact-card { background: var(--paper); padding: 28px; border-top: 4px solid var(--red); }
.fact-card h3 { margin-bottom: 14px; }
.fact-card dl { margin: 0; }
.fact-card dt { font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--ink-soft); margin-top: 14px; }
.fact-card dt:first-child { margin-top: 0; }
.fact-card dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; max-width: 66ch; }
.checklist li { padding: 8px 0 8px 30px; border-bottom: 1px solid var(--rule); position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 12px;
  border: 2px solid var(--red); transform: rotate(45deg);
}

/* ---------- Service area ---------- */
.county-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; border-top: 2px solid var(--blue); }
.county-grid div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.county-grid h3 { margin-bottom: 2px; font-size: 1.12rem; }
.county-grid p { margin: 0; font-size: .98rem; color: var(--ink-soft); }
.agency-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 40px; padding: 0; list-style: none; margin: 0; }
.agency-list li { padding-left: 18px; border-left: 3px solid var(--red); }
.agency-list strong { font-family: var(--font-head); color: var(--blue); display: block; }

/* ---------- Process / FAQ ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; border-top: 2px solid var(--blue); }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  padding: 24px 0; border-bottom: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step); font-family: var(--font-head); font-weight: 700; font-size: 1.6rem;
  color: var(--blue); width: 52px; height: 52px; border: 2px solid var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-soft); }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 2px solid var(--blue); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--font-head); font-weight: 600; color: var(--blue); font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; color: var(--red); font-weight: 400;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-soft); padding-bottom: 8px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-method { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.contact-method:first-child { border-top: 2px solid var(--blue); }
.contact-method h2 { font-size: 1.2rem; margin-bottom: 6px; }
.contact-method .big {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  text-decoration: none; word-break: break-word;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--blue); color: #C9D4E6; font-size: .98rem; }
.site-footer .wrap {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px;
}
.site-footer .brand-name { color: var(--white); }
.site-footer .brand-name small { color: #AFC0DA; }
.site-footer h2 { font-family: var(--font-head); font-size: .95rem; color: var(--white); margin-bottom: 12px; letter-spacing: .04em; padding-bottom: 6px; border-bottom: 2px solid var(--red); display: inline-block; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .tagline { font-family: var(--font-head); font-weight: 600; color: var(--white); margin-top: 16px; }
.legal { border-top: 1px solid rgba(255,255,255,.15); }
.legal .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 18px; padding-bottom: 22px; font-size: .85rem; color: #9FB2D0; grid-template-columns: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .split, .about-grid, .contact-grid, .svc-layout { grid-template-columns: 1fr; }
  .portico { max-width: 320px; justify-self: start; }
  .svc-index { position: static; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; background: var(--white);
    border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 18px;
  }
  .nav.open { display: flex; }
  .nav a { border-bottom: 1px solid var(--rule); padding: 14px 4px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--red); }
  .nav .btn { margin: 14px 0 0; text-align: center; }
}
@media (max-width: 720px) {
  body { font-size: 1.06rem; }
  .creds ul, .svc-list, .county-grid, .agency-list { grid-template-columns: 1fr; }
  .creds li { padding: 10px 18px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .brand-name { font-size: .9rem; }
  .steps li { grid-template-columns: 52px 1fr; gap: 14px; }
  .steps li::before { width: 44px; height: 44px; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portico .col { animation: none; }
}

/* Specificity fix: nav links vs. header button */
.nav a.btn { color: var(--white); padding: 11px 18px; }
.nav a.btn:hover { color: var(--white); }
@media (max-width: 600px) {
  .portico { max-width: 240px; justify-self: center; margin-top: 8px; }
}

/* ---------- Neoclassical details ---------- */
.portico { width: 100%; max-width: 460px; justify-self: end; }
.portico svg { width: 100%; height: auto; display: block; }
.portico .col { transform-box: fill-box; transform-origin: 50% 100%; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.portico .col:nth-of-type(2) { animation-delay: .08s; }
.portico .col:nth-of-type(3) { animation-delay: .16s; }
.portico .col:nth-of-type(4) { animation-delay: .24s; }
@keyframes rise { from { transform: scaleY(0.6); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* Entablature band: architrave line + dentil course, used under the header and above the footer */
.entablature {
  height: 18px; background:
    linear-gradient(var(--blue), var(--blue)) top / 100% 4px no-repeat,
    linear-gradient(var(--red), var(--red)) 0 7px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--blue) 0 10px, transparent 10px 18px) 0 12px / 100% 6px no-repeat;
}
.entablature.inverse {
  background:
    repeating-linear-gradient(90deg, var(--blue) 0 10px, transparent 10px 18px) 0 0 / 100% 6px no-repeat,
    linear-gradient(var(--red), var(--red)) 0 9px / 100% 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) bottom / 100% 4px no-repeat;
}

/* Fluted pilaster edges on inner page headers */
.page-head { position: relative; }
.page-head::before, .page-head::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 34px; opacity: .14;
  background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 8px);
}
.page-head::before { left: 0; }
.page-head::after { right: 0; }
@media (max-width: 720px) { .page-head::before, .page-head::after { width: 14px; } }

/* Stone-toned paper sections read as limestone against the blue */
.section-paper { background: var(--stone); }
.creds { background: var(--stone); }

/* ---------- Restrained stars and stripes ---------- */
.hero { position: relative; }
.hero .wrap { position: relative; z-index: 1; }
.canton {
  position: absolute; left: 0; top: 0; width: min(46%, 560px); height: 70%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='38'%3E%3Cpath fill='%23ffffff' d='M11 3l2.35 4.76 5.25.77-3.8 3.7.9 5.23L11 15l-4.7 2.46.9-5.23-3.8-3.7 5.25-.77z'/%3E%3Cpath fill='%23ffffff' d='M33 22l2.35 4.76 5.25.77-3.8 3.7.9 5.23L33 34l-4.7 2.46.9-5.23-3.8-3.7 5.25-.77z'/%3E%3C/svg%3E"); background-size: 44px 38px; opacity: .07;
  -webkit-mask-image: linear-gradient(135deg, #000 35%, transparent 85%); mask-image: linear-gradient(135deg, #000 35%, transparent 85%);
}
.star-rule { display: flex; align-items: center; gap: 10px; color: var(--white); font-size: .8rem; letter-spacing: .5em; margin-bottom: 26px; }
.star-rule span { display: block; width: 44px; height: 3px; background: var(--red); }
.cta-band.stripes {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 14px, transparent 14px 28px),
    var(--blue-deep);
  border-top: 4px solid var(--red);
}
.site-header { border-top: 5px solid var(--red); }

/* ---------- Service area map ---------- */
.map-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.map-fig { margin: 0; background: var(--white); border: 1px solid var(--rule); padding: 12px; }
.county-grid.two { grid-template-columns: repeat(2, 1fr); }
.prior { margin-top: 56px; padding: 28px 32px; background: var(--stone); border-left: 4px solid var(--red); }
.prior h2 { font-size: 1.4rem; }
.prior p { margin: 0; color: var(--ink-soft); }
@media (max-width: 960px) { .map-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .county-grid.two { grid-template-columns: 1fr; } .brand-name { font-size: 1.1rem; } .brand-name small { font-size: .7rem; } .brand img { width: 46px; height: 46px; } }
@media (max-width: 1100px) and (min-width: 861px) { .brand-name { font-size: 1.2rem; } .nav a { padding: 10px 6px; font-size: .85rem; } }
