/* BRi Engineering — benchmark-driven redesign
   Palette: deep Spartan pine + green accent, editorial serif headlines, forensic precision */

:root {
  --pine-950: #08120e;
  --pine-900: #0c1e15;
  --pine-800: #132b1f;
  --pine-700: #1b3d2b;
  --ink: #101812;
  --paper: #f5f7f4;
  --paper-dim: #e9efe9;
  --accent: #2fa36b;
  --accent-bright: #63d298;
  --accent-deep: #1c7a4b;
  --accent-soft: rgba(47, 163, 107, 0.14);
  --line: rgba(255, 255, 255, 0.1);
  --line-dark: rgba(16, 24, 18, 0.14);
  --text: #e9ede9;
  --text-dim: #a9bcb0;
  --text-dark: #2b3a30;
  --text-muted: #68766d;
  --serif: "Playfair Display", "Didot", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --radius: 10px;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--text-dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--pine-950); }

.container { width: min(var(--max), 92%); margin: 0 auto; }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin-bottom: 1rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; color: var(--text-dark); }
.display { font-size: clamp(2.4rem, 5.2vw, 4.2rem); letter-spacing: -0.01em; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 0.6rem; }
.lede { font-size: 1.12rem; color: var(--text-muted); max-width: 46rem; }
em.accent { color: var(--accent-deep); font-style: italic; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(8, 18, 14, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  width: min(var(--max), 94%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, #1d5c3c 100%);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: #08120e;
}
.brand-text { line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.02em; }
.brand-text small { display: block; font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-dim); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: 0.88rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-dim); font-weight: 500;
  padding: 0.4rem 0; border-bottom: 2px solid transparent; transition: 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; border-bottom-color: var(--accent); }
.nav-phone {
  text-decoration: none; font-weight: 700; font-size: 0.92rem;
  border: 1px solid var(--accent); color: var(--accent-bright);
  padding: 0.55rem 1.1rem; border-radius: 999px; transition: 0.25s; white-space: nowrap;
}
.nav-phone:hover { background: var(--accent); color: var(--pine-950); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: #fff; border-radius: 8px; padding: 0.5rem 0.7rem; font-size: 1.1rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  min-height: 96vh; display: flex; align-items: flex-end;
  position: relative; overflow: hidden;
  padding: 9rem 0 5.5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,18,14,0.38) 0%, rgba(8,18,14,0.22) 40%, rgba(8,18,14,0.9) 100%);
}
.hero-inner { position: relative; z-index: 1; width: min(var(--max), 92%); margin: 0 auto; }
.hero h1 { max-width: 16ch; margin-bottom: 1.2rem; }
.hero .lede { max-width: 40rem; margin-bottom: 2.2rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 0.95rem 1.9rem; border-radius: 999px; transition: 0.25s; letter-spacing: 0.02em;
}
.btn-primary { background: var(--accent); color: var(--pine-950); }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-bright); }

/* Page hero (interior pages) */
.page-hero { position: relative; padding: 10rem 0 4.5rem; overflow: hidden; }
.page-hero .hero-bg::after { background: linear-gradient(180deg, rgba(8,18,14,0.55), rgba(8,18,14,0.92)); }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero .lede { margin-bottom: 0; }

/* Light text over dark hero imagery */
.hero, .page-hero { color: var(--text); }
.hero h1, .page-hero h1 { color: #fff; }
.hero .eyebrow, .page-hero .eyebrow { color: var(--accent-bright); }
.hero .lede, .page-hero .lede { color: var(--text-dim); }

/* ---------- Stat band ---------- */
.stat-band { background: #fff; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 2.4rem 1.6rem; border-left: 1px solid var(--line-dark); }
.stat:first-child { border-left: none; }
.stat-num { font-family: var(--serif); font-size: 2.4rem; color: var(--accent-deep); line-height: 1.1; }
.stat-label { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-top: 0.5rem; }

/* ---------- Sections ---------- */
.section { padding: 6rem 0; }
.section-light { background: var(--paper); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split img.frame { border-radius: var(--radius); box-shadow: 0 30px 60px rgba(8,18,14,0.18); }
.kicker-list { list-style: none; margin-top: 1.8rem; display: grid; gap: 1.1rem; }
.kicker-list li { display: flex; gap: 1rem; align-items: flex-start; }
.kicker-list .tick {
  flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-deep); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; margin-top: 2px;
}
.kicker-list strong { display: block; font-size: 1.02rem; }
.kicker-list p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.card {
  background: #fff; border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 2.2rem 1.9rem; transition: 0.3s; text-decoration: none; display: block;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 24px 48px rgba(8,18,14,0.14); }
.card-icon { font-size: 1.7rem; margin-bottom: 1.1rem; }
.card h3 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card .more { display: inline-block; margin-top: 1.2rem; color: var(--accent-deep); font-weight: 600; font-size: 0.88rem; letter-spacing: 0.04em; }
.serve-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 3rem; }
.serve {
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 2rem 1.6rem;
  background: #fff; transition: 0.3s;
}
.serve:hover { border-color: var(--accent); box-shadow: 0 16px 32px rgba(8,18,14,0.1); }
.serve h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.serve p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Quote ---------- */
.pull-quote {
  background: #e9f3ec;
  border: 1px solid var(--line-dark); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 3rem; margin-top: 1rem;
}
.pull-quote blockquote { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-style: italic; line-height: 1.5; color: var(--text-dark); }
.pull-quote cite { display: block; margin-top: 1.2rem; font-style: normal; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-deep); }

/* ---------- Timeline ---------- */
.timeline { margin-top: 3rem; border-left: 2px solid var(--accent); padding-left: 2.2rem; display: grid; gap: 2.4rem; max-width: 46rem; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.75rem; top: 0.35rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.timeline-item .year { font-family: var(--serif); color: var(--accent-deep); font-size: 1.25rem; }
.timeline-item p { color: var(--text-muted); margin-top: 0.4rem; }

/* ---------- Credentials ---------- */
.cred-list { display: grid; gap: 1rem; margin-top: 2rem; }
.cred {
  display: flex; gap: 1.2rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 1.5rem 1.7rem;
}
.cred .seal {
  flex: 0 0 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent-deep);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700;
}
.cred strong { display: block; font-size: 1.02rem; margin-bottom: 0.25rem; }
.cred p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, #1d5c3c, var(--accent) 55%, var(--accent-bright));
  color: var(--pine-950); padding: 4.5rem 0; text-align: center;
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 0.8rem; }
.cta-band p { max-width: 38rem; margin: 0 auto 2rem; font-weight: 500; }
.cta-band .btn-primary { background: var(--pine-950); color: #fff; }
.cta-band .btn-primary:hover { background: var(--pine-800); }
.cta-band .btn-ghost { border-color: rgba(8,18,14,0.4); color: var(--pine-950); }
.cta-band .btn-ghost:hover { border-color: var(--pine-950); color: var(--pine-950); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3.5rem; margin-top: 3rem; align-items: start; }
.contact-card { background: #fff; border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 2.4rem; }
.contact-card h3 { margin-bottom: 1rem; }
.contact-line { display: flex; gap: 1rem; align-items: center; margin: 1.1rem 0; font-size: 1.05rem; }
.contact-line a { color: var(--accent-deep); text-decoration: none; font-weight: 600; }
.contact-line a:hover { text-decoration: underline; }
.form { display: grid; gap: 1.1rem; }
.form label { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.form input, .form select, .form textarea {
  width: 100%; background: #fff; border: 1px solid var(--line-dark);
  border-radius: 8px; color: var(--text-dark); padding: 0.9rem 1.1rem; font-size: 1rem; font-family: var(--sans);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form textarea { min-height: 150px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine-950); border-top: 1px solid var(--line); padding: 4.5rem 0 2rem; color: var(--text); }
.site-footer h1, .site-footer h2, .site-footer h3 { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-grid h4 { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 1.1rem; }
.footer-grid ul { list-style: none; display: grid; gap: 0.6rem; }
.footer-grid a { color: var(--text-dim); text-decoration: none; font-size: 0.93rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { color: var(--text-dim); font-size: 0.92rem; margin-top: 1rem; max-width: 24rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 1.6rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-dim); font-size: 0.82rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--pine-900); flex-direction: column; align-items: stretch;
    padding: 1rem 5%; gap: 0; border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .nav-phone { display: none; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .serve-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: none; }
  .stat { border-top: 1px solid var(--line-dark); }
  .stat:nth-child(-n+2) { border-top: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .serve-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}

.insight-tag { display:inline-block; font-size:.7rem; letter-spacing:.14em; text-transform:uppercase; color:var(--accent-deep); border:1px solid var(--line-dark); border-radius:999px; padding:.28rem .8rem; margin-bottom:1rem; }
.insight-more { color:var(--accent-deep); font-weight:600; font-size:.95rem; }
.form-success { background:#e9f3ec; border:1px solid var(--accent); border-radius:14px; padding:2rem; }
.form-success h3 { font-family:var(--serif); font-size:1.6rem; margin-bottom:.6rem; color:var(--text-dark); }
.form-success p { color: var(--text-muted); }
.form-success a { color: var(--accent-deep); font-weight: 600; }
