/* =========================================================
   IonForge CNC & Fabrication — site styles
   ========================================================= */

:root {
  --bg: #0a0c0f;
  --bg-2: #0e1116;
  --surface: #12161c;
  --surface-2: #171c24;
  --paper: #ebe6dc;
  --ink: #12100d;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f5;
  --muted: #9aa4b2;
  --dim: #6f7885;
  --accent: #ff6a2b;
  --accent-2: #ffb03a;
  --accent-soft: rgba(255, 106, 43, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

::selection { background: var(--accent); color: #120a06; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: #120a06;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Top bar ---------- */
.topbar {
  background: #07090b;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 38px;
}
.topbar-item,
.topbar-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-links { display: inline-flex; gap: 22px; }
.topbar-links a { transition: color 0.2s; }
.topbar-links a:hover { color: var(--text); }
.topbar svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.topbar svg .dot { fill: var(--accent); stroke: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10, 12, 15, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { width: 34px; height: 34px; flex: none; }
.mark-frame {
  fill: rgba(255, 106, 43, 0.08);
  stroke: var(--accent);
  stroke-width: 1.6;
}
.mark-bolt { fill: var(--accent); }
.brand-text {
  font-family: var(--font-head);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-text small {
  font-family: var(--font-body);
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav a:not(.nav-cta):hover,
.nav a:not(.nav-cta).active { color: var(--text); }
.nav a:not(.nav-cta):hover::after,
.nav a:not(.nav-cta).active::after { width: 100%; }

.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #140b06 !important;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(255, 106, 43, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 106, 43, 0.42);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s, top 0.25s;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: flex;
  align-items: center;
  padding: 96px 0 84px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-media {
  position: absolute;
  inset: 0;
  background: url("../images/work-07.jpg") center 42% / cover no-repeat;
  transform: scale(1.03);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 13, 0.95) 0%, rgba(8, 10, 13, 0.78) 42%, rgba(8, 10, 13, 0.28) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 12, 15, 0) 38%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 20px;
}
.eyebrow .num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(255, 176, 58, 0.35);
  border-radius: 5px;
  background: rgba(255, 176, 58, 0.08);
  color: var(--accent-2);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.hero h1 {
  font-size: clamp(3.1rem, 8.4vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  margin-top: 26px;
  max-width: 560px;
  font-size: 1.12rem;
  color: #c3cad4;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #140b06;
  box-shadow: 0 10px 30px rgba(255, 106, 43, 0.32);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(255, 106, 43, 0.45);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 58px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  max-width: 700px;
}
.hero-stats > div {
  padding: 20px 30px 0 0;
  margin-right: 30px;
  border-right: 1px solid var(--border);
}
.hero-stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stats dt {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.hero-stats dd {
  margin: 3px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- Capabilities ---------- */
.capabilities {
  padding: 0;
  position: relative;
  z-index: 2;
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: -46px;
}
.cap-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, border-color 0.3s;
}
.cap-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 106, 43, 0.4);
}
.cap-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 43, 0.28);
  margin-bottom: 20px;
}
.cap-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cap-card h2 {
  font-size: 1.22rem;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.cap-card p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Sections ---------- */
.section { padding: 108px 0; }
.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 44px;
}
.section-head h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
}
.section-lede {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 430px;
  justify-self: end;
}

.subhead {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 64px 0 22px;
}

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 34px;
}
.tag-list li {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Galleries ---------- */
/* Mosaic grid: portrait photos span extra rows so the mosaic stays balanced.
   The is-portrait class is added by main.js from the photo dimensions. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 190px;
  grid-auto-flow: dense;
  gap: 16px;
}
.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
  text-align: left;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: rgba(255, 106, 43, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}
.gallery-item.is-portrait { grid-row: span 3; }
.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.045); }

.gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 38px 14px 12px;
  background: linear-gradient(0deg, rgba(5, 7, 9, 0.9), rgba(5, 7, 9, 0));
  color: #fff;
  font-size: 0.79rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}
.gallery-item:hover .gallery-cap,
.gallery-item:focus-visible .gallery-cap {
  opacity: 1;
  transform: none;
}

.gallery-item .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 106, 43, 0.94);
  color: #140b06;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Before gallery: two columns, letterboxed so damage is not cropped. */
.gallery-before {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 300px;
}
.gallery-before .gallery-item { grid-row: auto; }
.gallery-before .gallery-item img {
  object-fit: contain;
  background: #05070a;
}
.gallery-before .gallery-item { border-color: rgba(255, 120, 80, 0.22); }
.gallery-before .gallery-item img { filter: saturate(0.85) contrast(1.02); }

/* With an odd number of Before photos, center the final tile instead of
   leaving an empty column beside it. */
@media (min-width: 821px) {
  .gallery-before > .gallery-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc(50% - 8px);
    justify-self: center;
  }
}

.before-block {
  margin-top: 78px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}
.before-head {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 30px;
}
.before-head h3 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); }
.before-head .section-lede { justify-self: end; }

/* ---------- Brand cards ---------- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.brand-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 70%);
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}
.brand-card:hover {
  border-color: rgba(255, 106, 43, 0.45);
  transform: translateY(-3px);
  background: linear-gradient(160deg, rgba(255, 106, 43, 0.08), transparent 70%);
}
.brand-name {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.brand-link {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  display: inline-flex;
  gap: 6px;
}

/* ---------- About ---------- */
.about { background: var(--bg); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.about-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.about-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 106, 43, 0.16), transparent 55%);
  z-index: 1;
  pointer-events: none;
}
.about-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}
.about-copy h2 { font-size: clamp(2rem, 4vw, 2.85rem); margin-bottom: 20px; }
.about-copy p { color: var(--muted); margin-bottom: 16px; }
.about-points {
  list-style: none;
  padding: 0;
  margin: 26px 0 32px;
  display: grid;
  gap: 12px;
}
.about-points li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.95rem;
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  transform: rotate(45deg);
}
.about-points strong { color: var(--text); font-weight: 600; }

/* ---------- Process ---------- */
.process {
  background: var(--paper);
  color: var(--ink);
  padding: 84px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.process .eyebrow { color: #a8431a; }
.process .eyebrow .num {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(255, 106, 43, 0.14);
  color: #a8431a;
}
.process-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 42px;
}
.process-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
.process-head > p { color: #524d45; max-width: 430px; justify-self: end; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.process-step {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}
.process-step .step-num {
  font-family: var(--font-head);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #a8431a;
}
.process-step h3 {
  font-size: 1.16rem;
  color: var(--ink);
  margin: 10px 0 8px;
}
.process-step p { color: #524d45; font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  gap: 18px;
}
.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 43, 0.24);
}
.contact-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-list small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2px;
}
.contact-list a, .contact-list span {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
}
.contact-list a:hover { color: var(--accent-2); }

.service-area {
  margin-top: 22px;
  max-width: 420px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--dim);
}
.service-area strong { color: var(--muted); font-weight: 600; }

.map-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 230px;
  border: 0;
  filter: grayscale(1) invert(0.92) contrast(0.9);
  opacity: 0.85;
  transition: filter 0.4s, opacity 0.4s;
}
.map-wrap:hover iframe { filter: grayscale(0.2) invert(0); opacity: 1; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 18px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > span {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.field > span em { color: var(--accent); font-style: normal; }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 13px 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--dim); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 106, 43, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 106, 43, 0.14);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: rgba(255, 88, 88, 0.55); }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}
.form-note { color: var(--dim); font-size: 0.78rem; max-width: 300px; }
.form-note a { color: var(--muted); }
.form-status { font-size: 0.88rem; color: var(--accent-2); min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer {
  background: #07090b;
  border-top: 1px solid var(--border);
  padding: 64px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.9fr;
  gap: 48px;
}
.footer-brand p {
  color: var(--dim);
  font-size: 0.9rem;
  max-width: 330px;
  margin-top: 18px;
}
.footer-col { display: grid; align-content: start; gap: 9px; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
  font-weight: 600;
}
.footer-col a,
.footer-col p { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--dim);
}
.to-top { color: var(--muted); text-decoration: none; }
.to-top:hover { color: var(--text); }

/* ---------- Mobile call bar ---------- */
.mobile-cta { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(4, 6, 8, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 84px;
}
.lightbox[hidden] { display: none; }
.lb-figure {
  margin: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}
.lb-figure figcaption {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.lb-count {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  padding-left: 16px;
  border-left: 1px solid var(--border-strong);
}
.lb-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 2.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.05); }
.lb-close { top: 22px; right: 24px; font-size: 1.9rem; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.05); }
body.lb-open { overflow: hidden; }

/* ---------- Reveal ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .section-head, .before-head { grid-template-columns: 1fr; gap: 16px; }
  .section-lede { justify-self: start; max-width: 560px; }
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .cap-grid .cap-card:last-child { grid-column: 1 / -1; }
  .brand-grid { grid-template-columns: 1fr 1fr; }
  .brand-grid .brand-card:last-child { grid-column: 1 / -1; }
  .about-grid { grid-template-columns: 1fr; gap: 38px; }
  .about-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .nav { gap: 20px; }
  .nav a { font-size: 0.88rem; }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 190px;
  }
  .gallery-before { grid-auto-rows: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .topbar-item { display: none; }
  .topbar-inner { justify-content: center; }
  .topbar-links { gap: 18px; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 24px 22px;
    background: rgba(10, 12, 15, 0.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  }
  .nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
  }
  .nav a { padding: 12px 4px; font-size: 1rem; }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { margin-top: 8px; text-align: center; }

  .hero { min-height: 0; padding: 80px 0 70px; }
  .hero-media {
    background-image: url("../images/work-07-800.jpg");
    background-position: 58% center;
  }
  .hero-stats { margin-top: 40px; }
  .hero-stats > div { padding-right: 22px; margin-right: 22px; }
  .hero-stats dt { font-size: 1rem; }

  body { padding-bottom: 70px; }
  .mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    gap: 9px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(7, 9, 11, 0.97);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .mobile-cta a {
    flex: 1;
    padding: 12px 10px;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
  }
  .mobile-cta .call {
    color: var(--text);
    border: 1px solid var(--border-strong);
  }
  .mobile-cta .quote {
    color: #140b06;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
  }
}

@media (max-width: 560px) {
  .topbar { font-size: 0.72rem; }
  .topbar-links { gap: 13px; }
  .topbar-links a:nth-child(3) { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .process { padding: 60px 0; }
  .process-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 28px; }
  .process-head > p { justify-self: start; }
  .process-grid { grid-template-columns: 1fr; gap: 24px; }
  .section-head { margin-bottom: 32px; }
  .capabilities { padding-top: 0; }
  .cap-grid { grid-template-columns: 1fr; margin-top: 28px; }
  .cap-grid .cap-card:last-child { grid-column: auto; }
  .brand-grid { grid-template-columns: 1fr; }
  .brand-grid .brand-card:last-child { grid-column: auto; }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 130px;
    gap: 10px;
  }
  .gallery-item.is-portrait { grid-row: span 2; }
  .gallery-before {
    grid-template-columns: 1fr;
    grid-auto-rows: 230px;
  }
  .gallery-cap { display: none; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 3.6rem); }
  .hero-lede { font-size: 1rem; }
  .hero-actions { gap: 10px; }
  .btn { padding: 13px 22px; }
  .hero-stats { display: grid; gap: 14px; }
  .hero-stats > div { padding: 0; margin: 0; border: 0; }
  .hero-stats dd { margin-top: 0; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .lightbox { padding: 64px 14px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-btn { width: 44px; height: 44px; }
  .subhead { margin-top: 46px; }
  .before-block { margin-top: 56px; padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
