/* GradeMetrix additions on top of the shared Hemisphere design system (site.css).
   Same tokens, same grid. New pieces: machine cards, brochure band, gallery and lightbox,
   video library, hardware cards, legal pages. */

/* ---------- Brand ---------- */
/* The only logo file available today is a full-color PNG made for light backgrounds.
   On the navy header and footer it is shown in white until Hemisphere supplies SVG logos. */
.brand--gm img, .gm-logo-light { filter: brightness(0) invert(1); }
.brand--gm img { height: 32px; }
.foot-brand .gm-logo-light { height: 36px; width: auto; margin-bottom: 20px; }

/* ---------- Special offer bar ---------- */
.announce { background: var(--orange); color: var(--navy-950); }
.announce a, .announce a:hover { color: var(--navy-950); font-weight: 500; }
.announce .tag { color: var(--navy-950); opacity: .7; }
.announce a { text-wrap: balance; }
.announce .announce-cta { white-space: nowrap; flex: none; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; border: 1px solid rgba(5, 10, 36, .45); border-radius: 999px; padding: 3px 12px; }
.announce .dot { background: var(--navy-950); color: #fff; }
.announce a:hover .announce-cta { background: var(--navy-950); color: #fff; border-color: var(--navy-950); }

/* ---------- Home hero with background video ---------- */
.hero--gm .hero-media { opacity: .5; }
.hero-video { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; }
.hero-video.is-ready { opacity: .6; }
.hero-video iframe { position: absolute; top: 50%; left: 50%; width: max(100%, 177.78vh); height: max(100%, 56.25vw); transform: translate(-50%, -50%); border: 0; }
.hero--gm .display { max-width: none; }
.hero--gm .hero-content { max-width: 1000px; }

/* Hero "Watch the video" button: opens the explainer with sound in the pop-up player. */
.hero-play { display: inline-flex; align-items: center; gap: 16px; margin-top: 28px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; text-align: left; }
.hero-play .ring { position: relative; width: 60px; height: 60px; border-radius: 50%; background: var(--orange); color: var(--navy-950); display: grid; place-items: center; flex: none; transition: transform .2s var(--ease), background .2s; }
.hero-play .ring::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(245, 128, 37, .55); animation: heroPulse 2.4s var(--ease) infinite; }
.hero-play .ring .icon { width: 24px; height: 24px; margin-left: 3px; }
.hero-play .txt { display: grid; gap: 2px; }
.hero-play strong { font-weight: 500; font-size: 17px; }
.hero-play .txt span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: #9AA3BE; }
.hero-play:hover .ring { transform: scale(1.06); background: #fff; }
.hero-play:hover strong { color: var(--orange); }
@keyframes heroPulse { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-play .ring::after { animation: none; } }

/* ---------- Page hero with a product photo ---------- */
.page-hero--media .frame { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; }
.page-hero--media .page-hero-content { max-width: none; }
.page-hero--media h1 { font-size: clamp(2.1rem, 3.7vw, 3.5rem); }
.page-hero-figure { position: relative; z-index: 2; padding: clamp(24px, 4vw, 48px) var(--pad) clamp(24px, 4vw, 48px) 0; }
.page-hero-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }

/* ---------- Machine and solution cards ---------- */
.machine-card { display: flex; flex-direction: column; background: var(--bg); text-decoration: none; color: var(--ink); position: relative; }
.machine-card .media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-mist); }
.machine-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.machine-card:hover .media img { transform: scale(1.05); }
.machine-card .body { display: flex; flex-direction: column; gap: 10px; padding: 28px 30px 30px; flex: 1; position: relative; }
.machine-card .body > .icon { width: 40px; height: 40px; color: var(--navy-700); }
.machine-card .num { position: absolute; top: 30px; right: 30px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.machine-card h3 { font-weight: 400; font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: -.02em; margin: 6px 0 0; }
.machine-card p { color: var(--muted); margin: 0; text-wrap: balance; }
.machine-card .tagline { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-600); margin-top: auto; padding-top: 10px; }
.machine-card .link-arrow { align-self: flex-start; }
.machine-card:hover { color: var(--ink); }
.machine-card:hover h3 { color: var(--navy-700); }

/* ---------- Brochure band ---------- */
.brochure-band { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: clamp(20px, 3vw, 44px); align-items: center; padding: clamp(28px, 4vw, 44px) var(--pad); }
.brochure-band .cover { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 40px -24px rgba(10, 20, 64, .6); background: var(--bg-mist); }
.brochure-band .cover img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; transition: transform .6s var(--ease); }
.brochure-band .cover:hover img { transform: scale(1.04); }
.brochure-band .cover--icon { aspect-ratio: 3 / 4; display: grid; place-items: center; color: var(--navy-700); }
.brochure-band .muted { text-wrap: balance; max-width: 60ch; }

/* ---------- Split with image ---------- */
.split--media .media-col { padding: clamp(24px, 4vw, 48px); display: flex; align-items: center; background: var(--bg-mist); }
.split--media .media-col img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(10, 20, 64, .55); }
.sm-block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.sm-block:first-of-type { padding-top: 6px; }
.sm-block h2 { font-weight: 400; margin-bottom: 10px; }
.sm-block p { color: var(--text); }
.contact-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; padding: 18px 20px; background: var(--bg-mist); border-radius: var(--radius); }
.contact-prompt p { margin: 0; font-weight: 500; color: var(--ink); }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

/* ---------- Motto band ---------- */
.motto { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.motto .display { font-size: clamp(2.4rem, 5vw, 4.6rem); color: #fff; }

/* ---------- Feature lists ---------- */
.feature-list { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--line); }
.feature-list li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); line-height: 1.5; }
.feature-list li .icon { width: 20px; height: 20px; color: var(--orange); margin-top: 2px; }
.hw-card { padding: clamp(28px, 3.5vw, 44px); background: var(--bg); }
.hw-card > .icon { color: var(--navy-700); margin-bottom: 18px; }
.hw-card h3 { font-weight: 400; font-size: clamp(1.35rem, 2vw, 1.7rem); letter-spacing: -.02em; margin: 0; }
.hw-card .feature-list li { font-size: 15.5px; }

/* ---------- Gallery and lightbox ---------- */
.gm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.gm-gallery > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gm-shot { border: 0; padding: 0; margin: 0; background: #fff; cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; display: block; }
.gm-shot img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .5s var(--ease); }
.gm-shot:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 10, 36, .92); }
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox img { max-width: 100%; max-height: 86vh; margin: auto; object-fit: contain; background: #fff; border-radius: var(--radius); }
.lightbox .icon-btn { color: #fff; background: rgba(255, 255, 255, .1); width: 48px; height: 48px; justify-self: center; }
.lightbox .icon-btn:hover { background: var(--orange); color: var(--navy-950); }
.lightbox .lb-close { position: fixed; top: 20px; right: 20px; }

/* ---------- Video library ---------- */
.video-group + .video-group { margin-top: clamp(48px, 6vw, 80px); }
/* Separate cards with space between them; each card carries its own border. */
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.video-grid > * { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.video-grid > *:hover { box-shadow: 0 18px 36px -22px rgba(10, 20, 64, .45); transform: translateY(-2px); }
.video-card { display: flex; flex-direction: column; text-align: left; border: 0; padding: 0; background: var(--bg); cursor: pointer; font: inherit; color: var(--ink); }
.video-card .thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background-color: var(--navy-900); background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 24px 24px; }
.video-card .thumb { overflow: hidden; }
.video-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.video-card .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 10, 36, .45) 0%, rgba(5, 10, 36, 0) 40%, rgba(5, 10, 36, .35) 100%); }
.video-card:hover .thumb img { transform: scale(1.05); }
.video-card .play, .video-card .idx, .video-card .len { z-index: 1; }
.video-card .play { position: relative; box-shadow: 0 8px 24px rgba(5, 10, 36, .45); }
.video-card .len { position: absolute; right: 10px; bottom: 10px; font-family: var(--mono); font-size: 12px; color: #fff; background: rgba(5, 10, 36, .78); padding: 2px 7px; border-radius: 3px; }
.video-card .play { width: 54px; height: 54px; border-radius: 50%; background: var(--orange); color: var(--navy-950); display: grid; place-items: center; transition: transform .2s var(--ease); }
.video-card .play .icon { width: 22px; height: 22px; }
.video-card:hover .play { transform: scale(1.08); }
.video-card .idx { position: absolute; left: 14px; top: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: #fff; }
.video-card .t { padding: 16px 18px 20px; font-size: 16px; line-height: 1.35; text-wrap: balance; }
.video-card:hover .t { color: var(--navy-700); }
.video-modal { border: 0; padding: 0; width: min(1100px, 94vw); background: var(--navy-950); border-radius: 6px; overflow: hidden; color: #fff; }
.video-modal::backdrop { background: rgba(5, 10, 36, .88); }
.video-modal-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 12px 20px; }
.video-modal-bar .icon-btn { color: #fff; }
.video-frame { aspect-ratio: 16 / 9; background: #000; position: relative; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Quick guide PDFs ---------- */
/* Quick Guides tabs: Videos | PDFs */
.qg-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 clamp(24px, 3vw, 36px); background: var(--bg-mist); border: 1px solid var(--line); border-radius: 999px; scroll-margin-top: calc(var(--header-h) + 20px); }
.qg-tab { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 500; padding: 11px 20px 11px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.qg-tab .icon { width: 18px; height: 18px; color: var(--orange); flex: none; }
.qg-tab:hover { color: var(--navy-700); }
.qg-tab[aria-selected="true"] { background: var(--navy-700); color: #fff; box-shadow: 0 8px 18px -10px rgba(0, 26, 123, .6); }
.qg-tab:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.qg-count { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--navy-700); text-align: center; }
.qg-tab[aria-selected="true"] .qg-count { background: rgba(255, 255, 255, .16); color: #fff; }
.qg-panel[hidden] { display: none; }
@media (max-width: 640px) {
  .qg-tabs { display: flex; width: 100%; }
  .qg-tab { flex: 1 1 0; justify-content: center; font-size: 15px; padding: 10px 12px; gap: 8px; white-space: nowrap; }
  .qg-long { display: none; }
}
.guide-pdf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.guide-pdf { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.guide-pdf:hover { box-shadow: 0 18px 36px -22px rgba(10, 20, 64, .45); transform: translateY(-2px); }
.guide-pdf-main { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.guide-pdf-main .ico { width: 48px; height: 48px; flex: none; border-radius: var(--radius); background: var(--bg-mist); color: var(--navy-700); display: grid; place-items: center; }
.guide-pdf-main .ico .icon { width: 24px; height: 24px; }
.guide-pdf-main .t { font-size: 17px; line-height: 1.35; text-wrap: balance; }
.guide-pdf-main .n { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; color: var(--orange-600); margin-bottom: 4px; }
.guide-pdf-main:hover { color: var(--navy-700); }
.guide-pdf-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.guide-watch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 14px 6px 10px; font: inherit; font-size: 14px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.guide-watch .icon { width: 16px; height: 16px; color: var(--orange); }
.guide-watch:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.guide-watch:hover .icon { color: #fff; }
#videos, #pdfs { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- Brochures and case studies ---------- */
.doc-card { display: flex; flex-direction: column; background: var(--bg); text-decoration: none; color: var(--ink); }
.doc-card .media { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-mist); border-bottom: 1px solid var(--line); }
/* Portrait covers sit whole inside the frame, never cropped. The shadow follows the cover itself. */
.doc-card .media img { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); object-fit: contain; filter: drop-shadow(0 12px 18px rgba(10, 20, 64, .35)); transition: transform .6s var(--ease); }
.doc-card:hover .media img { transform: translateY(-4px); }
.doc-card .body { display: flex; flex-direction: column; gap: 10px; padding: 26px 28px 28px; flex: 1; }
.doc-card h3 { font-weight: 400; font-size: 1.35rem; letter-spacing: -.015em; margin: 0; }
.doc-card p { color: var(--muted); margin: 0; text-wrap: balance; }
.doc-card .tagline { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-600); margin-top: auto; padding-top: 8px; }
.doc-card .link-arrow { align-self: flex-start; }
.doc-card:hover { color: var(--ink); }

/* ---------- Forms ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { background: #FDECEC; color: #8A1C1C; border-radius: var(--radius); padding: 12px 14px; font-size: 15px; margin: 0; grid-column: 1 / -1; }
.opt--card span { min-height: 56px; border-radius: var(--radius); font-family: var(--mono); font-size: 13px; letter-spacing: .08em; padding: 0 18px; }
.opt--card span .icon { width: 22px; height: 22px; color: var(--navy-700); }
.btn.is-busy { opacity: .7; pointer-events: none; }
.form-nav [data-reset] { border-color: transparent; }

/* ---------- Footer ---------- */
.foot-phones a { color: #fff; }
.social { display: flex; gap: 8px; margin-top: 18px; }
.social a { width: 38px; height: 38px; border-radius: var(--radius); display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #C9CFE0; transition: background .2s, color .2s; }
.social a:hover { background: var(--orange); color: var(--navy-950); }
.social svg { width: 18px; height: 18px; }

/* ---------- Legal ---------- */
.legal { max-width: 80ch; margin: 0 auto; }
.legal h3 { font-size: clamp(1.25rem, 1.8vw, 1.45rem); font-weight: 500; margin-top: 2em; }
.legal h4 { font-size: 1.05rem; font-weight: 500; margin: 1.6em 0 .5em; color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 20px 0; }
.legal table { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 14px; background: var(--bg); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--bg-mist); color: var(--ink); font-weight: 500; }

/* ---------- Shared balance rules for new components ---------- */
.machine-card h3, .doc-card h3, .brochure-band h2, .hw-card h3, .sm-block h2 { text-wrap: balance; }

@media (max-width: 1100px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-pdf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .page-hero--media .frame { grid-template-columns: 1fr; }
  .page-hero-figure { padding: 0 var(--pad) 40px; }
  .brochure-band { grid-template-columns: 120px minmax(0, 1fr); }
  .brochure-band > .btn { grid-column: 1 / -1; justify-self: start; }
  .motto { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticky-col { position: static; }
}
@media (max-width: 640px) {
  .guide-pdf-grid { grid-template-columns: 1fr; }
  .brochure-band { grid-template-columns: 1fr; }
  .brochure-band .cover { max-width: 160px; }
  .brand--gm img { height: 26px; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .video-card .t { font-size: 14.5px; padding: 12px 12px 16px; }
  .lightbox[open] { grid-template-columns: 44px 1fr 44px; }
  .lightbox .icon-btn { width: 40px; height: 40px; }
  .announce .tag, .announce .dot { display: none; }
  .hero--gm .display { font-size: 2.05rem; }
}

/* Solutions menu: the guide cover is portrait, show all of it. */
.mega-feature img[src*="Brochure-Graphic"] { aspect-ratio: auto; width: auto; max-width: 100%; height: 190px; object-fit: contain; align-self: flex-start; background: transparent; box-shadow: 0 14px 28px -16px rgba(10, 20, 64, .5); }

/* Quick guide thumbnails are title cards: keep the play button and running time in the
   bottom corners so the title on the thumbnail stays readable. The number sits above the card title. */
.video-card .thumb { place-items: end start; padding: 10px; }
.video-card .thumb::after { background: linear-gradient(0deg, rgba(5, 10, 36, .55) 0%, rgba(5, 10, 36, 0) 38%); }
.video-card .play { width: 40px; height: 40px; }
.video-card .play .icon { width: 17px; height: 17px; margin-left: 2px; }
.video-card .t .idx { position: static; display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; color: var(--orange-600); margin-bottom: 4px; }

/* OneTrust footer link: looks like the footer text beside it, accent on hover. Shown by the Worker only when OneTrust is on. */
.ot-link-btn-site { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.ot-link-btn-site:hover { color: var(--orange); }
.ot-link-btn-site:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Shown over a video player when OneTrust is holding Vimeo until the visitor consents. */
.video-consent { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; background: var(--navy-950); color: #fff; }
.video-consent p { margin: 0; max-width: 34ch; font-size: 17px; line-height: 1.5; text-wrap: balance; }

/* Turnstile spam check: span the full form row (the form is a 6-column grid) and keep its
   height reserved so the Submit button does not jump when the widget loads. */
.cf-turnstile { grid-column: 1 / -1; min-height: 65px; width: 100%; }

/* Dealer form industries: one card per row so "Construction & Mining" stays on one line. */
.opts--industry { display: grid; grid-template-columns: 1fr; gap: 10px; }
.opts--industry .opt--card span { width: 100%; box-sizing: border-box; white-space: nowrap; }
