/* ============================================================
   CONTRACT MANUFACTURING PAGE (page-contract-manufacturing.php)
   Enqueued only on that template (functions.php). Laid out after the
   2026 Custom Contract Manufacturing brochure: wide photo, brand-blue
   title band, five-photo mosaic with blue tags, contacts. Colors and type
   match the Facility page (assets/css/facility.css).
   ============================================================ */

.oxcm-page {
  --oxcm-brand: #004c8c;           /* Oxid brand blue */
  --oxcm-accent: #6fd8d6;          /* teal, used on blue backgrounds */
  --oxcm-accent-hover: #8fe4e2;    /* button hover */
  --oxcm-accent-dark: #1c7f7d;     /* teal, used on white backgrounds */
  --oxcm-text-on-brand: #dbe8f4;   /* body text on blue */
  --oxcm-body: #41566b;            /* body text on white */
  --oxcm-tile: #d5deec;            /* placeholder behind photos */
  --oxcm-ui: "Archivo", system-ui, sans-serif;
  --oxcm-body-font: "Spline Sans", system-ui, sans-serif;
}

/* ---------- Theme integration (same as facility.css) ---------- */

/* main.css sets body{overflow:hidden}; scrolling templates turn it back on. */
body.page-template-page-contract-manufacturing {
  overflow-x: hidden;
  overflow-y: auto;
}
/* main.css zooms the body to 0.9 on desktop; this page's content is
   zoomed back to 1 like the Facility page. The header and footer stay at
   site scale. --oxcm-scale converts header measurements into page units. */
.oxcm-page { --oxcm-scale: 1; }
@media (min-width: 901px) {
  .oxcm-page {
    --oxcm-scale: var(--desktop-page-scale, 1);
    zoom: calc(1 / var(--desktop-page-scale, 1));
  }
}
/* Clear the fixed .site-header. With the news ticker (desktop only) the
   ticker already sits in flow under the header. */
.oxcm-page { padding-top: calc((var(--wp-admin-bar-offset, 0px) + var(--header-height)) * var(--oxcm-scale)); }
@media (min-width: 901px) {
  body.has-news-ticker .oxcm-page { padding-top: 0; }
}
/* main.css zooms every img on hover; not on this page. */
.oxcm-page img { transition: none; max-width: none; }
.oxcm-page img:hover { transform: none; }
.oxcm-page p, .oxcm-page h1, .oxcm-page h2, .oxcm-page h3, .oxcm-page figure { margin: 0; }

/* ---------- Shared pieces ---------- */

.oxcm-eyebrow {
  font-family: var(--oxcm-ui);
  font-size: clamp(14px, 1.15vw, 16px); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}

/* The brochure's blue photo tags. */
.oxcm-tag {
  position: absolute; z-index: 1;
  padding: 6px 12px;
  background: var(--oxcm-brand); color: #fff;
  font-family: var(--oxcm-ui); font-size: clamp(14px, 1.1vw, 17px); font-weight: 700; line-height: 1.2;
}

.oxcm-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.oxcm-actions:empty { display: none; }
.oxcm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  /* Square corners: no rounded corners anywhere on the site. */
  min-height: 48px; padding: 0 28px; box-sizing: border-box; border-radius: 0;
  font-family: var(--oxcm-ui); font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.oxcm-btn--solid { background: var(--oxcm-accent); color: var(--oxcm-brand); }
.oxcm-btn--solid:hover,
.oxcm-btn--solid:focus-visible { background: var(--oxcm-accent-hover); color: var(--oxcm-brand); }
.oxcm-btn--ghost { border: 1.5px solid rgba(255,255,255,0.6); color: #fff; }
.oxcm-btn--ghost:hover,
.oxcm-btn--ghost:focus-visible { border-color: var(--oxcm-accent); color: var(--oxcm-accent); }
.oxcm-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Hero: photo, then the blue title band ---------- */

.oxcm-hero__photo {
  position: relative; overflow: hidden;
  height: clamp(300px, 34vw, 600px);
  background: #0b1118;
}
.oxcm-hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
}
.oxcm-hero__tag { right: 5%; bottom: 20px; }

.oxcm-band { background: var(--oxcm-brand); color: #fff; }
/* Tightened after review (Jake: "oversized for what we need"): less
   padding, a smaller headline, and the intro in a wider column at a
   slightly smaller size so it runs fewer lines. */
.oxcm-band__inner {
  max-width: 1680px; margin: 0 auto; box-sizing: border-box;
  padding: clamp(32px, 2.6vw, 44px) 5%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center; gap: 24px clamp(40px, 5vw, 96px);
}
.oxcm-band__title { display: flex; flex-direction: column; gap: 10px; }
.oxcm-band .oxcm-eyebrow { color: var(--oxcm-accent); }
/* The sitewide breadcrumb, white version, above the eyebrow (Jake, after
   review). Colours come from main.css (nav.lm-crumb--on-dark). */
.oxcm-band nav.lm-crumb { margin: 0 0 6px; font-size: 14px; }
/* Phones only (Jake): above that the band keeps its "Custom" eyebrow and
   no breadcrumb. */
@media (min-width: 761px) {
  .oxcm-band nav.lm-crumb { display: none; }
}
.oxcm-band__h1 {
  font-family: var(--oxcm-ui); font-weight: 800; color: #fff;
  /* Sized up (Nov 2026) with the "Custom" eyebrow gone. "MANUFACTURING"
     is about 9.3x the font size wide and its column about 0.4vw (capped
     ~664px once the band hits 1680px), so 4.15vw / 4.4rem is about the
     most that stays inside it; the 2rem floor covers 761-800px. */
  font-size: clamp(2rem, 4.15vw, 4.4rem); line-height: 0.95;
  letter-spacing: -0.01em; text-transform: uppercase;
}
.oxcm-band__copy { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.oxcm-band__intro {
  font-family: var(--oxcm-body-font);
  font-size: clamp(17px, 1.25vw, 19px); line-height: 1.5; color: var(--oxcm-text-on-brand);
}

/* ---------- What we build: the mosaic ---------- */

.oxcm-work { background: #fff; color: var(--oxcm-brand); }
.oxcm-work__inner {
  max-width: 1680px; margin: 0 auto; box-sizing: border-box;
  padding: clamp(56px, 5vw, 88px) 5% clamp(64px, 6vw, 104px);
  display: flex; flex-direction: column; gap: 32px;
}
.oxcm-work__head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.oxcm-work .oxcm-eyebrow { color: var(--oxcm-accent-dark); }
.oxcm-work__title {
  font-family: var(--oxcm-ui); font-weight: 700; color: var(--oxcm-brand);
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em;
}
.oxcm-work__body { font-family: var(--oxcm-body-font); font-size: 18px; line-height: 1.55; color: var(--oxcm-body); }

/* The brochure's grid: two wide photos stacked on the left, two squarer
   ones in the middle, the tall surgical cart on the right across both rows.
   Sized from the photos, not fixed row heights (Jake, after review: the
   cart and the optical system were getting cut off): the cart's tile is
   fixed at its photo's 0.42:1 and its height sets both rows; the column
   widths (48 / 29 / 23) are chosen so the other four tiles then land
   within a few percent of their own photos' shapes at any width. The
   images sit absolutely so they add no height of their own. */
.oxcm-grid {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 48fr) minmax(0, 29fr) minmax(0, 23fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "machined electronics surgical"
    "optical  aesthetic   surgical";
}
.oxcm-tile { position: relative; overflow: hidden; min-height: 0; background: var(--oxcm-tile); }
.oxcm-tile img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.oxcm-tile--surgical { aspect-ratio: 42 / 100; }
.oxcm-tile .oxcm-tag { left: 16px; bottom: 16px; }
.oxcm-tile--machined    { grid-area: machined; }
.oxcm-tile--electronics { grid-area: electronics; }
.oxcm-tile--surgical    { grid-area: surgical; }
.oxcm-tile--optical     { grid-area: optical; }
.oxcm-tile--aesthetic   { grid-area: aesthetic; }
.oxcm-tile--machined img    { object-position: 50% 40%; }
.oxcm-tile--electronics img { object-position: 50% 45%; }
.oxcm-tile--surgical img    { object-position: 45% 50%; }
.oxcm-tile--optical img     { object-position: 50% 55%; }
.oxcm-tile--aesthetic img   { object-position: 50% 50%; }

/* ---------- Call to action + contacts ---------- */

.oxcm-cta { background: var(--oxcm-brand); color: #fff; }
.oxcm-cta__inner {
  max-width: 1680px; margin: 0 auto; box-sizing: border-box;
  padding: clamp(56px, 5vw, 88px) 5%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: start; gap: 48px clamp(40px, 5vw, 96px);
}
.oxcm-cta__lead { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.oxcm-cta__title {
  font-family: var(--oxcm-ui); font-weight: 700; color: #fff;
  font-size: clamp(2rem, 3.4vw, 2.875rem); line-height: 1.05; letter-spacing: -0.02em;
}
.oxcm-cta__body {
  max-width: 520px; font-family: var(--oxcm-body-font);
  font-size: 17px; line-height: 1.55; color: var(--oxcm-text-on-brand);
}
.oxcm-cta__lead .oxcm-btn { margin-top: 12px; }

.oxcm-contacts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  padding-top: 8px;
}
.oxcm-contact { padding-left: 20px; border-left: 2px solid rgba(111,216,214,0.55); }
.oxcm-contact__heading {
  margin-bottom: 10px !important;
  font-family: var(--oxcm-ui); font-size: 14px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--oxcm-accent);
}
.oxcm-contact__lines {
  font-family: var(--oxcm-body-font); font-size: 16px; line-height: 1.7;
  color: var(--oxcm-text-on-brand);
}
.oxcm-contact__lines a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
.oxcm-contact__lines a:hover,
.oxcm-contact__lines a:focus-visible { color: var(--oxcm-accent); border-bottom-color: currentColor; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .oxcm-cta__inner { grid-template-columns: 1fr; }
}

/* Mosaic up to 900px: two columns. The same idea as desktop: the two
   full-width photos take their exact proportions, the surgical cart keeps
   its 0.42:1 and sets the height of the two rows beside it, which
   electronics and aesthetic fill (only those two crop, at the sides). */
@media (max-width: 900px) {
  .oxcm-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "machined    machined"
      "electronics surgical"
      "aesthetic   surgical"
      "optical     optical";
  }
  .oxcm-tile--machined { aspect-ratio: 16 / 9; }
  .oxcm-tile--optical  { aspect-ratio: 173 / 100; }
  .oxcm-tile--surgical img { object-position: 50% 50%; }
  /* The handpiece is at the right edge of this photo: keep it in. */
  .oxcm-tile--aesthetic img { object-position: 80% 50%; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  /* Phones (Jake, after review): the photo is the backdrop behind the
     title band rather than a strip above it, grayscale under the same
     muted blue cast as the Facility page's phone hero (facility.css:
     slate darkening at .72, brand-blue color tint at .3, faint blue
     wash). Its label is dropped: the photo is texture here. */
  .oxcm-hero { position: relative; background: var(--oxcm-brand); }
  .oxcm-hero__photo { position: absolute; inset: 0; z-index: 0; height: auto; isolation: isolate; }
  /* Only about a third of the wide photo shows on a phone; centred on the
     brass lens mount with the red/black leads, the clearest subject. */
  .oxcm-hero__img { filter: grayscale(100%); object-position: 75% 45%; }
  .oxcm-hero__photo::before,
  .oxcm-hero__photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
  .oxcm-hero__photo::before {
    z-index: 1;
    background: linear-gradient(rgba(var(--hero-tint-rgb), calc(var(--hero-tint, .3) / 6)), rgba(var(--hero-tint-rgb), calc(var(--hero-tint, .3) / 6))), rgba(22,30,40,0.72);
  }
  /* Strength from the page's "Blue Tint — Phones" slider (--hero-tint,
     inc/hero-tint.php; was a fixed .3, the wash above a sixth of it). */
  .oxcm-hero__photo::after { z-index: 2; background: rgba(var(--hero-tint-rgb), var(--hero-tint, .3)); mix-blend-mode: color; }
  .oxcm-hero__tag { display: none; }
  /* No "Custom" eyebrow on phones; the breadcrumb heads the band. */
  .oxcm-band .oxcm-eyebrow { display: none; }
  .oxcm-band { position: relative; z-index: 1; background: transparent; }

  .oxcm-band__inner { grid-template-columns: 1fr; gap: 18px; padding: 28px 20px 32px; }
  /* "MANUFACTURING" is about 9.3x the font size wide: 9.4vw (up from 9vw,
     Nov 2026) is about the most that keeps it on one line with 20px
     gutters. */
  .oxcm-band__h1 { font-size: clamp(1.9rem, 9.4vw, 3.25rem); }
  .oxcm-band__intro { font-size: 17px; }
  .oxcm-band__copy { gap: 18px; }
  .oxcm-actions { flex-direction: column; }
  .oxcm-actions .oxcm-btn { width: 100%; min-height: 52px; font-size: 17px; }

  .oxcm-work__inner { padding: 48px 20px 56px; gap: 24px; }
  .oxcm-grid { gap: 10px; } /* layout: the 900px mosaic block above */
  .oxcm-tile .oxcm-tag { left: 10px; bottom: 10px; padding: 5px 9px; font-size: 13px; }

  .oxcm-cta__inner { padding: 48px 20px 56px; gap: 36px; }
  .oxcm-cta__lead .oxcm-btn { width: 100%; min-height: 52px; font-size: 17px; }
  .oxcm-contacts { grid-template-columns: 1fr; gap: 24px; }
}
