/* Houston Machine & Thread — Direction C "Houston Steel"
   Layout: white pages broken by full-width navy bands; one gold accent; photo-led. */
:root {
  --navy: #0F2233;
  --navy-deep: #0A1824;
  --navy-line: #24384A;
  --gold: #E6B33C;
  --gold-deep: #C9971F;
  --ink: #14202B;
  --muted: #4A5864;
  --muted-2: #5A6772;
  --on-navy: #E3E9EE;
  --on-navy-muted: #AEBBC6;
  --rule: #DDE2E6;
  --tint: #F3F5F7;
  --paper: #FFFFFF;
  --danger: #B3261E;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: #28506F; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.1; text-wrap: balance; margin: 0; color: var(--navy); }
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: 22px; font-weight: 700; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--navy); padding: 10px 16px; z-index: 50; }
.skip:focus { left: 16px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 600px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
.eyebrow { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.on-navy .eyebrow, .hero .eyebrow { color: var(--gold); }
.lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted-2); }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font: 600 16px/1.2 var(--font-body); text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #F0C45A; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #1C3A54; color: #fff; }
.btn-line-light { border-color: #fff; color: #fff; background: transparent; }
.btn-line-light:hover { background: #fff; color: var(--navy); }
.btn-line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-line:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Top bar + header */
.topbar { background: var(--navy-deep); color: #fff; font-size: 14px; }
.topbar .wrap { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; padding-block: 9px; text-align: center; }
.topbar strong { color: var(--gold); font-weight: 600; }
.topbar a { color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.topbar a:hover { color: var(--gold); }
.site-header { background: var(--navy); color: #fff; position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { width: 46px; height: auto; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.03em; line-height: 1.05; text-transform: uppercase; }
.brand:hover { color: #fff; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: #fff; text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 12px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.nav a.btn, .nav a.btn:hover, .nav a.btn[aria-current="page"] { color: var(--navy); }
.nav .nav-phone { font-weight: 600; white-space: nowrap; }
.nav .btn { margin-left: 8px; padding: 10px 18px; min-height: 44px; }
.menu-btn { display: none; background: transparent; border: 2px solid var(--navy-line); color: #fff; min-height: 44px; padding: 8px 14px; font: 600 15px var(--font-body); cursor: pointer; }
@media (max-width: 1060px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-top: 1px solid var(--navy-line);
         flex-direction: column; align-items: stretch; gap: 0;
         padding: 8px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--navy-line); font-size: 17px; }
  .nav .btn { margin: 16px 0 0; border-bottom: 0; }
}

/* Hero (home) */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,24,36,.88) 0%, rgba(10,24,36,.7) 55%, rgba(10,24,36,.45) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-block: 112px 88px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { color: #fff; max-width: 820px; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 20px; line-height: 1.55; color: var(--on-navy); max-width: 600px; }
.hero .fine { font-size: 15px; color: var(--on-navy-muted); }
@media (max-width: 600px) { .hero .wrap { padding-block: 72px 56px; } .hero p { font-size: 18px; } }

/* Page hero (inner pages) */
.page-hero { background: var(--navy); color: #fff; }
.page-hero .wrap { padding-block: 64px 56px; display: flex; flex-direction: column; gap: 16px; }
.page-hero h1 { color: #fff; font-size: clamp(36px, 5vw, 60px); }
.page-hero p { color: var(--on-navy); font-size: 19px; max-width: 720px; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.subnav a { color: #fff; text-decoration: none; border: 1px solid var(--navy-line); padding: 8px 16px; font-size: 15px; font-weight: 600; }
.subnav a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.subnav a:hover { border-color: var(--gold); }

/* Stats band */
.stats { border-bottom: 1px solid var(--rule); }
.stats .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.stat { padding: 30px 24px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { font-family: var(--font-display); font-size: 38px; line-height: 1.05; color: var(--navy); font-weight: 700; }
.stat span { color: var(--muted-2); font-size: 15px; }
@media (max-width: 960px) { .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } .stat:first-child { border-top: 0; } }

/* Sections */
.section { padding-block: 88px; }
.section.tight { padding-block: 64px; }
.section.tint { background: var(--tint); }
.on-navy { background: var(--navy); color: var(--on-navy); }
.on-navy h2, .on-navy h3 { color: #fff; }
.on-navy a:not(.btn) { color: var(--gold); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; max-width: 760px; }
@media (max-width: 600px) { .section { padding-block: 60px; } .section.tight { padding-block: 48px; } }

.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.split > * { min-width: 0; }
.split .side { flex: 1 1 340px; display: flex; flex-direction: column; gap: 18px; }
.split .main { flex: 2 1 560px; }
.split.even > * { flex: 1 1 420px; }
.split.center { align-items: center; }

/* Row list (quantity & timing, programs) */
.rows { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 26px 0; border-top: 1px solid var(--rule); }
.row:first-child { border-top: 2px solid var(--navy); }
.row:last-child { border-bottom: 1px solid var(--rule); }
.row h3 { flex: 0 0 220px; font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.row p, .row div.body { flex: 1 1 320px; color: var(--muted); }
.on-navy .row { border-color: var(--navy-line); }
.on-navy .row:first-child { border-top-color: var(--gold); }
.on-navy .row p { color: var(--on-navy); }

/* Two-up product split */
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 32px; }
.panel { border: 1px solid var(--rule); display: flex; flex-direction: column; background: var(--paper); }
.panel img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.panel .body { padding: 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.panel ul { margin: 0; padding-left: 20px; color: var(--muted); }
.panel .more { margin-top: auto; font-weight: 600; }

.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px; border-left: 3px solid var(--gold-deep); border-bottom: 3px solid var(--gold-deep); transform: rotate(-45deg); }
.on-navy .ticks li::before { border-color: var(--gold); }

/* Product grid */
.items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0; border-top: 2px solid var(--navy); }
.item { padding: 26px 24px 28px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.item p { color: var(--muted); }
@media (min-width: 700px) { .items { column-gap: 40px; } }

/* Tables */
.table-scroll { overflow-x: auto; }
table.spec { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 16px; }
table.spec th, table.spec td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.spec thead th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--muted-2); border-bottom: 2px solid var(--navy); }
table.spec td:first-child { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* Steps (real sequences only) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 24px; }
.steps li { counter-increment: s; border-top: 2px solid var(--navy); padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(s); font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1; color: var(--gold-deep); }
.steps li b { color: var(--navy); }
.steps li span { color: var(--muted); font-size: 16px; }

/* Photos */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--muted-2); padding-top: 8px; }

/* Callout / note */
.note { border-left: 4px solid var(--gold); background: var(--tint); padding: 20px 24px; color: var(--ink); }
.note b { color: var(--navy); }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 56px; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); max-width: 640px; }
.cta-band p { color: var(--on-navy); margin-top: 8px; }

/* Case studies */
.case { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 40px; padding-block: 56px; border-top: 1px solid var(--rule); align-items: start; }
.case:first-of-type { border-top: 2px solid var(--navy); }
.case img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.case dl { margin: 0; display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px 20px; font-size: 16px; }
.case dt { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--muted-2); padding-top: 2px; }
.case dd { margin: 0; }
.case .text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* FAQ */
.faq { border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; color: var(--navy); font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 28px; font-weight: 400; color: var(--gold-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 760px; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.dl { border: 1px solid var(--rule); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.dl p { color: var(--muted); font-size: 16px; }
.dl .btn { align-self: flex-start; margin-top: auto; }

/* Forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 15px; color: var(--navy); }
.field label .opt { font-weight: 400; color: var(--muted-2); }
.field input, .field textarea, .field select {
  font: 16px/1.4 var(--font-body); color: var(--ink); background: #fff;
  border: 1px solid #B9C3CC; padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--navy); }
.field .hint { font-size: 14px; color: var(--muted-2); }
.form-error { color: var(--danger); font-weight: 600; font-size: 15px; }
.form-note { background: var(--tint); border-left: 4px solid var(--gold); padding: 14px 18px; font-size: 15px; }
.hp { position: absolute; left: -9999px; }
.form-card { border: 1px solid var(--rule); padding: 32px; background: #fff; }
@media (max-width: 600px) { .form-card { padding: 20px; } }

.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list .label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--muted-2); }
.contact-list .big { font-size: 22px; font-weight: 700; color: var(--navy); text-decoration: none; }

.dont { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.dont h3 { font-size: 18px; margin-bottom: 10px; }
.dont ul { margin: 0; padding-left: 20px; color: var(--muted); }

/* LinkedIn */
.social { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.social-feed:empty { display: none; }

/* Prose (privacy) */
.prose { max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 26px; margin-top: 24px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); font-size: 15px; }
.site-footer .wrap { padding-block: 56px 32px; display: flex; flex-direction: column; gap: 40px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 32px; }
.foot-grid h2 { font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--on-navy); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.foot-brand { display: flex; flex-direction: column; gap: 14px; }
.foot-brand img { width: 64px; }
.foot-brand .tag { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; letter-spacing: .02em; }
.foot-legal { border-top: 1px solid var(--navy-line); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.55; }

/* Industry cards */
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ind { border: 1px solid var(--rule); background: var(--paper); display: flex; flex-direction: column; }
.ind img { width: 100%; height: 230px; object-fit: cover; }
.ind .body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--gold); }
.ind p { color: var(--muted); margin: 0; }
.ind.wide { grid-column: span 2; }
@media (max-width: 960px) { .ind-grid { grid-template-columns: 1fr 1fr; } .ind.wide { grid-column: auto; } .ind.wide:first-child { grid-column: span 2; } .ind.wide:first-child img { height: 260px; } }
@media (max-width: 640px) { .ind-grid { grid-template-columns: 1fr; } .ind.wide { grid-column: auto; } .ind img, .ind.wide img { height: 210px; } }
