/* ==========================================================================
   MARE COMMODITIES — Brand tokens
   Colour and type for the whole site. Navy and gold are sampled directly from
   the supplied logo artwork; the layout language (deep navy surfaces,
   light-weight large headlines, 6px radii, hairline borders, generous vertical
   rhythm) is drawn from maersk.com.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@200;300;400;500;600&family=Source+Sans+3:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* --- Core navy ramp — sampled from the Mare Commodities wordmark --- */
  --navy-900: #0b234c;   /* brand navy, straight off the logo */
  --navy-800: #123061;
  --navy-700: #1a3e76;
  --navy-600: #24508f;
  --navy-500: #2f63ad;

  /* --- Brand accents — sampled from the logo sunburst --- */
  --gold-500: #fbb605;   /* the gold square */
  --gold-400: #ffc93d;
  --gold-300: #ffdd7a;
  --gold-100: #fff4d6;
  --yellow: #fff505;     /* the sun core */
  --gold-ink: #8a6200;   /* gold that still passes AA as text on white */
  --grey-brand: #767677; /* the COMMODITIES grey */

  --blue-link: #1a4a87;  /* 8.7:1 on white */

  /* --- Neutrals --- */
  --ink: #141414;
  --ink-2: #545454;
  --ink-3: #767676;
  --line: #dbdbdb;
  --line-soft: #ececec;
  --surface: #f7f7f7;
  --white: #ffffff;

  /* Inverted neutrals for dark surfaces — tuned to the brand navy */
  --on-dark: #ffffff;
  --on-dark-2: #c3cee0;
  --on-dark-3: #94a3bf;
  --line-dark: rgba(255, 255, 255, 0.16);
  --line-dark-soft: rgba(255, 255, 255, 0.08);

  /* --- Typography --- */
  --font-display: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Fluid scale — h1 tops out at Maersk's 50px, display runs larger */
  --fs-display: clamp(2.5rem, 1.55rem + 3.9vw, 4.25rem);
  --fs-h1: clamp(2.125rem, 1.62rem + 2.1vw, 3.125rem);
  --fs-h2: clamp(1.75rem, 1.36rem + 1.6vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 1.13rem + 0.5vw, 1.5rem);
  --fs-h4: 1.125rem;
  --fs-lead: clamp(1.0625rem, 1.01rem + 0.23vw, 1.25rem);
  --fs-body: 1rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Maersk sets headline line-height at ~1.0–1.12 and uses weight 300 */
  --lh-display: 1.04;
  --lh-heading: 1.12;
  --lh-body: 1.6;
  --wt-display: 300;

  /* --- Layout --- */
  --container: 1280px;
  --container-narrow: 900px;
  --gutter: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
  --section-y: clamp(4rem, 2.4rem + 6.4vw, 7rem);

  /* --- Shape & depth --- */
  --r-sm: 4px;
  --r: 6px;          /* Maersk button/card radius */
  --r-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 36, 61, 0.06), 0 1px 3px rgba(0, 36, 61, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 36, 61, 0.08), 0 2px 4px rgba(0, 36, 61, 0.05);
  --shadow-lg: 0 18px 40px rgba(0, 36, 61, 0.14), 0 4px 10px rgba(0, 36, 61, 0.06);

  /* --- Motion --- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;

  /* --- Z-index scale --- */
  --z-nav: 50;
  --z-drawer: 60;
  --z-top: 70;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: var(--wt-display);
  line-height: var(--lh-heading);
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 500; letter-spacing: 0; }

p { margin: 0 0 1rem; max-width: 68ch; }

a { color: var(--blue-link); text-decoration: none; }
a:hover { text-decoration: underline; }

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

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button { font: inherit; cursor: pointer; }

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Visible focus for keyboard users on every interactive element.
   Navy on light surfaces, gold on dark — both clear 3:1 against their ground. */
:focus-visible {
  outline: 3px solid var(--navy-700);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.on-dark :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.cta-band :focus-visible { outline-color: var(--gold-500); }

.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;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100%;
  z-index: var(--z-top);
  background: var(--white);
  color: var(--navy-900);
  padding: 0.75rem 1.25rem;
  border-radius: var(--r);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; text-decoration: none; }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }

.grid { display: grid; gap: clamp(1rem, 0.6rem + 1.4vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.stack > * + * { margin-top: 1rem; }
.lead { font-size: var(--fs-lead); line-height: 1.55; }

/* ==========================================================================
   Eyebrow / section label — shared across all variants
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  flex: none;
}
.on-dark .eyebrow { color: var(--gold-400); }

/* ==========================================================================
   Brand lockup
   The supplied logo artwork is used as-is. Because it is supplied on a white
   ground, any placement on a dark surface sits on a white plate rather than
   being recoloured or redrawn.
   ========================================================================== */

.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo img {
  height: var(--logo-h, 40px);
  width: auto;
  display: block;
}

/* White plate for dark surfaces */
.logo--plate {
  background: var(--white);
  padding: 0.6rem 0.85rem;
  border-radius: var(--r);
}

/* Compact mark-only lockup */
.logo-mark { height: var(--mark-h, 34px); width: auto; flex: none; border-radius: 2px; }

/* ==========================================================================
   Buttons — Maersk geometry: 6px radius, hairline border, weight 400–500
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.75rem 1.4rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
  font-weight: 600;
}
.btn--primary:hover { background: var(--gold-400); border-color: var(--gold-400); }

.btn--navy {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}
.btn--navy:hover { background: var(--navy-700); border-color: var(--navy-700); }

.btn--ghost {
  background: transparent;
  border-color: rgba(20, 20, 20, 0.28);
  color: var(--ink);
}
.btn--ghost:hover { background: rgba(20, 20, 20, 0.05); border-color: var(--ink); }

.on-dark .btn--ghost,
.btn--ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.42);
  color: var(--white);
}
.on-dark .btn--ghost:hover,
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }

.btn--white {
  background: var(--white);
  border-color: var(--white);
  color: var(--navy-900);
}
.btn--white:hover { background: #e9eef2; border-color: #e9eef2; }

/* Text link with chevron — a recurring Maersk pattern */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--blue-link);
  text-decoration: none;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover svg { transform: translateX(3px); }
.on-dark .link-arrow { color: var(--gold-400); }

/* ==========================================================================
   Dark surface helper
   ========================================================================== */

.on-dark { background: var(--navy-900); color: var(--on-dark-2); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--on-dark); }
.on-dark a { color: var(--gold-400); }

/* ==========================================================================
   Scroll reveal — opt-in, and fully disabled for reduced-motion users
   ========================================================================== */

/* `.reveal` is inert until JavaScript arms it.

   The hidden state hangs off `html.js-reveal`, and that class is added by
   initReveal() in site.js and nowhere else. So the bare stylesheet never hides
   anything: with JS off, with the script failing, or with reduced motion on,
   every `.reveal` renders exactly as if this block did not exist.

   This effect was pulled once before, because a section could sit at low
   opacity for the first part of its travel and read as a blank gap in the
   page. Two things prevent a repeat. The travel is short and the fade is
   quick, so nothing lingers half-visible; and the reveal fires off scroll
   position rather than an observer callback, so anything you can actually see
   has already been shown. See the comment on initReveal() for the details. */

@media (prefers-reduced-motion: no-preference) {
  html.js-reveal .reveal {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  html.js-reveal .reveal.is-in {
    opacity: 1;
    transform: none;
    transition:
      opacity 480ms var(--ease) var(--reveal-delay, 0ms),
      transform 600ms var(--ease) var(--reveal-delay, 0ms);
  }
}

/* A printed page has no scrolling, so nothing would ever be revealed and the
   sheets would come out blank. Print always gets the finished state. */
@media print {
  html.js-reveal .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Shared footer — identical legal disclosure on every variant
   ========================================================================== */

.site-footer {
  background: var(--navy-900);
  color: var(--on-dark-2);
  padding-block: clamp(3rem, 2rem + 4vw, 4.5rem) 2rem;
  font-size: var(--fs-sm);
}
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand { max-width: 22rem; }
.footer-links a {
  display: block;
  color: var(--on-dark-2);
  padding: 0.3rem 0;
  text-decoration: none;
}
.footer-links a:hover { color: var(--white); text-decoration: underline; }

/* Contact details sit under the brand rather than in a column of their own:
   the addresses are far wider than a 13rem grid track. */
.footer-contact {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  font-size: var(--fs-sm);
}
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.28rem 0;
  color: var(--on-dark-2);
}
.footer-contact svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 0.2em;
  color: var(--gold-500);
}
.footer-contact a {
  color: var(--on-dark-2);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer-contact a:hover { color: var(--white); text-decoration: underline; }

.footer-legal { padding-top: 2rem; }
.footer-legal p {
  max-width: 78ch;
  font-size: var(--fs-xs);
  line-height: 1.65;
  color: var(--on-dark-3);
}
.footer-legal strong { color: var(--on-dark-2); font-weight: 600; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark-soft);
  font-size: var(--fs-xs);
  color: var(--on-dark-3);
}

/* Registry facts strip used in the footer of every variant */
.registry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1.25rem 2rem;
  margin: 0 0 1.75rem;
}
.registry dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 0.3rem;
}
.registry dd { margin: 0; color: var(--on-dark); font-size: var(--fs-sm); }
