/* CMD Plant Ltd - site styles */
:root {
  --ink: #262624;
  --ink-2: #33332f;
  --paper: #edefea;
  --white: #ffffff;
  --green: #62d11f;
  --green-deep: #2c6f0b;
  --steel: #666b64;
  --line: #cbd0c7;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --skew: -12deg;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 64ch; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(3rem, 8.6vw, 8rem); line-height: 0.88; }
h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 800; }
:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 3px; }
.dark :focus-visible, .site-footer :focus-visible { outline-color: var(--green); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: 0.6rem 1rem;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.5rem;
}
.logo {
  display: inline-flex; flex-direction: column; align-items: stretch;
  text-decoration: none; font-family: var(--display); font-weight: 900;
  line-height: 0.8; width: 5.6rem;
}
.logo-top { font-size: 2.55rem; letter-spacing: 0.02em; text-align: center; }
.logo-bar {
  background: var(--ink); color: var(--paper);
  font-size: 0.86rem; letter-spacing: 0.14em; text-align: center;
  padding: 0.28rem 0 0.22rem; margin-top: 0.22rem; line-height: 1;
}
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 0.5rem 0.7rem; border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--green); }
.nav .btn { margin-left: 0.6rem; border-bottom: 0; }
.menu-btn {
  display: none; background: var(--ink); color: var(--white);
  border: 0; font: 600 1rem var(--body); padding: 0.6rem 1rem; cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 700 1rem var(--body);
  padding: 0.85rem 1.4rem; border: 2px solid var(--ink);
  background: var(--ink); color: var(--white);
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--green); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--white); }
.dark .btn { background: var(--green); color: var(--ink); border-color: var(--green); }
.dark .btn:hover { background: var(--white); border-color: var(--white); }
.dark .btn.ghost { background: transparent; color: var(--white); border-color: var(--white); }
.dark .btn.ghost:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

/* Sections */
.band { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.band.tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.dark { background: var(--ink); color: var(--white); }
.white { background: var(--white); }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.5; max-width: 52ch; }
.head { display: grid; gap: 1.2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 900px) {
  .head { grid-template-columns: 1.1fr 1fr; align-items: end; gap: 3rem; }
}
.head p { margin: 0; }

/* Slab: the slanted green banner from the CMD flyers */
.slab {
  display: inline-block; background: var(--green); color: var(--ink);
  transform: skewX(var(--skew)); padding: 0.7rem 1.6rem;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.2rem, 2.2vw, 1.9rem); line-height: 1.05;
}
.slab > span { display: block; transform: skewX(12deg); }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero h1 { max-width: 16ch; }
.hero .lede { margin-top: 1.8rem; }
.hero .slab { margin: 2rem 0 0 0.6rem; }
.page-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem); border-bottom: 2px solid var(--ink); }
.page-hero h1 { font-size: clamp(2.8rem, 7.4vw, 6.5rem); max-width: 14ch; }
.page-hero .lede { margin-top: 1.5rem; }

/* Island rail: coverage from north to south */
.rail-band { padding: clamp(2.5rem, 5vw, 4rem) 0; overflow: hidden; }
.rail-title { font-family: var(--body); text-transform: none; font-weight: 600; font-size: 1.05rem; letter-spacing: 0; line-height: 1.4; margin-bottom: 2.2rem; color: #c9cec4; }
.rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.rail::before {
  content: ""; position: absolute; left: 0.5rem; right: calc(100% / 7 - 1rem); top: 0.56rem;
  height: 4px; background: var(--green);
  transform-origin: left; animation: draw 1.1s cubic-bezier(0.6, 0, 0.2, 1) both;
}
.rail li { position: relative; padding-top: 2rem; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(1rem, 1.9vw, 1.6rem); line-height: 1; animation: pop 0.4s both; animation-delay: calc(var(--i) * 0.14s + 0.1s); }
.rail li::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--green);
}
.rail li.yard::before { background: var(--green); box-shadow: 0 0 0 6px rgba(98, 209, 31, 0.25); }
.rail li small { display: block; font: 500 0.85rem/1.35 var(--body); text-transform: none; color: #c9cec4; margin-top: 0.4rem; max-width: 14ch; }
.rail li.yard small { color: var(--green); font-weight: 700; }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 760px) {
  .rail { grid-template-columns: 1fr; gap: 1.4rem; }
  .rail::before { left: 0.56rem; right: auto; top: 0.5rem; bottom: 0.5rem; width: 4px; height: auto; transform-origin: top; animation-name: drawY; }
  .rail li { padding: 0 0 0 2.4rem; font-size: 1.4rem; }
  .rail li small { max-width: none; }
  @keyframes drawY { from { transform: scaleY(0); } }
}

/* Trade rows on the home page */
.trades { border-top: 2px solid var(--ink); }
.trade {
  display: grid; gap: 0.8rem 3rem; padding: clamp(1.6rem, 3vw, 2.6rem) 0;
  border-bottom: 2px solid var(--ink); text-decoration: none;
  transition: background 0.15s, padding 0.15s;
}
.trade h3 { font-size: clamp(2rem, 4.4vw, 3.8rem); font-weight: 900; }
.trade p { margin: 0; }
.trade .go { font-weight: 700; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.trade:hover { background: var(--white); padding-inline: 1.2rem; }
@media (min-width: 900px) { .trade { grid-template-columns: 1.1fr 1fr auto; align-items: center; } }

/* Spec plates: fleet items styled like a machine data plate */
.plates { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.plate {
  background: var(--ink); color: var(--white); padding: 1.7rem 1.6rem 1.5rem;
  border-radius: 4px; position: relative;
  background-image:
    radial-gradient(circle at 0.8rem 0.8rem, #8d928a 0 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 0.8rem) 0.8rem, #8d928a 0 3px, transparent 3.5px),
    radial-gradient(circle at 0.8rem calc(100% - 0.8rem), #8d928a 0 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 0.8rem) calc(100% - 0.8rem), #8d928a 0 3px, transparent 3.5px);
}
.white .plate, .paper .plate { box-shadow: none; }
.plate .kind { color: var(--green); font-weight: 700; font-size: 0.92rem; margin: 0 0 0.3rem; }
.plate h3 { font-size: 1.9rem; margin-bottom: 1rem; }
.plate dl { margin: 0; }
.plate dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.42rem 0; border-top: 1px solid #4a4a45; font-size: 0.97rem; }
.plate dt { color: #c9cec4; }
.plate dd { margin: 0; font-weight: 700; text-align: right; }
.plate p { font-size: 0.97rem; margin: 0.9rem 0 0; color: #e3e6df; }
.dark .plate { background: var(--ink-2); }

/* Two column prose + list */
.split { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: start; } }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { padding: 0.8rem 0 0.8rem 2.2rem; border-bottom: 1px solid var(--line); position: relative; font-weight: 600; }
.ticks li span { display: block; font-weight: 400; color: var(--steel); font-size: 0.97rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 1.1rem; height: 0.55rem; background: var(--green); transform: skewX(var(--skew)); }
.dark .ticks li { border-bottom-color: #4a4a45; }
.dark .ticks li span { color: #c9cec4; }
.cols { columns: 2; column-gap: 2.5rem; }
.cols li { break-inside: avoid; }
@media (max-width: 560px) { .cols { columns: 1; } }

/* What we work on strip */
.kit { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; border: 2px solid var(--ink); }
.kit div { padding: 1.3rem 1.1rem; border-right: 2px solid var(--ink); font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.45rem; line-height: 1; }
.kit div:last-child { border-right: 0; }
.kit small { display: block; font: 400 0.9rem/1.4 var(--body); text-transform: none; color: var(--steel); margin-top: 0.5rem; }
@media (max-width: 700px) { .kit div { border-right: 0; border-bottom: 2px solid var(--ink); } .kit div:last-child { border-bottom: 0; } }

/* Job log */
.jobs { display: grid; gap: 0; border-top: 2px solid currentColor; }
.job { display: grid; gap: 0.5rem 3rem; padding: 1.6rem 0; border-bottom: 1px solid #4a4a45; }
.white .job, .paper .job { border-bottom-color: var(--line); }
.job h3 { font-size: 1.6rem; }
.job p { margin: 0; }
.job .tag { color: var(--green); font-weight: 700; font-size: 0.95rem; }
.white .job .tag { color: var(--green-deep); }
@media (min-width: 900px) { .job { grid-template-columns: 11rem 1fr 1.5fr; align-items: baseline; } }

/* Notice / licence box */
.notice { border: 2px solid var(--ink); padding: 1.5rem 1.6rem; background: var(--white); }
.notice h3 { font-size: 1.4rem; margin-bottom: 0.7rem; }
.notice p:last-child { margin-bottom: 0; }
.notice dl { margin: 0; }
.notice dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.notice dd { margin: 0; font-weight: 700; }

/* CTA */
.cta { text-align: left; }
.cta h2 { max-width: 16ch; }
.cta .lede { margin-top: 1.2rem; }

/* Form */
form.quote { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 700; }
.field .hint { font-size: 0.9rem; color: var(--steel); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 0; padding: 0.75rem 0.85rem; width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }
.pair { display: grid; gap: 1.1rem; }
@media (min-width: 620px) { .pair { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: 0.92rem; color: var(--steel); margin: 0; }
.contact-big { font-family: var(--display); font-weight: 900; font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.05; word-break: break-word; text-decoration-color: var(--green); text-decoration-thickness: 4px; text-underline-offset: 6px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); padding: 3.5rem 0 2rem; border-top: 6px solid var(--green); }
.foot { display: grid; gap: 2.2rem; }
@media (min-width: 800px) { .foot { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.site-footer .logo-bar { background: var(--green); color: var(--ink); }
.site-footer h3 { font-size: 1.15rem; margin-bottom: 0.8rem; color: var(--green); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 0.2rem 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--green); }
.site-footer p { color: #c9cec4; font-size: 0.95rem; }
.legal { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid #4a4a45; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; font-size: 0.88rem; color: #c9cec4; }
.legal p { margin: 0; max-width: none; }

/* Mobile nav */
@media (max-width: 980px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 2px solid var(--ink);
    flex-direction: column; align-items: stretch; padding: 0.6rem 1.25rem 1.25rem; gap: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a[aria-current="page"] { border-bottom-color: var(--green); }
  .nav .btn { margin: 1rem 0 0; text-align: center; }
}

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

/* Photos */
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 1040px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
  .hero h1 { font-size: clamp(3rem, 6.3vw, 6.2rem); max-width: none; }
  .hero-photo img { aspect-ratio: 1 / 1; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); object-position: 8% 50%; }
}
.plate.has-img { padding-top: 0; overflow: hidden; }
.plate-img { width: calc(100% + 3.2rem); max-width: none; margin: 0 -1.6rem 1.4rem; height: auto; aspect-ratio: 5 / 4; object-fit: cover; }
.shots { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin-bottom: 2.5rem; }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.split .shot { margin-top: 1.8rem; }
.split .shot + .ticks { margin-top: 1.2rem; }
.shot figcaption { font-size: 0.92rem; padding-top: 0.5rem; color: var(--steel); }
.dark .shot figcaption { color: #c9cec4; }
