/*
 * Fastener Custom Manufacturing — precision industrial layout.
 *
 * The rules stay under .fcm-* so the theme's header/footer and the rest of the
 * site are not affected. Copy and functionality remain in the PHP classes;
 * this file controls presentation only.
 */

.fcm-page {
  --fcm-navy: #0b192c;
  --fcm-navy-deep: #060e18;
  --fcm-amber: #d97706;
  --fcm-amber-dark: #a85d05;
  --fcm-ink: #0b192c;
  --fcm-copy: #475569;
  --fcm-muted: #64748b;
  --fcm-canvas: #f8fafc;
  --fcm-card: #ffffff;
  --fcm-line: #e2e8f0;
  --fcm-line-strong: #cbd5e1;
  background: var(--fcm-canvas);
  color: var(--fcm-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  isolation: isolate;
}

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

.fcm-container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

/* Application-guide style image hero. */
.fcm-hero {
  position: relative;
  display: flex;
  min-height: clamp(380px, 43vw, 560px);
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background-color: var(--fcm-navy-deep);
  background-position: center;
  background-size: cover;
}

.fcm-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 14, 24, .94) 0%, rgba(6, 14, 24, .78) 42%, rgba(6, 14, 24, .38) 100%),
    linear-gradient(0deg, rgba(6, 14, 24, .84) 0%, rgba(6, 14, 24, .08) 70%);
}

.fcm-hero-inner {
  position: relative;
  z-index: 1;
  padding: 44px 0 64px;
}

.fcm-hero-crumbs {
  margin: 0 0 34px;
  color: rgba(226, 232, 240, .78);
}

.fcm-hero-crumbs a {
  color: rgba(226, 232, 240, .82);
}

.fcm-hero-crumbs a:hover,
.fcm-hero-crumbs span {
  color: #fff;
}

.fcm-hero-crumbs i {
  font-style: normal;
  color: rgba(203, 213, 225, .55);
}

.fcm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: #fdbb3e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fcm-eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fcm-amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, .18);
  content: "";
}

.fcm-hero h1 {
  max-width: 920px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(38px, 5.3vw, 72px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.fcm-hero-sub {
  max-width: 820px;
  margin: 0;
  color: rgba(241, 245, 249, .9);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.65;
}

.fcm-content-shell {
  padding-top: 64px;
  padding-bottom: 96px;
}

.fcm-body {
  max-width: none;
}

.fcm-body > p,
.fcm-body > h2,
.fcm-body > h3,
.fcm-body > ul,
.fcm-body > .fcm-terms,
.fcm-body > .fcm-prods,
.fcm-body > .fcm-grid,
.fcm-body > div:not(.fcm-terms):not(.fcm-prods):not(.fcm-grid) {
  max-width: 980px;
}

.fcm-body > h2 {
  position: relative;
  margin: 64px 0 18px;
  padding-top: 19px;
  border-top: 1px solid var(--fcm-line);
  color: var(--fcm-ink);
  font-size: clamp(25px, 2.6vw, 36px);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.2;
  text-wrap: balance;
}

.fcm-body > h2::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 54px;
  height: 3px;
  background: var(--fcm-amber);
  content: "";
}

.fcm-body > h3,
.fcm-body .fcm-prods h3 {
  margin: 38px 0 14px;
  color: var(--fcm-ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.35;
}

.fcm-body p {
  margin: 0 0 16px;
  color: var(--fcm-copy);
  font-size: 16px;
  line-height: 1.75;
}

.fcm-body .fcm-lead {
  max-width: 860px;
  color: var(--fcm-copy);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.65;
}

.fcm-muted {
  color: var(--fcm-muted);
  font-size: 13px;
}

/* Process/category cards. */
.fcm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}

.fcm-card {
  position: relative;
  display: flex;
  min-height: 166px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 22px 19px;
  overflow: hidden;
  border: 1px solid var(--fcm-line);
  border-radius: 3px;
  background: var(--fcm-card);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(11, 25, 44, .04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.fcm-card::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: var(--fcm-amber);
  content: "→";
  font-size: 20px;
  opacity: .85;
  transition: transform .18s ease;
}

.fcm-card:hover {
  border-color: var(--fcm-amber);
  box-shadow: 0 8px 22px rgba(11, 25, 44, .1);
  transform: translateY(-2px);
}

.fcm-card:hover::after {
  transform: translateX(4px);
}

.fcm-card h3 {
  margin: 0 0 7px;
  color: var(--fcm-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.fcm-card p {
  max-width: 32ch;
  margin: 0;
  color: var(--fcm-copy);
  font-size: 14px;
  line-height: 1.55;
}

.fcm-aka {
  display: block;
  margin: 0 0 8px;
  color: var(--fcm-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Lists become compact technical modules rather than long text columns. */
.fcm-ticks,
.fcm-crosses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
}

.fcm-ticks li,
.fcm-crosses li {
  position: relative;
  min-height: 54px;
  padding: 15px 16px 15px 43px;
  border: 1px solid var(--fcm-line);
  border-radius: 3px;
  background: var(--fcm-card);
  color: var(--fcm-copy);
  font-size: 15px;
  line-height: 1.55;
}

.fcm-ticks li::before,
.fcm-crosses li::before {
  position: absolute;
  top: 15px;
  left: 16px;
  font-weight: 800;
}

.fcm-ticks li::before {
  color: var(--fcm-amber);
  content: "✓";
}

.fcm-crosses li::before {
  color: #a33b3b;
  content: "×";
  font-size: 19px;
  line-height: 1;
}

.fcm-ticks strong,
.fcm-crosses strong {
  color: var(--fcm-ink);
}

.fcm-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0 18px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.fcm-cols li {
  padding: 13px 28px 13px 0;
  border-bottom: 1px solid var(--fcm-line);
  color: var(--fcm-copy);
  font-size: 15px;
  line-height: 1.55;
}

.fcm-cols a {
  color: var(--fcm-ink);
  font-weight: 650;
  text-decoration: none;
}

.fcm-cols a:hover {
  color: var(--fcm-amber-dark);
}

.fcm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.fcm-pills li {
  padding: 8px 11px;
  border: 1px solid var(--fcm-line);
  border-radius: 2px;
  background: #f1f5f9;
  color: var(--fcm-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.fcm-prods {
  margin: 0 0 12px;
}

/* Shared order terms panel. */
.fcm-terms {
  max-width: 980px;
  margin: 42px 0 0;
  padding: 24px 26px;
  border: 1px solid var(--fcm-line);
  border-left: 4px solid var(--fcm-amber);
  border-radius: 3px;
  background: var(--fcm-card);
  box-shadow: 0 1px 3px rgba(11, 25, 44, .04);
}

.fcm-terms h2 {
  margin: 0 0 18px;
  color: var(--fcm-ink);
  font-size: 23px;
  letter-spacing: -.025em;
}

.fcm-terms dl {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr;
  gap: 11px 22px;
  margin: 0;
}

.fcm-terms dt {
  color: var(--fcm-ink);
  font-size: 14px;
  font-weight: 750;
}

.fcm-terms dd {
  margin: 0;
  color: var(--fcm-copy);
  font-size: 14px;
  line-height: 1.6;
}

/* FAQ and RFQ are deliberately quiet white cards after the denser body. */
.fcm-faq {
  max-width: 980px;
  margin: 72px 0 0;
  padding: 30px 32px;
  border: 1px solid var(--fcm-line);
  background: var(--fcm-card);
  box-shadow: 0 1px 3px rgba(11, 25, 44, .04);
}

.fcm-faq h2,
.fcm-rfq h2 {
  margin: 0 0 20px;
  color: var(--fcm-ink);
  font-size: 28px;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.fcm-faq details {
  padding: 16px 0;
  border-top: 1px solid var(--fcm-line);
}

.fcm-faq summary {
  cursor: pointer;
  padding-right: 24px;
  color: var(--fcm-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.fcm-faq summary::marker {
  color: var(--fcm-amber);
}

.fcm-faq p {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--fcm-copy);
  font-size: 15px;
  line-height: 1.7;
}

.fcm-rfq {
  max-width: 980px;
  margin: 32px 0 0;
  padding: 32px;
  border: 1px solid var(--fcm-line);
  border-top: 4px solid var(--fcm-navy);
  border-radius: 3px;
  background: var(--fcm-card);
  box-shadow: 0 1px 3px rgba(11, 25, 44, .04);
}

.fcm-rfq > p {
  max-width: 720px;
  margin: -6px 0 26px;
  color: var(--fcm-copy);
}

.fcm-rfq form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.fcm-rfq .fcm-field {
  min-width: 0;
  margin: 0 0 18px;
}

.fcm-rfq .fcm-field:first-of-type,
.fcm-rfq .fcm-field:last-of-type,
.fcm-rfq .fcm-submit {
  grid-column: 1 / -1;
}

.fcm-field label {
  display: block;
  margin: 0 0 7px;
  color: var(--fcm-ink);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .01em;
}

.fcm-field input[type="text"],
.fcm-field input[type="email"],
.fcm-field textarea,
.fcm-field input[type="file"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--fcm-line-strong);
  border-radius: 2px;
  background: #fff;
  color: var(--fcm-ink);
  font: inherit;
  font-size: 15px;
}

.fcm-field textarea {
  min-height: 112px;
  resize: vertical;
}

.fcm-field input:focus,
.fcm-field textarea:focus {
  outline: 2px solid var(--fcm-navy);
  outline-offset: 1px;
}

.fcm-why {
  display: block;
  margin-top: 6px;
  color: var(--fcm-muted);
  font-size: 12px;
  line-height: 1.5;
}

.fcm-req {
  color: #a33b3b;
}

.fcm-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fcm-captcha {
  grid-column: 1 / -1;
  margin: 2px 0 18px;
  padding-top: 2px;
}

.fcm-captcha > label {
  display: block;
  margin: 0 0 7px;
  color: var(--fcm-ink);
  font-size: 13px;
  font-weight: 750;
}

.fcm-captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fcm-captcha-row img {
  display: block;
  width: 136px;
  height: 46px;
  border: 1px solid var(--fcm-line-strong);
  border-radius: 4px;
  background: #f8fafc;
}

.fcm-captcha-row input {
  width: 150px;
  padding: 11px 13px;
  border: 1px solid var(--fcm-line-strong);
  border-radius: 2px;
  background: #fff;
  color: var(--fcm-ink);
  font: inherit;
  font-size: 15px;
}

.fcm-captcha-row input:focus {
  outline: 2px solid var(--fcm-navy);
  outline-offset: 1px;
}

.fcm-submit {
  justify-self: start;
  padding: 13px 24px;
  border: 0;
  border-radius: 2px;
  background: var(--fcm-amber);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: background .18s ease, transform .18s ease;
}

.fcm-submit:hover {
  background: var(--fcm-amber-dark);
  transform: translateY(-1px);
}

.fcm-sent {
  margin: 0 0 26px;
  padding: 15px 18px;
  border: 1px solid #9dc5a0;
  border-left: 4px solid #2f7d32;
  background: #f0f8f0;
  color: #205b24;
  font-size: 15px;
  line-height: 1.55;
}

.fcm-sent-err {
  border-color: #d6a1a1;
  border-left-color: #a33b3b;
  background: #fff4f4;
  color: #7c2c2c;
}

/* The same note is appended to catalog/guide/application pages. */
.fcm-note {
  margin: 40px 0 0;
  padding: 22px 24px;
  border: 1px solid var(--fcm-line, #e2e8f0);
  border-left: 4px solid var(--fcm-amber, #d97706);
  border-radius: 3px;
  background: var(--fcm-card, #fff);
}

.fcm-note h3 {
  margin: 0 0 8px;
  color: var(--fcm-ink, #0b192c);
  font-size: 19px;
}

.fcm-note p {
  margin: 0 0 9px;
  color: var(--fcm-copy, #475569);
  font-size: 15px;
  line-height: 1.65;
}

.fcm-note-cta {
  color: var(--fcm-ink, #0b192c);
  font-weight: 750;
  text-decoration: none;
}

.fcm-note-cta:hover {
  color: var(--fcm-amber-dark, #a85d05);
}

@media (max-width: 780px) {
  .fcm-container {
    width: min(100% - 32px, 1280px);
  }

  .fcm-hero {
    min-height: 460px;
  }

  .fcm-hero-inner {
    padding: 36px 0 48px;
  }

  .fcm-hero-crumbs {
    margin-bottom: 28px;
  }

  .fcm-content-shell {
    padding-top: 44px;
    padding-bottom: 64px;
  }

  .fcm-body > h2 {
    margin-top: 48px;
  }

  .fcm-ticks,
  .fcm-crosses,
  .fcm-rfq form {
    grid-template-columns: 1fr;
  }

  .fcm-rfq .fcm-field:first-of-type,
  .fcm-rfq .fcm-field:last-of-type,
  .fcm-rfq .fcm-submit {
    grid-column: auto;
  }

  .fcm-faq,
  .fcm-rfq {
    padding: 24px 20px;
  }
}

@media (max-width: 560px) {
  .fcm-hero h1 {
    font-size: 38px;
  }

  .fcm-hero-sub {
    font-size: 17px;
  }

  .fcm-terms dl {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .fcm-terms dt {
    margin-top: 10px;
  }

  .fcm-card {
    min-height: 142px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fcm-card,
  .fcm-card::after,
  .fcm-submit {
    transition: none;
  }
}

/*
 * Site-grid alignment and shared masthead integration.
 * When the active theme exposes ehw_page_header(), the PHP template uses that
 * component so custom pages have the same shorter hero as catalog/application
 * pages. These rules align the content plate to the same 1440px grid.
 */
.fcm-page {
  width: 100%;
  max-width: 1440px;
  margin-right: auto;
  margin-left: auto;
  padding: 0 40px 96px;
}

.ehw-phead + .fcm-page {
  padding-top: 40px;
}

.fcm-content-shell {
  width: 100%;
  max-width: none;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
}

.fcm-body {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

.fcm-body > p,
.fcm-body > h2,
.fcm-body > h3,
.fcm-body > ul,
.fcm-body > .fcm-terms,
.fcm-body > .fcm-prods,
.fcm-body > .fcm-grid,
.fcm-body > div:not(.fcm-terms):not(.fcm-prods):not(.fcm-grid) {
  max-width: 1040px;
  margin-right: auto;
  margin-left: auto;
}

.fcm-terms,
.fcm-faq,
.fcm-rfq,
.fcm-sent {
  max-width: 1120px;
  margin-right: auto;
  margin-left: auto;
}

/* Short fallback for themes that do not provide ehw_page_header(). */
.fcm-hero {
  min-height: 0;
  padding: clamp(32px, 3.5vw, 48px) 0;
}

.fcm-hero-inner {
  padding: 0;
}

.fcm-hero h1 {
  max-width: 840px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -.02em;
}

/* The two dl blocks read as numbered technical list cards. */
.fcm-needs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px auto 26px;
  padding: 0;
  counter-reset: fcm-need;
}

.fcm-need-item {
  position: relative;
  min-height: 116px;
  padding: 18px 20px 17px 53px;
  border: 1px solid var(--fcm-line);
  border-radius: 3px;
  background: var(--fcm-card);
  box-shadow: 0 1px 3px rgba(11, 25, 44, .04);
  counter-increment: fcm-need;
}

.fcm-need-item::before {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--fcm-navy);
  color: #fff;
  content: counter(fcm-need, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}

.fcm-need-item dt {
  margin: 0 0 6px;
  color: var(--fcm-ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}

.fcm-need-item dd {
  margin: 0;
  color: var(--fcm-copy);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 780px) {
  .fcm-page {
    padding-right: 16px;
    padding-left: 16px;
  }

  .ehw-phead + .fcm-page {
    padding-top: 32px;
  }

  .fcm-needs {
    grid-template-columns: 1fr;
  }
}
