/* ==========================================================================
   FERRUM — site layer: navigation, page scaffolds, portfolio, forms,
   sliders, timelines. Same doctrine as style.css: hard edges, flat fields,
   no rounded corners, no soft shadows.
   ========================================================================== */

/* ==========================================================================
   NAVIGATION BAR (extends .bar)
   ========================================================================== */
.brand{
  color: var(--paper); text-decoration: none; font-weight: 700;
  letter-spacing: .2em; font-size: 13px;
  border-right: 1px solid var(--paper);
  display: flex; align-items: center; gap: 9px;
  white-space: nowrap;
}
.brand:hover, .brand:focus-visible{ background: var(--redb); color: var(--ink); }
.brand-sq{ width: 9px; height: 9px; background: var(--redb); display: inline-block; }
.brand:hover .brand-sq{ background: var(--ink); }

.nav{ flex: 1; display: flex; align-items: stretch; padding: 0; overflow: hidden; }
.nav a{
  display: flex; align-items: center; padding: 0 13px;
  color: var(--paper); text-decoration: none;
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  white-space: nowrap;
}
.nav a:hover, .nav a:focus-visible{ background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"]{ color: var(--redb); box-shadow: inset 0 -3px 0 var(--redb); }

.bar-cta{
  background: var(--redb); color: var(--ink);
  text-decoration: none; font-weight: 700; font-size: 11px; letter-spacing: .16em;
  white-space: nowrap;
}
.bar-cta:hover, .bar-cta:focus-visible{ background: var(--paper); }

.nav-btn{
  display: none;
  background: var(--ink); color: var(--paper);
  border: 0; border-left: 1px solid var(--paper);
  font: 700 11px var(--f-mono); letter-spacing: .16em;
  padding: 0 16px; cursor: pointer;
}
.nav-btn:hover{ background: var(--redb); color: var(--ink); }

@media (max-width: 1180px){
  .nav{ display: none; }
  .nav-btn{ display: block; }
  .nav.open{
    display: flex; position: fixed;
    top: var(--barH); left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--texD, none) var(--ink);
    border-bottom: 4px solid var(--redb);
    z-index: 99;
  }
  .nav.open a{ padding: 15px 5vw; border-bottom: 1px solid rgba(233,231,223,.18); font-size: 13px; }
}
@media (max-width: 560px){ .bar-cta{ display: none; } }

/* ==========================================================================
   PAGE HEAD — banner under the bar on interior pages
   ========================================================================== */
.page-head{
  border-bottom: var(--rule);
  padding: clamp(48px, 9vh, 110px) 5vw clamp(28px, 5vh, 64px);
  position: relative; overflow: hidden;
}
.page-head-over{
  font-size: 11px; font-weight: 700; letter-spacing: .24em;
  margin-bottom: 18px; display: flex; align-items: center; gap: 12px;
}
.page-head h1{
  font-family: var(--f-disp);
  font-size: clamp(40px, 8.4vw, 128px);
  line-height: .9; letter-spacing: -.015em;
  max-width: 18ch;
}
.page-head-sub{
  margin-top: 22px;
  font-size: clamp(12px, 1.2vw, 15px);
  font-weight: 700; letter-spacing: .12em; line-height: 2;
  max-width: 62ch;
}
.page-head-no{
  position: absolute; right: 2vw; bottom: -0.08em;
  font-family: var(--f-cond); font-weight: 800;
  font-size: clamp(90px, 16vw, 220px); line-height: .8;
  color: transparent; -webkit-text-stroke: 2px var(--ink);
  opacity: .35; pointer-events: none; user-select: none;
}

/* ==========================================================================
   GENERIC BLOCKS
   ========================================================================== */
.grid-2, .grid-3, .grid-4{
  display: grid; gap: 2px; background: var(--ink);
}
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px){ .grid-4{ grid-template-columns: repeat(2, 1fr); } .grid-3{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px){ .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; } }

.cell{
  background: var(--texL, none) var(--c);
  padding: clamp(22px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 12px;
}
.cell:hover{ background-color: var(--c3); }
.cell-no{
  font-family: var(--f-cond); font-weight: 800;
  font-size: clamp(36px, 4vw, 60px); line-height: .9;
  color: transparent; -webkit-text-stroke: 2px var(--ink);
}
.cell:hover .cell-no{ color: var(--red); -webkit-text-stroke: 2px var(--red); }
.cell h3{
  font-family: var(--f-disp);
  font-size: clamp(16px, 1.6vw, 23px); line-height: 1.15; letter-spacing: -.01em;
}
.cell p{ font-size: 12px; letter-spacing: .06em; line-height: 1.9; }
.cell-tag{
  align-self: flex-start;
  font-size: 10px; font-weight: 700; letter-spacing: .24em;
  background: var(--ink); color: var(--paper);
  padding: 4px 10px;
}
.cell:hover .cell-tag{ background: var(--red); }
.cell--dark{ background: var(--texD, none) var(--ink2); color: var(--paper); }
.cell--dark:hover{ background-color: var(--ink); }
.cell--dark .cell-no{ -webkit-text-stroke: 2px var(--paper); }
.cell--dark:hover .cell-no{ color: var(--redb); -webkit-text-stroke: 2px var(--redb); }

.cell-link{ text-decoration: none; color: inherit; }

/* prose block for longer copy */
.prose{
  padding: clamp(30px, 5vw, 64px) 5vw;
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 36px;
}
.prose-cap{
  font-family: var(--f-disp);
  font-size: clamp(20px, 2.4vw, 34px); line-height: 1.1;
}
.prose-body{ max-width: 68ch; font-size: 13px; letter-spacing: .04em; line-height: 2.1; display: flex; flex-direction: column; gap: 18px; }
.prose-body strong{ background: var(--ink); color: var(--paper); padding: 1px 6px; font-weight: 700; }
@media (max-width: 820px){ .prose{ grid-template-columns: 1fr; gap: 18px; } }

/* stat band */
.stats{
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--paper);
  border-bottom: var(--rule);
}
.stat{
  background: var(--texD, none) var(--ink);
  color: var(--paper);
  padding: clamp(26px, 4vw, 52px) 24px;
  text-align: left;
}
.stat-num{
  font-family: var(--f-cond); font-weight: 800;
  font-size: clamp(44px, 6vw, 92px); line-height: .9;
  color: var(--paper);
}
.stat-num .red{ color: var(--redb); }
.stat-cap{ margin-top: 12px; font-size: 10px; font-weight: 700; letter-spacing: .24em; color: var(--redb); }
.stat-sub{ margin-top: 6px; font-size: 11px; letter-spacing: .08em; opacity: .75; }
@media (max-width: 860px){ .stats{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px){ .stats{ grid-template-columns: 1fr; } }

/* CTA band */
.cta-band{
  background: var(--texD, none) var(--ink);
  color: var(--paper);
  border-bottom: var(--rule);
  padding: clamp(40px, 8vh, 96px) 5vw;
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px;
}
.cta-band h2{
  font-family: var(--f-disp);
  font-size: clamp(26px, 4.6vw, 68px); line-height: .95; letter-spacing: -.01em;
  flex: 1 1 420px;
}
.cta-band h2 .red{ color: var(--redb); }
.cta-actions{ display: flex; flex-wrap: wrap; gap: 14px; }
.btn-lg{
  display: inline-block; text-decoration: none; text-align: center;
  font: 700 13px var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  padding: 18px 30px; cursor: pointer;
}
.btn-red{ background: var(--redb); color: var(--ink); border: 2px solid var(--redb); }
.btn-red:hover, .btn-red:focus-visible{ background: var(--paper); border-color: var(--paper); }
.btn-ghost{ background: transparent; color: var(--paper); border: 2px solid var(--paper); }
.btn-ghost:hover, .btn-ghost:focus-visible{ background: var(--paper); color: var(--ink); }
.btn-ink{ background: var(--ink); color: var(--paper); border: 2px solid var(--ink); }
.btn-ink:hover, .btn-ink:focus-visible{ background: var(--red); border-color: var(--red); color: var(--paper); }

/* testimonial cells */
.quote-cell{
  background: var(--texL, none) var(--c);
  padding: clamp(24px, 3vw, 42px);
  display: flex; flex-direction: column; gap: 18px;
}
.quote-mark{
  font-family: var(--f-disp); font-size: 54px; line-height: .5;
  color: var(--red); height: 24px;
}
.quote-text{
  font-family: var(--f-disp);
  font-size: clamp(14px, 1.35vw, 19px); line-height: 1.5; letter-spacing: 0;
  text-transform: none;
}
.quote-who{ margin-top: auto; font-size: 11px; font-weight: 700; letter-spacing: .14em; line-height: 1.9; }
.quote-who span{ display: block; font-weight: 400; opacity: .7; }

/* ==========================================================================
   PORTFOLIO
   ========================================================================== */
.filters{
  display: flex; flex-wrap: wrap;
  border-bottom: var(--rule);
  background: var(--c3);
}
.filters button{
  font: 700 11px var(--f-mono); letter-spacing: .18em;
  background: transparent; color: var(--ink);
  border: 0; border-right: var(--hair);
  padding: 14px 20px; cursor: pointer; text-transform: uppercase;
}
.filters button:hover{ background: var(--c2); }
.filters button[aria-pressed="true"]{ background: var(--ink); color: var(--redb); }
.filters-count{ margin-left: auto; display: flex; align-items: center; padding: 0 20px; font-size: 11px; font-weight: 700; letter-spacing: .18em; }

.pf-grid{
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; background: var(--ink);
}
@media (max-width: 1020px){ .pf-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px){ .pf-grid{ grid-template-columns: 1fr; } }

.pf-card{
  background: var(--texL, none) var(--c);
  display: flex; flex-direction: column;
  text-decoration: none; color: var(--ink);
}
.pf-card.hide{ display: none; }
.pf-thumb{
  width: 100%; height: 210px; display: block;
  border-bottom: var(--rule); background: var(--c2);
}
.pf-body{ padding: 20px 20px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pf-name{ font-family: var(--f-disp); font-size: 18px; line-height: 1.15; }
.pf-meta{
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  font-size: 11px; letter-spacing: .08em; line-height: 1.7;
}
.pf-meta b{ display: block; font-size: 9px; letter-spacing: .24em; opacity: .6; }
.pf-tags{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.pf-tags span{
  font-size: 9px; font-weight: 700; letter-spacing: .18em;
  border: 1px solid var(--ink); padding: 3px 8px;
}
.pf-card:hover{ background-color: var(--ink); color: var(--paper); }
.pf-card:hover .pf-tags span{ border-color: var(--paper); }
.pf-card:hover .pf-name{ color: var(--redb); }

/* before / after slider */
.ba-wrap{
  padding: clamp(26px, 4vw, 54px) 5vw;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px; align-items: start;
}
@media (max-width: 900px){ .ba-wrap{ grid-template-columns: 1fr; } }
.ba-stage{
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border: var(--rule); background: var(--c2);
  overflow: hidden; touch-action: none;
}
.ba-stage canvas{ position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ba-after{ clip-path: inset(0 0 0 50%); }
.ba-handle{
  position: absolute; top: 0; bottom: 0; left: 50%; width: 4px;
  background: var(--redb); transform: translateX(-50%);
  pointer-events: none;
}
.ba-handle::after{
  content: "◂ ▸"; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--redb); color: var(--ink);
  font: 700 11px var(--f-mono); letter-spacing: .1em;
  padding: 8px 10px; white-space: nowrap;
}
.ba-label{
  position: absolute; top: 12px;
  font: 700 10px var(--f-mono); letter-spacing: .22em;
  background: var(--ink); color: var(--paper); padding: 5px 10px;
}
.ba-label.a{ left: 12px; } .ba-label.b{ right: 12px; background: var(--redb); color: var(--ink); }
.ba-range{ width: 100%; margin-top: 14px; accent-color: var(--red); }
.ba-side{ display: flex; flex-direction: column; gap: 14px; font-size: 12px; letter-spacing: .06em; line-height: 1.9; }
.ba-side h3{ font-family: var(--f-disp); font-size: 20px; }

/* project map */
.map-wrap{ padding: clamp(26px, 4vw, 54px) 5vw; }
.site-map{
  width: 100%; border: var(--rule);
  background: var(--texD, none) var(--ink); display: block;
}
.site-map text{ font-family: var(--f-mono); letter-spacing: .1em; }
.map-legend{ display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 14px; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.map-legend span::before{ content: "■ "; color: var(--red); }
.map-legend .lg-ink::before{ color: var(--ink); }

/* ==========================================================================
   PROCESS TIMELINE
   ========================================================================== */
.tl{ position: relative; padding: clamp(30px, 5vw, 60px) 5vw; }
.tl::before{
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(5vw + 27px);
  width: 2px; background: var(--ink);
}
.tl-step{
  position: relative;
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  gap: 26px; padding: 26px 0;
}
.tl-no{
  width: 56px; height: 56px;
  background: var(--ink); color: var(--paper);
  font-family: var(--f-cond); font-weight: 800; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.tl-step:hover .tl-no{ background: var(--red); }
.tl-body h3{ font-family: var(--f-disp); font-size: clamp(18px, 2vw, 26px); margin-bottom: 8px; }
.tl-dur{ font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--red); margin-bottom: 10px; }
.tl-body p{ max-width: 64ch; font-size: 12px; letter-spacing: .05em; line-height: 2; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq{ border-bottom: var(--rule); }
.faq details{ border-bottom: var(--hair); }
.faq details:last-child{ border-bottom: 0; }
.faq summary{
  list-style: none; cursor: pointer;
  display: flex; align-items: baseline; gap: 18px;
  padding: 22px 5vw;
  font-family: var(--f-disp); font-size: clamp(14px, 1.6vw, 20px);
}
.faq summary::-webkit-details-marker{ display: none; }
.faq summary::before{
  content: "+"; font-family: var(--f-cond); font-weight: 800;
  font-size: 1.4em; line-height: .8; color: var(--red); width: 22px; flex: none;
}
.faq details[open] summary::before{ content: "–"; }
.faq details[open] summary{ background: var(--ink); color: var(--paper); }
.faq summary:hover{ background: var(--c3); }
.faq details[open] summary:hover{ background: var(--ink2); }
.faq-a{
  padding: 24px 5vw 30px calc(5vw + 40px);
  font-size: 12.5px; letter-spacing: .05em; line-height: 2.1; max-width: 78ch;
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-wrap{
  padding: clamp(30px, 5vw, 64px) 5vw;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px; align-items: start;
}
@media (max-width: 940px){ .form-wrap{ grid-template-columns: 1fr; } }
.form{
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 18px;
}
.form .full{ grid-column: 1 / -1; }
@media (max-width: 560px){ .form{ grid-template-columns: 1fr; } }
.field{ display: flex; flex-direction: column; gap: 7px; }
.field label{
  font-size: 10px; font-weight: 700; letter-spacing: .22em;
}
.field label .req{ color: var(--red); }
.field input, .field select, .field textarea{
  font: 400 13px var(--f-mono);
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink);
  padding: 13px 12px;
  width: 100%;
}
.field textarea{ min-height: 130px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible{
  outline: 3px solid var(--red); outline-offset: 0;
}
.field-file input{ padding: 10px; background: var(--c3); }
.form-note{ grid-column: 1 / -1; font-size: 11px; letter-spacing: .08em; opacity: .75; line-height: 1.9; }
.form-done{
  grid-column: 1 / -1;
  border: 3px solid var(--red);
  padding: 22px;
  font-weight: 700; font-size: 13px; letter-spacing: .12em; line-height: 2;
  display: none;
}
.form-done.show{ display: block; }
.form-side{ display: flex; flex-direction: column; gap: 22px; }
.form-side h3{ font-family: var(--f-disp); font-size: 20px; }
.form-side p, .form-side li{ font-size: 12px; letter-spacing: .06em; line-height: 2; }
.form-side ul{ list-style: none; }
.form-side li::before{ content: "■ "; color: var(--red); }
.side-box{ border: var(--rule); padding: 22px; background: var(--c3); }
.side-box--dark{ background: var(--texD, none) var(--ink); color: var(--paper); border-color: var(--ink); }
.side-box--dark .est-out{ color: var(--redb); }

/* estimator */
.est{ display: flex; flex-direction: column; gap: 16px; }
.est .field select, .est .field input{ background: var(--paper); }
.est-out{
  font-family: var(--f-cond); font-weight: 800;
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1;
}
.est-cap{ font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.est-note{ font-size: 10px; letter-spacing: .06em; opacity: .7; line-height: 1.8; }
input[type="range"]{ accent-color: var(--red); }
.range-val{ font-weight: 700; font-size: 12px; letter-spacing: .1em; }

/* ==========================================================================
   TEAM
   ========================================================================== */
.team-card{ padding: 0 0 24px; }
.team-face{
  width: 100%; height: 190px; display: block;
  border-bottom: var(--rule); background: var(--c2);
}
.team-card h3{ padding: 18px 20px 0; }
.team-card .cell-tag{ margin: 10px 20px 0; }
.team-card p{ padding: 12px 20px 0; }
.team-card .cred{ padding: 10px 20px 0; font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--red); }

/* careers */
.job-row{
  display: grid;
  grid-template-columns: 90px minmax(0, 1.6fr) 1fr 130px 130px;
  gap: 0 14px; align-items: center;
  padding: 17px 5vw 17px 24px;
  border-bottom: var(--hair);
  color: var(--ink); text-decoration: none;
  font-size: 12px; letter-spacing: .1em; white-space: nowrap;
}
.job-row .w-name{ white-space: normal; }
.job-row:hover, .job-row:focus-visible{ background: var(--ink); color: var(--paper); }
.job-row:hover .w-no{ color: var(--redb); }
@media (max-width: 780px){
  .job-row{ grid-template-columns: 70px minmax(0, 1.6fr) 110px; }
  .job-row > span:nth-child(3), .job-row > span:nth-child(5){ display: none; }
}

/* contact office cells */
.office h3{ font-family: var(--f-disp); font-size: 20px; }
.office p{ font-size: 12px; letter-spacing: .08em; line-height: 2.1; }
.office a{ color: inherit; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--red); }
.office a:hover{ background: var(--red); color: var(--paper); }
.office .emg{
  background: var(--redb); color: var(--ink);
  font-weight: 700; padding: 4px 8px; display: inline-block;
}

/* download center */
.dl-row{
  display: flex; align-items: center; gap: 18px;
  padding: 16px 5vw 16px 24px;
  border-bottom: var(--hair);
  color: var(--ink); text-decoration: none;
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
}
.dl-row:hover{ background: var(--ink); color: var(--paper); }
.dl-row .dl-kind{ font-weight: 400; opacity: .7; margin-left: auto; letter-spacing: .18em; font-size: 10px; }
.dl-row::before{ content: "▼"; color: var(--red); font-size: 10px; }
