/*
 * Shared site styles (issue #111): SMC Marine's navy and blue look from smcmarine.com.au, used by
 * every page before its own stylesheet. Mobile-first, body text 16 px or more, tap targets 44 px
 * or more, WCAG 2.2 AA contrast (SPEC.md, Code Style). Light only: it reads best in sunlight.
 * Safety colours (danger red, caution yellow) are never swapped for SMC blue.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* SMC Marine brand */
  --navy: #182242;
  --navy-2: #232f57;
  --sky: #5091cd;
  /* #5091CD is under 4.5:1 on white, so link text uses this darker blue. */
  --link: #2f6fae;
  --tile: #e6effa;
  /* Text and surfaces */
  --ink: #182242;
  --text: #4d4d4d;
  --muted: #5c5c5c;
  --paper: #fff;
  --page: #f4f7fb;
  --rule: #dde3ec;
  --panel: #f4f7fb;
  --on-navy: #fff;
  --on-navy-muted: #c9d3e6;
  --on-navy-accent: #9cc3ea;
  /* Safety colours: meaning first, never restyled in SMC blue */
  --danger: #b00000;
  --on-danger: #fff;
  --caution: #ffd400;
  --on-caution: #111;
  --notice: #fff4cc;
  --notice-rule: #d9a800;
  --on-notice: #3d3000;
  --ok: #0a6b2d;
  --on-ok: #fff;
  --focus: #1a5fd0;
  --focus-on-navy: #ffd400;
  /* Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --pill: 999px;
  --tap: 3rem;
  --page-width: 75rem;
}

[hidden] {
  display: none !important;
}

/* Hidden on screen but still read by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

h1,
h2,
h3 {
  color: var(--ink);
}

p {
  margin: 0 0 var(--space-2);
}

a {
  color: var(--link);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Content width, shared by the header, the page bands and the footer. */
.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Header: wave mark, SMC MARINE wordmark and "SDS Register", then the page links. */

.site-header {
  background: var(--navy);
  color: var(--on-navy);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.site-header :focus-visible,
.band :focus-visible,
.panel-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--focus-on-navy);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap);
  color: var(--on-navy);
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 2.5rem;
  height: 1.5rem;
  background: currentColor;
  mask: url('/icons/wave.svg') center / contain no-repeat;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.brand-strong {
  font-weight: 800;
}

.brand-sub {
  color: var(--on-navy-muted);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border-radius: var(--pill);
  color: var(--on-navy-muted);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--on-navy);
}

.site-nav a[aria-current='page'] {
  color: var(--on-navy);
  font-weight: 700;
}

/* Poisons Information in the header: emergency red, never SMC blue. */
.site-nav .nav-call {
  background: var(--danger);
  color: var(--on-danger);
  font-weight: 700;
}

/* Navy page band under the header: page title, a white bar beside it, and the page's actions. */

.band {
  background: var(--navy);
  color: var(--on-navy);
}

.band .wrap {
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
}

.band h1 {
  color: var(--on-navy);
}

.title-bar {
  padding-left: var(--space-4);
  border-left: 4px solid var(--on-navy);
}

.title-bar h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.title-bar p {
  margin: var(--space-1) 0 0;
  color: var(--on-navy-muted);
  font-size: 1.125rem;
}

/* Small uppercase label above a heading. */
.eyebrow {
  display: block;
  margin: 0 0 var(--space-1);
  color: var(--link);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.band .eyebrow,
.panel-dark .eyebrow {
  color: var(--on-navy-accent);
}

/* Buttons: pill-shaped, at least 44 px tall. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: var(--space-2) var(--space-6);
  border: 2px solid transparent;
  border-radius: var(--pill);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* Navy text on SMC blue: white on #5091CD is under 4.5:1. */
.button--primary {
  background: var(--sky);
  color: var(--navy);
}

.button--primary:hover {
  background: #6aa3d7;
}

/* On navy: white outline. */
.button--ghost {
  border-color: rgb(255 255 255 / 60%);
  background: transparent;
  color: var(--on-navy);
}

.button--ghost:hover {
  border-color: var(--on-navy);
  background: rgb(255 255 255 / 8%);
}

/* On white: navy outline. */
.button--outline {
  border-color: var(--navy);
  background: var(--paper);
  color: var(--navy);
}

/* Icons: self-hosted SVG files drawn in the text colour through a CSS mask, so the pages carry
   no inline SVG (the XSS tests flag any) and data: URLs aren't needed under the CSP. */

.icon {
  display: inline-block;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
}

.icon--search {
  --icon: url('/icons/search.svg');
}

.icon--scan {
  --icon: url('/icons/scan.svg');
}

.icon--flask {
  --icon: url('/icons/flask.svg');
}

.icon--chevron {
  --icon: url('/icons/chevron-right.svg');
}

.icon--chevron-down {
  --icon: url('/icons/chevron-down.svg');
}

.icon--arrow {
  --icon: url('/icons/arrow-up-right.svg');
}

.icon--phone {
  --icon: url('/icons/phone.svg');
}

.icon--download {
  --icon: url('/icons/download.svg');
}

.icon--file {
  --icon: url('/icons/file.svg');
}

.icon--alert {
  --icon: url('/icons/alert.svg');
}

.icon--truck {
  --icon: url('/icons/truck.svg');
}

.icon--ship {
  --icon: url('/icons/ship.svg');
}

/* Cards */

.card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.panel-dark {
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--on-navy);
}

.panel-dark h2 {
  color: var(--on-navy);
}

/* Footer */

.site-footer {
  margin-top: var(--space-10);
  background: var(--navy);
  color: var(--on-navy-muted);
  font-size: 1rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--on-navy);
}

.footer-name {
  color: var(--on-navy);
  font-weight: 600;
}

@media (min-width: 48rem) {
  .wrap {
    padding: 0 var(--space-6);
  }

  .title-bar h1 {
    font-size: 3rem;
  }

  .band .wrap {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }
}
