/* ==========================================================
   Operose Industries
   Look: light canvas alternating with black sections, frosted
   glass cards, thin orange arcs, heavy two-tone headings.
   ========================================================== */

:root {
  --orange: #f26422;
  --ink: #222222;
  --black: #0d0d0d;
  --canvas: #f3f3f3;
  --glass: rgba(255, 255, 255, .72);
  --line: rgba(0, 0, 0, .08);
  --muted: rgba(34, 34, 34, .7);
  --radius: 22px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -18px rgba(0, 0, 0, .18);
  --gutter: clamp(16px, 5vw, 80px);
  --head: "Montserrat", system-ui, sans-serif;
  --body: "Raleway", system-ui, sans-serif;
  --ease: cubic-bezier(.21, .47, .32, .98);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font: 400 16px/1.7 var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 85% -10%, #ffffff 0%, transparent 60%),
    radial-gradient(900px 600px at 0% 40%, #ffffff 0%, transparent 55%),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* The portfolio's thin sweeping arcs, fixed behind the light sections */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%;
}
body::before { width: 160vmax; height: 160vmax; left: -95vmax; top: -40vmax; border: 1.5px solid rgba(242, 100, 34, .18); }
body::after  { width: 140vmax; height: 140vmax; right: -80vmax; top: 10vmax;  border: 1.5px solid rgba(0, 0, 0, .06); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, address, dl, dd { margin: 0; font-style: normal; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--orange); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* Content spans the screen with proportional side margins (max 1680px) */
.wrap { width: min(1680px, 100% - 2 * var(--gutter)); margin-inline: auto; }
/* Shared building blocks */
.glass {
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.title {
  font: 800 clamp(2rem, 4.2vw, 3.6rem)/1.05 var(--head);
  letter-spacing: -.045em; color: var(--black);
}
.title em { font-style: italic; color: var(--orange); }
.lede { color: var(--muted); max-width: 28rem; }

/* ---------- Light / dark sections ---------- */
.section { padding: clamp(72px, 9vw, 136px) 0; }
.dark { background: var(--black); color: #fff; }
.dark .title { color: #fff; }
.dark .lede { color: rgba(255, 255, 255, .6); }
.head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 48px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* ---------- Loading screen ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--canvas); transition: opacity .6s var(--ease), visibility .6s;
}
.loader > * { grid-area: 1 / 1; }                 /* stack ring and logo in the centre */
.loader img { width: 64px; height: 64px; }
.loader-ring {
  width: 116px; height: 116px; border-radius: 50%;
  border: 2.5px solid rgba(0, 0, 0, .07); border-top-color: var(--orange);
  animation: loader-spin .9s linear infinite;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader.done img { transform: scale(.92); transition: transform .6s var(--ease); }
@keyframes loader-spin { to { transform: rotate(360deg); } }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; inset: 0 0 auto; height: 3px; z-index: 60;
  background: var(--orange); transform: scaleX(0); transform-origin: left;
}

/* ---------- Header ---------- */
/* Always a distinct frosted bar; a little more solid with a deeper shadow once you scroll */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 6px 24px -14px rgba(0, 0, 0, .22);
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .28);
}
.nav { height: 96px; display: flex; align-items: center; justify-content: space-between; }
.brand img { width: auto; height: 38px; }

.menu { display: flex; align-items: center; gap: 2px; }
.menu a {
  display: block; padding: 10px 14px; border-radius: 999px;
  font: 600 .92rem var(--head); letter-spacing: -.01em; color: var(--ink);
  transition: color .25s, background .25s;
}
.menu a:hover { color: var(--orange); }
/* The black pill follows the section you're currently viewing */
.menu a.current, .menu a.current:hover { background: var(--black); color: #fff; }
/* Company profile download: outlined orange pill, fills on hover */
.menu .menu-download {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 10px;
  color: var(--orange); box-shadow: inset 0 0 0 1.5px var(--orange);
}
.menu .menu-download svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.menu .menu-download:hover { background: var(--orange); color: #fff; }
.menu .menu-download:hover svg { transform: translateY(2px); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 6px auto; background: var(--ink); transition: transform .3s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav { height: 80px; }
  .brand img { height: 30px; }
  .nav-toggle { display: block; }
  .menu {
    position: absolute; top: 76px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: rgba(255, 255, 255, .97); border-radius: 18px; box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .menu.open { opacity: 1; visibility: visible; transform: none; }
  .menu a { padding: 14px 16px; font-size: 1rem; border-radius: 12px; }
  .menu .menu-download { justify-content: center; margin: 6px 0 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 120px 0 clamp(48px, 6vw, 80px); }
.hero-art { margin-top: 50px; }
.hero-art img { width: 100%; max-width: 1180px; margin: 0 auto; animation: rise 1.1s var(--ease) both; }
.est {
  position: absolute; left: calc(var(--gutter) / 2); top: 42%;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 500 .72rem var(--body); letter-spacing: .4em; text-transform: uppercase; color: var(--muted);
}

/* Intro: one frosted card, headline left, justified copy right (like the portfolio's Overview card) */
.intro {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 5vw, 96px); align-items: center;
  margin-top: calc(clamp(32px, 4vw, 56px) - 50px); padding: clamp(28px, 4vw, 64px) clamp(24px, 4.5vw, 72px);
  border-radius: calc(var(--radius) + 6px);
}
/* Dark frosted glass with a faint orange glow in one corner */
.glass.intro {
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(242, 100, 34, .16), transparent 70%),
    rgba(13, 13, 13, .86);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.intro-title { font-size: clamp(1.9rem, 3.6vw, 3.2rem); color: #fff; }
.intro-copy {
  display: grid; gap: 14px; color: rgba(255, 255, 255, .72); font-size: clamp(1rem, 1.15vw, 1.12rem); font-weight: 500;
  text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto;
}

@keyframes rise { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; align-items: start; }
  .est { display: none; }
}
/* Phones only: bigger hero art, compact intro box */
@media (max-width: 600px) {
  .hero { padding-top: 92px; }
  .hero-art { width: calc((100vw - 16px) * .85); margin: 60px auto 0; }   /* 85% of near-full width */
  .hero-art img { max-width: none; }
  .intro { margin-top: 48px; padding: 19px 17px; gap: 10px; border-radius: 18px; }
  .intro-title { font-size: 1.32rem; }
  .intro-copy { font-size: .8rem; line-height: 1.6; gap: 9px; text-align: left; hyphens: manual; -webkit-hyphens: manual; }
}

/* ---------- Infrastructure / Products ---------- */
.row { display: grid; gap: 20px; grid-template-columns: 1fr 3fr; }
.row-flip { grid-template-columns: 3fr 1fr; margin-top: 20px; }
.tile { border-radius: var(--radius); display: grid; place-items: center; padding: 32px; }
.tile h3 { font: 800 clamp(1.6rem, 2.6vw, 2.4rem) var(--head); letter-spacing: -.04em; font-style: italic; }
.tile-light { background: #fff; color: var(--orange); }
.tile-orange { background: var(--orange); color: #fff; }
@media (max-width: 900px) {
  .row, .row-flip { grid-template-columns: 1fr; }
  .row-flip .tile { order: -1; }
  .tile { padding: 22px; }
}

/* Wide letterbox shape: trims only empty background above/below each image (images are ~2:1) */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 2.8 / 1; background: #e9e9e9; }
@media (max-width: 900px) { .carousel { aspect-ratio: 2.4 / 1; } }
.carousel > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s ease;
}
.carousel > img.active, html:not(.js) .carousel > img:first-child { opacity: 1; }
.arrow {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .85); color: var(--black);
  backdrop-filter: blur(6px); transition: background .25s, color .25s;
}
.arrow:hover { background: var(--orange); color: #fff; }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arrow.prev { left: 14px; } .arrow.next { right: 14px; }
.dots { position: absolute; bottom: 14px; left: 50%; translate: -50% 0; z-index: 2; display: flex; gap: 6px; }
.dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgba(0, 0, 0, .25); cursor: pointer; transition: width .3s, background .3s; }
.dots button[aria-current="true"] { width: 26px; background: var(--orange); }
/* On phones the arrows would cover the machine names in the images: swipe + dots instead */
@media (max-width: 600px) {
  .arrow { display: none; }
  .dots { bottom: 10px; }
  .dots button { width: 9px; height: 9px; }
  .dots button[aria-current="true"] { width: 28px; }
}

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
/* Wide shape; crop is anchored to the bottom so the labels baked into the photos stay visible */
.gallery figure { overflow: hidden; border-radius: var(--radius); aspect-ratio: 2.6 / 1; box-shadow: var(--shadow); }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; transition: transform .8s var(--ease); transform-origin: 50% 100%; }
.gallery figure:hover img { transform: scale(1.04); }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- Careers ---------- */
.careers { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: center; }
.careers-tag { font-style: italic; color: rgba(255, 255, 255, .7); max-width: 30rem; margin: 20px 0 36px; font-size: 1.05rem; }
.btn {
  display: inline-block; padding: 16px 30px; border-radius: 999px;
  background: var(--orange); color: #fff; font: 600 .95rem var(--head);
  transition: background .25s, color .25s, transform .25s;
}
.btn:hover { background: #fff; color: var(--black); transform: translateY(-2px); }
.jobs { display: grid; gap: 12px; }
.job {
  position: relative; display: block; padding: 24px 60px 24px 26px; border-radius: 16px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  transition: background .25s, border-color .25s;
}
.job::after {
  content: "\2192"; position: absolute; right: 26px; top: 24px;
  font: 600 1.2rem var(--head); color: rgba(255, 255, 255, .35); transition: color .25s, transform .25s;
}
.job:hover { background: rgba(255, 255, 255, .09); border-color: var(--orange); }
.job:hover::after { color: var(--orange); transform: translateX(4px); }
.job h3 { font: 700 1.15rem var(--head); letter-spacing: -.02em; }
.job p { margin-top: 6px; font-size: .92rem; color: rgba(255, 255, 255, .6); }
@media (max-width: 900px) { .careers { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 20px; grid-template-columns: 1.15fr 1fr 1.3fr; }
.card { padding: clamp(24px, 3vw, 40px); }
.card-title { font: 800 1.4rem var(--head); letter-spacing: -.03em; font-style: italic; margin-bottom: 24px; }
.lines { display: grid; gap: 18px; }
.lines li { display: flex; gap: 14px; align-items: flex-start; font-size: .98rem; }
.lines a:hover { color: var(--orange); }
.ico { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--black); display: grid; place-items: center; }
.ico svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lines li > span:last-child, .lines li > a, .lines address { padding-top: 7px; line-height: 1.55; word-break: break-word; }
.person { border-left: 3px solid var(--orange); padding-left: 18px; }
.person + .person { margin-top: 26px; }
.person h4 { font: 700 1.08rem var(--head); letter-spacing: -.02em; }
.person a { font-size: .92rem; color: var(--muted); word-break: break-all; }
.person a:hover { color: var(--orange); }
.map { position: relative; min-height: 360px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--orange); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.map:hover iframe { filter: none; }
@media (max-width: 1100px) { .contact { grid-template-columns: 1fr 1fr; } .map { grid-column: 1 / -1; } }
@media (max-width: 640px)  { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer (dark) & dock ---------- */
.footer { background: var(--black); color: rgba(255, 255, 255, .55); padding: 36px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer img { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.footer p { font-size: .82rem; }
@media (max-width: 600px) { .footer { padding-bottom: 96px; } }

.dock {
  position: fixed; right: var(--gutter); bottom: 22px; z-index: 40;
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(13, 13, 13, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45);
}
/* When the footer is fully in view, the pill glides from the corner into the footer's centre */
.dock { transition: right .6s var(--ease), translate .6s var(--ease); }
.dock.docked { right: 50%; translate: 50% 0; }
.dock a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: background .25s; }
.dock a:hover { background: var(--orange); }
.dock img { width: 20px; height: 20px; }
@media (max-width: 600px) { .dock { right: 16px; bottom: 16px; } }

/* ---------- Scroll reveal (staggered via --d set in JS) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
