/* ============================================================
   V2 — PORT OF ROTTERDAAM^H^H ROTTERDAM
   Industrial-modern: container geometry, cargo color blocks,
   manifest tables, crane silhouettes, stencil type.
   ============================================================ */

@font-face { font-family: "Archivo Black"; src: url("fonts/ArchivoBlack-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/Archivo-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/SpaceMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/SpaceMono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --concrete: #EDEAE3;
  --ink: #10181E;
  --steel: #33414C;
  --orange: #B8431F;      /* container rust — AA large-text on concrete */
  --orange-loud: #D9531F; /* blocks only, never small text */
  --yellow: #EBA937;      /* blocks only, ink text on top */
  --green: #00623A;       /* 180 green, AA on concrete */
  --navy: #14293A;
  --white: #F7F5F0;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: var(--concrete);
}
::selection { background: var(--orange-loud); color: var(--white); }

/* corrugated container texture — visible ribbing, like the real thing */
.corru { background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.22) 0 3px, transparent 3px 8px, rgba(255,255,255,0.05) 8px 22px, transparent 22px 26px); }
.corru-v { background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0 3px, transparent 3px 8px, rgba(255,255,255,0.05) 8px 22px, transparent 22px 26px); }

.mono { font-family: var(--mono); }
.tag {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel);
}

/* ---------- header: harbor master bar ---------- */
header.bar {
  background: var(--ink); color: var(--white);
  display: flex; align-items: stretch; flex-wrap: wrap;
  border-bottom: 6px solid var(--orange-loud);
  position: sticky; top: 0; z-index: 40;
}
.bar-brand {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.85rem 1.4rem; text-decoration: none; color: var(--white);
  border-right: 1px solid rgba(255,255,255,0.18);
}
.bar-brand .mark {
  font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.02em;
  background: var(--orange-loud); color: var(--ink); padding: 0.1rem 0.5rem;
}
.bar-brand .name { font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.bar-brand .name small { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: #9FB0BC; }
header.bar nav { display: flex; align-items: center; margin-left: auto; flex-wrap: wrap; }
header.bar nav a {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--white); text-decoration: none;
  padding: 1.25rem 1.1rem; border-left: 1px solid rgba(255,255,255,0.12);
}
header.bar nav a:hover, header.bar nav a:focus-visible { background: var(--orange-loud); color: var(--ink); }
header.bar nav a[aria-current="page"] { background: var(--white); color: var(--ink); }
@media (max-width: 900px) {
  header.bar { position: static; }
  header.bar nav { width: 100%; flex-wrap: wrap; }
  header.bar nav a { padding: 0.85rem 0.5rem; flex: 1 1 auto; text-align: center; white-space: nowrap; }
}

/* ---------- hero ---------- */
.hero { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 70%;
  filter: grayscale(0.35) contrast(1.05);
  opacity: 0.42;
}
.hero-grad { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(16,24,30,0.6) 0%, rgba(16,24,30,0.42) 45%, var(--ink) 92%); }
.hero-inner { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 5.5rem 2rem 3.5rem; }
@media (max-width: 720px) { .hero-inner { padding: 3.5rem 1.2rem 2.8rem; } }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 7.6vw, 6rem);
  line-height: 0.98; letter-spacing: 0.005em;
  text-transform: uppercase;
  /* lines are hand-broken with <br>; never let the browser re-break them */
}
/* color rule: white carries the sentence, signal yellow lands the payload — nothing pastel */
.hero h1 .ln2 { color: #F7F5F0; }
.hero h1 .ln3 { color: var(--yellow); }
.hero .code {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em;
  color: var(--yellow); text-transform: uppercase; display: block; margin-bottom: 1.6rem;
}
.hero .sub { margin-top: 1.8rem; max-width: 54ch; font-size: 1.12rem; color: #C9D4DC; }

/* ---------- doors: cargo buttons ---------- */
.doors { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.6rem; }
.btn {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 1.5rem; border: 2px solid var(--white); color: var(--white);
  position: relative; transition: transform 130ms ease, background-color 130ms ease, color 130ms ease;
}
.btn:hover, .btn:focus-visible { background: var(--white); color: var(--ink); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--orange-loud); }
.btn--cargo { background: var(--orange-loud); border-color: var(--orange-loud); color: var(--ink); }
.btn--cargo:hover, .btn--cargo:focus-visible { background: var(--yellow); border-color: var(--yellow); }
.btn--dark { border-color: var(--ink); color: var(--ink); }
.btn--dark:hover, .btn--dark:focus-visible { background: var(--ink); color: var(--white); box-shadow: 4px 4px 0 var(--yellow); }

/* two-column hero (for-clients: copy + bill-of-lading document) */
.hero-cols { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-cols { grid-template-columns: 1fr; } .hero-cols .bol { justify-self: start; } }

/* ---------- crane divider ---------- */
.crane-strip { background: var(--ink); overflow: hidden; line-height: 0; }
.crane-strip svg { width: 100%; height: auto; display: block; }

/* ---------- sections ---------- */
section { padding: 5rem 2rem; }
@media (max-width: 720px) { section { padding: 3.2rem 1.2rem; } }
.inner { max-width: 1180px; margin: 0 auto; }
h2 {
  font-family: var(--display); font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.02; text-transform: uppercase; letter-spacing: 0.005em;
  max-width: 20ch;
}
.lede { margin-top: 1.2rem; color: var(--steel); max-width: 60ch; font-size: 1.08rem; }
.sec-head { display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.sec-num {
  font-family: var(--mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.15em;
  color: var(--white); background: var(--ink); padding: 0.35rem 0.7rem;
}

/* ---------- manifest table ---------- */
.manifest { width: 100%; border-collapse: collapse; margin-top: 2rem; background: var(--white); border: 2px solid var(--ink); }
.manifest caption { text-align: left; padding: 0 0 0.8rem; }
.manifest th, .manifest td { border: 1px solid var(--ink); padding: 0.9rem 1.1rem; text-align: left; vertical-align: top; }
.manifest th { font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; background: var(--ink); color: var(--white); }
.manifest td strong { font-family: var(--display); font-size: 1.5rem; display: block; }
.manifest td span { color: var(--steel); font-size: 0.92rem; }
.manifest td .idx { font-family: var(--mono); font-size: 0.75rem; color: var(--orange); }
.manifest tr:nth-child(even) td { background: #F1EEE7; }
.table-scroll { overflow-x: auto; }

/* crew manifest → stacked ID plates below 640px (no clipped emails) */
@media (max-width: 640px) {
  .manifest--crew, .manifest--crew tbody, .manifest--crew tr, .manifest--crew td { display: block; border: 0; }
  .manifest--crew thead { display: none; }
  .manifest--crew tr { border: 2px solid var(--ink); border-bottom-width: 0; padding: 0.9rem 1rem; }
  .manifest--crew tr:last-child { border-bottom-width: 2px; }
  .manifest--crew td { padding: 0.1rem 0; background: none !important; }
  .manifest--crew td .idx { display: inline-block; margin-bottom: 0.2rem; }
  .manifest--crew td a { word-break: break-all; }
}

/* sequential stamp-in for manifest rows (JS-gated, reduced-motion-gated) */
@media (prefers-reduced-motion: no-preference) {
  html.js .manifest.stamp-in tbody tr { opacity: 0; transform: translateY(-6px); transition: opacity 260ms ease, transform 260ms ease; }
  html.js .manifest.stamp-in.in tbody tr { opacity: 1; transform: none; }
  html.js .manifest.stamp-in.in tbody tr:nth-child(2) { transition-delay: 90ms; }
  html.js .manifest.stamp-in.in tbody tr:nth-child(3) { transition-delay: 180ms; }
  html.js .manifest.stamp-in.in tbody tr:nth-child(4) { transition-delay: 270ms; }
  html.js .manifest.stamp-in.in tbody tr:nth-child(5) { transition-delay: 360ms; }
  html.js .manifest.stamp-in.in tbody tr:nth-child(6) { transition-delay: 450ms; }
  html.js .manifest.stamp-in.in tbody tr:nth-child(7) { transition-delay: 540ms; }
  html.js .manifest.stamp-in.in tbody tr:nth-child(8) { transition-delay: 630ms; }
  html.js .placeholder { background-size: 34px 34px; animation: hazard-crawl 14s linear infinite; }
  @keyframes hazard-crawl { from { background-position: 0 0; } to { background-position: 68px 0; } }
}

/* ---------- containers: service areas ---------- */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; margin-top: 2.4rem; }
.container-box {
  color: var(--white); padding: 1.9rem 1.7rem 1.6rem; position: relative;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(16,24,30,0.85);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.container-box:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 rgba(16,24,30,0.85); }
.container-box .cbox-code {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em;
  display: inline-block; margin-bottom: 0.9rem; text-transform: uppercase;
  border: 1.5px solid currentColor; padding: 0.25rem 0.5rem; opacity: 0.92;
}
.container-box h3 { font-family: var(--display); font-size: 1.28rem; text-transform: uppercase; line-height: 1.1; margin-bottom: 0.55rem; }
.container-box p { font-size: 0.95rem; opacity: 0.94; }
.cb-navy { background: var(--navy); }
.cb-orange { background: #A63C1B; }
.cb-green { background: #084D30; }
.cb-steel { background: #2C3A45; }
.cb-yellow { background: var(--yellow); color: var(--ink); }
.cb-yellow .cbox-code { opacity: 0.7; }

/* ---------- stencil pro bono ---------- */
.stencil {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 1;
  color: var(--concrete);
  -webkit-text-stroke: 2.5px var(--ink);
  text-stroke: 2.5px var(--ink);
  letter-spacing: 0.04em;
}
.stencil strong { color: var(--orange-loud); -webkit-text-stroke: 0; }

/* ---------- route manifest (timeline) ---------- */
.route { margin-top: 2.5rem; border-left: 4px solid var(--ink); }
.port-stop { position: relative; padding: 0 0 2.4rem 2.2rem; }
.port-stop:last-child { padding-bottom: 0.4rem; }
.port-stop::before {
  content: ""; position: absolute; left: -13px; top: 0.35rem;
  width: 18px; height: 18px; background: var(--orange-loud); border: 3px solid var(--ink);
}
.port-stop .p-code { font-family: var(--mono); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); }
.port-stop h3 { font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; margin: 0.25rem 0 0.45rem; }
.port-stop p { max-width: 58ch; color: var(--steel); }

/* ---------- placeholder ---------- */
.placeholder {
  display: inline-block;
  border: 2px dashed var(--steel);
  padding: 0.8rem 1.05rem;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--steel);
  background: repeating-linear-gradient(-45deg, rgba(235,169,55,0.28), rgba(235,169,55,0.28) 12px, rgba(217,151,31,0.28) 12px, rgba(217,151,31,0.28) 24px);
}
.band-dark .placeholder, .band-green .placeholder { color: #F0E3C0; border-color: #9FB0BC; background: repeating-linear-gradient(-45deg, rgba(235,169,55,0.12), rgba(235,169,55,0.12) 12px, rgba(217,151,31,0.12) 12px, rgba(217,151,31,0.12) 24px); }

/* ---------- band sections ---------- */
.band-dark { background: var(--ink); color: var(--white); }
.band-dark h2 { color: var(--white); }
.band-dark .lede, .band-dark p { color: #C9D4DC; }
.band-dark a { color: var(--yellow); }
.band-green { background: var(--green); color: var(--white); }
.band-green h2 { color: var(--white); }
.band-green .lede, .band-green p { color: #D3E8DC; }
.band-green a { color: var(--yellow); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.prose p + p { margin-top: 1rem; }
a { color: var(--orange); }
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 3px solid var(--orange-loud); outline-offset: 3px; }

/* ---------- photo figure ---------- */
.duoto { border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--orange-loud); }
.duoto img { display: block; width: 100%; height: auto; filter: grayscale(0.25) contrast(1.02); }
.duoto figcaption { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.6rem 0.2rem 0; color: var(--steel); }
.band-dark .duoto figcaption, .band-green .duoto figcaption { color: #C9D4DC; }

/* ---------- footer ---------- */
footer { background: var(--navy); color: #C9D4DC; padding: 3rem 2rem 2rem; border-top: 6px solid var(--orange-loud); }
.foot-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }
footer .tag { color: var(--yellow); display: block; margin-bottom: 0.7rem; }
footer ul { list-style: none; }
footer li + li { margin-top: 0.4rem; }
footer a { color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
footer a:hover { border-bottom-color: var(--yellow); color: var(--yellow); }
.foot-legal {
  max-width: 1180px; margin: 2.4rem auto 0; padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
}

/* ---------- motion: ONE move — containers get craned into place.
   Everything else is static. JS-gated; no-JS renders everything. ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .stack .container-box { opacity: 0; transform: translateX(-20px); transition: opacity 300ms ease, transform 300ms cubic-bezier(0.2, 0.8, 0.3, 1); }
  html.js .stack.in .container-box { opacity: 1; transform: none; }
  html.js .stack.in .container-box:nth-child(2) { transition-delay: 110ms; }
  html.js .stack.in .container-box:nth-child(3) { transition-delay: 220ms; }
  html.js .stack.in .container-box:nth-child(4) { transition-delay: 330ms; }
  html.js .stack.in .container-box:nth-child(5) { transition-delay: 440ms; }
  html.js .stack.in .container-box:nth-child(6) { transition-delay: 550ms; }
}

/* command-style secondary links (hero) */
.link-cmd {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.35);
  padding-bottom: 2px;
}
.link-cmd:hover, .link-cmd:focus-visible { color: var(--yellow); border-color: var(--yellow); }
.link-cmd + .link-cmd { margin-left: 1.6rem; }
@media (max-width: 640px) {
  .link-cmd { display: block; }
  .link-cmd + .link-cmd { margin-left: 0; margin-top: 0.9rem; }
}

/* bill-of-lading document card (for-clients hero) */
.bol {
  background: var(--white); color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--orange-loud);
  padding: 1.5rem 1.6rem 4.2rem; max-width: 420px; position: relative;
}
.bol .bol-head { font-family: var(--mono); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 2px solid var(--ink); padding-bottom: 0.6rem; margin-bottom: 0.9rem; }
.bol dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; font-size: 0.92rem; }
.bol dt { font-family: var(--mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); align-self: center; }
.bol dd { font-weight: 600; }
.bol .bol-stamp {
  position: absolute; right: -0.6rem; bottom: 0.7rem; transform: rotate(-6deg);
  background: var(--white);
  border: 3px double var(--green); color: var(--green);
  font-family: var(--mono); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em;
  padding: 0.3rem 0.7rem; text-transform: uppercase;
}

/* ---------- skip ---------- */
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--yellow); color: var(--ink); padding: 0.6rem 1rem; font-family: var(--mono); font-weight: 700; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* forms */
input, textarea {
  width: 100%; padding: 0.85rem; border: 2px solid var(--ink);
  background: var(--white); font-family: var(--body); font-size: 1rem;
}
label .tag { display: block; margin-bottom: 0.35rem; color: var(--ink); }
