/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-charcoal);
  color: var(--c-white);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
  color: var(--c-white);
  text-decoration: none;
  margin-right: auto;
}
/* The company mark, decorative: the brand name next to it is the link text. */
.brand::before,
.site-footer .brand-name::before {
  content: '';
  width: 44px;
  aspect-ratio: 1500 / 810;
  background: url("../assets/brand/logo-mark.svg") center / contain no-repeat;
}
.brand::before { grid-row: 1 / span 2; }
.brand > * { grid-column: 2; }
.site-footer .brand-name { display: flex; align-items: center; gap: 10px; }
.brand-name { font-family: var(--font-head); font-weight: 800; letter-spacing: .04em; }
.brand-sub { font-size: .7rem; color: #d6d3d1; }

/* Primary navigation */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.site-nav a {
  display: inline-block;
  padding: 8px 0;
  color: #e7e5e4;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.site-nav a:hover { color: var(--c-white); }

.site-nav a[aria-current="true"] {
  color: var(--c-white);
  border-bottom-color: #fb7185;
}

/* Language switcher: always visible, never inside the collapsed menu. */
.lang-switch ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
}

.lang-switch a {
  display: inline-block;
  padding: 8px 6px;
  color: #a8a29e;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.lang-switch a:hover { color: var(--c-white); }

.lang-switch a[aria-current="page"] {
  color: var(--c-white);
  border-bottom-color: #fb7185;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  background: transparent;
  color: var(--c-white);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  position: relative;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

@media (max-width: 1023.98px) {
  .header-inner { flex-wrap: wrap; }

  /* Without JS the nav simply wraps below the brand and stays usable. */
  .site-nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }

  .js .header-inner { flex-wrap: nowrap; gap: 10px; }
  .js .nav-toggle { display: block; order: 2; flex-shrink: 0; }
  .js .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--c-charcoal);
    border-top: 1px solid #3f3f46;
  }
  .js .site-nav:not([data-open="true"]) { display: none; }
  .js .site-nav ul { flex-direction: column; }
  .lang-switch { order: 1; }
  .header-cta { order: 1; }
}

@media (max-width: 479.98px) {
  .brand-sub { display: none; }
  .brand { column-gap: 6px; }
  .brand::before { width: 26px; }
  .brand-name { font-size: .9rem; }
  .js .header-inner { gap: 8px; }
  .brand-name { font-size: .8rem; letter-spacing: .02em; white-space: nowrap; }
  .lang-switch a { padding-inline: 4px; }
  /* Icon-only: the text stays as the accessible name. */
  .site-header .header-cta { width: 40px; padding: 0; gap: 0; justify-content: center; font-size: 0; }
}

/* The hero's WhatsApp button sits directly below on the smallest phones. */
@media (max-width: 359.98px) {
  .brand-name { font-size: .72rem; letter-spacing: .01em; }
  /* No room for the mark at 320px: the name alone keeps the header on one row. */
  .brand::before { display: none; }
  .brand { column-gap: 0; }
  .site-header .header-cta { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  font: 600 .95rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--c-crimson); color: var(--c-white); }
.btn-primary:hover { background: var(--c-crimson-2); }

.btn-wa { background: var(--c-green); color: var(--c-white); }
.btn-wa::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-wa);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
}
.btn-wa:hover { background: #166534; }

.header-cta { min-height: 40px; padding: 8px 16px; font-size: .875rem; }

/* Labels & badges */
.label {
  margin: 0 0 8px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-crimson);
}

.badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-crimson);
  border-radius: var(--radius);
  background: var(--c-white);
}
.badge strong { font-family: var(--font-head); font-size: 1rem; }
.badge span { font-size: .85rem; color: var(--c-muted); }
.badge-blue { border-left-color: var(--c-blue); }

/* QC steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-white);
}
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.step-body { padding: 16px; }
.step-body p:last-child { margin-bottom: 0; }
.step-num { margin: 0 0 4px; font-size: .8rem; font-weight: 600; color: var(--c-muted); }

.step-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--c-crimson);
  color: var(--c-white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.note {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--c-linen);
  border: 1px solid var(--c-border);
}
.note p:last-child { margin-bottom: 0; }

/* Cards */
.card {
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-white);
}
.card h3 { font-size: 1.1rem; }

/* Specification table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: .95rem;
}
.spec-table th,
.spec-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border);
}
.spec-table th { width: 38%; font-weight: 600; background: var(--c-linen); }
.footnote { display: block; margin-top: 4px; font-size: .8rem; color: var(--c-muted); }

@media (max-width: 767.98px) {
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td { display: block; width: 100%; }
  .spec-table tr { border: 1px solid var(--c-border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
  .spec-table th { border-bottom: 0; padding-bottom: 4px; }
  .spec-table td { border-bottom: 0; }
}

/* Route diagram */
.route {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: stop;
}
.route li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 16px 52px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-white);
  counter-increment: stop;
}
.route li::before {
  content: counter(stop);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-crimson);
  color: var(--c-white);
  font-size: .8rem;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}
.route-stop { font-family: var(--font-head); font-weight: 700; }
.route-note { font-size: .85rem; color: var(--c-muted); }
.badge-port { color: var(--c-blue); }
.route li:nth-child(3)::before { background: var(--c-blue); }

@media (min-width: 1024px) {
  .route { grid-template-columns: repeat(4, 1fr); }
  .route li:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-muted);
    font-weight: 700;
  }
}

.transit, .documents { list-style: none; margin: 0; padding: 0; }
.transit li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
  font-variant-numeric: tabular-nums;
}
.documents li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--c-border); }
.documents li::before { content: '✓'; position: absolute; left: 4px; color: var(--c-green); font-weight: 700; }

/* Video tiles (enhanced by gallery.js) */
.g-video a { position: relative; display: block; }
.play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(24, 24, 27, .75);
}
.play::after {
  content: '';
  position: absolute;
  left: 26px;
  top: 20px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--c-white);
}

/* Credentials */
.credentials { margin: 0; display: grid; gap: 14px; }
.credentials dt { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); }
.credentials dd { margin: 2px 0 0; font-weight: 500; }

/* Footer */
.site-footer { background: var(--c-charcoal); color: #d6d3d1; padding-top: 48px; font-size: .9rem; }
.site-footer a { color: var(--c-white); }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-base { margin-top: 32px; padding-block: 20px; border-top: 1px solid #3f3f46; }
.footer-base p { margin: 0; }

/* Lightbox */
.lightbox {
  width: min(96vw, 1000px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-charcoal);
  color: var(--c-white);
}
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox figure { margin: 0; padding: 48px 56px 16px; }
.lightbox-img { max-height: 76vh; width: auto; margin-inline: auto; border-radius: 8px; }
.lightbox-caption { margin-top: 12px; text-align: center; color: #e7e5e4; }
.lightbox button {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: var(--c-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox-close { top: 8px; right: 8px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }

/* RFQ form */
.rfq-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
.field label { font-size: .9rem; font-weight: 600; }
.req { color: var(--c-crimson); }
.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #a8a29e;
  border-radius: 8px;
  background: var(--c-white);
  font: inherit;
  color: inherit;
}
.field [aria-invalid="true"] { border-color: #b91c1c; box-shadow: 0 0 0 1px #b91c1c; }
.field-error { margin: 0; min-height: 0; font-size: .85rem; color: #b91c1c; }
.field-error:empty { display: none; }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: 10px; }
.field-check input { width: 20px; height: 20px; margin-top: 2px; }
.field-check .field-error { grid-column: 1 / -1; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rfq-form button[disabled] { opacity: .7; cursor: progress; }

.rfq-status { padding: 20px; border-radius: var(--radius); background: #f0fdf4; border: 1px solid #bbf7d0; }
.rfq-status-error { margin-top: 16px; background: #fef2f2; border-color: #fecaca; }
.rfq-status h4 { margin-bottom: 8px; }
