/* Marine Graphics — shared stylesheet */

/* Exact brand colours from Marine Graphics Branding Proposal:
   Marine Blue    PANTONE 2757 C   RGB 0/63/94    (applied as richer indigo ~#222a6e)
   Polar White                      RGB 255/255/255 #FFFFFF
   Ocean Blue     PANTONE 333 C    RGB 88/189/180  #58BDB4
   Cool Grey      PANTONE Cool Grey 6  RGB 167/168/170 #A7A8AA
   Black          PANTONE Black C   #000000

   The spec swatch is #003F5E but every APPLIED usage in the proposal (solid panels,
   circle surrounds, duotone washes) reads as a deeper indigo ~ PANTONE 2757 C
   true value (#1A1F71 / applied around #222a6e). We use the applied colour.
*/

:root {
  --marine: #222a6e;
  --marine-900: #1a205a;
  --marine-800: #1e2566;
  --marine-700: #2a3380;
  --marine-600: #3a4490;
  --marine-deep: #141845;
  --polar: #FFFFFF;
  --polar-soft: #F4F6F8;
  --cool-grey: #A7A8AA;
  --cool-grey-light: #D9DBDD;
  --ocean: #58BDB4;
  --ocean-dim: #3fa59c;
  --black: #000000;
  --ink: #141631;

  /* Marine Blue tints (matching 20/40/60/80/100 scale) */
  --marine-t20: #d3d5e4;
  --marine-t40: #a6abc9;
  --marine-t60: #7a80af;
  --marine-t80: #4e5594;

  --fz-display: clamp(48px, 7vw, 112px);
  --fz-h1: clamp(40px, 5.6vw, 80px);
  --fz-h2: clamp(28px, 3.4vw, 48px);
  --fz-h3: clamp(20px, 2vw, 28px);
  --fz-body: 17px;
  --fz-small: 13px;
  --fz-label: 12px;

  --radius: 2px;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', 'Proxima Nova', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
  font-size: var(--fz-body);
  color: var(--ink);
  background: var(--polar);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- Type ---
   Brand face is Industry (Adobe Fonts). Barlow Condensed is the closest
   Google Fonts match for display use; Barlow for body. */
h1, h2, h3, h4, .display, .eyebrow {
  font-family: 'Barlow Condensed', 'Industry', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 600;
  letter-spacing: 0.005em;
  margin: 0;
}
h1, .display { font-size: var(--fz-h1); line-height: 1.02; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--fz-h2); line-height: 1.08; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
h3 { font-size: var(--fz-h3); line-height: 1.2; font-weight: 500; }
p { margin: 0 0 1em; text-wrap: pretty; }

.eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: var(--fz-label);
  color: var(--ocean);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow.plain::before { display: none; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Layout --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section { padding: clamp(72px, 10vw, 140px) 0; }

.rule { height: 1px; background: currentColor; opacity: 0.2; border: 0; margin: 0; }

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 20px 0;
  transition: background .35s var(--ease), padding .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header.is-solid {
  background: rgba(34, 42, 110, 0.96);
  border-bottom-color: rgba(255,255,255,0.08);
  padding: 14px 0;
}
.site-header[data-light="true"] {
  border-bottom-color: rgba(0,63,94,0.08);
}
.site-header[data-light="true"].is-solid {
  background: rgba(255,255,255,0.92);
  border-bottom-color: rgba(0,63,94,0.12);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--polar);
  text-decoration: none;
}
.site-header[data-light="true"] .brand { color: var(--marine); }
.brand-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  flex: none;
}
.brand-logo {
  display: block;
  width: 180px;
  height: auto;
  flex: none;
}
.brand-logo svg { width: 100%; height: auto; display: block; }
.brand-word {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.9;
  font-size: 20px;
}
.brand-word span { display: block; white-space: nowrap; }

.brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  line-height: 1;
}
.brand-sub {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-top: 5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav a {
  color: var(--polar);
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 15px;
  position: relative;
  padding: 6px 0;
}
.site-header[data-light="true"] .nav a { color: var(--marine); }
.nav a::after {
  content: '';
  position: absolute;
  left: 50%; right: 50%;
  bottom: -2px;
  height: 1px;
  background: var(--ocean);
  transition: left .3s var(--ease), right .3s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after {
  left: 0; right: 0;
}
.nav a[aria-current="page"] { color: var(--ocean); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 14px;
  padding: 16px 28px;
  white-space: nowrap;
  color: var(--marine) !important;
  background: var(--polar);
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.nav-cta:hover { background: var(--ocean); color: var(--marine) !important; }
.nav-cta::after { display: none !important; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
@media (max-width: 1024px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; color: var(--polar); }
  .site-header[data-light="true"] .nav-toggle { color: var(--marine); }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--marine-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px var(--gutter);
    gap: 18px;
  }
  .nav.is-open .nav-cta { align-self: stretch; justify-content: center; }
}
@media (max-width: 520px) {
  .brand-sub { display: none; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 13px;
  padding: 16px 26px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary { background: var(--ocean); border-color: var(--ocean); color: var(--marine); }
.btn--primary:hover { background: var(--polar); border-color: var(--polar); }
.btn--on-dark { color: var(--polar); }
.btn--on-dark:hover { background: var(--polar); color: var(--marine); }
.btn--ghost-dark { color: var(--marine); }
.btn--ghost-dark:hover { background: var(--marine); color: var(--polar); }

/* --- Placeholder imagery --- */
.ph {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.04) 0 14px,
      rgba(255,255,255,0.00) 14px 28px),
    linear-gradient(160deg, #0a4a6a 0%, #003F5E 55%, #00233a 100%);
  color: rgba(255,255,255,0.55);
  isolation: isolate;
}
.ph.ph-light {
  background:
    repeating-linear-gradient(45deg,
      rgba(0,63,94,0.05) 0 14px,
      rgba(0,63,94,0.0) 14px 28px),
    linear-gradient(160deg, #eef2f5 0%, #dde4ea 100%);
  color: rgba(0,63,94,0.5);
}
/* With real image */
.ph[data-img] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: rgba(255,255,255,0.75);
}
.ph[data-img]::after { opacity: 0; }
.ph[data-img]::before { opacity: 0; }
.ph[data-img] > .ph-caption { display: none; }
.ph::before, .ph::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid currentColor;
  opacity: 0.55;
}
.ph::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.ph::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.ph > .ph-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}
.ph > .ph-caption span { opacity: 0.8; }

/* --- Footer --- */
.site-footer {
  background: var(--marine-900);
  color: var(--polar);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 860px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
.site-footer h4 {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 20px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--ocean); }
.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 16px;
}

/* --- Marine section (dark) --- */
.bg-marine { background: var(--marine); color: var(--polar); }
.bg-marine-deep { background: var(--marine-900); color: var(--polar); }
.bg-polar { background: var(--polar); color: var(--ink); }
.bg-soft { background: var(--polar-soft); color: var(--ink); }

/* --- Page hero (inner pages) — cover-style composition --- */
.page-hero {
  position: relative;
  padding: clamp(140px, 16vw, 200px) 0 clamp(72px, 9vw, 120px);
  background: var(--marine);
  color: var(--polar);
  overflow: hidden;
}
.page-hero::before,
.page-hero::after { content: none; }

.page-hero .hero-wave {
  position: absolute;
  top: -20px; left: 0; right: 0; bottom: 0;
  opacity: 0.25;
  pointer-events: none;
  z-index: 1;
}
.page-hero .hero-wave svg {
  width: 100%; height: 100%;
  display: block;
}
.page-hero .hero-mark {
  position: absolute;
  right: -100px; bottom: -180px;
  width: 560px; height: 560px;
  color: #FFFFFF;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
}
.page-hero .hero-mark svg { width: 100%; height: 100%; display: block; }
.page-hero .inner { position: relative; z-index: 2; max-width: 1000px; }
.page-hero h1 {
  font-family: 'Barlow Condensed', 'Oswald', sans-serif;
  font-size: clamp(52px, 8vw, 128px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.88;
  margin-top: 24px;
  text-wrap: balance;
}
.page-hero h1 em {
  font-style: normal;
  color: var(--ocean);
  font-weight: 800;
}
.page-hero .lede {
  max-width: 64ch;
  margin-top: 36px;
  font-size: clamp(18px, 1.6vw, 22px);
  color: rgba(255,255,255,0.78);
  line-height: 1.5;
}

/* --- Registration marks (corner ornaments) --- */
.reg-marks {
  position: absolute;
  inset: 24px;
  pointer-events: none;
  color: rgba(255,255,255,0.25);
}
.reg-marks::before, .reg-marks::after,
.reg-marks > i::before, .reg-marks > i::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid currentColor;
}
.reg-marks::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reg-marks::after { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reg-marks > i { position: absolute; inset: 0; display: block; }
.reg-marks > i::before { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reg-marks > i::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* --- Utility --- */
.grid { display: grid; }
.flex { display: flex; }
.muted { color: var(--cool-grey); }
.underline-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.underline-link:hover { color: var(--ocean); border-bottom-color: var(--ocean); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  background: var(--marine-900);
  color: var(--polar);
  padding: 20px 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  display: none;
  width: 280px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
  font-size: 13px;
}
.tweaks-panel.is-open { display: block; }
.tweaks-panel h5 {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--ocean);
  margin: 0 0 14px;
  font-weight: 500;
}
.tweak-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.tweak-row:first-of-type { border-top: 0; }
.tweak-row label { font-size: 12px; color: rgba(255,255,255,0.85); }
.tweak-seg { display: inline-flex; background: rgba(255,255,255,0.06); border-radius: 3px; padding: 2px; }
.tweak-seg button {
  background: transparent; color: rgba(255,255,255,0.65); border: 0; padding: 5px 10px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; border-radius: 2px;
}
.tweak-seg button[aria-pressed="true"] { background: var(--ocean); color: var(--marine); }


/* ==============================================================
   BRAND SYSTEM — from Marine Graphics Branding Proposal
   Duotone imagery, contour overlay, framed photos, solid blocks
   ============================================================== */

/* Duotone Marine Blue wash — from Imagery spread p.10
   Maps full-colour photos into a Marine Blue tonal range.
   Shadows → #141845 (marine-deep), midtones → marine, highlights → near white.
   We compose using background-blend-mode: darken on Polar backgrounds, or use
   a mix-blend overlay for simpler cases. */
.duotone {
  position: relative;
  overflow: hidden;
  background-color: #eaecf5; /* light marine tint so the image bedding is tonal */
  isolation: isolate;
}
.duotone > img,
.duotone > picture img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: none;
  opacity: 0.5;
}
.duotone::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(34,42,110,0.5), rgba(20,24,69,0.7));
  z-index: 1;
}
.duotone::after {
  content: '';
  position: absolute; inset: 0;
  background: transparent;
  opacity: 0;
  z-index: 2;
}
/* When using as bg-image (for .ph[data-img]) */
.duotone.is-bg { background-color: var(--marine); }
.duotone.is-bg::before { background: url(var(--img)) center/cover no-repeat; opacity: 0.5; }
.duotone.is-bg::after { background: linear-gradient(180deg, rgba(34,42,110,0.35), rgba(20,24,69,0.55)); opacity: 1; }

/* Apply duotone to existing .ph[data-img] blocks */
.ph.duotone[data-img] {
  background-color: var(--marine);
  background-image: var(--bg-img) !important;
  background-size: cover;
  background-position: center;
}
.ph.duotone[data-img]::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(34,42,110,0.55), rgba(20,24,69,0.75));
  z-index: 0;
  border: 0;
  width: 100%; height: 100%;
}
.ph.duotone[data-img]::after {
  display: none;
}

/* Contour / wave-line overlay — signature brand element
   Elegant flowing parametric curves in Polar White at low opacity.
   Used over imagery and solid blue panels. */
.contour-overlay {
  position: absolute;
  pointer-events: none;
  opacity: 0.35;
}
.contour-overlay svg { width: 100%; height: 100%; display: block; }

/* Logo lockup block — solid Marine Blue panel with mark + wordmark, like the cover */
.logo-lockup {
  background: var(--marine);
  color: var(--polar);
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  --logo-bg: var(--marine);
}
.logo-lockup .lockup-mark { flex: none; width: 48px; height: 48px; display: grid; place-items: center; }
.logo-lockup .lockup-mark svg { width: 100%; height: 100%; }
.logo-lockup .lockup-word {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.95;
  font-size: 22px;
}
.logo-lockup .lockup-word span { display: block; }

/* Frame — solid Marine Blue border around imagery (from cover layout) */
.blue-frame {
  background: var(--marine);
  padding: clamp(24px, 3vw, 56px);
}

/* Solid blue block / panel */
.blue-panel {
  background: var(--marine);
  color: var(--polar);
}

/* Big word treatment (Industry Black ultra-condensed headlines) */
.industry-display {
  font-family: 'Barlow Condensed', 'Oswald', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.9;
}

/* Override nav/footer to use applied marine blue */
.site-header.is-solid { background: rgba(34, 42, 110, 0.94); }
.site-header[data-light="true"] { color: var(--marine); --logo-bg: var(--polar); }
.brand { --logo-bg: var(--marine); }
.site-header[data-light="true"] .brand { --logo-bg: var(--polar); }
