/* ==========================================================================
   Boffins Consulting — global stylesheet
   Palette: Deep Navy #0A2540/#0A1F3D, Teal/Cyan #00D4C8/#00C4B4
   ========================================================================== */

:root {
  --navy: #0a2540;
  --navy-dark: #0a1f3d;
  --teal: #00d4c8;
  --teal-dark: #00c4b4;
  --white: #ffffff;
  --light-bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #101c2c;
  --text-muted: #5b6b82;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 12px 40px rgba(10, 37, 64, 0.14);
  --radius: 12px;
  --max-width: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* ,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--navy);
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section--tight {
  padding: 56px 0;
}

.section--alt {
  background: var(--light-bg);
}

.section--dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: rgba(0, 212, 200, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section--dark .eyebrow {
  color: var(--teal);
  background: rgba(0, 212, 200, 0.16);
}

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--teal);
  color: var(--navy-dark);
  box-shadow: 0 8px 24px rgba(0, 212, 200, 0.35);
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 37, 64, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo img {
  height: 30px;
  width: auto;
}

.nav__logo span {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--white);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav__links a[aria-current="page"] {
  color: var(--teal);
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__cta .btn {
  padding: 10px 20px;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    display: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: 14px 8px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav__cta {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: var(--white);
  /* --hero-image is set inline per-page; the gradient scrim always renders
     on top of it so hero text stays legible regardless of the photo. */
  background: linear-gradient(135deg, rgba(10, 37, 64, 0.94) 0%, rgba(10, 31, 61, 0.92) 60%, rgba(0, 196, 180, 0.55) 130%),
    var(--hero-image, none),
    var(--navy);
  background-size: cover;
  background-position: center;
  padding: 120px 0 100px;
}

.hero h1,
.hero h2,
.hero h3 {
  color: var(--white);
}

.hero .eyebrow {
  color: var(--teal);
  background: rgba(0, 212, 200, 0.16);
}

.hero__content {
  max-width: 720px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 600px;
}

.hero-stats {
  display: grid;
  /* minmax(0, 1fr), not plain 1fr: a bare 1fr track still has an implicit
     auto (content-based) minimum, so a long unbroken word like
     "Safety-First" refuses to shrink and overflows the viewport on
     narrow screens instead of wrapping. minmax(0, 1fr) lets it wrap. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 56px;
  max-width: 640px;
}

.hero-stats .stat strong {
  display: block;
  font-size: 1.8rem;
  color: var(--teal);
}

.hero-stats .stat span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Page header (inner pages) ---------- */

.page-header {
  padding: 72px 0 56px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  text-align: center;
}

.page-header h1,
.page-header h2,
.page-header h3 {
  color: var(--white);
}

.page-header p {
  max-width: 640px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Cards / Grids ---------- */

.grid {
  display: grid;
  gap: 28px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 960px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 200, 0.1);
  border-radius: 12px;
}

.card__icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.card h3 {
  margin-bottom: 10px;
}

.card p:last-child {
  margin-bottom: 0;
}

.btn-link {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--teal-dark);
  transition: transform 0.15s ease;
}

.btn-link:hover {
  transform: translateX(3px);
}

/* ---------- Service detail rows (services page) ---------- */

.service-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.service-row:last-child {
  border-bottom: none;
}

.service-row__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-row__icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

@media (max-width: 640px) {
  .service-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Values / feature list ---------- */

.feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature__mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 212, 200, 0.14);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  border-radius: 20px;
  padding: 56px;
  text-align: center;
}

.cta-banner h2 {
  color: var(--white);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  margin: 0 auto 28px;
}

.cta-banner .cta-row {
  justify-content: center;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid .field--full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--navy);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.18);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.92rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  background: rgba(0, 212, 200, 0.12);
  color: var(--navy);
  border: 1px solid rgba(0, 196, 180, 0.4);
}

.form-status.is-error {
  background: #fdecec;
  color: #9c1f1f;
  border: 1px solid #f3b8b8;
}

/* Honeypot field — hidden from real users, catches simple bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Contact info cards ---------- */

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-info-item .mark {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 212, 200, 0.14);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.contact-info-item strong {
  display: block;
  color: var(--navy);
  margin-bottom: 2px;
}

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-row a {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--navy);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.social-row a:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.social-row a svg {
  width: 18px;
  height: 18px;
}

/* Default .social-row styling (navy icon, light border) assumes a light
   background — override for use inside the dark footer/hero contexts. */
.site-footer .social-row a,
.section--dark .social-row a {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.85);
}

.site-footer .social-row a:hover,
.section--dark .social-row a:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy-dark);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-grid a:hover {
  color: var(--teal);
}

.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-brand__logo img {
  height: 28px;
  width: auto;
}

.footer-brand__logo span {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--white);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.85rem;
}

.footer-bottom a:hover {
  color: var(--teal);
}

/* ---------- Legal pages ---------- */

.legal-content h2 {
  margin-top: 2em;
}

.legal-content ul {
  color: var(--text-muted);
}

/* ---------- Utilities ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
