/* =========================================================
   KEYSTONE INDUSTRIAL COATINGS
   Hand-rolled CSS — industrial / editorial aesthetic
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea, button { font: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --c-ink:        #0d1117;   /* near-black, slightly cool */
  --c-graphite:   #1a1f29;
  --c-steel:      #2c333f;
  --c-iron:       #4a5260;
  --c-zinc:       #8a93a0;
  --c-fog:        #c9cdd3;
  --c-paper:      #f4f4f1;   /* warm off-white, like spec paper */
  --c-bone:       #ebebe5;
  --c-orange:     #ff5a1f;   /* safety orange, OSHA-adjacent */
  --c-orange-dk:  #d94a14;
  --c-orange-lt:  #ffe7dc;
  --c-line:       #2a3140;

  --f-display: "Archivo Black", "Helvetica Neue", Arial, sans-serif;
  --f-sans:    "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max:    1240px;
  --gutter: clamp(1rem, 3vw, 2rem);

  --shadow-sm: 0 1px 2px rgba(13,17,23,.06);
  --shadow-md: 0 8px 24px -8px rgba(13,17,23,.18);
  --shadow-lg: 0 24px 60px -20px rgba(13,17,23,.35);
}

body {
  font-family: var(--f-sans);
  font-size: 16px;
  color: var(--c-ink);
  background: var(--c-paper);
}

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; letter-spacing: 0; }
p  { color: var(--c-steel); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--c-steel); max-width: 60ch; }

.eyebrow {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-orange);
  font-weight: 600;
}
.eyebrow.on-dark { color: var(--c-orange); }
.eyebrow::before { content: "▍ "; color: var(--c-orange); margin-right: 4px; }

.kicker {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-zinc);
}

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--dark { background: var(--c-ink); color: var(--c-paper); }
.section--dark p { color: var(--c-fog); }
.section--bone { background: var(--c-bone); }
.section--paper { background: var(--c-paper); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--12 { grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 2rem); }

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.col-7 { grid-column: 1 / -1; }
.col-5 { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .col-7 { grid-column: span 7; }
  .col-5 { grid-column: span 5; }
}

/* ---------- Top utility bar ---------- */
.utility-bar {
  background: var(--c-ink);
  color: var(--c-fog);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem var(--gutter);
  text-align: center;
  border-bottom: 1px solid var(--c-line);
}
.utility-bar strong { color: var(--c-orange); font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-paper);
  border-bottom: 1px solid rgba(13,17,23,.08);
  backdrop-filter: saturate(120%) blur(6px);
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  font-family: var(--f-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  line-height: 1.05;
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-transform: uppercase;
}
.brand__mark {
  width: 28px; height: 28px;
  background: var(--c-orange);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.brand__mark::after {
  content: "";
  position: absolute; inset: 6px;
  border: 2px solid var(--c-ink);
}
.brand__name { color: var(--c-ink); }
.brand__tag  { color: var(--c-orange); }

.nav {
  display: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.nav a {
  padding: 0.4rem 0;
  margin: 0 0.85rem;
  color: var(--c-steel);
  position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--c-ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--c-orange);
}
@media (min-width: 900px) { .nav { display: block; } }

.header-cta { display: none; }
@media (min-width: 720px) { .header-cta { display: inline-flex; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.25rem;
  border-radius: 2px;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  text-transform: uppercase;
  border: 2px solid transparent;
}
.btn--orange { background: var(--c-orange); color: #fff; }
.btn--orange:hover { background: var(--c-orange-dk); transform: translateY(-1px); }
.btn--dark { background: var(--c-ink); color: #fff; }
.btn--dark:hover { background: var(--c-graphite); }
.btn--ghost { background: transparent; color: var(--c-paper); border-color: var(--c-fog); }
.btn--ghost:hover { background: var(--c-paper); color: var(--c-ink); }
.btn--lg { font-size: 1rem; padding: 1.1rem 1.6rem; }
.btn--full { width: 100%; justify-content: center; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  background: var(--c-ink);
  color: var(--c-paper);
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--c-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute; right: -6%; top: -6%;
  width: 36vw; height: 36vw; max-width: 540px; max-height: 540px;
  background: var(--c-orange);
  opacity: 0.10;
  filter: blur(60px);
  border-radius: 50%;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero h1 { color: var(--c-paper); }
.hero h1 .accent { color: var(--c-orange); }
.hero p { color: var(--c-fog); }

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem 1.5rem;
  padding-top: 1.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid var(--c-line);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.specs__item { color: var(--c-fog); display: flex; align-items: baseline; gap: 0.5rem; }
.specs__item::before { content: "[•]"; color: var(--c-orange); }

/* ---------- Lead Form ---------- */
.lead-card {
  background: var(--c-paper);
  color: var(--c-ink);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--c-orange);
  position: relative;
}
.lead-card::before {
  content: "FORM-01 / SPEC REQUEST";
  position: absolute; top: -10px; left: 16px;
  background: var(--c-orange);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  padding: 3px 8px;
  font-weight: 600;
}
.lead-card h2, .lead-card h3 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.lead-card .sub { font-size: 0.88rem; color: var(--c-iron); margin-bottom: 1.25rem; }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-steel);
  margin-bottom: 0.35rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--c-fog);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(255,90,31,.15);
}
.field--row { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 540px) { .field--row { grid-template-columns: 1fr 1fr; } }
.field--row .field { margin-bottom: 0; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- Cards / Service grid ---------- */
.card {
  background: var(--c-paper);
  border: 1px solid rgba(13,17,23,.08);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--c-orange); box-shadow: var(--shadow-md); }
.card__num {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--c-orange);
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.94rem; }
.card__list {
  list-style: none;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--c-iron);
}
.card__list li {
  padding: 0.4rem 0;
  border-top: 1px dashed rgba(13,17,23,.12);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.card__list li::before { content: "→ "; color: var(--c-orange); font-weight: 700; }
.card__cta {
  margin-top: auto;
  padding-top: 1.25rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ink);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-top: 1px solid rgba(13,17,23,.08);
}
.card__cta:hover { color: var(--c-orange); }
.card__cta .arrow { transition: transform .2s ease; display: inline-block; }
.card__cta:hover .arrow { transform: translateX(4px); }

/* ---------- Section heading block ---------- */
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .eyebrow { margin-bottom: 0.9rem; }
.section-head h2 { margin-bottom: 0.85rem; }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.stat {
  padding: 1.75rem 1.25rem;
  border-right: 1px solid var(--c-line);
}
.stat:last-child { border-right: none; }
.stat__num {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--c-orange);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat__label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-fog);
}

/* ---------- Process / numbered steps ---------- */
.process { counter-reset: step; }
.process__step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(13,17,23,.12);
}
.process__step:last-child { border-bottom: 1px solid rgba(13,17,23,.12); }
.process__num {
  counter-increment: step;
  font-family: var(--f-display);
  font-size: 2.25rem;
  color: var(--c-orange);
  line-height: 1;
}
.process__num::before { content: counter(step, decimal-leading-zero); }
.process__body h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.process__body p { font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--c-orange);
  color: var(--c-ink);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.cta-band__inner {
  display: flex; flex-direction: column; gap: 1.5rem;
  align-items: flex-start;
}
@media (min-width: 760px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cta-band p { color: rgba(13,17,23,.8); margin-top: 0.4rem; }
.cta-band .btn--dark { flex-shrink: 0; }

/* ---------- Mini lead form (service pages) ---------- */
.mini-form {
  background: var(--c-graphite);
  color: var(--c-paper);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: 4px;
  border-left: 4px solid var(--c-orange);
}
.mini-form h3 { color: var(--c-paper); margin-bottom: 0.5rem; }
.mini-form p { color: var(--c-fog); font-size: 0.9rem; margin-bottom: 1.25rem; }
.mini-form label { color: var(--c-fog); }
.mini-form input, .mini-form select, .mini-form textarea {
  background: var(--c-steel);
  border-color: var(--c-iron);
  color: var(--c-paper);
}
.mini-form input::placeholder, .mini-form textarea::placeholder { color: var(--c-zinc); }
.mini-form input:focus, .mini-form select:focus, .mini-form textarea:focus {
  border-color: var(--c-orange);
  box-shadow: 0 0 0 3px rgba(255,90,31,.2);
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--c-ink);
  color: var(--c-paper);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--c-orange);
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 28px, rgba(255,90,31,0.04) 28px 56px);
}
.page-hero__inner { position: relative; z-index: 1; }
.page-hero h1 { color: var(--c-paper); max-width: 18ch; }
.page-hero p  { color: var(--c-fog); max-width: 60ch; margin-top: 1rem; }
.breadcrumb {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-zinc);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--c-fog); }
.breadcrumb a:hover { color: var(--c-orange); }
.breadcrumb__sep { margin: 0 0.5rem; color: var(--c-iron); }

/* ---------- Spec table ---------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-mono);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(13,17,23,.12);
}
.spec-table th {
  background: var(--c-ink);
  color: var(--c-paper);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.spec-table tr:nth-child(even) td { background: rgba(13,17,23,.03); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-ink);
  color: var(--c-fog);
  padding: clamp(3rem, 5vw, 4.5rem) 0 2rem;
  border-top: 1px solid var(--c-line);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.site-footer h4 {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-paper);
  margin-bottom: 1rem;
  font-weight: 600;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.55rem; font-size: 0.92rem; }
.site-footer a:hover { color: var(--c-orange); }
.site-footer__brand {
  font-family: var(--f-display);
  color: var(--c-paper);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.site-footer__brand span { color: var(--c-orange); }
.site-footer__legal {
  border-top: 1px solid var(--c-line);
  padding-top: 1.5rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--c-iron);
}
@media (min-width: 720px) {
  .site-footer__legal { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Mobile sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-orange);
  color: #fff;
  padding: 0.9rem var(--gutter);
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  z-index: 60;
  box-shadow: 0 -4px 16px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.sticky-cta:hover { background: var(--c-orange-dk); }
@media (min-width: 720px) { .sticky-cta { display: none; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid rgba(13,17,23,.12); }
.faq details {
  border-bottom: 1px solid rgba(13,17,23,.12);
  padding: 1.25rem 0;
}
.faq summary {
  cursor: pointer;
  font-family: var(--f-display);
  font-size: 1.05rem;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--f-mono);
  font-size: 1.4rem;
  color: var(--c-orange);
  transition: transform .25s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 0.85rem; max-width: 70ch; }

/* ---------- Region / location list ---------- */
.region-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.region-list span {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--c-fog);
  padding: 0.5rem 0.75rem;
  background: var(--c-graphite);
  border-left: 2px solid var(--c-orange);
}

/* ---------- Reveal animation removed: was a JS-dependent progressive
   enhancement that created more bugs than value. Static load only. ---------- */

/* ---------- Form success ---------- */
.thanks {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  max-width: 640px;
  margin: 0 auto;
}
.thanks .mark {
  width: 64px; height: 64px;
  background: var(--c-orange);
  margin: 0 auto 1.5rem;
  display: grid; place-items: center;
  color: #fff;
  font-size: 2rem;
}
