/* ============================================================================
   Sea Cross V2: global shell
   Tokens, base type, header, mobile menu and footer. Loaded on every page,
   after the older stylesheets on inner pages, so the shell is the same
   everywhere while inner pages wait for their own redesign.
   Tokens use the --sx- prefix so they never collide with site.css.
   ========================================================================== */

:root {
  /* Physical maritime palette: harbour ink, weathered steel, fog, warm paper.
     Accents have strict roles: teal = navigation and active states, rust = dates and
     documentary detail, signal orange = the primary action only. Brand indigo and
     cyan live in the logo and nowhere else. */
  --sx-night: #151b21;       /* harbour ink: dark grounds                   */
  --sx-night-2: #1f2830;     /* raised surface on ink                       */
  --sx-ink: #151b21;         /* type on paper                               */
  --sx-ink-2: #2b353e;
  --sx-paper: #ece8df;       /* warm paper                                  */
  --sx-paper-2: #e1dcd1;     /* chart paper, a step down                    */
  --sx-white: #f6f3ec;
  --sx-steel: #56626a;       /* weathered steel: secondary text on paper    */
  --sx-fog: #c8cbc6;         /* fog: secondary text on ink                  */
  --sx-teal: #2e6a64;        /* oxidised teal on paper (5.1:1)              */
  --sx-teal-lt: #7fb3aa;     /* oxidised teal on ink (7.4:1)                */
  --sx-rust: #9e4a2c;        /* rust on paper (5.0:1)                       */
  --sx-rust-lt: #d9946b;     /* rust on ink (6.9:1)                         */
  --sx-signal: #da5e26;      /* signal orange: primary action, ink text 4.6:1 */
  --sx-signal-2: #e8743f;
  --sx-logo-s: #3ddef0;      /* the S in the logo mark                      */
  --sx-line: rgba(21, 27, 33, .16);
  --sx-line-dark: rgba(200, 203, 198, .16);
  --sx-grade: saturate(.8) contrast(1.04) brightness(.97);

  --sx-font: "Archivo", "Archivo Fallback", "Segoe UI", system-ui, sans-serif;
  --sx-mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Type: expanded display (the wordmark's geometry) against plain-width text. */
  --sx-x: 125%;
  --sx-t-hero: clamp(2.55rem, 1.2rem + 4.5vw, 5.9rem);
  --sx-t-1: clamp(2.15rem, 1.25rem + 3vw, 4.4rem);
  --sx-t-2: clamp(1.55rem, 1.15rem + 1.35vw, 2.45rem);
  --sx-t-3: clamp(1.2rem, 1.05rem + .5vw, 1.5rem);
  --sx-t-lede: clamp(1.1rem, 1rem + .35vw, 1.3rem);
  --sx-t-body: 1.0625rem;
  --sx-t-small: .9rem;
  --sx-t-meta: .78rem;

  --sx-maxw: 92rem;
  --sx-gutter: clamp(1rem, 4.2vw, 4.5rem);
  --sx-gap: clamp(1rem, 2vw, 2rem);
  --sx-section: clamp(4.5rem, 9vw, 9rem);
  --sx-ease: cubic-bezier(.22, 1, .36, 1);
  --sx-focus: var(--sx-teal);

  --header-h: 76px;
}
@media (max-width: 1080px) { :root { --header-h: 64px; } }

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
.page-home, .page-v2 {
  margin: 0;
  background: var(--sx-paper);
  color: var(--sx-ink);
  font-family: var(--sx-font);
  font-size: var(--sx-t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html:has(.page-home) { background: var(--sx-night); scroll-padding-top: var(--header-h); }
html:has(.page-v2) { background: var(--sx-paper); scroll-padding-top: var(--header-h); }
:is(.page-home, .page-v2) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
:is(.page-home, .page-v2) :where(ul, ol) { padding: 0; list-style: none; }
:is(.page-home, .page-v2) :where(a) { color: inherit; }
:is(.page-home, .page-v2) :where(img, video) { display: block; max-width: 100%; height: auto; }
:is(.page-home, .page-v2) :where(picture) { display: block; }
:is(.page-home, .page-v2) :where(button, select, input) { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--sx-focus); outline-offset: 3px; }
.sx-dark { --sx-focus: var(--sx-teal-lt); }

.sx-wrap { width: 100%; max-width: var(--sx-maxw); margin-inline: auto; padding-inline: var(--sx-gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 200;
  padding: .8rem 1.1rem; background: var(--sx-signal); color: var(--sx-ink);
  font: 600 .95rem/1 var(--sx-font); text-decoration: none;
  transform: translateY(-170%); transition: transform .2s var(--sx-ease);
}
.skip-link:focus { transform: none; outline-color: var(--sx-night); }

/* Shared marks of the system. */
.sx-display {
  font-family: var(--sx-font); font-stretch: var(--sx-x); font-weight: 600;
  letter-spacing: -.035em; line-height: .98; text-wrap: balance;
}
.sx-meta { font-family: var(--sx-mono); font-size: var(--sx-t-meta); letter-spacing: .01em; font-variant-numeric: tabular-nums; }

.sx-btn {
  --b-bg: var(--sx-signal); --b-ink: var(--sx-ink); --b-hover: var(--sx-signal-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 52px; padding: 0 1.5rem;
  background: var(--b-bg); color: var(--b-ink); border: 0; border-radius: 0;
  font: 600 1rem/1 var(--sx-font); font-stretch: 112%; letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .18s var(--sx-ease), color .18s var(--sx-ease), transform .12s var(--sx-ease);
}
.sx-btn:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) { .sx-btn:hover { background: var(--b-hover); } }

/* ================================================================= HEADER
   One bar for photography and paper. data-tone (set by site.js from the
   section under the bar) picks the ink; is-scrolled adds the ground. */
.site-header {
  --h-ink: #fff; --h-soft: rgba(232, 229, 221, .78); --h-bg: rgba(21, 27, 33, .9); --h-line: rgba(200, 203, 198, .1);
  --h-mark: #fff; --h-s: var(--sx-logo-s); --h-cta-bg: var(--sx-signal); --h-cta-ink: var(--sx-ink); --h-cta-hover: var(--sx-signal-2);
  --sx-focus: var(--sx-teal-lt);
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  height: var(--header-h);
  color: var(--h-ink);
  font-family: var(--sx-font);
  transition: transform .45s var(--sx-ease), color .25s var(--sx-ease);
}
.site-header[data-tone="light"] {
  --h-ink: var(--sx-ink); --h-soft: rgba(21, 27, 33, .74); --h-bg: rgba(236, 232, 223, .94); --h-line: var(--sx-line);
  --h-mark: #0d0e68; --h-s: #17b3c6; --h-cta-bg: var(--sx-signal); --h-cta-ink: var(--sx-ink); --h-cta-hover: var(--sx-signal-2);
  --sx-focus: var(--sx-teal);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--h-bg); border-bottom: 1px solid var(--h-line);
  opacity: 0; transition: opacity .3s var(--sx-ease), background-color .3s var(--sx-ease);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header::before { -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); }
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner { height: 100%; display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 3rem); }
.site-header .brand { display: inline-flex; align-items: center; gap: .65rem; flex: none; color: var(--h-ink); text-decoration: none; }
.site-header .brand__mark { width: 28px; height: 37px; --logo-mark: var(--h-mark); --logo-s: var(--h-s); transition: none; }
.site-header .brand__word { width: 128px; height: 15px; --logo-word: var(--h-ink); }

.primary-nav { display: flex; gap: clamp(1.25rem, 2.2vw, 2.25rem); margin-left: clamp(.5rem, 3vw, 3.5rem); }
.primary-nav a {
  position: relative; padding-block: .5rem;
  color: var(--h-soft); text-decoration: none;
  font-size: .95rem; font-weight: 500; letter-spacing: -.005em;
  transition: color .16s var(--sx-ease);
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .2rem; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--sx-ease);
}
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--h-ink); }
.primary-nav a:hover::after, .primary-nav a[aria-current]::after { transform: none; }

.header-end { margin-left: auto; display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem); }
.header-call { display: grid; justify-items: end; gap: .1rem; color: var(--h-ink); text-decoration: none; line-height: 1.15; }
.header-call__label { font-size: .74rem; color: var(--h-soft); }
.header-call__num { font-family: var(--sx-mono); font-size: .86rem; font-variant-numeric: tabular-nums; }
.header-call:hover .header-call__num { text-decoration: underline; text-underline-offset: 3px; }
.header-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem;
  background: var(--h-cta-bg); color: var(--h-cta-ink); text-decoration: none; white-space: nowrap;
  font-size: .92rem; font-weight: 600; font-stretch: 112%;
  transition: background-color .18s var(--sx-ease), color .18s var(--sx-ease);
}
@media (hover: hover) and (pointer: fine) { .header-cta:hover { background: var(--h-cta-hover); } }

.menu-toggle {
  display: none; margin-left: auto; align-items: center; gap: .75rem;
  min-height: 44px; padding: 0 0 0 .85rem; background: transparent; border: 0;
  color: var(--h-ink); font: 500 .95rem/1 var(--sx-font); cursor: pointer;
}
.menu-toggle__bars { position: relative; width: 26px; height: 44px; }
.menu-toggle__bars i {
  position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .3s var(--sx-ease), top .3s var(--sx-ease);
}
.menu-toggle__bars i:first-child { top: 17px; }
.menu-toggle__bars i:last-child { top: 25px; }
.menu-open .menu-toggle__bars i:first-child { top: 21px; transform: rotate(40deg); }
.menu-open .menu-toggle__bars i:last-child { top: 21px; transform: rotate(-40deg); }

/* Breakpoints measured with all seven links: the desk number needs >= 1280px to keep
   clear air from the nav; below 1081px the links themselves go to the menu. */
@media (max-width: 1279px) { .header-call { display: none; } }
@media (max-width: 1080px) {
  .primary-nav, .header-end { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 420px) { .site-header .brand__word { width: 112px; height: 13px; } }

/* ------------------------------------------------------------ mobile menu
   Composed for the phone: big targets, then the operations desk itself. */
.mobile-panel {
  position: fixed; inset: 0; z-index: -2;
  display: flex; flex-direction: column; gap: 2rem;
  padding: calc(var(--header-h) + 1.5rem) var(--sx-gutter) max(1.5rem, env(safe-area-inset-bottom));
  background: var(--sx-night); color: #fff;
  overflow-y: auto; overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .55s var(--sx-ease), visibility 0s linear .55s;
}
.menu-open .mobile-panel { clip-path: inset(0); visibility: visible; transition: clip-path .55s var(--sx-ease); }
.menu-open .site-header {
  --h-ink: #fff; --h-soft: rgba(232, 229, 221, .78); --h-mark: #fff; --h-s: var(--sx-logo-s); --sx-focus: var(--sx-teal-lt);
}
.menu-open .site-header::before { opacity: 0; }
.mobile-nav { display: grid; }
.mobile-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--sx-line-dark);
  color: #fff; text-decoration: none;
  font-size: clamp(1.85rem, 8.4vw, 2.6rem); font-weight: 600; font-stretch: var(--sx-x); letter-spacing: -.035em; line-height: 1.05;
}
/* The current section: teal ink plus a square marker, so it never rests on colour alone. */
.mobile-nav a[aria-current] { color: var(--sx-teal-lt); }
.mobile-nav a[aria-current]::after { content: ""; flex: none; width: .5rem; height: .5rem; background: currentColor; }
.mobile-panel__desk { margin-top: auto; display: grid; gap: 1.1rem; }
.mobile-panel__desk p { color: var(--sx-fog); font-size: .9rem; }
.mobile-panel__lines { display: grid; }
.mobile-panel__lines a { color: #fff; text-decoration: none; font-family: var(--sx-mono); font-size: 1rem; line-height: 1.5; padding-block: .65rem; }
.mobile-panel__lines a.is-mail { font-family: var(--sx-font); font-weight: 600; font-size: 1.15rem; }
.mobile-panel .sx-btn { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .mobile-nav a { opacity: 0; transform: translateY(14px); transition: opacity .4s var(--sx-ease), transform .5s var(--sx-ease); }
  .menu-open .mobile-nav a { opacity: 1; transform: none; transition-delay: calc(.12s + var(--i, 0) * 45ms); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-panel, .menu-open .mobile-panel { transition: none; }
}

/* ================================================================= FOOTER
   The page ends at the operations desk: who to write to, who to call, then
   the short routes into the site, the coast, and the legal line. */
.site-footer {
  --sx-focus: var(--sx-teal-lt);
  position: relative; z-index: 2;
  background: var(--sx-night); color: #fff;
  font-family: var(--sx-font); font-size: var(--sx-t-body); line-height: 1.55;
}
:where(.site-footer) :where(h2, p, ul, dl, dd, address) { margin: 0; }
:where(.site-footer) :where(ul) { padding: 0; list-style: none; }
:where(.site-footer) :where(a) { color: inherit; }
.foot {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 1.6fr) minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2.25rem, 3.5vw, 3.5rem) var(--sx-gap);
  padding-block: clamp(3rem, 5vw, 4.5rem) clamp(2.5rem, 4vw, 3.5rem);
}
.foot__label { font-size: .85rem; font-weight: 500; color: var(--sx-fog); margin-bottom: 1rem; }
.foot__desk { display: grid; align-content: start; justify-items: start; }
/* The desk's address is the quiet companion to the page above it: one clear
   address to write to, then the lines, never a second display headline. */
.foot__addr { display: grid; gap: 1.25rem; justify-items: start; font-style: normal; }
.foot__email {
  font-size: clamp(1.1rem, 1rem + .3vw, 1.3rem); white-space: nowrap; font-weight: 600; font-stretch: var(--sx-x); letter-spacing: -.025em; line-height: 1.1;
  text-decoration: none; background: linear-gradient(var(--sx-teal-lt), var(--sx-teal-lt)) 0 100% / 100% 1px no-repeat; padding-bottom: .3rem;
}
.foot__email:hover { color: var(--sx-teal-lt); }
.foot__lines { display: grid; gap: .15rem; font-size: .92rem; }
.foot__lines div { display: grid; grid-template-columns: 7.5rem auto; align-items: baseline; gap: 1rem; }
.foot__lines dt { color: var(--sx-fog); }
.foot__lines dd { margin: 0; }
.foot__lines a { display: inline-block; padding-block: .3rem; text-decoration: none; }
.foot__lines a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot__lines .sx-meta { font-size: .88rem; }
.foot__col { display: grid; align-content: start; }
.foot__col a { justify-self: start; padding-block: .3rem; text-decoration: none; color: rgba(255, 255, 255, .9); font-size: .95rem; }
.foot__col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot__ports { display: grid; align-content: start; font-size: .9rem; }
.foot__ports dl { display: grid; gap: .7rem; }
.foot__ports div { display: grid; gap: .05rem; }
.foot__ports dt { color: var(--sx-fog); font-size: .8rem; }
.foot__ports dd { margin: 0; line-height: 1.5; }
.foot__ports a { text-decoration: none; color: rgba(255, 255, 255, .9); }
.foot__ports a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot__ports .is-hq { color: var(--sx-teal-lt); }
.foot__base {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem;
  padding-block: 1.4rem; border-top: 1px solid var(--sx-line-dark);
  color: var(--sx-fog); font-size: .84rem;
}
.foot__base .brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.foot__base .brand__mark { width: 22px; height: 29px; --logo-mark: #fff; --logo-s: var(--sx-logo-s); }
.foot__base .brand__word { width: 108px; height: 13px; --logo-word: #fff; }
.footer-credit { margin-left: auto; display: inline-flex; align-items: center; padding: 12px 0 12px 12px; margin-block: -12px; opacity: .78; transition: opacity .2s var(--sx-ease); }
.footer-credit img { width: 150px; height: auto; display: block; }
a.footer-credit:hover, a.footer-credit:focus-visible { opacity: 1; }

@media (max-width: 1080px) {
  .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); }
  .foot__desk { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-top: 3rem; row-gap: 2.5rem; }
  .foot__ports { grid-column: 1 / -1; }
  .foot__base { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .footer-credit { margin-left: 0; padding: 12px 12px 12px 0; margin-top: .25rem; }
}
@media (max-width: 380px) {
  .foot__lines div { grid-template-columns: 1fr; gap: 0; }
  .foot__lines div + div { margin-top: .35rem; }
}
