/* ==========================================================================
   EngiTech Consulting — website styles
   Built to the EngiTech Brand Identity Guide v3.1 (ETC-INT-BD-001-R03).
   Colour, typography, spacing, corners and component rules follow the
   guide's Section 04 (colour), 06 (typography) and 09 (digital standards).
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  /* Brand colours */
  --navy:        #062E6F;  /* Primary Navy   — logo, headings, primary buttons */
  --tech-blue:   #0795C7;  /* Technology Blue — accents only (<=5% of page)     */
  --charcoal:    #263746;  /* Body text                                         */
  --steel:       #5E6B76;  /* Secondary text, captions, footers                 */
  --ice:         #EEF3F6;  /* Alternate rows, cards, panels                     */
  --soft-blue:   #D9F2FA;  /* Subtle highlights and callouts                    */
  --border:      #D6E0E7;  /* Borders, rules, dividers                          */
  --web-bg:      #F7FAFC;  /* Page background                                   */
  --white:       #FFFFFF;

  --navy-90:     rgba(6, 46, 111, 0.90);
  --navy-06:     rgba(6, 46, 111, 0.06);

  /* Semantic status (Section 04) */
  --on-track:    #2E7D32;
  --at-risk:     #9A6700;
  --critical:    #B42318;
  --info:        #175CD3;

  /* Type */
  --font: "Inter", "Segoe UI", Arial, sans-serif;

  /* Spacing scale (4 / 8 px) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --radius:     8px;   /* controls & cards: 6–10 px */
  --radius-lg:  10px;
  --maxw:       1160px;
  --shadow:     0 1px 2px rgba(6,46,111,.06), 0 8px 24px rgba(6,46,111,.06);
  --shadow-sm:  0 1px 2px rgba(6,46,111,.05), 0 2px 8px rgba(6,46,111,.05);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--web-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 var(--s-4);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--s-4); }

/* Visible focus for keyboard users (Section 09) */
:focus-visible {
  outline: 3px solid var(--tech-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s-5); }

.section { padding-block: clamp(var(--s-7), 8vw, var(--s-9)); }
.section--tight { padding-block: var(--s-7); }
.section--ice { background: var(--ice); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tech-blue);
  margin: 0 0 var(--s-3);
}
.section-lead { max-width: 62ch; color: var(--steel); font-size: 1.08rem; }
.accent { color: var(--tech-blue); }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font); font-weight: 600; font-size: 1rem;
  padding: 12px 22px; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* Primary: navy background, white text */
.btn--primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--primary:hover { background: #04225a; border-color: #04225a; color: #fff; }

/* Secondary: white background, navy border and text */
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: #fff; }

/* On navy sections */
.btn--onnavy { background: #fff; color: var(--navy); border-color: #fff; }
.btn--onnavy:hover { background: var(--soft-blue); border-color: var(--soft-blue); color: var(--navy); }
.btn--ghost-onnavy { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost-onnavy:hover { background: rgba(255,255,255,.10); border-color: #fff; color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---- Header / navigation ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); min-height: 74px;
}
.nav__brand { display: inline-flex; align-items: center; }
.nav__brand img { height: 42px; width: auto; }

.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 8px; color: var(--navy);
}
.nav__toggle svg { display: block; }

.nav__menu {
  display: flex; align-items: center; gap: var(--s-2); list-style: none; margin: 0; padding: 0;
}
.nav__link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 14px; border-radius: var(--radius);
  color: var(--charcoal); font-weight: 500; font-size: 0.98rem;
}
.nav__link:hover { color: var(--navy); background: var(--navy-06); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--navy); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: ""; display: block;
}
.nav__cta { margin-left: var(--s-2); }

/* Dropdown */
.nav__item--has-menu { position: relative; }
.nav__submenu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 264px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: var(--s-2); list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.nav__item--has-menu:hover .nav__submenu,
.nav__item--has-menu:focus-within .nav__submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__submenu a {
  display: block; padding: 10px 12px; border-radius: var(--radius);
  color: var(--charcoal); font-weight: 500;
}
.nav__submenu a:hover { background: var(--ice); color: var(--navy); text-decoration: none; }
.nav__submenu a span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--steel); margin-top: 2px; }
.nav__caret { width: 14px; height: 14px; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; background: var(--white); }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--navy-06) 1px, transparent 1px),
    linear-gradient(90deg, var(--navy-06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 12%, #000 0%, transparent 62%);
          mask-image: radial-gradient(120% 90% at 78% 12%, #000 0%, transparent 62%);
}
.hero .container { position: relative; }
.hero__inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s-8);
  align-items: center; padding-block: clamp(var(--s-7), 7vw, 88px);
}
.hero h1 { margin-bottom: var(--s-4); }
.hero__lead { font-size: 1.18rem; color: var(--steel); max-width: 52ch; margin-bottom: var(--s-6); }
.hero__note { margin-top: var(--s-5); font-size: .92rem; color: var(--steel); }

/* Blueprint-style visual panel */
.hero__panel {
  position: relative; border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, var(--web-bg));
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: var(--s-6);
}
.hero__panel h3 { margin-bottom: var(--s-2); font-size: 1.1rem; }
.hero__panel p { color: var(--steel); font-size: .96rem; margin-bottom: var(--s-5); }
.hero__stat { display: flex; align-items: baseline; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.hero__stat:first-of-type { border-top: 0; }
.hero__stat b { font-size: 1.5rem; color: var(--navy); font-weight: 700; min-width: 2.2ch; }
.hero__stat span { color: var(--charcoal); font-size: .96rem; }

/* ---- Grid / cards ---- */
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.card h3 { margin-bottom: var(--s-3); }
.card p:last-child { margin-bottom: 0; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c2d2e0; text-decoration: none; }
.card--link { display: block; color: inherit; }
.card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-4); color: var(--navy); font-weight: 600; font-size: .96rem; }

/* Icon badge (thin outline, per Section 07) */
.badge {
  width: 46px; height: 46px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-06); color: var(--navy); margin-bottom: var(--s-4);
}
.badge svg { width: 24px; height: 24px; stroke: var(--navy); }
.card--link:hover .badge { background: var(--soft-blue); }
.badge svg .accent-stroke { stroke: var(--tech-blue); }

.tier-tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 100px; margin-bottom: var(--s-3);
}
.tier-tag--volume  { background: var(--ice);  color: var(--navy); border: 1px solid var(--border); }
.tier-tag--pm      { background: var(--navy-06); color: var(--navy); }
.tier-tag--premium { background: var(--soft-blue); color: var(--navy); }

/* ---- Feature list with ticks ---- */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.ticks li { position: relative; padding-left: 30px; color: var(--charcoal); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--navy-06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23062E6F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* Split content block */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
.split--reverse .split__media { order: -1; }

/* Process steps */
.steps { display: grid; gap: var(--s-4); counter-reset: step; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); align-items: start; }
.step__n {
  counter-increment: step; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.step__n::before { content: counter(step); }
.step h4 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--steel); }

/* Definition / audience chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.chips li {
  background: #fff; border: 1px solid var(--border); border-radius: 100px;
  padding: 8px 16px; font-size: .94rem; color: var(--charcoal);
}

/* Callout (Section 08 style) */
.callout {
  border-left: 4px solid var(--tech-blue);
  background: var(--soft-blue);
  padding: var(--s-5) var(--s-6); border-radius: 0 var(--radius) var(--radius) 0;
}
.callout h3 { font-size: 1.1rem; margin-bottom: var(--s-2); }
.callout p:last-child { margin-bottom: 0; }
.callout--muted { background: var(--ice); border-left-color: var(--steel); }

/* Stat band */
.stat-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); text-align: center; }
.stat-band .stat b { display: block; font-size: 2.4rem; color: #fff; font-weight: 700; line-height: 1.1; }
.stat-band .stat span { color: rgba(255,255,255,.8); font-size: .98rem; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: var(--s-3); }
.cta-band p { max-width: 56ch; margin-inline: auto; margin-bottom: var(--s-6); }

/* Contact layout */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
.contact-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); align-items: start; }
.contact-list .badge { margin: 0; }
.contact-list b { color: var(--navy); display: block; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.contact-list a { font-weight: 500; word-break: break-word; }

/* Page hero (interior pages) */
.page-hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.page-hero__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 120% at 85% 0%, #000, transparent 60%);
          mask-image: radial-gradient(120% 120% at 85% 0%, #000, transparent 60%);
}
.page-hero .container { position: relative; padding-block: clamp(var(--s-7), 7vw, 80px); }
.page-hero h1 { color: #fff; margin-bottom: var(--s-4); }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.12rem; max-width: 62ch; margin: 0; }
.page-hero .eyebrow { color: var(--soft-blue); }

/* Breadcrumb */
.crumbs { font-size: .88rem; color: rgba(255,255,255,.7); margin-bottom: var(--s-4); }
.crumbs a { color: rgba(255,255,255,.85); }
.crumbs a:hover { color: #fff; }
.crumbs span { margin-inline: 8px; opacity: .6; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.82); padding-block: var(--s-8) var(--s-6); }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s-7); }
.footer__logo { height: 44px; width: auto; margin-bottom: var(--s-4); }
.footer__about { font-size: .95rem; color: rgba(255,255,255,.72); max-width: 34ch; }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--s-4); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer ul a { font-size: .96rem; }
.footer__meta { font-size: .92rem; color: rgba(255,255,255,.72); display: grid; gap: var(--s-2); }
.footer__meta a { word-break: break-word; }
.footer__bottom {
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  font-size: .86rem; color: rgba(255,255,255,.6);
}
.footer__bottom a { color: rgba(255,255,255,.75); }

/* ---- Utilities ---- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.lead-tight { max-width: 68ch; }
.divider { height: 1px; background: var(--border); border: 0; margin-block: var(--s-6); }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero__panel { max-width: 520px; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .split--reverse .split__media { order: 0; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}

@media (max-width: 820px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: var(--s-3) var(--s-5) var(--s-6);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 74px); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
  }
  .nav__menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__link { padding: 14px 12px; border-radius: var(--radius); border-bottom: 1px solid var(--ice); }
  .nav__cta { margin: var(--s-3) 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; }
  .nav__submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--border);
    border-radius: 0; margin: 4px 0 4px 12px; padding: 0 0 0 8px; min-width: 0;
  }
  .nav__item--has-menu > .nav__link { pointer-events: none; color: var(--steel); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
  .nav__caret { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: 1fr; gap: var(--s-5); }
  .footer-grid { grid-template-columns: 1fr; }
  .nav__brand img { height: 36px; }
  .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
