@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital@0;1&display=swap");

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--surface);
  overflow-x: hidden;            /* belt to the braces; nothing should overflow */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: var(--lh-tight); letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ----------------------------------------------------------------- grid */
.wrap {
  width: min(var(--content-max), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

.section { padding-block: var(--space-7); }
.section--tight { padding-block: var(--space-5); }
@media (max-width: 767px) { .section { padding-block: var(--space-5); } }

.section__head { text-align: center; margin-bottom: var(--space-5); }
.section__head h2 { font-size: var(--fs-h1); }
.section__head p {
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------- header */
.header {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-3);
}
.header--over {                    /* home page: sits on the hero */
  position: absolute; inset-inline: 0; top: 0;
}
.logo { display: inline-flex; flex: 0 0 auto; }
.logo img { width: 190px; }
@media (max-width: 767px) { .logo img { width: 140px; } }

.nav__toggle, .nav__toggle-label { display: none; }

.nav__list {
  display: flex; align-items: center; gap: clamp(14px, 1.6vw, 30px);
  list-style: none; margin: 0;
  background: var(--orange);
  border-radius: var(--radius-pill);
  padding: 0 clamp(18px, 1.4vw, 26px);
  min-height: 54px;
}
.nav__list a {
  display: flex; align-items: center;
  min-height: var(--tap-min);
  font-size: var(--fs-nav); color: #fff; text-decoration: none;
  white-space: nowrap;
}
.nav__list a:hover, .nav__list a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.nav__list a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* disclosure menu — no JavaScript, so it works before/without hydration */
@media (max-width: 1023px) {
  .nav__toggle-label {
    display: flex; align-items: center; justify-content: center;
    width: var(--tap-min); height: var(--tap-min);
    background: var(--orange); border-radius: 50%; cursor: pointer;
  }
  .nav__toggle-label span,
  .nav__toggle-label span::before,
  .nav__toggle-label span::after {
    display: block; width: 20px; height: 2px; background: #fff; content: ""; position: relative;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav__toggle-label span::before { position: absolute; top: -6px; }
  .nav__toggle-label span::after  { position: absolute; top: 6px; }

  .nav__list {
    position: absolute; inset-inline: 0; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; gap: 0;
    border-radius: 16px; padding: var(--space-1) 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
    display: none;
  }
  .nav__list a { min-height: 56px; padding-inline: var(--space-3); }
  .nav__toggle:checked ~ .nav__list { display: flex; }
  .nav__toggle:checked ~ .nav__toggle-label span { background: transparent; }
  .nav__toggle:checked ~ .nav__toggle-label span::before { transform: translateY(6px) rotate(45deg); }
  .nav__toggle:checked ~ .nav__toggle-label span::after  { transform: translateY(-6px) rotate(-45deg); }
  .nav__toggle:focus-visible ~ .nav__toggle-label { outline: 3px solid var(--ink); outline-offset: 3px; }
  .header { position: relative; }
}

/* ----------------------------------------------------------------- hero */
.hero { position: relative; isolation: isolate; background: var(--grey-100); }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.hero::after {                     /* scrim: opaque at the text, clear over the spindle */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, #fff 0%, rgba(255,255,255,.94) 34%, rgba(255,255,255,.55) 56%, rgba(255,255,255,0) 78%);
}
.hero .wrap { padding-block: clamp(150px, 18vw, 280px) clamp(80px, 11vw, 175px); }
.hero__inner { max-width: 62ch; margin-inline-end: auto; }
.hero h1 { font-size: var(--fs-h1); }
.hero__lead {
  font-size: var(--fs-lead); color: var(--text-muted);
  margin-top: var(--space-3); max-width: 54ch;
}

@media (max-width: 767px) {
  .hero__media img { object-position: 66% 50%; }
  .hero::after {
    background: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.93) 46%, rgba(255,255,255,.86) 100%);
  }
  .hero .wrap { padding-block: 140px var(--space-5); }
}

/* --------------------------------------------------------------- button */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap-min); padding: 12px 28px;
  background: var(--orange); color: #fff; text-decoration: none;
  border: 0; border-radius: var(--radius-pill);
  font-size: 1rem; font-weight: 500; cursor: pointer;
  transition: background-color .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--orange-hover); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--ink); color: #fff; }
.hero .btn { margin-top: var(--space-4); }

/* --------------------------------------------------------- sector cards */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 1023px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px)  { .sectors { grid-template-columns: 1fr; } }

/* rows 1 and 2 in the mockup used different column sets; a single grid with
   the last two items centred keeps 3+2 without inventing a second grid */
@media (min-width: 1024px) {
  .sectors > :nth-child(4) { grid-column: 1 / span 1; transform: translateX(calc(50% + var(--gap) / 2)); }
  .sectors > :nth-child(5) { grid-column: 2 / span 1; transform: translateX(calc(50% + var(--gap) / 2)); }
}

.card { position: relative; display: block; text-decoration: none; color: inherit; }
.card__media { position: relative; aspect-ratio: 536 / 692; overflow: hidden; background: var(--grey-100); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
/* Fixed two-line box so a one-word label and "Marine Manufacturing" share the
   same baseline across the row. The build strips the burnt-in captions from the
   three exports that carry them — see tools/build-assets.py. */
.card__label {
  position: absolute; inset-inline: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: center;
  min-height: calc(2 * var(--fs-h2) * 1.08 + var(--space-3));
  padding: var(--space-5) var(--space-2) var(--space-3);
  font-size: var(--fs-h2); font-weight: 600; text-align: center; text-wrap: balance;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.72) 38%, rgba(255,255,255,.95) 100%);
}

/* -------------------------------------------------------------- clients */
.clients {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: var(--space-5) var(--gap);
}
.clients img { flex: 0 1 auto; }
.clients img { max-height: 92px; width: auto; object-fit: contain; }
@media (max-width: 479px) { .clients img { max-height: 64px; } }

/* -------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 767px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; background: var(--grey-100); }
.gallery figcaption {
  font-size: var(--fs-small); color: var(--text-muted); margin-top: var(--space-1);
}

/* ----------------------------------------------------------------- form */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 62fr);
  gap: var(--gap); align-items: start;
}
@media (max-width: 1023px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid > figure { margin: 0; }

.form { display: grid; gap: var(--space-2); }
.form label { display: block; }
.form input, .form textarea {
  width: 100%; min-height: 68px; padding: 20px 30px;
  background: var(--ink); color: #fff;
  border: 2px solid transparent; border-radius: 0;
  font: inherit; font-size: var(--fs-body);
}
.form textarea { min-height: 132px; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: rgba(255, 255, 255, .72); }
.form input:focus-visible, .form textarea:focus-visible { outline: none; border-color: var(--orange); }
.form .btn { min-height: 68px; width: 100%; border-radius: 0; }
.form__note { font-size: var(--fs-small); color: var(--text-muted); }

/* -------------------------------------------------------------- leaders */
.leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 767px) { .leaders { grid-template-columns: 1fr; } }
.leader__photo {
  aspect-ratio: 477 / 600; background: var(--grey-100);
  display: grid; place-items: center;
  color: var(--grey-400); font-size: var(--fs-small); text-align: center; padding: var(--space-2);
}
.leader h3 { font-size: var(--fs-h3); margin-top: var(--space-2); }
.leader p { color: var(--text-muted); }

/* ----------------------------------------------------------------- prose */
.prose { max-width: 72ch; margin-inline: auto; }
.prose > * + * { margin-top: var(--space-3); }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--space-5); }
.prose h3 { font-size: 1.25rem; margin-top: var(--space-4); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-1); }
.prose a { color: var(--orange-hover); text-underline-offset: 3px; }
/* A link that is the whole of its table cell is a target, not prose, so it
   needs a real box — the WCAG 2.5.8 inline-in-text exemption does not cover it. */
.prose td a, .prose th a { display: inline-flex; align-items: center; min-height: var(--tap-min); }
.prose table {
  width: 100%; border-collapse: collapse; font-size: var(--fs-small);
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
@media (min-width: 600px) { .prose table { display: table; } }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--grey-100); }
.prose th { background: var(--surface-alt); font-weight: 600; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------------ blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); list-style: none; padding: 0; margin: 0; }
@media (max-width: 1023px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px)  { .posts { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; gap: var(--space-2); height: 100%; }
.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--grey-100); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card h3 { font-size: var(--fs-h3); }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover, .post-card h3 a:focus-visible { color: var(--orange-hover); }
.post-card p { color: var(--text-muted); }

.meta { font-size: var(--fs-small); color: var(--text-muted); }
.crumbs { font-size: var(--fs-small); color: var(--text-muted); padding-block: var(--space-3); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--grey-400); }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap-min); }

.contact-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-1); }
.contact-list a { display: inline-flex; align-items: center; min-height: var(--tap-min); }

.needs {
  border-left: 4px solid var(--orange); background: var(--surface-alt);
  padding: var(--space-3); font-size: var(--fs-small);
}

/* ---------------------------------------------------------------- footer */
.footer { background: var(--ink); color: #fff; padding-block: var(--space-5); }
.footer__grid {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--gap); align-items: start;
}
@media (max-width: 1023px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px)  { .footer__grid { grid-template-columns: 1fr; gap: var(--space-4); } }
.footer__mark { width: 150px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap-min); }
.footer a:hover, .footer a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.footer__contact { text-align: right; display: grid; gap: var(--space-2); }
@media (max-width: 1023px) { .footer__contact { text-align: left; } }
.footer__legal {
  margin-top: var(--space-4); padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: var(--fs-small); color: rgba(255, 255, 255, .7);
}
