/* ============================================================
   LeanEdge Resources — site.css
   Shared foundation. Theme: SLATE & CRIMSON (engineered, brutalist).
   reset, layout, typography, buttons, header, footer, forms, modal,
   scroll-reveal. Hard geometry — 0px radius throughout.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  font-family: var(--font-body);
  color: var(--le-body);
  background: var(--le-light);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--le-red); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.section { padding-block: clamp(72px, 8vw, 112px); position: relative; border-bottom: 1px solid var(--le-line); }
.section--alt { background: var(--le-paper); }
.section--dark { background: var(--le-navy-900); color: var(--le-on-dark); border-bottom-color: #0a1120; }
.section--sand { background: var(--le-sand); border-bottom-color: var(--le-sand-deep); }
.section--dark .section-title { color: #fff; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--le-red);
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--le-red); flex: none; }
.eyebrow--red { color: #e74c3c; }
.section--dark .eyebrow::before { background: #e74c3c; }

.section-title {
  font-family: var(--font-display); font-weight: 500; color: var(--le-ink);
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-title strong { font-weight: 700; color: var(--le-ink); }
.section--dark .section-title strong { color: #fff; }
.title-accent { color: var(--le-ink); font-weight: 700; }
.title-accent-light { color: #fff; font-weight: 700; }
.section-intro { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.65; color: var(--le-muted); max-width: 64ch; margin-top: 20px; }
.section--dark .section-intro { color: var(--le-on-dark-mut); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 60px); }

/* ---------- Buttons · BIG & COLD brutalist ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 26px; border: 1px solid transparent; border-radius: 0; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn .ico { width: 15px; height: 15px; flex: none; }
.btn .ico--dim { opacity: .6; }
.btn:active { transform: scale(.98); }
.btn--red   { background: var(--le-red); color: #fff; border-color: var(--le-red); }
.btn--red:hover   { background: var(--le-red-deep); border-color: var(--le-red-deep); transform: scale(1.02); }
.btn--navy  { background: var(--le-navy); color: #fff; border-color: var(--le-navy); }
.btn--navy:hover  { background: var(--le-navy-deep); border-color: var(--le-navy-deep); transform: scale(1.02); }
.btn--ghost { background: #fff; color: var(--le-navy); border-color: var(--le-line); }
.btn--ghost:hover { background: var(--le-grey); border-color: #b9c3d1; transform: scale(1.02); }
.btn--glass { background: rgba(15,23,42,.42); color: #fff; border-color: rgba(255,255,255,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn--glass:hover { background: rgba(15,23,42,.62); border-color: #fff; transform: scale(1.02); }
.btn--lg { padding: 16px 32px; }
.btn--sm { padding: 11px 20px; font-size: 11px; letter-spacing: .12em; }

/* Text link with animated arrow — technical label feel */
.link-arrow {
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--le-red);
  display: inline-flex; align-items: center; gap: 9px; letter-spacing: .1em; text-transform: uppercase;
  width: fit-content;
}
.link-arrow .ar { transition: transform .25s var(--ease); font-family: var(--font-body); }
.link-arrow:hover { color: var(--le-red-deep); }
.link-arrow:hover .ar { transform: translateX(5px); }
.link-arrow--ondark { color: #e74c3c; }
.link-arrow--ondark:hover { color: #fff; }

/* ---------- Header (dark navy bar over light page) ---------- */
.site-top { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.util-bar { background: #0A1120; border-bottom: 1px solid rgba(255,255,255,.07); height: 40px; overflow: hidden; }
.util-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 40px; flex-wrap: nowrap; }
.util-left { display: flex; align-items: center; gap: 20px; min-width: 0; }
.util-item { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .03em; color: var(--le-on-dark); white-space: nowrap; transition: color .2s var(--ease); }
.util-item svg { width: 14px; height: 14px; color: var(--le-red); flex: none; }
.util-item:hover { color: #fff; }
.util-right { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--le-slate-soft); white-space: nowrap; }

.site-header {
  height: 72px;
  background: var(--le-navy-900); border-bottom: 1px solid rgba(255,255,255,.08);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header .header-inner { display: flex; align-items: center; gap: 30px; height: 100%; }
.brand { display: flex; align-items: center; }
.site-logo { height: 28px; width: auto; }
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0,0,0,.35); border-bottom-color: var(--le-red); }

.main-nav { display: flex; gap: 26px; margin-left: 10px; }
.main-nav a {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: rgba(230,236,244,.72);
  letter-spacing: .08em; text-transform: uppercase;
  position: relative; padding-block: 6px; transition: color .2s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--le-red); transition: width .25s var(--ease);
}
.main-nav a:hover, .main-nav a.is-active { color: #fff; }
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }

/* Services dropdown */
.nav-dd { position: relative; display: flex; align-items: center; }
.nav-dd-trigger { display: inline-flex; align-items: center; gap: 6px; }
.dd-caret { width: 11px; height: 11px; transition: transform .2s var(--ease); }
.nav-dd:hover .dd-caret, .nav-dd:focus-within .dd-caret { transform: rotate(180deg); }
.nav-dd-menu { position: absolute; top: 100%; left: -10px; min-width: 290px; background: var(--le-navy-900); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 44px rgba(0,0,0,.42); padding: 8px; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease); z-index: 120; }
.nav-dd-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dd-menu a { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .03em; text-transform: none; color: rgba(230,236,244,.8); padding: 11px 14px; white-space: nowrap; border-left: 2px solid transparent; }
.nav-dd-menu a::after { content: none; }
.nav-dd-menu a:hover { color: #fff; background: rgba(255,255,255,.05); border-left-color: var(--le-red); }

.header-cta { margin-left: auto; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 0; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle span:nth-child(1) { top: 15px; } .nav-toggle span:nth-child(2) { top: 21px; } .nav-toggle span:nth-child(3) { top: 27px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer { background: #0A1120; color: var(--le-on-dark-mut); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1.1fr 1.2fr; gap: 44px; padding-block: clamp(56px, 7vw, 84px); }
.footer-logo { height: 30px; width: auto; margin-bottom: 22px; }
.footer-tagline { font-family: var(--font-body); font-weight: 400; font-size: 15px; line-height: 1.6; color: var(--le-on-dark-mut); max-width: 40ch; }
.footer-li { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--le-on-dark); border: 1px solid rgba(255,255,255,.16); padding: 9px 16px; transition: background .2s var(--ease), border-color .2s var(--ease); }
.footer-li svg { width: 15px; height: 15px; }
.footer-li:hover { background: var(--le-navy); border-color: var(--le-navy); color: #fff; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--le-slate-soft); margin-bottom: 22px; }
.footer-links { display: flex; flex-direction: column; gap: 13px; }
.footer-links a { color: var(--le-on-dark); font-size: 14.5px; transition: color .2s var(--ease); width: fit-content; }
.footer-links a:hover { color: var(--le-slate-soft); }
.footer-contact { display: flex; flex-direction: column; gap: 15px; }
.footer-contact a, .footer-contact span { font-family: var(--font-mono); font-size: 13px; letter-spacing: .01em; color: var(--le-on-dark); display: flex; align-items: center; gap: 12px; }
.footer-contact a:hover { color: var(--le-slate-soft); }
.footer-contact .ico { width: 16px; height: 16px; color: var(--le-red); flex: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Footer newsletter column */
.foot-news-copy { font-size: 13.5px; line-height: 1.55; color: var(--le-on-dark-mut); margin-bottom: 16px; max-width: 34ch; }
.foot-news-row { display: flex; gap: 0; }
.foot-news-row input { flex: 1; min-width: 0; font-family: var(--font-body); font-size: 14px; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-right: 0; border-radius: 0; padding: 11px 13px; transition: border-color .2s var(--ease); }
.foot-news-row input::placeholder { color: rgba(157,176,204,.6); }
.foot-news-row input:focus { outline: none; border-color: var(--le-slate-soft); }
.foot-news-row .btn { padding: 11px 15px; flex: none; }
.foot-news-msg { display: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em; margin-top: 9px; }
.foot-news-form.is-error .foot-news-err { display: block; color: #E78A7E; }
.foot-news-form.is-ok .foot-news-ok { display: block; color: var(--le-slate-soft); }
.footer-bottom p { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .03em; color: var(--le-on-dark-mut); display: inline-flex; align-items: center; gap: 9px; }
.footer-bottom p .ico { width: 14px; height: 14px; color: var(--le-slate-soft); }
.footer-bottom .legal { display: flex; gap: 22px; }
.footer-bottom .legal a { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .03em; }
.footer-bottom .legal a:hover { color: #fff; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--le-slate-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 15px; color: #fff; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.18); border-radius: 0; padding: 14px 16px; width: 100%;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(157,176,204,.6); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--le-slate-soft); background: rgba(255,255,255,.09); }
.field input[aria-invalid="true"] { border-color: var(--le-red); }
.field .err { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: #E78A7E; min-height: 0; opacity: 0; transition: opacity .2s; }
.field input[aria-invalid="true"] ~ .err { opacity: 1; }

/* Light field variant (modal) */
.field--light label { color: var(--le-muted); }
.field--light input, .field--light select, .field--light textarea {
  color: var(--le-ink); background: var(--le-light); border-color: var(--le-line);
}
.field--light input::placeholder, .field--light textarea::placeholder { color: #9aa6b4; }
.field--light input:focus, .field--light select:focus, .field--light textarea:focus { border-color: var(--le-navy); background: #fff; }
.field--light input[aria-invalid="true"], .field--light select[aria-invalid="true"], .field--light textarea[aria-invalid="true"] { border-color: var(--le-red); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.is-open { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(10,17,32,.66); backdrop-filter: blur(3px); animation: mfade .25s var(--ease); }
.modal-dialog {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border: 1px solid var(--le-line); box-shadow: var(--shadow-lg);
  animation: mrise .3s var(--ease);
}
@keyframes mfade { from { opacity: 0; } }
@keyframes mrise { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; background: var(--le-navy); color: #fff; padding: 24px 28px; }
.modal-eyebrow { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--le-slate-soft); margin-bottom: 8px; }
.modal-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -0.015em; color: #fff; }
.modal-close { background: transparent; border: 1px solid rgba(255,255,255,.24); color: #fff; width: 38px; height: 38px; display: grid; place-items: center; flex: none; transition: background .2s var(--ease); }
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { background: rgba(255,255,255,.12); }
.modal-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 16px; }
.modal-body .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-foot { padding: 0 28px 26px; display: flex; justify-content: flex-end; gap: 12px; }
.modal-success { display: none; padding: 40px 28px 44px; text-align: center; flex-direction: column; align-items: center; gap: 14px; }
.modal-success svg { width: 52px; height: 52px; color: #1F8A5B; }
.modal-success h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--le-ink); letter-spacing: -0.015em; }
.modal-success p { font-size: 15px; color: var(--le-muted); max-width: 40ch; }
.modal-success .btn { margin-top: 8px; }
.modal-form.is-sent .modal-body, .modal-form.is-sent .modal-foot { display: none; }
.modal-form.is-sent .modal-success { display: flex; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }

/* ---------- Mobile ---------- */
@media (max-width: 1080px) {
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 11px; }
}
@media (max-width: 760px) {
  .util-right { display: none; }
}
@media (max-width: 480px) {
  .util-email { display: none; }
}
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav, .header-cta {
    position: fixed; left: 0; right: 0; top: 0; flex-direction: column; align-items: flex-start;
    background: var(--le-navy-900); padding: 116px clamp(16px,4vw,32px) 40px; margin: 0; gap: 4px;
    transform: translateY(-100%); transition: transform .4s var(--ease); z-index: -1;
  }
  .main-nav { border-bottom: 1px solid rgba(255,255,255,.1); }
  .main-nav a { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: 0; text-transform: none; padding-block: 11px; color: #fff; }
  .nav-dd { flex-direction: column; align-items: flex-start; width: 100%; }
  .nav-dd-trigger { width: 100%; }
  .dd-caret { display: none; }
  .nav-dd-menu { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; box-shadow: none; padding: 2px 0 10px 16px; min-width: 0; }
  .nav-dd-menu a { font-family: var(--font-display); font-weight: 500; font-size: 16px; letter-spacing: 0; color: rgba(230,236,244,.82); padding: 8px 0; border-left: 0; white-space: normal; }
  .header-cta { top: auto; transform: translateY(-100%); padding-top: 8px; padding-bottom: 52px; }
  .header-cta .btn { width: 100%; }
  body.nav-open .main-nav { transform: translateY(0); }
  body.nav-open .header-cta { transform: translateY(0); }
  body.nav-open { overflow: hidden; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .modal-body .row2 { grid-template-columns: 1fr; }
}
