/* ============================================================
   828 Engineering Services — main.css (Rev. 4 "Industrial B2B")
   Modeled on the Mereen-Johnson design system:
   crimson / charcoal / light gray · Oswald + Inter
   utility topbar · mega menu · industry tiles · bottom contact
   ============================================================ */

:root {
  --red: #B01F24;
  --red-dark: #8E181D;
  --charcoal: #1E1F21;
  --charcoal-2: #2B2C2E;
  --gray-bg: #F4F4F4;
  --ink: #26272A;
  --gray: #5F6368;
  --line: #E2E2E2;
  --line-dark: rgba(255, 255, 255, .14);
  --white: #FFFFFF;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 0;
  --container: 1240px;
  --topbar-h: 38px;
  --mainbar-h: 86px;
  --header-h: 124px; /* topbar + mainbar */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--red-dark); text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 500; }
h4 { font-size: 1.12rem; font-weight: 500; }
p { margin: 0 0 1.05em; }
ul { padding-left: 1.2em; }
li { margin-bottom: .3em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 26px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--red); color: var(--white);
  padding: 10px 18px; font-weight: 600; font-size: .85rem;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .22em;
  font-size: .78rem; color: var(--red);
  display: block; margin-bottom: 12px;
}
.section.dark .eyebrow, .hero .eyebrow { color: #E9737A; }

/* ---------- Header: topbar + mainbar ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: stretch;
}
.topbar { background: var(--charcoal); color: rgba(255,255,255,.8); height: var(--topbar-h); }
.topbar-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 26px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem;
}
.topbar a { color: rgba(255,255,255,.8); margin-left: 18px; }
.topbar a:first-child { margin-left: 0; }
.topbar a:hover { color: var(--white); }
.topbar .tb-contact a { color: var(--white); font-weight: 500; }
.topbar .tb-contact a:hover { color: #E9737A; }
.site-header.is-shrunk .topbar { display: none; }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 26px;
  height: var(--mainbar-h); transition: height .2s ease;
}
.site-header.is-shrunk .header-inner { height: 68px; }
.site-header.is-shrunk { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 48px; width: auto; transition: height .2s ease; }
.site-header.is-shrunk .brand img { height: 38px; }

.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.main-nav a, .main-nav button.nav-toggle-sub {
  font-family: var(--font-display); font-size: .92rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink); padding: 12px 14px; display: block;
  background: none; border: 0; cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .15s ease;
}
.main-nav a:hover, .main-nav button.nav-toggle-sub:hover { color: var(--red); }
.main-nav li.is-active > a,
.main-nav li.is-active > button.nav-toggle-sub { color: var(--red); border-bottom-color: var(--red); }

.has-dropdown { position: relative; }
.has-dropdown > button::after { content: " ▾"; font-size: .7em; color: var(--red); }

/* Mega dropdown */
.dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--red);
  display: none; z-index: 1001;
  box-shadow: 0 24px 50px rgba(0,0,0,.14);
}
.has-dropdown.is-open > .dropdown { display: block; }
.mega-inner { display: grid; grid-template-columns: 260px 1fr; width: 620px; }
.mega-feature {
  background: var(--gray-bg); padding: 26px 24px; border-right: 1px solid var(--line);
}
.mega-feature h4 { margin-bottom: 8px; }
.mega-feature p { font-size: .84rem; color: var(--gray); line-height: 1.6; }
.mega-cta {
  font-family: var(--font-display); font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--red);
}
.mega-cta::after { content: " →"; }
.mega-links { list-style: none; margin: 0; padding: 14px 8px; columns: 1; }
.mega-links.two-col { columns: 2; column-gap: 0; }
.mega-links li { margin: 0; break-inside: avoid; }
.mega-links a {
  font-family: var(--font-body); font-size: .9rem; font-weight: 400;
  text-transform: none; letter-spacing: 0; color: var(--ink);
  padding: 9px 18px; display: block; border-bottom: 0; border-left: 3px solid transparent;
}
.mega-links a:hover { color: var(--red); border-left-color: var(--red); background: var(--gray-bg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; font-size: .92rem;
  padding: 15px 32px; border-radius: var(--radius); border: 2px solid var(--red);
  cursor: pointer; text-align: center;
  background: var(--red); color: var(--white);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); text-decoration: none; }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--charcoal); border-color: var(--white); }
.btn-dark { background: transparent; border-color: var(--charcoal); color: var(--charcoal); }
.btn-dark:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }
.header-cta { margin-left: 12px; padding: 11px 22px; font-size: .84rem; }
.main-nav a.header-cta,
.main-nav a.header-cta:hover,
.main-nav a.header-cta:focus {
  color: var(--white); border-bottom: 0; font-weight: 600;
  background: var(--red); border-color: var(--red);
}

.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span {
  display: block; width: 26px; height: 3px; background: var(--charcoal);
  margin: 5px 0; transition: transform .25s ease, opacity .25s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white);
  padding: calc(var(--header-h) + 100px) 0 110px;
  background: var(--charcoal);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media .img-slot { border: 0; min-height: 100%; }
.hero-media .img-slot.has-photo img { filter: none; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(95deg, rgba(20,21,23,.88) 30%, rgba(20,21,23,.62) 65%, rgba(20,21,23,.35) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: var(--white); max-width: 900px; }
.hero p.lead { font-size: 1.1rem; max-width: 700px; color: rgba(255,255,255,.88); line-height: 1.8; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 34px; }
.hero-inner-page { padding: calc(var(--header-h) + 64px) 0 70px; }

/* ---------- Image figures ---------- */
.img-slot {
  background: linear-gradient(135deg, #EAEAEA, #D8D8D8);
  color: var(--gray); display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: .82rem; padding: 16px; min-height: 220px;
  position: relative; overflow: hidden; margin: 0; border-radius: var(--radius);
}
.img-slot.has-photo { padding: 0; }
.img-slot.has-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .img-slot.has-photo img { transform: scale(1.04); }
.img-caption { font-size: .76rem; color: var(--gray); margin-top: 8px; font-style: italic; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--gray-bg); }
.section.dark { background: var(--charcoal); color: rgba(255,255,255,.85); }
.section.dark h2, .section.dark h3 { color: var(--white); }
.section.dark li { color: rgba(255,255,255,.85); }
.section-head { max-width: 780px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--gray); font-size: 1.03rem; }
.section.dark .section-head p { color: rgba(255,255,255,.72); }

/* Technical background accent (gear/rings motif, Mereen-Johnson style) */
.bg-tech { position: relative; overflow: hidden; }
.bg-tech::before {
  content: ""; position: absolute; right: -160px; top: 50%; transform: translateY(-50%);
  width: 560px; height: 560px; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 560'%3E%3Cg fill='none' stroke='%23D8D8D8' stroke-width='1.5'%3E%3Ccircle cx='280' cy='280' r='120'/%3E%3Ccircle cx='280' cy='280' r='180'/%3E%3Ccircle cx='280' cy='280' r='240'/%3E%3Ccircle cx='280' cy='280' r='60'/%3E%3Cpath d='M280 20v520M20 280h520M96 96l368 368M464 96L96 464'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
.bg-tech > .container { position: relative; z-index: 1; }
.section.dark.bg-tech::before { filter: invert(1); opacity: .12; }

/* ---------- Industry tile band ---------- */
.tile-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ind-tile {
  position: relative; display: block; min-height: 240px; overflow: hidden;
  border-radius: var(--radius); background: var(--charcoal);
}
.ind-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease; opacity: .78;
}
.ind-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,21,23,.15) 30%, rgba(20,21,23,.82) 100%);
}
.ind-tile:hover img { transform: scale(1.06); }
.ind-tile:hover .ind-tile-label { color: #E9737A; }
.ind-tile-label {
  position: absolute; left: 24px; bottom: 20px; z-index: 2;
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--white);
  transition: color .2s ease;
}
.ind-tile-label::after { content: " →"; color: var(--red); }

/* ---------- Stats strip ---------- */
.stats-bar { background: var(--red); color: var(--white); padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid > div { padding: 40px 18px; text-align: center; border-right: 1px solid rgba(255,255,255,.22); }
.stats-grid > div:last-child { border-right: 0; }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 3.4rem); line-height: 1; }
.stat-label { font-size: .84rem; color: rgba(255,255,255,.85); margin-top: 8px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.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: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.card:hover { box-shadow: 0 16px 40px rgba(0,0,0,.12); transform: translateY(-4px); }
.card .img-slot { border-radius: 0; border: 0; border-bottom: 3px solid var(--red); min-height: 200px; }
.card-body { padding: 26px 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 a, .card-body h4 a { color: var(--ink); }
.card-body h3 a:hover, .card-body h4 a:hover { color: var(--red); }
.card-body p { color: var(--gray); font-size: .93rem; flex: 1; line-height: 1.65; }
.card-link {
  font-family: var(--font-display); font-size: .84rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--red); margin-top: 16px; align-self: flex-start;
}
.card-link::after { content: " →"; }
.card-link:hover { color: var(--red-dark); }

.icon-badge {
  width: 54px; height: 54px; border-radius: var(--radius); background: rgba(176,31,36,.08);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.icon-badge svg { width: 28px; height: 28px; stroke: var(--red); fill: none; stroke-width: 1.7; }

.tag {
  display: inline-block; background: var(--gray-bg); color: var(--charcoal);
  font-family: var(--font-display); font-size: .72rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius); margin: 0 7px 7px 0;
}
.tag.orange { background: rgba(176,31,36,.1); color: var(--red); }

/* ---------- Why Us: 4-column difference ---------- */
.diff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.diff-item h3 { position: relative; padding-top: 18px; }
.diff-item h3::before {
  content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 4px; background: var(--red);
}
.diff-item p { font-size: .92rem; color: var(--gray); }
.section.dark .diff-item p { color: rgba(255,255,255,.72); }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.process-step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 4px solid var(--red); padding: 26px 20px;
}
.process-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--red);
  display: block; margin-bottom: 8px;
}
.process-step h3 { font-size: 1.12rem; }
.process-step p { font-size: .86rem; color: var(--gray); margin: 0; }

/* ---------- Accordion ---------- */
.accordion details {
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 10px; background: var(--white); overflow: hidden;
}
.accordion summary {
  font-family: var(--font-display); font-size: 1.08rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--charcoal); cursor: pointer; padding: 18px 22px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  border-left: 4px solid var(--red);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.3rem; color: var(--red); }
.accordion details[open] summary::after { content: "–"; }
.accordion details[open] summary { border-bottom: 1px solid var(--line); }
.accordion .acc-body { padding: 18px 22px; color: var(--gray); }
.accordion .acc-body ul { margin: 0; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem;
  cursor: pointer; padding: 20px 0; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; color: var(--charcoal);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.3rem; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-a { padding: 0 0 20px; color: var(--gray); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--charcoal); color: var(--white); padding: 84px 0; text-align: center;
  border-top: 4px solid var(--red);
}
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 620px; margin: 0 auto 30px; color: rgba(255,255,255,.75); }
.cta-band a.tel-link { color: #E9737A; font-weight: 600; }
.cta-band a.tel-link:hover { color: var(--white); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .8rem; color: rgba(255,255,255,.6); margin-bottom: 20px; }
.breadcrumbs a { color: rgba(255,255,255,.8); }
.breadcrumbs a:hover { color: #E9737A; }
.breadcrumbs span[aria-current] { color: #E9737A; }

/* ---------- Filter ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.filter-btn {
  font-family: var(--font-display); font-size: .84rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 20px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--white); color: var(--gray);
  cursor: pointer; transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--red); color: var(--red); }
.filter-btn.is-active { background: var(--red); border-color: var(--red); color: var(--white); }
.project-card.is-hidden { display: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: .94rem; background: var(--white);
  border: 1px solid var(--line);
}
table.data th {
  background: var(--charcoal); color: var(--white); text-align: left;
  font-family: var(--font-display); font-weight: 500; font-size: .9rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 14px 18px; border-bottom: 3px solid var(--red);
}
table.data td { padding: 14px 18px; border-top: 1px solid var(--line); vertical-align: top; color: var(--gray); }
table.data td strong { color: var(--ink); }
table.data tr:nth-child(even) td { background: var(--gray-bg); }

/* ---------- Answer box / takeaways ---------- */
.answer-box {
  background: var(--gray-bg); border-left: 4px solid var(--red);
  padding: 24px 30px; margin-bottom: 38px; font-size: 1.05rem; border-radius: 0 var(--radius) var(--radius) 0;
}
.takeaways {
  background: var(--gray-bg); border: 1px solid var(--line); border-top: 4px solid var(--red);
  border-radius: var(--radius); padding: 26px 30px; margin: 34px 0;
}
.takeaways h3 { margin-top: 0; }

/* ---------- Blog ---------- */
.post-meta { font-size: .84rem; color: rgba(255,255,255,.75); margin-bottom: 22px; }
.post-meta strong { color: #E9737A; }
.post-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.toc {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: var(--gray-bg); border: 1px solid var(--line); border-top: 4px solid var(--red);
  border-radius: var(--radius); padding: 22px 24px; font-size: .88rem;
}
.toc h4 { margin-top: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; color: var(--red); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 7px; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--red); }
.post-body h2 { margin-top: 1.6em; }
.post-body h3 { margin-top: 1.3em; }
.post-body p { color: #3C4043; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-display); font-weight: 500; font-size: .84rem;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 7px; color: var(--charcoal);
}
.section.dark .form-field label, .contact-panel .form-field label { color: var(--white); }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--red); outline: 2px solid rgba(176,31,36,.2);
}
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: #C4392E; }
.field-error { color: #E9737A; font-size: .8rem; margin-top: 5px; display: none; }
.section:not(.dark) .field-error { color: #C4392E; }
.form-field.has-error .field-error { display: block; }
.form-status { margin-top: 18px; padding: 14px 18px; border-radius: var(--radius); display: none; }
.form-status.ok { display: block; background: #E8F4EC; color: #1E6B43; border-left: 4px solid #1E6B43; }
.form-status.err { display: block; background: #FBEAEA; color: #9E2B2B; border-left: 4px solid #9E2B2B; }

/* Home contact panel (Mereen-Johnson bottom-of-page form) */
.contact-panel { background: var(--charcoal); color: rgba(255,255,255,.85); padding: 96px 0; border-top: 4px solid var(--red); }
.contact-panel h2, .contact-panel h3 { color: var(--white); }
.contact-panel .split { align-items: start; }
.contact-panel a { color: #E9737A; }
.contact-panel a:hover { color: var(--white); }
.contact-panel .form-field input, .contact-panel .form-field select, .contact-panel .form-field textarea {
  background: var(--charcoal-2); border-color: rgba(255,255,255,.18); color: var(--white);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,.72); padding: 72px 0 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 42px; padding-bottom: 52px; }
.site-footer h4 {
  color: var(--white); font-size: .92rem; text-transform: uppercase; letter-spacing: .1em;
  padding-bottom: 10px; border-bottom: 3px solid var(--red); display: inline-block;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #E9737A; }
.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-bottom {
  border-top: 1px solid var(--line-dark); padding: 22px 0; display: flex;
  justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.6); }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 48px; height: 48px; border-radius: var(--radius); border: 0; cursor: pointer;
  background: var(--red); color: var(--white); font-size: 1.2rem; font-weight: 700;
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, background .2s ease;
}
.back-top:hover { background: var(--red-dark); }
.back-top.is-visible { opacity: 1; pointer-events: auto; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .img-slot.has-photo img, .ind-tile img { transition: none; }
}

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split .img-slot { min-height: 400px; }

/* ---------- Prev / next ---------- */
.prevnext {
  display: flex; justify-content: space-between; gap: 20px; margin-top: 52px;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.prevnext a {
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--charcoal);
}
.prevnext a:hover { color: var(--red); }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: calc(var(--header-h) + 100px) 24px 130px; }
.page-404 .big {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(5rem, 15vw, 9.5rem); color: var(--red); line-height: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); }
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
  .tile-band { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .split { gap: 40px; }
  .bg-tech::before { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .topbar { display: none; }
  .main-nav {
    position: fixed; top: var(--header-h); right: 0; bottom: 0; width: min(340px, 88vw);
    background: var(--charcoal); box-shadow: -18px 0 50px rgba(0,0,0,.35);
    transform: translateX(100%); transition: transform .28s ease; overflow-y: auto; padding: 22px 20px;
  }
  .main-nav.is-open { transform: none; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a, .main-nav button.nav-toggle-sub {
    padding: 14px 10px; width: 100%; text-align: left; color: rgba(255,255,255,.88);
    border-bottom: 1px solid var(--line-dark);
  }
  .main-nav a:hover, .main-nav button.nav-toggle-sub:hover { color: #E9737A; }
  .main-nav li.is-active > a { color: #E9737A; border-bottom-color: var(--line-dark); }
  .dropdown { position: static; box-shadow: none; border: 0; background: transparent; }
  .mega-inner { display: block; width: auto; }
  .mega-feature { display: none; }
  .mega-links { padding: 0 0 8px; columns: 1 !important; }
  .mega-links a { color: rgba(255,255,255,.65); padding: 10px 18px; border-left: 2px solid var(--line-dark); margin-left: 10px; }
  .mega-links a:hover { background: transparent; color: #E9737A; border-left-color: var(--red); }
  .nav-burger { display: block; }
  .header-cta { display: none; }
  .split { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > div { border-bottom: 1px solid rgba(255,255,255,.22); }
  .stats-grid > div:nth-child(2n) { border-right: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .diff-grid { grid-template-columns: 1fr; }
  .tile-band { grid-template-columns: 1fr; }
  .ind-tile { min-height: 190px; }
  .footer-grid { grid-template-columns: 1fr; }
  .prevnext { flex-direction: column; gap: 12px; }
}
@media (max-width: 400px) {
  .process { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
}
