/* Plos Trading concept. Same four pages as their site: Home, About, Services, Contact.
   Their maroon (#85134A, from the current site) and the logo's khaki, on white and near-black.
   White on maroon is 9.6:1. Khaki is decoration only, never text on white.
   Barlow Condensed for headings (workshop signage feel), Barlow for reading. */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --soft: #f4f3ef;
  --ink: #17151a;
  --muted: #4f4b52;
  --line: #dedbd3;
  --maroon: #85134a;
  --maroon-dark: #6a0f3b;
  --khaki: #a89a6b;
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(16px, 5vw, 72px);
  --nav: 76px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { accent-color: var(--maroon); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3 { margin: 0; font-family: var(--head); text-wrap: balance; line-height: 1; }
h1 { font-weight: 700; font-size: clamp(42px, 6vw, 84px); text-transform: uppercase; letter-spacing: -.01em; }
h2 { font-weight: 700; font-size: clamp(34px, 4.4vw, 58px); text-transform: uppercase; margin-bottom: .45em; }
h3 { font-weight: 600; font-size: 26px; margin-bottom: .4em; }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.wrap { max-width: 1320px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--pad); }
.lede { font-size: 20px; color: var(--muted); }

.demo-note { margin: 0; max-width: none; padding: 8px var(--pad); background: var(--soft); font-size: 14px; }

/* header */
.top { background: var(--ink); color: #fff; font-size: 15px; }
.top .wrap { padding-block: 8px; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.top a { text-decoration: none; }
.top a:hover { text-decoration: underline; }
.nav { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.nav .wrap { padding-block: 0; height: var(--nav); display: flex; align-items: center; gap: 28px; }
.nav-brand img { height: 46px; width: auto; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 600; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { border-color: var(--maroon); }
.nav-menu { display: none; margin-left: auto; }
.nav-menu summary { list-style: none; cursor: pointer; font-weight: 600; padding: 10px 14px; border: 2px solid var(--ink); border-radius: var(--radius); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] .nav-drop { display: grid; }
.nav-drop { display: none; position: absolute; left: 0; right: 0; top: var(--nav); background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 20px; }
.nav-drop a { padding: 12px 0; font-weight: 600; font-size: 20px; text-decoration: none; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) {
  .nav-links, .nav .btn { display: none; }
  .nav-menu { display: block; }
  .nav-brand img { height: 38px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border-radius: var(--radius);
  font: 700 17px/1 var(--sans); text-decoration: none; border: 2px solid var(--maroon); cursor: pointer; transition: background-color .2s, color .2s; }
.btn-solid { background: var(--maroon); color: #fff; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-solid:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); }
.btn-line { background: transparent; color: #fff; border-color: #fff; }
.btn-line:hover { background: #fff; color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* hero */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(23 21 26 / .92) 0%, rgb(23 21 26 / .72) 45%, rgb(23 21 26 / .25) 100%); }
.hero .wrap { position: relative; z-index: 1; min-height: min(78vh, 760px); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { max-width: 21ch; }
.hero h1 em { font-style: normal; color: #fff; background: linear-gradient(var(--maroon), var(--maroon)) 0 92% / 100% .14em no-repeat; }
.hero .lede { color: #e7e4ea; max-width: 46ch; margin-top: 22px; }
.page-hero .wrap { min-height: 0; padding-block: clamp(56px, 8vw, 104px); }

/* service groups */
.groups { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 3px solid var(--ink); }
.group { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); }
.group p { color: var(--muted); }
.group a { font-weight: 700; color: var(--maroon); }
@media (min-width: 640px) { .group:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line); } }
@media (min-width: 1100px) { .group + .group { padding-left: 28px; border-left: 1px solid var(--line); } }

/* makes */
.makes { background: var(--soft); }
.makes h2 { font-size: 22px; margin: 0 12px 0 0; }

/* split: photo + words */
.split { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.flip > :first-child { order: 2; } }
.split figure { margin: 0; }
.split img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split img.tall { aspect-ratio: 4 / 5; object-position: 50% 60%; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 19px; width: 12px; height: 12px; background: var(--maroon); border-radius: 2px; }

/* vendor pack placeholder: what the buyer's procurement team will ask for */
.pack { background: var(--ink); color: #fff; }
.pack p { color: #d9d5dc; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 32px; }
.pack-item { border: 2px dashed rgb(255 255 255 / .35); border-radius: var(--radius); padding: 22px; }
.pack-item strong { display: block; font: 600 22px/1.1 var(--head); text-transform: uppercase; margin-bottom: 6px; }
.pack-item span { font-size: 15px; color: #bdb7c1; }

/* bases */
.bases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.base { border: 1px solid var(--line); border-top: 4px solid var(--maroon); padding: 26px; }
.base p { margin-bottom: .6em; }
.base a { font-weight: 600; }

/* call band */
.band { background: var(--maroon); color: #fff; }
.band .wrap { padding-block: clamp(48px, 7vw, 88px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band h2 { margin: 0; max-width: 18ch; }
.band .btn-solid { background: #fff; color: var(--maroon); border-color: #fff; }
.band .btn-solid:hover { background: var(--soft); }

/* services page */
.svc { border-top: 3px solid var(--ink); padding-top: 28px; margin-top: 56px; display: grid; gap: 24px; }
.svc:first-of-type { margin-top: 0; }
@media (min-width: 900px) { .svc { grid-template-columns: 5fr 7fr; gap: 56px; } }
.svc ul { margin: 0; padding: 0; list-style: none; columns: 2 240px; column-gap: 32px; }
.svc li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--line); }
.svc li small { display: block; color: var(--muted); font-size: 15px; }
.flag { background: #fff6d8; border-radius: 3px; padding: 4px 10px; font-size: 14px; }

/* values */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.values h3 { font-size: 24px; }
.values p { color: var(--muted); }

/* contact form */
.contact-grid { display: grid; gap: clamp(40px, 6vw, 80px); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 7fr 5fr; } }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { form { grid-template-columns: 1fr; } }
label, legend { font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #8f8a93; border-radius: var(--radius); padding: 12px 14px; min-height: 50px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--maroon); outline-offset: 1px; border-color: var(--maroon); }
fieldset { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.chips label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; padding: 10px 16px; border: 1.5px solid #8f8a93; border-radius: var(--radius); cursor: pointer; }
.chips input { width: auto; min-height: 0; margin: 0; }
.chips label:has(input:checked) { border-color: var(--maroon); background: var(--maroon); color: #fff; font-weight: 700; }
.chips label:has(input:checked) input { accent-color: #fff; }
.chips label:has(input:focus-visible) { outline: 3px solid var(--maroon); outline-offset: 2px; }
.hint { font-size: 15px; color: var(--muted); margin: 10px 0 0; }
.side h3 { margin-top: 8px; }
.phones { list-style: none; padding: 0; margin: 0 0 28px; }
.phones a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 20px; }
.phones a span { font-weight: 400; font-size: 15px; color: var(--muted); align-self: center; }
.phones a:hover { color: var(--maroon); }

/* footer */
.foot { background: var(--ink); color: #d9d5dc; font-size: 15px; }
.foot .wrap { padding-block: 48px; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot h3 { color: #fff; font-size: 20px; }
.foot p { margin: 0 0 .4em; }
.foot a { color: #fff; }
.foot-base { border-top: 1px solid rgb(255 255 255 / .15); grid-column: 1 / -1; padding-top: 20px; font-size: 14px; }
@media (min-width: 640px) { .groups { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .groups { grid-template-columns: repeat(4, 1fr); } }

/* logo: flat SVG, see ../logo/. Footer uses the reversed version straight on the ink. */
.foot-logo { width: 220px; height: auto; }
/* the mark, cropped off the edge of the call band, as a quiet brand shape */
.band { position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; right: -6%; top: 50%; width: min(46vw, 520px); aspect-ratio: 162 / 152;
  transform: translateY(-50%) rotate(-12deg); background: url("plos-mark-white.svg") center / contain no-repeat; opacity: .1; pointer-events: none; }
.band .wrap { position: relative; }

.foot-base { max-width: none; }
.side-h { font-size: 30px; margin-bottom: .3em; }

/* browser surfaces in the brand colours */
::selection { background: var(--maroon); color: #fff; }
html { scrollbar-color: #9b8f99 var(--paper); caret-color: var(--maroon); }

/* Pumps we repair: Magic UI Marquee, ported to plain CSS. Two copies of the list, the second
   hidden from screen readers, slide left together. Pauses on hover. Reduced motion: one still,
   wrapping list. */
.makes .wrap { padding-block: 44px; display: grid; gap: 18px; }
.makes h2 { font-size: 32px; margin: 0; }
.marquee { --gap: 10px; --duration: 36s; display: flex; gap: var(--gap); overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; flex-shrink: 0; gap: var(--gap); margin: 0; padding: 4px 0; list-style: none; }
.marquee-track li { padding: 10px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  font: 600 18px/1 var(--head); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee var(--duration) linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { mask-image: none; }
  .marquee-track { flex-wrap: wrap; flex-shrink: 1; }
  .marquee-track[aria-hidden] { display: none; }
}
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }

/* Engineering grid behind the dark page heroes and the vendor pack: Magic UI Grid Pattern,
   ported to two repeating gradients, faded out with a radial mask. */
.page-hero::before, .pack::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px);
  background-size: 40px 40px; background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 90% at 85% 40%, #000 20%, transparent 75%); }
.page-hero::after { content: none; }
.pack { position: relative; }
.pack .wrap { position: relative; }

/* Vendor pack slots: Magic UI Border Beam, ported to a conic gradient that turns round each
   empty slot, so the eye reads them as "to be filled". Reduced motion: the dashed outline only. */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pack-item { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .pack-item::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
    background: conic-gradient(from var(--beam), transparent 0 78%, var(--khaki) 88%, #fff 92%, transparent 96%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: beam 7s linear infinite; }
  .pack-item:nth-child(2)::after { animation-delay: -1.75s; }
  .pack-item:nth-child(3)::after { animation-delay: -3.5s; }
  .pack-item:nth-child(4)::after { animation-delay: -5.25s; }
}
@keyframes beam { to { --beam: 360deg; } }

/* The one authored moment: on load the headline rises out of a clip and the maroon underline
   draws under "back in service". Final state is the default, so no motion leaves it as is. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise .9s cubic-bezier(.16, 1, .3, 1) both; }
  .hero .lede, .hero .actions { animation: rise .9s cubic-bezier(.16, 1, .3, 1) .12s both; }
  .hero h1 em { animation: underline .8s cubic-bezier(.16, 1, .3, 1) .55s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 -20% 0); } }
@keyframes underline { from { background-size: 0 .14em; } }

/* Services: a photo from the current site sits in the top-right of each group and fades out to
   the left and downwards, so the list reads on clean white. Two masks, intersected, keep the
   top-right corner solid. Decorative: the heading already names the service. */
.svc-body { position: relative; display: grid; }
.svc-photo { display: block; height: clamp(170px, 20vw, 280px); margin: -28px 0 0; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.04);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 88%), linear-gradient(to left, #000 45%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 88%), linear-gradient(to left, #000 45%, transparent 100%);
  mask-composite: intersect; }
.svc-body ul { position: relative; margin-top: -30px; }
#pumps .svc-photo img { object-position: 60% 60%; }
#site .svc-photo img { object-position: 50% 40%; }
@media (max-width: 899px) { .svc-photo { margin-top: 8px; height: 190px; } .svc-body ul { margin-top: -20px; } }
