/* ==========================================================================
   Hindsight Solutions — site.css
   Single stylesheet, no build step, no framework. Ready for cPanel drop-in.
   ========================================================================== */

/* Tokens -------------------------------------------------------------- */
:root {
  --bg:           #020618;
  --bg-2:         #0f172b;
  --steel:        #334155;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --line:         rgba(255, 255, 255, 0.10);
  --line-dark:    #e2e8f0;
  --text:         #f8fafc;
  --text-muted:   rgba(248, 250, 252, 0.62);
  --text-dark:    #020618;
  --text-dark-muted: #64748b;
  --primary:      #ea580d;
  --primary-hover:#c2410c;
  --shadow-card:  0 1px 0 rgba(255,255,255,0.04), 0 12px 30px rgba(0,0,0,0.35);
  --radius:       14px;
  --radius-sm:    8px;
  --max-w:        1180px;
  --gutter:       clamp(1.25rem, 4vw, 2.5rem);
  --t-fast:       180ms cubic-bezier(.4, 0, .2, 1);
}

/* Reset (lean) -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter Tight', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary); }
button { font: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Type --------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: 'Inter Tight', Inter, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: clamp(2.75rem, 7vw, 5rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.35rem); letter-spacing: -0.01em; }
p  { margin: 0 0 1em; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Layout helpers ----------------------------------------------------- */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--tight { padding: clamp(2rem, 5vw, 3rem) 0; }

/* Status bar (top utility strip) ------------------------------------- */
.statusbar {
  background: var(--steel);
  color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.5rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
.statusbar > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .statusbar { font-size: 9px; letter-spacing: 0.14em; gap: 0.5rem; }
}
.statusbar .pulse {
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.statusbar .pulse::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: pulse 1.8s ease-in-out infinite;
}
.statusbar .dot-live {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  margin-right: 0.5rem;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(1.4); }
}

/* Nav --------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(2, 6, 24, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  min-height: 64px;
  padding: 0.75rem var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  height: 40px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  line-height: 1;
  text-decoration: none;
}
.brand-mark {
  display: inline-block;
  vertical-align: middle;
  width: 1.75em;
  height: 1.75em;
  background: var(--primary);
  color: #020618;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 800;
  font-size: 0.9em;
  line-height: 1.75;
  text-align: center;
  border-radius: 4px;
  letter-spacing: 0;
  margin-right: 0.4rem;
}
@media (max-width: 480px) {
  .brand { font-size: 0.95rem; }
  .brand-mark { width: 1.6em; height: 1.6em; line-height: 1.6; margin-right: 0.35rem; font-size: 0.85em; }
}
.nav-links {
  display: none;
  gap: 1.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  list-style: none;
  margin: 0; padding: 0;
  align-items: center;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  line-height: 1;
  color: var(--text);
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--primary); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 40px;
  padding: 0 1.1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  transition: background var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  align-self: center;
}
.nav-cta:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.nav-cta:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.nav-cta .arrow { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast);
  margin-left: auto;
}
.menu-btn:hover { border-color: var(--primary); background: var(--primary); color: #fff; }
.menu-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 760px) {
  .nav-links { display: flex; }
  .menu-btn  { display: none; }
}

/* Mobile drawer ------------------------------------------------------ */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(2, 6, 24, 0.6);
  z-index: 99;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-fast);
  display: none;
}
.drawer-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: var(--bg);
  border-left: 1px solid var(--line);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  padding: 1.25rem;
  padding-top: 5rem;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
.drawer[data-open="true"] { transform: translateX(0); }
.drawer-head {
  position: absolute; top: 1rem; left: 1.25rem; right: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-head .brand { font-size: 1rem; }
.drawer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.drawer a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0.5rem;
  font-size: 1.05rem; font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: color var(--t-fast), padding var(--t-fast);
}
.drawer a:hover { color: var(--primary); padding-left: 0.85rem; }
.drawer .brand {
  border-bottom: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  height: 40px;
  color: var(--text);
}
.drawer .brand:hover { padding-left: 0; color: var(--primary); }
.drawer a::after {
  content: "\2192"; /* → */
  color: var(--text-muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  transition: color var(--t-fast), transform var(--t-fast);
}
.drawer a:hover::after { color: var(--primary); transform: translateX(4px); }
/* Brand and CTA have their own arrows; suppress the generic ::after.
   Specificity must exceed `.drawer a::after` (0,1,2): use `a.drawer-cta::after`
   to add the `a` element so we hit (0,2,1). Source order alone won't do it. */
.drawer a.brand::after,
.drawer a.drawer-cta::after { content: none; }
.drawer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0 1.25rem;
  height: 44px;
  background: var(--primary);
  color: #fff;
  text-align: center;
  border-radius: 999px;
  font-weight: 600;
  align-self: flex-start;
  white-space: nowrap;
}
.drawer-cta:hover { background: var(--primary-hover); color: #fff; }
.drawer-close {
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text);
  cursor: pointer;
  transition: border-color var(--t-fast);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.drawer-close:hover { border-color: var(--text); }
.drawer-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate; /* keeps the overlay/bg stack contained */
  min-height: clamp(520px, 78vh, 760px);
  display: flex;
  align-items: flex-end; /* text sits toward bottom of viewport on wide screens */
  overflow: hidden;
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 6vw, 4rem);
  color: #ffffff; /* light text on dark photo by default */
}
.hero__bg {
  position: absolute; inset: 0;
  background-image: url('/demo8/assets/images/hero-bg-1280.jpg');
  background-size: cover;
  background-position: center bottom; /* conduit arc anchored to bottom of hero */
  z-index: -2;
}
.hero__overlay {
  position: absolute; inset: 0;
  z-index: -1;
  /* diagonal gradient: darker on the left for legibility, slightly lighter on the right
     so the worker/sunset region still reads. Plus a bottom boost under the text. */
  background:
    linear-gradient(180deg,
      rgba(2, 6, 24, 0.55) 0%,
      rgba(2, 6, 24, 0.35) 35%,
      rgba(2, 6, 24, 0.75) 100%),
    linear-gradient(90deg,
      rgba(2, 6, 24, 0.55) 0%,
      rgba(2, 6, 24, 0.15) 60%,
      rgba(2, 6, 24, 0.05) 100%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero h1 {
  max-width: 14ch;
  text-transform: none;
  margin-bottom: 1.25rem;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}
.hero-rule {
  width: 96px; height: 4px;
  background: var(--primary);
  margin: 0 0 1.5rem;
  border: 0;
  transform-origin: left;
  animation: scale-x 600ms cubic-bezier(.2,.7,.3,1) 200ms backwards;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
@keyframes scale-x {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.hero .lede {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: rgba(248, 250, 252, 0.92); /* off-white, sits well on dark overlay */
  max-width: 42ch;
  margin-bottom: 2rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  margin-bottom: 1.5rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 40px;
  padding: 0 1.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}
.btn .arrow { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; transition: transform var(--t-fast); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(234, 88, 13, 0.35); }
.btn--primary:hover .arrow { transform: translateX(3px); }
.btn--primary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn--ghost   { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: rgba(255, 255, 255, 0.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--primary); color: #fff; background: rgba(234, 88, 13, 0.85); }
.btn--ghost:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Larger screens: switch to the 1920px source for crispness on retina/4K */
@media (min-width: 1280px) {
  .hero__bg {
    background-image: url('/demo8/assets/images/hero-bg-1920.jpg');
  }
}

/* Mobile: tighten the overlay so the workers stay visible at small widths */
@media (max-width: 640px) {
  .hero { min-height: 560px; align-items: center; }
  .hero__bg { background-position: center 65%; }
  .hero__overlay {
    background:
      linear-gradient(180deg,
        rgba(2, 6, 24, 0.65) 0%,
        rgba(2, 6, 24, 0.45) 50%,
        rgba(2, 6, 24, 0.85) 100%);
  }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.75rem); }
  .hero .lede { max-width: 100%; }
}

/* Trust strip -------------------------------------------------------- */
.truststrip {
  background: var(--surface);
  color: var(--text-dark);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 1rem var(--gutter);
  overflow: hidden; /* safety: prevent credential badges from forcing h-scroll */
}
.truststrip ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: 0.35rem 0.85rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dark-muted);
}
.truststrip li { white-space: nowrap; }
.truststrip li.credential-sep {
  color: var(--primary);
  opacity: 0.7;
  font-weight: 400;
  letter-spacing: 0;
  user-select: none;
}
@media (max-width: 480px) {
  .truststrip ul { font-size: 9.5px; letter-spacing: 0.14em; gap: 0.3rem 0.65rem; }
}

/* Services ----------------------------------------------------------- */
.services-head .eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.services-head h2 {
  max-width: 22ch;
  margin-bottom: 1rem;
}
.services-head p {
  color: var(--text-muted);
  max-width: 60ch;
  font-size: 1.05rem;
}
.services-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}
@media (min-width: 720px)  { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }

.service {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.service::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.55;
}
.service:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.service:hover::before { opacity: 1; }
.service-title { margin-bottom: 0.4rem; }
.service-summary {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1rem;
}
.service-bullets {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 0.4rem;
}
.service-bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.service-bullets li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 1px;
  background: var(--primary);
}

/* About -------------------------------------------------------------- */
.about {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 880px) {
  .about-grid { grid-template-columns: 1fr 1.2fr; gap: 4rem; }
}
.about h2 { max-width: 16ch; }
.about p { color: var(--text-muted); }
.about .stat-row {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.stat .num {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  display: block;
}
.stat .label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
}

/* Contact ------------------------------------------------------------ */
.contact {
  background: var(--steel);
  color: var(--text);
}
.contact h2 { color: var(--text); max-width: 16ch; }
.contact .lede { color: rgba(248,250,252,0.7); max-width: 48ch; margin-bottom: 2rem; }
.contact-grid {
  display: grid; gap: 2.5rem;
  align-items: start;
}
.contact-grid > * { align-self: start; }
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
}
.contact-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.5rem;
}
.contact-item .k {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(248,250,252,0.55);
  margin-bottom: 0.35rem;
  display: block;
}
.contact-item .v {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.contact-item .v a { color: var(--text); border-bottom: 1px solid rgba(255,255,255,0.15); }
.contact-item .v a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* Form --------------------------------------------------------------- */
.dispatch {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  align-self: start;
}
.dispatch h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.dispatch .lede {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  transition: border-color var(--t-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.field textarea { resize: vertical; min-height: 110px; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-actions { margin-top: 0.5rem; }
.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: none;
}
.form-status.is-ok    { background: rgba(34,197,94,0.12); border:1px solid rgba(34,197,94,0.4); color: #bbf7d0; display: block; }
.form-status.is-error { background: rgba(239,68,68,0.10); border:1px solid rgba(239,68,68,0.4); color: #fecaca; display: block; }

/* Footer ------------------------------------------------------------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 2rem var(--gutter);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248,250,252,0.45);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

/* Utility ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-in { opacity: 1; transform: none; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Skip link ---------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff;
  padding: 0.6rem 1rem; border-radius: 4px;
  z-index: 1000;
}
.skip:focus { left: 1rem; top: 1rem; }