/* Page-specific styles. Global brand colors, shared header and footer use styles.css. */
.fabrication-machining-page { --fm-border: rgba(16, 43, 67, .14); }
.fabrication-machining-page .primary-navigation a[aria-current="page"] { color: var(--orange); }
.fabrication-machining-page .primary-navigation a[aria-current="page"]::after { display: block; width: 26px; height: 2px; margin-top: 2px; background: var(--orange); content: ""; }

.fm-hero { position: relative; display: flex; min-height: 420px; align-items: center; overflow: hidden; color: var(--white); background: var(--navy-deep); }
.fm-hero::after { position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(7,24,39,.94), rgba(7,24,39,.66) 68%, rgba(7,24,39,.42)); content: ""; }
.fm-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.fm-hero-content { position: relative; z-index: 1; padding-block: 58px; }
.fm-breadcrumb { display: flex; align-items: center; gap: 12px; margin-bottom: 38px; color: rgba(255,255,255,.7); font-size: 12px; }
.fm-breadcrumb a:hover, .fm-breadcrumb [aria-current="page"] { color: var(--white); }
.fm-hero h1 { max-width: 820px; margin: 0; font-size: clamp(48px, 7vw, 82px); font-weight: 600; letter-spacing: -.055em; line-height: .98; }
.fm-hero-intro { max-width: 600px; margin: 24px 0 0; color: rgba(255,255,255,.8); font-size: clamp(16px, 2vw, 19px); }

.fm-section { padding-block: 98px; }
.fm-overview { background: var(--paper); }
.fm-overview-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 90px; }
.fm-section-heading h2, .fm-section-intro h2, .machining-content h2 { max-width: 600px; margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 600; letter-spacing: -.045em; line-height: 1.08; }
.eyebrow-dark { color: var(--orange); }
.fm-copy { padding-top: 5px; }
.fm-copy p { margin: 0 0 18px; color: #515b62; font-size: 16px; line-height: 1.8; }
.fm-copy p:last-child { margin-bottom: 0; }

.fm-products { color: var(--white); background: var(--navy); }
.fm-section-intro { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 42px; }
.fm-section-intro h2 { max-width: 650px; }
.fm-section-intro > p { max-width: 370px; margin: 0 0 7px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.fm-products .fm-section-intro > p { color: rgba(255,255,255,.68); }
.fm-image-feature { position: relative; height: 270px; margin: 0 0 22px; overflow: hidden; background: #354b58; }
.fm-image-feature img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; transition: transform .45s ease; }
.fm-image-feature:hover img { transform: scale(1.025); }
.fm-image-feature figcaption, .electrical-photo figcaption, .machining-photo figcaption, .turning-visual figcaption { position: absolute; right: 0; bottom: 0; padding: 8px 12px; color: var(--white); background: rgba(10,31,50,.82); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.fm-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fm-product-card { min-width: 0; min-height: 240px; padding: 20px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.035); transition: transform .22s ease, background .22s ease, border-color .22s ease; }
.fm-product-card:hover { transform: translateY(-4px); border-color: rgba(230,109,50,.65); background: rgba(255,255,255,.075); }
.product-visual { display: grid; width: 66px; height: 62px; place-items: center; margin-bottom: 19px; background: rgba(255,255,255,.08); }
.product-visual svg { width: 58px; height: 48px; fill: none; stroke: rgba(255,255,255,.82); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.product-visual svg .accent { stroke: #f0925e; }
.fm-product-card h3 { margin: 0 0 9px; font-size: 17px; font-weight: 600; line-height: 1.3; }
.fm-product-card p { margin: 0; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.65; }

.fm-electrical { background: #e9e8e2; }
.electrical-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 24px; align-items: stretch; }
.electrical-photo, .machining-photo { position: relative; min-height: 430px; margin: 0; overflow: hidden; background: #465b67; }
.electrical-photo img, .machining-photo img { display: block; width: 100%; height: 100%; min-height: inherit; object-fit: cover; object-position: center; transition: transform .45s ease; }
.electrical-photo:hover img, .machining-photo:hover img { transform: scale(1.025); }
.electrical-products { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--fm-border); border-left: 1px solid var(--fm-border); }
.electrical-products article { position: relative; min-height: 140px; padding: 18px 20px; border-right: 1px solid var(--fm-border); border-bottom: 1px solid var(--fm-border); background: rgba(255,255,255,.36); transition: background .2s ease; }
.electrical-products article:hover { background: var(--white); }
.electrical-index { color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.electrical-products h3 { max-width: 230px; margin: 24px 0 0; color: var(--navy); font-size: 16px; font-weight: 600; line-height: 1.3; }

.fm-machining { background: var(--paper); }
.machining-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 76px; }
.machining-visuals { display: grid; min-height: 490px; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.machining-photo, .turning-visual { position: relative; min-height: 490px; margin: 0; overflow: hidden; background: #465b67; }
.machining-photo img { object-position: center; }
.turning-visual { display: grid; place-items: center; background: linear-gradient(145deg, #153650, #0a1f32); }
.turning-visual::before { position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.12); content: ""; }
.turning-visual svg { position: relative; width: 100%; max-width: 250px; padding: 12px; }
.machining-content > p:not(.eyebrow) { margin: 20px 0; color: #515b62; font-size: 15px; line-height: 1.75; }
.machining-list { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--fm-border); list-style: none; }
.machining-list li { position: relative; padding: 11px 10px 11px 23px; border-bottom: 1px solid var(--fm-border); color: #414c53; font-size: 13px; line-height: 1.5; }
.machining-list li::before { position: absolute; top: 18px; left: 2px; width: 7px; height: 2px; background: var(--orange); content: ""; }

.fm-materials { color: var(--white); background: var(--navy-deep); }
.fm-materials .fm-section-intro > p { color: rgba(255,255,255,.65); }
.material-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.material-grid article { position: relative; min-height: 205px; overflow: hidden; padding: 18px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); }
.material-grid article > span { color: #f0925e; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.material-grid h3 { position: relative; z-index: 1; margin: 20px 0 0; font-size: 17px; font-weight: 500; line-height: 1.35; }
.material-grid h3 small { display: block; margin-top: 3px; color: #f0925e; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.material-lines { position: absolute; right: -20px; bottom: -18px; width: 125px; height: 100px; transform: rotate(-24deg); opacity: .62; }
.material-lines::before, .material-lines::after { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.35); content: ""; }
.material-lines::after { inset: 10px 0; border-right: 0; border-left: 0; }
.material-lines--ms { background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(230,109,50,.72) 10px 11px); }
.material-lines--ss { background: repeating-linear-gradient(0deg, transparent 0 12px, rgba(255,255,255,.55) 13px 14px); }
.material-lines--ss316 { background: repeating-linear-gradient(90deg, transparent 0 12px, rgba(255,255,255,.44) 13px 14px); }
.material-lines--al { background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(230,109,50,.5) 8px 9px); }
.material-other { display: flex; flex-direction: column; justify-content: space-between; }
.material-other h3 { margin: auto 0 7px; }
.material-other p { margin: 0; color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.55; }

.fm-process { background: #e9e8e2; }
.fm-process .fm-section-intro > p { max-width: 450px; color: #515b62; }
.process-steps { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: process; }
.process-steps li { position: relative; min-height: 160px; padding: 22px 20px 20px 0; border-top: 2px solid var(--navy); }
.process-steps li:not(:last-child)::after { position: absolute; top: -6px; right: 16px; width: 10px; height: 10px; border-top: 2px solid var(--orange); border-right: 2px solid var(--orange); content: ""; transform: rotate(45deg); }
.process-steps li span { color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.process-steps li h3 { max-width: 190px; margin: 20px 15px 0 0; color: var(--navy); font-size: 16px; font-weight: 600; line-height: 1.4; }
.process-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; }

.fm-enquiry { padding-block: 76px; color: var(--white); background: var(--orange); }
.enquiry-inner { display: flex; justify-content: space-between; align-items: end; gap: 52px; }
.fm-enquiry .eyebrow { color: rgba(255,255,255,.8); }
.fm-enquiry h2 { max-width: 690px; margin: 0; font-size: clamp(36px, 4.5vw, 58px); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
.fm-enquiry .enquiry-inner > div:first-child > p:last-child { max-width: 520px; margin: 20px 0 0; color: rgba(255,255,255,.88); }
.enquiry-actions { display: grid; min-width: 275px; justify-items: stretch; gap: 12px; }
.enquiry-actions .button { justify-content: space-between; }
.enquiry-actions .button-primary { color: var(--navy-deep); background: var(--white); }
.enquiry-actions .button-primary:hover { background: #f3f1ea; }
.enquiry-actions .button-outline { border-color: rgba(255,255,255,.75); }
.enquiry-contact-link { color: rgba(255,255,255,.92); font-size: 12px; }
.enquiry-contact-link:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 950px) {
  .fm-section { padding-block: 78px; }
  .fm-overview-grid { grid-template-columns: 1fr 1fr; gap: 42px; }
  .fm-product-grid { grid-template-columns: repeat(2, 1fr); }
  .electrical-layout { grid-template-columns: 1fr; }
  .electrical-photo { min-height: 300px; }
  .electrical-products { grid-template-columns: repeat(3, 1fr); }
  .machining-layout { gap: 40px; }
  .machining-visuals { min-height: 430px; }
  .machining-photo, .turning-visual { min-height: 430px; }
  .material-grid { grid-template-columns: repeat(3, 1fr); }
  .process-steps { grid-template-columns: repeat(3, 1fr); gap: 20px 12px; }
  .process-steps li { min-height: 140px; }
  .process-steps li:nth-child(3)::after { display: none; }
  .enquiry-inner { align-items: flex-start; flex-direction: column; gap: 30px; }
  .enquiry-actions { width: min(100%, 450px); grid-template-columns: 1fr 1fr; }
  .enquiry-contact-link { grid-column: span 2; }
}

@media (max-width: 700px) {
  .fm-hero { min-height: 380px; }
  .fm-hero-content { padding-block: 44px; }
  .fm-breadcrumb { margin-bottom: 30px; }
  .fm-overview-grid { grid-template-columns: 1fr; gap: 24px; }
  .fm-section-intro { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 30px; }
  .fm-image-feature { height: 220px; }
  .machining-layout { grid-template-columns: 1fr; gap: 34px; }
  .machining-visuals { min-height: 320px; }
  .machining-photo, .turning-visual { min-height: 320px; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-steps li:nth-child(3)::after { display: block; }
  .process-steps li:nth-child(2n)::after { display: none; }
}

@media (max-width: 520px) {
  .fm-hero { min-height: 350px; }
  .fm-hero h1 { font-size: clamp(42px, 12vw, 58px); }
  .fm-section { padding-block: 62px; }
  .fm-product-grid { grid-template-columns: 1fr; }
  .fm-product-card { min-height: 205px; }
  .electrical-photo { min-height: 240px; }
  .electrical-products { grid-template-columns: 1fr 1fr; }
  .electrical-products article { min-height: 130px; padding: 15px; }
  .electrical-products h3 { margin-top: 18px; font-size: 14px; }
  .machining-visuals { min-height: 0; grid-template-columns: 1fr; }
  .machining-photo, .turning-visual { min-height: 250px; }
  .material-grid { grid-template-columns: 1fr 1fr; }
  .material-grid article { min-height: 170px; }
  .process-steps { grid-template-columns: 1fr; gap: 0; }
  .process-steps li { min-height: 115px; padding-block: 16px; }
  .process-steps li:not(:last-child)::after, .process-steps li:nth-child(3)::after { display: block; top: auto; right: 10px; bottom: 14px; transform: rotate(135deg); }
  .process-steps li:nth-child(2n)::after { display: block; }
  .enquiry-actions { grid-template-columns: 1fr; }
  .enquiry-actions .enquiry-contact-link { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .fm-image-feature img, .electrical-photo img, .machining-photo img, .fm-product-card { transition: none; }
}
