/* ==========================================================================
   G.S. Fabricators site stylesheet
   Light, technical layout: paper background, hairline rules, square corners.
   ========================================================================== */

:root {
  --paper:       #f6f5f1;
  --paper-2:     #eeece5;
  --surface:     #ffffff;

  --ink:         #15171b;
  --ink-2:       #454a52;
  --ink-3:       #82878f;

  --rule:        #e0ddd4;
  --rule-2:      #cbc7bb;

  --accent:      #9f1f20;   /* brand crimson  */
  --accent-ink:  #7d1718;
  --blue:        #0f6fbd;   /* brand blue     */

  --sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 32px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Micro-label: uppercase mono, used for eyebrows and field labels ---------- */
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ==========================================================================
   Header
   ========================================================================== */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 60;
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-text strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.05;
}
.brand-text > span {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Navigation --------------------------------------------------------------- */

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
}

.nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav > ul > li { position: relative; }

.nav a {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 12px 14px;
  border-bottom: 2px solid transparent;
}
.nav > ul > li > a:hover { color: var(--ink); border-bottom-color: var(--rule-2); }
.nav > ul > li > a.current { color: var(--ink); border-bottom-color: var(--accent); }

/* Dropdown */
.has-sub > a::after {
  content: "+";
  margin-left: 7px;
  color: var(--ink-3);
  font-size: 12px;
}
.sub {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 296px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.has-sub:hover .sub,
.has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }

.sub a {
  padding: 9px 18px;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 13px;
  font-family: var(--sans);
  color: var(--ink-2);
  border-bottom: 0;
}
.sub a:hover { background: var(--paper); color: var(--accent); }
.sub a.current { color: var(--accent); }

/* ==========================================================================
   Hero slider
   ========================================================================== */

.hero {
  position: relative;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.slides {
  position: relative;
  aspect-ratio: 1366 / 350;
  min-height: 230px;
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
}
.slide.on { opacity: 1; }
.slide { pointer-events: none; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.slide-caption {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 34px;
  background: rgba(255, 255, 255, 0.9);
  border-left: 3px solid var(--accent);
  padding: 14px 26px 14px 20px;
  max-width: 62%;
}
.slide-caption .label { display: block; margin-bottom: 3px; }
.slide-caption h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.slider-nav {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rule-2);
  padding: 5px;
}
.slider-nav button {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding: 5px 8px;
  line-height: 1;
}
.slider-nav button:hover { color: var(--ink); }
.slider-nav .dot { width: 9px; height: 9px; padding: 0; border: 1px solid var(--rule-2); }
.slider-nav .dot.on { background: var(--accent); border-color: var(--accent); }
.slider-count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding: 0 6px; }

/* ==========================================================================
   Page banner (interior pages)
   ========================================================================== */

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 46px 0 40px;
}
.page-head .label { display: block; margin-bottom: 10px; }
.page-head h1 {
  font-size: clamp(28px, 4.2vw, 40px);
  letter-spacing: -0.02em;
}
.page-head .mark { width: 46px; height: 3px; background: var(--accent); margin-top: 18px; }

.crumbs { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--accent); }

/* ==========================================================================
   Statement + spec strip
   ========================================================================== */

.statement {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 56px 0;
}
.statement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.statement h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.18;
}
.statement h1 em { font-style: normal; color: var(--accent); }
.statement .label { display: block; margin-bottom: 14px; }

.specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.spec {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 20px 22px;
  background: var(--surface);
}
.spec dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.spec dd { margin: 6px 0 0; color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.35; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 40px;
}
.section-head .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-head h2 {
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.section-head .aside {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* About two-column ---------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 52px;
  align-items: start;
}
.prose h3 {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.prose h3 + .hairline { margin-bottom: 16px; }
.hairline { width: 32px; height: 2px; background: var(--accent); }
.prose .block + .block { margin-top: 34px; }

.figure { border: 1px solid var(--rule); background: var(--surface); padding: 10px; }
.figure figcaption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 4px 4px;
  border-top: 1px solid var(--rule);
  margin-top: 10px;
}

/* Product index list -------------------------------------------------------- */

.index-list { border-top: 1px solid var(--rule); }
.index-row {
  display: grid;
  grid-template-columns: 62px 132px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 22px 8px;
  border-bottom: 1px solid var(--rule);
  transition: background .15s ease, padding .15s ease;
}
.index-row:hover { background: var(--surface); }
.index-row .num { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.08em; }
.index-row:hover .num { color: var(--accent); }
.index-thumb {
  width: 132px;
  height: 84px;
  border: 1px solid var(--rule);
  background: var(--surface);
  overflow: hidden;
}
.index-thumb img { width: 100%; height: 100%; object-fit: contain; }
.index-row h3 { font-size: 18px; letter-spacing: -0.01em; margin-bottom: 3px; }
.index-row p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.index-row .go {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 2px;
}
.index-row:hover .go { color: var(--accent); border-bottom-color: var(--accent); }

/* Product gallery ----------------------------------------------------------- */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 52px;
  align-items: start;
}

.lede {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  border-left: 3px solid var(--accent);
  padding-left: 22px;
  margin-bottom: 40px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.gal-item { border: 1px solid var(--rule); background: var(--surface); }
.gal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gal-item .cap {
  border-top: 1px solid var(--rule);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.gal-item .cap span { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

/* Sidebar ------------------------------------------------------------------- */

.side { position: sticky; top: 112px; }
.side-block { border: 1px solid var(--rule); background: var(--surface); margin-bottom: 22px; }
.side-block h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-weight: 700;
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid var(--rule); }
.side-list a {
  display: block;
  padding: 12px 18px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-left: 2px solid transparent;
}
.side-list a:hover { background: var(--paper); color: var(--accent); }
.side-list a.current { border-left-color: var(--accent); color: var(--accent); font-weight: 700; }

.side-cta { padding: 18px; }
.side-cta p { font-size: 13.5px; }

/* Buttons ------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn-accent { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* Client logo grid ---------------------------------------------------------- */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: var(--surface);
}
.logo-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.logo-cell img {
  max-height: 100%;
  width: auto;
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter .2s ease, opacity .2s ease;
}
.logo-cell:hover img { filter: none; opacity: 1; }
.logo-cell.text {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-2);
  font-weight: 700;
}

/* CTA band ------------------------------------------------------------------ */

.cta {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 52px 0;
}
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap; }
.cta h2 { font-size: 26px; letter-spacing: -0.02em; }
.cta p { margin-top: 8px; max-width: 620px; }

/* Contact cards ------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: var(--surface);
}
.contact-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 30px 32px;
}
.contact-cell h3 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.contact-cell .org { font-weight: 700; color: var(--ink); }
.contact-cell address { font-style: normal; line-height: 1.8; }
.contact-cell .row { display: flex; gap: 12px; }
.contact-cell .row dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-width: 66px;
  padding-top: 3px;
}
.contact-cell dl { margin: 0; }
.contact-cell dd { margin: 0 0 10px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--paper-2);
  border-top: 3px solid var(--accent);
  padding: 56px 0 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1.4fr;
  gap: 40px;
}
.foot-grid h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-2);
  margin-bottom: 16px;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--ink-2); font-size: 14px; }
.foot-grid a:hover { color: var(--accent); }
.foot-grid address { font-style: normal; font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.foot-grid address strong { color: var(--ink); display: block; font-size: 12px; letter-spacing: 0.04em; }
.iso-badge { border: 1px solid var(--rule-2); background: var(--surface); padding: 12px; max-width: 190px; }
.iso-badge img { width: 100%; }

.colophon {
  margin-top: 48px;
  border-top: 1px solid var(--rule-2);
  padding: 20px 0 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* Back to top --------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  background: var(--ink);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  z-index: 70;
}
.to-top:hover { background: var(--accent); color: #fff; }
.to-top.on { display: flex; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .statement-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .side { position: static; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; }

  .brand-mark { width: 38px; height: 38px; }
  .brand-text strong { font-size: 15px; }
  .brand-text > span { display: none; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    padding: 8px 0 14px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  .nav.open { display: block; }
  .masthead .wrap { position: relative; min-height: 70px; }
  .nav > ul { display: block; padding: 0 var(--gutter); }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav > ul > li > a.current { border-bottom-color: var(--accent); }
  .sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    border-top: 0;
    padding: 0 0 0 16px;
    min-width: 0;
    background: none;
  }
  .has-sub > a::after { display: none; }
  .sub a { padding: 10px 0; }

  /* Banners are 1366x350 with the product on the right; bias the crop that
     way so a narrow screen still shows the work rather than empty backdrop. */
  /* aspect-ratio + min-height derives WIDTH from height, which overflows a
     narrow viewport; pin an explicit height and let the crop do the work. */
  .slides { aspect-ratio: auto; height: 210px; min-height: 0; }
  .slide img { object-position: 78% center; }

  .slide-caption {
    max-width: none;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 16px;
  }
  .slide-caption h2 { font-size: 15px; }

  /* Controls move to the top so they clear the full-width caption. */
  .slider-nav { right: 10px; bottom: auto; top: 10px; }

  .index-row { grid-template-columns: 44px 1fr; gap: 14px; padding: 20px 4px; }
  .index-thumb { display: none; }
  .index-row .go { grid-column: 2; }

  .gallery { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

@media (max-width: 560px) {
  .specs { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
  .section-head { flex-wrap: wrap; }
  .section-head .aside { margin-left: 0; width: 100%; }
}

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