:root {
  --navy: #023261;
  --orange: #ee8624;
  --red: #e02b20;
  --ink: #122033;
  --muted: #5b6b7c;
  --bg: #f7f9fc;
  --card: #ffffff;
  --line: #d9e2ec;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 50, 97, 0.08);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--navy); }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(640px, calc(100% - 2rem)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .5rem 1rem;
}
.skip-link:focus { left: 0; z-index: 10; }

.site-header {
  background: #fff;
  border-bottom: 4px solid var(--orange);
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
}
.nav { display: flex; flex-wrap: wrap; gap: .85rem 1rem; align-items: center; }
.nav a { text-decoration: none; color: var(--navy); font-weight: 600; font-size: .95rem; }
.nav a.phone {
  background: var(--navy); color: #fff; padding: .45rem .8rem; border-radius: 999px;
}

.page-hero {
  background: linear-gradient(135deg, #023261 0%, #0a4b8c 55%, #1463ad 100%);
  color: #fff; padding: 4.5rem 0 3.5rem;
}
.page-hero h1 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; }

.hero--photo {
  position: relative;
  color: #fff;
  min-height: min(72vh, 640px);
  display: flex;
  align-items: flex-end;
  padding: 5rem 0 3.5rem;
  overflow: hidden;
  border-bottom: 10px solid var(--orange);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-bg--a {
  background-image: url(../img/heroes/hero-yacht-ocean.b00402efb198.jpg);
}
/* Two stacked clips driven by hero.js: hidden until a clip is actually playing,
   then crossfaded by toggling .is-on (the still photo shows through meanwhile). */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero-video.is-on { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(2, 50, 97, 0.72) 0%,
    rgba(2, 50, 97, 0.42) 45%,
    rgba(2, 50, 97, 0.22) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}
.brand-mark {
  margin: 0 0 .35rem;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: .02em;
}
.brand-mark span { color: var(--orange); }
.hero h1, .page-hero h1 { margin: 0 0 .35rem; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; }
/* Brand names sit under the short "The US Branch of" title. */
.hero-brands {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .55rem .85rem;
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
}
.hero-brands-sep { color: var(--orange); font-weight: 700; opacity: .9; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; opacity: .9; font-size: .85rem; margin: 0 0 .75rem; }
.lead { font-size: 1.15rem; max-width: 38rem; opacity: .95; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.brand-strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0;
}
.brand-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2rem;
}
/* The two wordmarks share the same letter height (--cap) and the same
   horizontal text axis; the MARCO flag below and the TESSILMARE ship above
   are treated as accessories. Ratios are measured on the source files:
   MARCO letters rows 1-76 of 109 px, TESSILMARE letters rows 83-140 of 142 px. */
.brand-logos {
  --cap: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4rem;
}
.brand-logo {
  width: auto;
  filter: none;
}
.brand-logo--marco {
  height: calc(var(--cap) * 109 / 76);
  /* TESSILMARE text center (111.5/58 cap) minus MARCO text center (38.5/76 cap). */
  margin-top: calc(var(--cap) * (111.5 / 58 - 38.5 / 76));
}
.brand-logo--tess {
  height: calc(var(--cap) * 142 / 58);
}

/* Home "Where our products work": photo cards (backgrounds live in CSS for CSP). */
.sectors {
  background: #f4f7fb;
  padding: 3rem 0;
}
.sectors .section-kicker { color: var(--orange); }
.sectors-title { margin: 0 0 1.5rem; color: var(--navy); font-size: clamp(1.5rem, 2.5vw, 2rem); }
/* Six cards = two full rows of three wide rectangles on desktop. */
.sector-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sector {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 16 / 10;
  min-height: 230px;
  height: 100%;
  padding: 0 1.15rem 1.1rem;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.sector::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  /* Tone the photo down so bright skies and steel do not fight the text. */
  filter: brightness(.85) saturate(.9);
  transform: scale(1.02);
  transition: transform .45s ease;
}
.sector::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(2, 50, 97, 0) 25%,
    rgba(2, 50, 97, 0.65) 55%,
    rgba(2, 50, 97, 0.94) 100%
  );
}
/* Fixed-height text block: the orange rule sits at the same height in every card,
   whatever the number of wrapped lines (sized for a 2-line title + 2-line text). */
.sector-body {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: .35rem;
  min-height: 7.2rem;
  padding-top: .7rem;
  border-top: 3px solid var(--orange);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.sector:hover::before, .sector:focus-visible::before { transform: scale(1.06); }
.sector--marine::before { background-image: url(../img/sectors/marine.d0ee6da740cb.jpg); }
.sector--road::before { background-image: url(../img/sectors/road.8c0cc777ab0c.jpg); }
.sector--motorsport::before { background-image: url(../img/sectors/motorsport.4e028433b27d.jpg); }
.sector--defense::before { background-image: url(../img/sectors/defense.e4d5cef40b0e.jpg); }
.sector--food::before { background-image: url(../img/sectors/food.17cbc244e13f.jpg); }
.sector--cooling::before { background-image: url(../img/sectors/cooling.6db9b6a085e5.jpg); }
.sector strong { color: #fff; font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.sector-body > span { font-size: .95rem; line-height: 1.5; color: #fff; }

.section { padding: 3rem 0; }
.grid-2, .grid-3 { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; color: var(--navy); font-size: 1.25rem; }
/* Push the CTA to the bottom so orange buttons align across cards of unequal copy. */
.card > .btn { margin-top: auto; align-self: flex-start; }
.meta { color: var(--muted); font-size: .9rem; }
.prose { background: #fff; border-radius: var(--radius); padding: 1.5rem 1.75rem; border: 1px solid var(--line); }

.btn {
  display: inline-block; text-decoration: none; border: none; cursor: pointer;
  border-radius: 999px; padding: .7rem 1.2rem; font-weight: 700;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-accent { background: var(--red); color: #fff; }

.filter-form {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; align-items: end;
  background: #fff; padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line);
}
.filter-form label { display: grid; gap: .35rem; font-weight: 600; color: var(--navy); }
input, select, textarea {
  font: inherit; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; min-width: 12rem;
}
.logo-thumb { max-height: 64px; margin-bottom: .75rem; }
.logo-large { max-height: 120px; margin-bottom: 1rem; }
.catalog-card img { border-radius: 10px; margin-bottom: 1rem; max-height: 220px; object-fit: cover; width: 100%; }

.page-hero--photo {
  position: relative;
  isolation: isolate;
  padding: 6.5rem 0 4.5rem;
  border-bottom: 8px solid var(--orange);
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
}
.page-hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(2, 50, 97, 0.86) 0%, rgba(2, 50, 97, 0.55) 55%, rgba(2, 50, 97, 0.25) 100%);
}
.page-hero--about { background-image: url(../img/panels/panel-about-boat.e62d929daa09.jpg); }

.section-kicker {
  margin: 0 0 .5rem;
  color: var(--orange);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-title {
  margin: 0 0 1.25rem;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.about-intro { padding: 4rem 0 4.5rem; }
.about-intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-lead {
  margin: 0 0 1.75rem;
  font-size: 1.2rem;
  line-height: 1.6;
  padding-left: 1.1rem;
  border-left: 4px solid var(--orange);
}
.brand-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.brand-duo-item {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
a.brand-duo-item:hover,
a.brand-duo-item:focus-visible {
  border-color: var(--navy);
  box-shadow: 0 10px 28px rgba(2, 50, 97, 0.16);
  transform: translateY(-2px);
  outline: none;
}
.brand-duo-item img { max-height: 40px; width: auto; margin-bottom: .6rem; }
.brand-duo-item p { margin: 0; color: var(--muted); font-size: .95rem; font-weight: 600; }
.about-sectors { margin: 1.25rem 0 0; line-height: 1.65; }
.about-figure { margin: 0; }
.about-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(2, 50, 97, 0.18);
}

.about-pillars {
  background: linear-gradient(135deg, #023261 0%, #0a4b8c 100%);
  color: #e6eef7;
  padding: 4rem 0;
}
.pillar {
  border-top: 3px solid var(--orange);
  padding-top: 1.25rem;
}
.pillar-index {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  margin-bottom: .75rem;
}
.pillar h3 { margin: 0 0 .6rem; color: #fff; font-size: 1.2rem; }
.pillar p { margin: 0; line-height: 1.65; }
.pillar strong { color: #fff; }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
}
.cta-band h2 { margin: 0 0 .35rem; color: var(--navy); font-size: 1.4rem; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--navy); color: #fff; }

.site-footer {
  background: var(--navy); color: #d7e6f5; margin-top: 2rem; padding: 2rem 0;
}
.site-footer a { color: #fff; }
.footer-inner {
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer-nav { display: grid; gap: .35rem; }
/* SemVer from the running container image (MATE_VERSION / Docker APP_VERSION). */
.footer-version {
  margin: 1rem auto 0;
  padding: 0 0 .25rem;
  font-size: .7rem;
  letter-spacing: .04em;
  opacity: .45;
  text-align: right;
}
/* Product family pages: catalog-backed bullet lists under section headings. */
.prose .product-bullets {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
}
.prose .product-bullets li {
  margin: 0.35rem 0;
}
.prose .meta {
  color: var(--muted);
  font-size: 0.92rem;
}
/* Product family intro: readable narrative beside the official product photo. */
.product-intro { margin-bottom: 1.5rem; }
.product-intro-text p { font-size: 1.06rem; line-height: 1.7; }
.product-intro-text p:first-child { margin-top: 0; }
.product-intro--photo {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: start;
}
.product-intro-figure {
  margin: 0;
  position: sticky;
  top: 6rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.product-intro-figure img { width: 100%; }
/* Representative models: one card per "NAME — description" item. */
.model-grid {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}
.model-grid li {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem 1.1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: 10px;
}
.model-grid strong { color: var(--navy); font-size: 1.02rem; }
.model-grid span { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.messages .message { background: #e8f7ee; border: 1px solid #b7e0c5; padding: .75rem 1rem; border-radius: 8px; }

@media (max-width: 960px) {
  .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav a.phone { width: 100%; text-align: center; }
  .sector-grid { grid-template-columns: 1fr; }
  .hero--photo {
    min-height: 520px;
    align-items: center;
    padding: 3.5rem 0 2.75rem;
  }
  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(2, 50, 97, 0.72) 0%,
      rgba(2, 50, 97, 0.82) 100%
    );
  }
  .brand-logos { --cap: 22px; gap: 1.75rem; }
  .page-hero--photo { padding: 4.5rem 0 3rem; }
  .about-intro { padding: 2.75rem 0 3.5rem; }
  .about-intro-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .brand-duo { grid-template-columns: 1fr; }
  .cta-band { padding: 1.4rem 1.25rem; }
  /* Product photo above the narrative on narrow screens. */
  .product-intro--photo { grid-template-columns: 1fr; gap: 1.25rem; }
  .product-intro-figure { position: static; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  /* Motion-sensitive visitors keep the still photo. */
  .hero-video { display: none; }
  .sector::before { transition: none; }
}
