:root {
  --navy: #002b5b;
  --navy-light: #0d467f;
  --navy-dark: #001a3a;
  --orange: #ff6b00;
  --orange-dark: #e35f00;
  --bg: #f7fafc;
  --text: #132238;
  --muted: #5f6f82;
  --border: #d9e1ea;
  --card: #ffffff;
  --shadow: 0 14px 36px rgba(14, 30, 57, 0.09);
  --radius: 18px;
  --container: 1180px;
  /* Always-visible side inset (replaces “shrink width only”, which can look like zero padding) */
  --gutter-x: clamp(1.125rem, 4.5vw, 2rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: max(var(--gutter-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter-x), env(safe-area-inset-right, 0px));
}

.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
}

.topbar .container,
.navbar .container,
.footer-bottom .container,
.cta-strip .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Full-bleed topbar row: inner edge lines up with padded .container content above/below */
.topbar .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px max(var(--gutter-x), env(safe-area-inset-right, 0px)) 10px
    calc((100vw - min(var(--container), 100vw)) / 2 + max(var(--gutter-x), env(safe-area-inset-left, 0px)));
  flex-wrap: wrap;
  justify-content: flex-start;
}

.topbar-group:last-child {
  margin-left: auto;
  justify-content: flex-end;
  text-align: right;
}

.topbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag.orange {
  background: var(--orange);
  color: #fff;
}

.tag.light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.navbar {
  --nav-bar-height: 60px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 43, 91, 0.08);
  backdrop-filter: blur(10px);
}

.navbar .container {
  min-height: var(--nav-bar-height);
  padding-top: 0;
  padding-bottom: 0;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-weight: 700;
}

/* Site logo image (replaces legacy anchor .brand-mark) */
.brand-logo {
  display: block;
  width: auto;
  height: 52px;
  max-height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--orange);
  display: grid;
  place-items: center;
  font-size: 22px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--orange);
  background: rgba(255, 107, 0, 0.08);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 28px;
  color: var(--navy);
}

.button,
.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.button {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow);
}

.button:hover {
  background: var(--orange-dark);
}

.button-outline {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.button-outline.dark {
  color: var(--navy);
  background: #fff;
  border-color: var(--border);
}

.hero,
.page-hero {
  position: relative;
  color: #fff;
}

.hero {
  min-height: 82vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(0, 28, 60, 0.8), rgba(0, 28, 60, 0.7)),
    url("../images/hero-ship.jpg") center/cover no-repeat;
}

.page-hero {
  min-height: 380px;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 43, 91, 0.92), rgba(0, 43, 91, 0.56));
}

.page-hero .container,
.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1,
.page-hero h1 {
  margin: 16px 0;
  line-height: 1.08;
  font-size: clamp(38px, 7vw, 66px);
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 54px);
}

.hero p,
.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.section {
  padding: 84px 0;
}

.section-alt {
  background: var(--bg);
}

.section-dark {
  background: var(--navy);
  color: #fff;
}

.eyebrow {
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-dark .eyebrow {
  color: #ff9f5d;
}

.section h2 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.14;
}

.lead {
  max-width: 760px;
  color: var(--muted);
}

.section-dark .lead,
.section-dark .muted {
  color: rgba(255, 255, 255, 0.72);
}

.stats-grid,
.card-grid,
.service-grid,
.jobs-grid,
.compliance-grid,
.roles-grid,
.contact-grid {
  display: grid;
  gap: 24px;
}

.stats-grid {
  margin-top: 24px;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.service-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jobs-grid,
.roles-grid,
.compliance-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.stat-card,
.job-card,
.info-card,
.timeline-card,
.role-card,
.quote-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-dark .role-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.stat-card,
.card,
.job-card,
.info-card,
.timeline-card,
.role-card,
.quote-card {
  padding: 24px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
  height: 100%;
  text-align: center;
}

.stat-card strong {
  display: block;
  color: var(--navy);
  font-size: 32px;
  margin-bottom: 6px;
  line-height: 1.1;
}

.stat-card .muted {
  min-height: 2.6em;
}

.muted {
  color: var(--muted);
}

.two-col,
.feature-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
}

.feature-row {
  margin-top: 40px;
}

.feature-row + .feature-row {
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.feature-row.reverse .image-wrap {
  order: 2;
}

.feature-row.reverse .text-wrap {
  order: 1;
}

.image-wrap img,
.photo {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.bullet-list,
.check-list,
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bullet-list li,
.check-list li,
.plain-list li {
  margin: 10px 0;
}

.check-list li::before,
.bullet-list li::before {
  content: "•";
  color: var(--orange);
  font-weight: 700;
  display: inline-block;
  width: 18px;
}

.timeline {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.timeline-year {
  color: var(--orange);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.job-table {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.job-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.job-table thead {
  background: var(--navy);
  color: #fff;
}

.job-table th,
.job-table td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.job-table tbody tr:nth-child(even) {
  background: #f9fbfd;
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  background: #ffe3d0;
  color: #b94800;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.contact-flash--ok {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #1b5e20;
}

.contact-flash--err {
  background: #ffebee;
  border: 1px solid #e57373;
  color: #b71c1c;
}

body.privacy-modal-open {
  overflow: hidden;
}

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(var(--gutter-x, 1rem), env(safe-area-inset-top, 0px)) max(var(--gutter-x, 1rem), env(safe-area-inset-right, 0px))
    max(var(--gutter-x, 1rem), env(safe-area-inset-bottom, 0px)) max(var(--gutter-x, 1rem), env(safe-area-inset-left, 0px));
}

.privacy-modal[hidden] {
  display: none !important;
}

.privacy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 43, 91, 0.82);
  backdrop-filter: blur(4px);
}

.privacy-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 640px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 26, 58, 0.35);
  border: 1px solid rgba(0, 43, 91, 0.12);
  padding: clamp(22px, 4vw, 28px);
}

.privacy-modal__title {
  margin: 0 0 16px;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  color: var(--navy);
  line-height: 1.2;
}

.privacy-modal__body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}

.privacy-modal__body p {
  margin: 0 0 12px;
}

.privacy-modal__lead {
  font-weight: 600;
  color: var(--navy);
}

.privacy-modal__muted {
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.privacy-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.privacy-modal .button {
  min-width: 9rem;
}

.privacy-modal .button-outline {
  color: var(--navy);
  background: #fff;
  border: 2px solid var(--navy);
}

.privacy-modal .button-outline:hover {
  background: rgba(0, 43, 91, 0.06);
  color: var(--navy);
}

/* ----- Quality page — ISO 9001:2015 showcase ----- */
.iso-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(260px, 0.88fr);
  gap: clamp(28px, 5vw, 48px);
  align-items: start;
}

.iso-showcase__intro h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  color: var(--navy);
}

.iso-figure {
  margin: 0;
  position: sticky;
  top: 96px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 24px);
}

.iso-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(72vh, 560px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 10px;
}

.iso-figure figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
}

.card--iso {
  border-left: 4px solid var(--orange);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 107, 0, 0.08);
}

@media (max-width: 900px) {
  .iso-showcase {
    grid-template-columns: 1fr;
  }

  .iso-figure {
    position: static;
    max-width: 400px;
    margin-inline: auto;
  }
}

.cta-strip {
  background: var(--navy);
  color: #fff;
  padding: 56px 0;
}

.cta-strip .container {
  gap: 22px 36px;
}

.footer-main {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 55%, var(--navy-dark) 100%);
  color: #fff;
  padding: 72px 0 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-main p,
.footer-main li {
  color: rgba(255, 255, 255, 0.72);
}

.footer-main a {
  color: rgba(255, 255, 255, 0.82);
}

/* Grid: narrow brand + certs (matches correction layout); wider link + contact columns */
.footer-main .container.footer-grid,
.footer-main .footer-grid {
  display: grid;
  width: 100%;
  align-items: start;
  column-gap: clamp(22px, 3vw, 40px);
  row-gap: 30px;
  grid-template-columns:
    clamp(210px, 22vw, 258px)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1.12fr);
}

.footer-main .footer-grid > .footer-col,
.footer-main .footer-grid > .footer-contact {
  min-width: 0;
}

@media (min-width: 1081px) {
  .footer-main .footer-grid > .footer-col,
  .footer-main .footer-grid > .footer-contact {
    padding-left: clamp(20px, 3vw, 40px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.footer-main h3 {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.footer-brand {
  width: 100%;
  max-width: none;
  padding-right: 0;
}

.footer-brand .brand {
  color: #fff;
  flex-wrap: wrap;
  row-gap: 10px;
  align-items: flex-start;
}

.footer-brand .brand-mark {
  flex-shrink: 0;
}

/* Circular crop: hides white square corners in evic_logo_blue.jpg on navy footer */
.footer-brand .brand-logo {
  width: 52px;
  height: 52px;
  max-width: 52px;
  max-height: 52px;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  object-position: center;
}

.footer-brand .brand small {
  color: rgba(255, 255, 255, 0.52);
}

.footer-brand p {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.65;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.68);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 20px;
}

.footer-badge-img {
  height: 46px;
  width: auto;
  max-width: min(132px, 38vw);
  object-fit: contain;
  object-position: left center;
  opacity: 0.95;
}

.footer-main .plain-list li {
  margin: 0;
  padding: 6px 0;
}

.footer-main .footer-col .plain-list a {
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  padding: 2px 0;
  transition: color 0.15s ease;
}

.footer-main .footer-col .plain-list a:hover {
  color: #fff;
}

.footer-contact {
  overflow-wrap: break-word;
}

.footer-contact .plain-list li {
  line-height: 1.6;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

/* ≤1024px: single column — avoids a half-width "Contact" row in a 2-col grid */
@media (max-width: 1024px) {
  .footer-main {
    padding: 56px 0 44px;
  }

  /* Must match .footer-main .container.footer-grid specificity from the base rule,
     or the 4-column desktop grid wins on phones and columns overlap. */
  .footer-main .container.footer-grid,
  .footer-main .footer-grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
    column-gap: 0;
  }

  .footer-main .footer-grid > .footer-col,
  .footer-main .footer-grid > .footer-contact {
    border-left: none;
    padding-left: 0;
  }

  .footer-main .footer-grid .footer-brand {
    grid-column: auto;
    max-width: none;
    padding-right: 0;
  }
}

.footer-bottom {
  background: #00112a;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  padding: 18px 0;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: var(--nav-bar-height, 60px);
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .desktop-only {
    display: none;
  }

  .stats-grid,
  .service-grid,
  .two-col,
  .feature-row,
  .contact-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .image-wrap,
  .feature-row.reverse .text-wrap {
    order: initial;
  }
}

@media (max-width: 640px) {
  .navbar {
    --nav-bar-height: 52px;
  }

  .navbar .brand-logo {
    width: auto;
    height: 44px;
    max-height: 44px;
    border-radius: 0;
  }

  .footer-brand .brand-logo {
    width: 48px;
    height: 48px;
    max-width: 48px;
    max-height: 48px;
  }

  /* Keep topbar visible: show DMW / ISO line on phones (stacked, readable). */
  .topbar {
    display: block;
    font-size: 12px;
  }

  .topbar .container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    width: 100%;
    max-width: none;
    padding: 10px max(var(--gutter-x), env(safe-area-inset-right, 0px)) 12px
      max(var(--gutter-x), env(safe-area-inset-left, 0px));
  }

  .topbar-group {
    justify-content: flex-start;
    width: 100%;
  }

  .topbar-group:last-child {
    margin-left: 0;
    justify-content: flex-start;
    text-align: left;
  }

  .topbar .tag.orange {
    font-size: 10px;
    padding: 6px 10px;
    line-height: 1.4;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .section {
    padding: 68px 0;
  }

  .hero,
  .page-hero {
    min-height: 70vh;
  }

  .button,
  .button-outline {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  /* Footer: readable blocks, touch-friendly links, copyright stack */
  .footer-main {
    padding: 40px 0 28px;
  }

  .footer-main .container.footer-grid,
  .footer-main .footer-grid {
    row-gap: 12px;
  }

  .footer-main .footer-grid > .footer-brand,
  .footer-main .footer-grid > .footer-col,
  .footer-main .footer-grid > .footer-contact {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 18px 16px;
  }

  .footer-brand p {
    max-width: none;
    font-size: 15px;
    line-height: 1.65;
  }

  .footer-main h3 {
    margin-bottom: 12px;
  }

  .footer-main .footer-col .plain-list a {
    display: block;
    padding: 12px 10px;
    margin: 2px -10px;
    border-radius: 10px;
    font-size: 15px;
  }

  .footer-main .footer-col .plain-list a:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .footer-contact .plain-list li {
    font-size: 14px;
    padding: 8px 0;
  }

  .footer-badges {
    margin-top: 16px;
    gap: 12px 14px;
  }

  .footer-badge-img {
    height: 40px;
    max-width: min(46%, 130px);
  }

  .footer-bottom {
    padding: 20px 0;
  }

  .footer-bottom .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}
