/* TeamMcAfee, LLC — site styles
   Restrained engineering-consultancy look: white ground, deep navy accents,
   warm gray copy, fine #DDD rules, charcoal gallery panel. */

:root {
  --navy: #1b3e6e;
  --navy-dark: #122b4d;
  --ink: #3d3a37;          /* labels, nav */
  --body: #6b6560;         /* warm gray body copy (5.6:1 on white) */
  --rule: #dddddd;
  --charcoal: #222222;
  --panel-text: #d4d4d4;   /* light gray on charcoal (11:1) */
  --error: #b3261e;
  --focus: #2a6fd6;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px;
  --content: 1112px;
  --pad: 24px;

  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --font-slogan: "Nunito", "Open Sans", Arial, sans-serif;
  --font-panel: "PT Sans", "Open Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font: 400 15px/1.85 var(--font-body);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p { margin: 0 0 var(--s2); }
strong { font-weight: 700; color: var(--body); }
.reg { font-size: .6em; vertical-align: .6em; line-height: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s2); top: -60px; z-index: 50;
  background: var(--navy); color: #fff; padding: var(--s1) var(--s2); font-weight: 700;
}
.skip-link:focus { top: var(--s1); }

.container { width: 100%; max-width: calc(var(--content) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Header ---------- */
.site-header { background: #fff; position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 89px; gap: var(--s3); }
.brand { display: block; flex: none; }
.brand img { width: 224px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s4); }
.site-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 800; font-size: 15px; line-height: 1; padding: 10px 0;
}
.site-nav a:hover { color: var(--navy); text-decoration: none; }
.site-nav a.is-active { color: var(--navy); }
.icon {
  width: 17px; height: 17px; flex: none; background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.icon-home { --m: url(../icons/home.svg); width: 17px; }
.icon-gallery { --m: url(../icons/gallery.png); }
.icon-rss { --m: url(../icons/rss.png); width: 15px; }
.icon-envelope { --m: url(../icons/envelope.png); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: #cfcfcf url(../images/hero-network.jpg) center 43% / cover no-repeat;
  height: clamp(200px, 23.5vw, 340px);
  display: flex; align-items: center;
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.hero-slogan {
  margin: 0; padding-left: 10%;
  font: 600 clamp(36px, 4.5vw, 62px)/1.02 var(--font-slogan);
  color: var(--navy); letter-spacing: -.01em;
  text-shadow: 2px 2px 0 rgba(255,255,255,.85), 3px 3px 6px rgba(255,255,255,.55);
}
.hero--slogan-only .hero-inner { grid-template-columns: 1fr; }
.hero--slogan-only .hero-slogan { padding-left: 16%; }
.hero-icon {
  width: clamp(72px, 10.5vw, 148px); height: auto; justify-self: start; margin-left: 26%;
  filter: drop-shadow(2px 2px 0 rgba(255,255,255,.9)) drop-shadow(0 0 4px rgba(255,255,255,.5));
}
.hero-icon-rss { width: clamp(64px, 8.6vw, 116px); }

/* ---------- Main content ---------- */
.site-main { padding: var(--s6) 0 var(--s5); outline: none; }
.section { margin-bottom: var(--s4); }
.section-title {
  margin: 0 0 var(--s2); padding-bottom: 6px; border-bottom: 1px solid var(--rule);
  color: var(--navy); font: 400 23px/1.3 var(--font-body); text-transform: uppercase; letter-spacing: -.01em;
}
.bullets { margin: 0 0 var(--s2); padding-left: 40px; }
.bullets li { padding-left: 2px; }
.bullets li::marker { color: #9a9590; font-size: .8em; }

.columns-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s5); }
.columns-3 .section-title { font-size: 21px; }

/* ---------- Gallery ---------- */
.gallery { margin-top: var(--s5); }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.gallery-thumb {
  display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: pointer; border-radius: 0;
  box-shadow: 0 0 0 1px var(--rule); transition: box-shadow .15s ease, opacity .15s ease;
}
.gallery-thumb img { width: 100%; height: auto; }
.gallery-thumb:hover { box-shadow: 0 0 0 1px #aab4c3, 0 2px 8px rgba(0,0,0,.08); }
.gallery-thumb[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--navy); }
.gallery-thumb:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.gallery-panel {
  position: relative; margin-top: var(--s2); background: var(--charcoal); color: var(--panel-text);
  display: grid; grid-template-columns: minmax(0, 58%) minmax(0, 1fr); gap: var(--s4);
  align-items: start; padding: var(--s5) var(--s5) 72px;
}
.gallery-panel[hidden] { display: none; }
.panel-media { display: flex; align-items: center; justify-content: center; }
.panel-media img { width: 100%; height: auto; background: #fff; }
.panel-copy { text-align: center; padding: var(--s3) 7% 0; }
.panel-title {
  margin: 0 0 4px; color: #fff; font: 700 16px/1.35 var(--font-panel); text-align: center; outline: none;
}
.panel-copy p { margin: 0; font-size: 16px; line-height: 1.6; }
.panel-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: #8a8a8a; color: var(--charcoal); display: inline-grid; place-items: center;
  transition: background .15s ease;
}
.panel-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.panel-btn:hover { background: #bdbdbd; }
.panel-btn:focus-visible { outline: 3px solid #8fb8ff; outline-offset: 2px; }
/* 44px touch target around the 28px visual circle */
.panel-btn::after { content: ""; position: absolute; inset: -8px; }
.panel-btn { position: relative; }
.panel-close { position: absolute; top: var(--s2); right: var(--s2); }
.panel-nav { position: absolute; right: var(--s2); bottom: var(--s2); display: flex; gap: 8px; }

@media (prefers-reduced-motion: no-preference) {
  .gallery-panel.is-revealing { animation: panel-in .28s ease-out; }
  .gallery-panel.is-switching .panel-media, .gallery-panel.is-switching .panel-copy { animation: fade-in .22s ease-out; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: .2; } to { opacity: 1; } }

/* ---------- Blog ---------- */
.blog-layout { display: grid; grid-template-columns: minmax(0, 65%) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.post-date { margin-top: -8px; margin-bottom: var(--s2); }
.article p { margin-bottom: 12px; }
.sidebar section { margin-bottom: var(--s3); }
.sidebar .section-title { font-size: 21px; margin-bottom: 8px; }
.sidebar p { margin: 0; }
.sidebar-list { margin: 0; padding-left: 28px; }
.sidebar-list li::marker { color: #9a9590; font-size: .8em; }

/* ---------- Contact form ---------- */
.contact-form { margin-top: var(--s4); }
.field { margin-bottom: var(--s2); }
.field label { display: block; margin-bottom: 6px; color: var(--body); font-weight: 700; font-size: 15px; line-height: 1.4; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: 400 16px/1.4 var(--font-body); color: var(--ink);
  padding: 8px 10px; background: #fff; border: 1px solid #c9c9c9; border-radius: 3px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a8580; opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(42,111,214,.3); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 14px; line-height: 1.4; font-weight: 600; }
.field-check { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: start; margin-top: var(--s3); }
.field-check input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--navy); }
.field-check label { font-weight: 400; margin: 0; line-height: 1.6; }
.field-check .field-error { grid-column: 2; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: var(--s3); }
.btn {
  font: 700 15px/1 var(--font-body); color: #fff; background: var(--navy);
  border: 0; border-radius: 3px; padding: 14px 32px; min-height: 44px; cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--navy-dark); }
.btn[disabled] { opacity: .65; cursor: progress; }
.form-status { margin-top: var(--s2); font-size: 15px; }
.form-status:empty { display: none; }
.form-status.is-success { color: #1e6b34; font-weight: 600; }
.form-status.is-error { color: var(--error); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { padding-bottom: var(--s5); }
.footer-inner { max-width: calc(var(--content) * .9 + 2 * var(--pad)); }
.footer-links {
  list-style: none; margin: 0; padding: var(--s2) 0 0; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; font-size: 14px;
}
.footer-links a { display: inline-block; padding: 4px 0; }
.copyright { margin: var(--s1) 0 0; text-align: center; font-size: 11px; color: #4a4a4a; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .site-main { padding-top: var(--s5); }
  .gallery-panel { padding: var(--s4) var(--s4) 64px; gap: var(--s3); }
}

@media (max-width: 760px) {
  :root { --pad: 16px; }
  body { font-size: 15px; line-height: 1.75; }
  .header-inner { min-height: 68px; flex-wrap: wrap; }
  .brand img { width: 176px; }
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
    background: #fff; color: var(--navy); border: 1px solid var(--rule); border-radius: 3px;
    font: 800 14px/1 var(--font-body); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
  .site-nav { flex-basis: 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--rule); margin-bottom: var(--s1); }
  .site-nav li + li { border-top: 1px solid var(--rule); }
  .site-nav a { display: flex; padding: 14px 4px; min-height: 44px; }
  .no-js .site-nav ul, html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: 0 var(--s3); border: 0; }

  .hero { height: clamp(150px, 42vw, 220px); }
  .hero-slogan { padding-left: 0; font-size: clamp(30px, 8.4vw, 44px); }
  .hero--slogan-only .hero-slogan { padding-left: 0; }
  .hero-icon { width: clamp(56px, 17vw, 96px); justify-self: center; margin: 0; }
  .hero-icon-rss { width: clamp(48px, 14vw, 80px); }

  .site-main { padding: var(--s4) 0 var(--s4); }
  .section-title { font-size: 20px; }
  .columns-3 { grid-template-columns: 1fr; gap: var(--s3); margin-top: var(--s4); }
  .gallery { margin-top: var(--s3); }
  .gallery-grid { gap: var(--s1); }
  .gallery-panel { grid-template-columns: 1fr; padding: 56px var(--s2) 64px; gap: var(--s2); margin-top: var(--s1); }
  .panel-copy { padding: 0 var(--s1); }
  .blog-layout { grid-template-columns: 1fr; gap: var(--s3); }
  .sidebar { border-top: 1px solid var(--rule); padding-top: var(--s3); }
  .footer-links { gap: 0 18px; }
  .footer-links a { padding: 8px 0; }
}

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