/* Oxford Science Group — approved reference match
   This file intentionally loads after site.css and controls the final visual layer. */

:root {
  --header-h: 88px;
  --osg-navy: #000f27;
  --osg-blue: #0877dc;
  --osg-text: #10243d;
  --font-display: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  --font-body: "Aptos", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

html { scroll-padding-top: calc(var(--header-h) + 18px); }
body {
  background: #fff;
  color: var(--osg-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  letter-spacing: -.034em;
}

/* Exact header proportions and approved group lock-up. */
.site-header,
.site-header.is-scrolled {
  height: var(--header-h);
  background: linear-gradient(90deg, #01142d 0%, #000d22 48%, #000410 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
  backdrop-filter: none;
}

.header-inner {
  width: calc(100% - 56px);
  max-width: none;
  height: 100%;
  display: grid;
  grid-template-columns: 386px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.brand {
  width: 386px;
  min-width: 0;
  height: 75px;
  display: block;
  overflow: hidden;
  border-radius: 0;
}
.brand-picture,
.brand-lockup {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-lockup {
  object-fit: contain;
  object-position: left center;
}
.brand:hover { text-decoration: none; }

.site-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}
.site-nav a {
  padding: 12px 14px;
  color: #fff;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: -.008em;
}
.site-nav .nav-cta {
  min-width: 160px;
  min-height: 46px;
  margin-left: 20px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: linear-gradient(180deg, #0b7de8, #0564c5);
  box-shadow: 0 10px 24px rgba(0, 86, 184, .26);
  font-size: .79rem;
  font-weight: 800;
  letter-spacing: .015em;
}

/* Hero image and layout reproduced from the approved reference. */
.hero {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 558px;
  min-height: 558px;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background-color: var(--osg-navy);
  background-image: url('../images/hero-group-target.jpg');
  background-repeat: no-repeat;
  background-position: center var(--header-h);
  background-size: 100% calc(100% - var(--header-h));
}
@supports (background-image: image-set(url('../images/hero-group-target.webp') type('image/webp'))) {
  .hero {
    background-image: image-set(
      url('../images/hero-group-target.avif') type('image/avif'),
      url('../images/hero-group-target.webp') type('image/webp'),
      url('../images/hero-group-target.jpg') type('image/jpeg')
    );
  }
}
.hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: var(--header-h) 0 0;
  opacity: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,18,42,.16) 0%, rgba(0,18,42,.02) 54%, rgba(0,18,42,.13) 100%),
    linear-gradient(180deg, rgba(0,12,28,.02) 0%, rgba(0,18,42,.12) 43%, rgba(0,22,49,.95) 100%);
  background-size: auto;
  mask-image: none;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 40px;
  pointer-events: none;
  background: #fff;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.hero .container {
  width: 94%;
  max-width: 1460px;
}
.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding-top: 300px;
}
.hero-content {
  width: 100%;
  max-width: 1045px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.hero h1 {
  max-width: none;
  margin: 0;
  color: #fff;
  font-size: clamp(48px, 3.4vw, 54px);
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: -.047em;
  white-space: nowrap;
  text-shadow: 0 4px 24px rgba(0,0,0,.58);
}
.hero-intro {
  max-width: 980px;
  margin: 9px 0 0;
  color: #fff;
  font-size: clamp(18px, 1.28vw, 20px);
  font-weight: 430;
  line-height: 1.35;
  text-shadow: 0 3px 16px rgba(0,0,0,.62);
}
.hero-value-grid {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}
.hero-value {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  padding: 0 27px;
  color: #fff;
}
.hero-value:first-child { padding-left: 0; }
.hero-value + .hero-value { border-left: 1px solid rgba(255,255,255,.28); }
.hero-value svg {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  color: #1a96ff;
}
.hero-value strong,
.hero-value span { display: block; }
.hero-value strong {
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.18;
}
.hero-value span {
  margin-top: 4px;
  color: #fff;
  font-size: .82rem;
  font-weight: 420;
  line-height: 1.25;
}
.hero .hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
  margin-top: 19px;
}
.hero .button {
  min-width: 255px;
  min-height: 50px;
  padding: 13px 22px;
  justify-content: center;
  border-radius: 5px;
  font-size: .8rem;
  font-weight: 800;
}
.hero .button--secondary {
  min-width: 246px;
  border-color: rgba(255,255,255,.78);
  background: rgba(0,20,45,.35);
}
.hero .button--secondary:hover { background: rgba(255,255,255,.11); }

/* First-screen company grid. */
.home-companies-section {
  position: relative;
  z-index: 3;
  padding: 0 0 24px;
  background: #fff;
}
.home-companies-section > .container {
  width: min(1460px, 92%);
  max-width: none;
}
.home-companies-intro {
  max-width: 900px;
  margin: 0 auto 17px;
  text-align: center;
}
.home-companies-intro h2 {
  margin: 0;
  color: #092342;
  font-size: 28px;
  font-weight: 740;
  line-height: 1.15;
  letter-spacing: -.032em;
}
.home-companies-intro p {
  margin: 7px 0 0;
  color: #263d55;
  font-size: 15px;
  line-height: 1.42;
}
.home-company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.home-company-card {
  display: grid;
  min-width: 0;
  grid-template-rows: 56px 114px 112px;
  overflow: hidden;
  border: 1px solid #e5e8eb;
  border-top: 0;
  border-radius: 5px;
  background: #f5f6f7;
  box-shadow: 0 5px 15px rgba(0,23,45,.065);
  transition: box-shadow .2s ease, transform .2s ease;
}
.home-company-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 27px rgba(0,23,45,.11);
}
.home-company-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 0 2px;
  overflow: hidden;
  background: #fff;
}
.home-company-logo-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
}
.home-company-image {
  display: block;
  overflow: hidden;
  background: #dce3e8;
}
.home-company-image picture,
.home-company-image img {
  display: block;
  width: 100%;
  height: 100%;
}
.home-company-image img {
  object-fit: cover;
  object-position: center;
  transform: none;
  transition: transform .4s ease;
}
.home-company-card:hover .home-company-image img { transform: scale(1.025); }
.home-company-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 11px 11px;
  background: #f5f6f7;
}
.home-company-body p {
  margin: 0 0 10px;
  color: #263746;
  font-size: 13.5px;
  line-height: 1.42;
}
.home-company-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-top: auto;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
}
.home-company-button::after { font-size: 1.45rem; }

.home-benefits {
  min-height: 78px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  margin-top: 12px;
  padding: 10px 20px;
  border: 1px solid #e3e7eb;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,23,45,.035);
}
.home-benefit {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 0 22px;
}
.home-benefit:first-child { padding-left: 0; }
.home-benefit + .home-benefit { border-left: 1px solid #edf0f2; }
.home-benefit svg {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  color: #0b315b;
}
.home-benefit strong {
  color: #0b2747;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.15;
}
.home-benefit span {
  margin-top: 3px;
  color: #344a61;
  font-size: 12.5px;
  line-height: 1.22;
}

/* Subpages retain the full content system but use the approved header/font language. */
.page-hero { padding-top: calc(var(--header-h) + 92px); }
.site-footer .brand {
  width: 275px;
  height: 75px;
}
.brand-lockup--footer { object-position: left center; }

@media (max-width: 1450px) and (min-width: 1181px) {
  .header-inner {
    width: calc(100% - 40px);
    grid-template-columns: 275px minmax(0, 1fr);
    gap: 16px;
  }
  .brand { width: 275px; }
  .site-nav a { padding-inline: 9px; font-size: .79rem; }
  .site-nav .nav-cta { min-width: 142px; margin-left: 10px; padding-inline: 16px; }
  .hero .container { width: calc(100% - 58px); }
  .home-companies-section > .container { width: calc(100% - 58px); }
  .home-company-grid { gap: 22px; }
  .home-company-button { font-size: 10px; }
}

@media (max-width: 1180px) {
  :root { --header-h: 78px; }
  .header-inner {
    width: calc(100% - 40px);
    display: flex;
    gap: 16px;
  }
  .brand { width: 275px; height: 75px; }
  .nav-toggle { display: flex; flex-direction: column; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: grid;
    justify-content: stretch;
    gap: 3px;
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    padding: 16px 20px 24px;
    border-top: 1px solid #173a5a;
    background: rgba(0,15,39,.99);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .site-nav a { padding: 13px 14px; font-size: .92rem; }
  .site-nav .nav-cta { width: 100%; margin: 8px 0 0; }
  .hero {
    height: 650px;
    min-height: 650px;
    background-size: auto calc(100% - var(--header-h));
    background-position: 48% var(--header-h);
  }
  .hero-inner { padding-top: 280px; }
  .hero h1 { white-space: normal; font-size: clamp(44px, 5vw, 52px); }
  .hero-value-grid { grid-template-columns: repeat(2, minmax(0,1fr)); max-width: 760px; gap: 16px 0; }
  .hero-value:nth-child(3) { border-left: 0; padding-left: 0; }
  .home-company-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
  .home-company-card { grid-template-rows: 60px 150px 112px; }
}

@media (max-width: 820px) {
  .hero {
    height: 720px;
    min-height: 720px;
    background-size: auto calc(100% - var(--header-h));
    background-position: 47% var(--header-h);
  }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(0,18,38,.55), rgba(0,18,38,.28)),
      linear-gradient(180deg, rgba(0,16,35,.05) 0%, rgba(0,20,44,.48) 40%, rgba(0,23,50,.98) 100%);
  }
  .hero-inner { padding-top: 285px; }
  .hero h1 { font-size: clamp(42px, 8vw, 54px); }
  .hero-intro { font-size: 17px; }
  .home-companies-section > .container { width: calc(100% - 30px); }
  .home-benefits { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 0; }
  .home-benefit:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (max-width: 620px) {
  :root { --header-h: 72px; }
  .header-inner { width: calc(100% - 24px); }
  .brand { width: 220px; height: 60px; }
  .brand-lockup { object-fit: contain; }
  .hero {
    height: 760px;
    min-height: 760px;
    background-size: auto calc(100% - var(--header-h));
    background-position: 47% var(--header-h);
  }
  .hero-inner { padding-top: 250px; }
  .hero h1 { font-size: clamp(38px, 11vw, 49px); line-height: 1.03; }
  .hero-intro { max-width: 95%; font-size: 16px; line-height: 1.42; }
  .hero-value-grid { margin-top: 24px; gap: 16px 0; }
  .hero-value { align-items: flex-start; gap: 9px; padding: 0 10px; }
  .hero-value:first-child,
  .hero-value:nth-child(3) { padding-left: 0; }
  .hero-value svg { width: 31px; height: 31px; flex-basis: 31px; }
  .hero-value strong { font-size: .78rem; }
  .hero-value span { font-size: .7rem; }
  .hero .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 24px; }
  .hero .button { width: 100%; min-width: 0; }
  .home-companies-intro h2 { font-size: 26px; }
  .home-company-grid { grid-template-columns: 1fr; }
  .home-company-card { grid-template-rows: 60px 165px 110px; }
  .home-benefits { grid-template-columns: 1fr; padding: 12px 16px; }
  .home-benefit { padding: 9px 0; }
  .home-benefit + .home-benefit { border-left: 0; border-top: 1px solid #edf0f2; }
}

/* Final optical alignment against the approved 1536 × 1024 reference. */
@media (min-width: 1451px) {
  .site-nav a { padding-inline: 16px; }
  .site-nav .nav-cta { padding-inline: 22px; }
  .hero h1 { font-size: 58px; }
  .hero-intro { font-size: 21.5px; }
  .hero .hero-actions { margin-top: 8px; }
}

/* Connected-project action photograph: full-bleed machinery-in-operation framing. */
.media-frame--connected img {
  object-fit: cover;
  object-position: 50% 48%;
  padding: 0;
}
