/* ============================================================
   BlueMarine Chartering Inc. — Design System
   v1 · Editorial maritime · Refined minimalism
   ============================================================ */

:root {
  /* Brand palette */
  --navy:        #0E2C4D;   /* primary — wordmark, headlines, nav */
  --deep-sea:    #1E5A8C;   /* secondary blue */
  --tide:        #5B9BC4;   /* accent blue, waves */
  --gold:        #C9A24A;   /* single brand accent, sparingly */
  --gold-soft:   #E0C683;   /* hover/light variant */

  /* Neutrals */
  --paper:       #F8F6F1;   /* warm white background */
  --paper-soft:  #F1EEE7;   /* slightly darker for section bands */
  --ink:         #1A1A1A;   /* body copy */
  --slate:       #6B7280;   /* secondary text, eyebrows */
  --slate-soft:  #9CA3AF;   /* tertiary, captions */
  --line:        #E5E0D6;   /* dividers, subtle borders */

  /* Typography */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Layout */
  --container:   1200px;
  --container-narrow: 880px;
  --nav-height:  180px;

  /* Motion */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* Subtle paper grain — adds atmosphere without noise */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 350; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 400; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 500; line-height: 1.25; }

p { color: var(--ink); max-width: 65ch; }
p + p { margin-top: 1rem; }

a { color: inherit; text-decoration: none; transition: color 220ms var(--ease); }

::selection { background: var(--gold); color: var(--navy); }

/* Eyebrow — section labels in caps */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 1.25rem;
}
.eyebrow .num {
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 500;
  margin-right: 0.7em;
  letter-spacing: 0;
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}
.container--narrow { max-width: var(--container-narrow); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  height: 100%;
}
.nav__brand img {
  height: 152px;
  width: auto;
  display: block;
}
@media (max-width: 1024px) { .nav__brand img { height: 110px; } }
@media (max-width: 720px)  { .nav__brand img { height: 80px; } }
.nav__links {
  display: flex;
  list-style: none;
  gap: 2.4rem;
  align-items: center;
}
.nav__link {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  position: relative;
  padding: 0.5rem 0;
}
.nav__link:hover { color: var(--navy); }
.nav__link.is-active { color: var(--navy); }
.nav__link.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
}

@media (max-width: 1024px) {
  :root { --nav-height: 130px; }
}
@media (max-width: 720px) {
  :root { --nav-height: 100px; }
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1.6rem;
  padding-left: 1.6rem;
  border-left: 1px solid var(--line);
}
.lang-toggle__btn {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--slate-soft);
  padding: 0.3rem 0.1rem;
  transition: color 220ms var(--ease);
  text-transform: uppercase;
}
.lang-toggle__btn:hover { color: var(--navy); }
.lang-toggle__btn.is-active {
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
}
.lang-toggle__sep {
  color: var(--slate-soft);
  font-size: 0.78rem;
  user-select: none;
}
@media (max-width: 820px) {
  .lang-toggle {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    margin-top: 0.6rem;
  }
}

/* Hamburger for mobile */
.nav__burger {
  display: none;
  background: none;
  border: 0;
  width: 32px; height: 32px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav__burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--navy);
  margin: 5px auto;
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
}

@media (max-width: 820px) {
  .nav__burger { display: block; }
  .nav__links {
    position: fixed;
    inset: var(--nav-height) 0 auto 0;
    flex-direction: column;
    background: var(--paper);
    padding: 2rem;
    gap: 1.4rem;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    transition: transform 320ms var(--ease);
  }
  .nav.is-open .nav__links { transform: translateY(0); }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(4rem, 8vh, 6rem);
  position: relative;
}
.hero__inner {
  max-width: 980px;
}
.hero h1 {
  margin: 1.5rem 0 1.5rem;
  max-width: 18ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--deep-sea);
  font-weight: 350;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 58ch;
  margin-top: 0.5rem;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Two-column hero — text + image */
.hero--split .hero__inner {
  max-width: var(--container);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}
.hero--split .hero__text { max-width: 540px; }
.hero--split .hero__image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 30px 60px -30px rgba(14, 44, 77, 0.35);
}
.hero--split .hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}
.hero--split .hero__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(14, 44, 77, 0.18));
  pointer-events: none;
}
.hero--split .hero__image-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 246, 241, 0.85);
  z-index: 2;
}
.hero--split .hero__image-caption .num {
  font-family: var(--font-mono);
  color: var(--gold);
  margin-right: 0.6em;
  letter-spacing: 0;
}

@media (max-width: 920px) {
  .hero--split .hero__inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero--split .hero__image { aspect-ratio: 4 / 3; max-width: 100%; }
}

/* Gold rule under hero */
.gold-rule {
  width: 64px;
  height: 2px;
  background: var(--gold);
  margin: 2rem 0;
  border: 0;
}

/* Section feature image — for markets/services pages */
.feature-image {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  margin: 2rem 0 3rem;
  border-radius: 2px;
  background: var(--paper-soft);
}
.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}
.feature-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  background: transparent;
}
.feature-image--placeholder::before {
  content: 'IMAGE PLACEHOLDER — replace src in HTML';
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--slate-soft);
  text-transform: uppercase;
}

/* ============================================================
   PAGE HEADER (for non-home pages)
   ============================================================ */
.pageheader {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4rem;
}
.pageheader h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  margin-bottom: 0.5rem;
}
.pageheader__sub {
  color: var(--slate);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-top: 1rem;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 5rem 0; }
.section--tight { padding: 3.5rem 0; }
.section--band { background: var(--paper-soft); }

.section__head {
  margin-bottom: 3rem;
  max-width: 60ch;
}
.section__head h2 { margin-bottom: 0.75rem; }
.section__head p {
  color: var(--slate);
  margin-top: 1rem;
  font-size: 1.02rem;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* ============================================================
   GRIDS — markets, services
   ============================================================ */
.grid {
  display: grid;
  gap: 2.5rem;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 920px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* Card style — markets/services blocks */
.card {
  position: relative;
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
}
.card__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.9rem;
  display: block;
}
.card h3 {
  margin-bottom: 0.85rem;
  font-size: 1.5rem;
}
.card p {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.6;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.card__sizes {
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--slate);
  font-style: italic;
  line-height: 1.55;
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 14, 'SOFT' 100;
}
.card__sizes::before {
  content: 'Tonnage';
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-soft);
  margin-bottom: 0.4rem;
}

/* ============================================================
   PROSE — body content blocks
   ============================================================ */
.prose {
  max-width: 62ch;
}
.prose p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.prose p:first-of-type::first-line {
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--navy);
}

/* On narrow screens, justified text opens ugly word gaps — revert to left */
@media (max-width: 600px) {
  .card p,
  .prose p,
  .section__head p,
  .pageheader__sub,
  .hero__lede,
  .muted {
    text-align: left;
  }
}

/* ============================================================
   CONTACT BLOCKS
   ============================================================ */
.offices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
@media (max-width: 820px) { .offices { grid-template-columns: 1fr; } }

.office {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.office__city {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
  font-weight: 400;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}
.office__country {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

.contact-block {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--navy);
}
.contact-block__label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.8rem;
}
.contact-block__value {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.85rem);
  color: var(--navy);
  font-weight: 400;
}
.contact-block__value a {
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: border-color 220ms var(--ease);
}
.contact-block__value a:hover { border-bottom-color: var(--navy); }
.contact-block__person {
  font-size: 1.05rem;
  color: var(--ink);
  margin-top: 0.4rem;
}
.contact-block__person .role {
  color: var(--slate);
  font-style: italic;
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 14;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy);
  color: var(--paper);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  position: relative;
  z-index: 2;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.footer__brand .accent { color: var(--gold); }
.footer__tagline {
  color: rgba(248, 246, 241, 0.65);
  font-size: 0.92rem;
  max-width: 38ch;
  margin-top: 0.6rem;
}
.footer__links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.footer__links a {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(248, 246, 241, 0.7);
  transition: color 220ms var(--ease);
}
.footer__links a:hover { color: var(--gold); }
.footer__bottom {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: rgba(248, 246, 241, 0.45);
  letter-spacing: 0.05em;
}
@media (max-width: 720px) {
  .footer__top { flex-direction: column; gap: 2rem; }
  .footer__links { flex-wrap: wrap; gap: 1.2rem; }
  .footer__bottom { flex-direction: column; gap: 0.5rem; }
}

/* ============================================================
   WAVE DIVIDER — signature element from logo
   ============================================================ */
.wave-divider {
  height: 24px;
  margin: 4rem auto;
  display: block;
  opacity: 0.55;
  max-width: 200px;
}

/* ============================================================
   ENTRANCE ANIMATION — staggered fade-up on first paint
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 800ms var(--ease) backwards;
}
.fade-up-1 { animation-delay: 80ms; }
.fade-up-2 { animation-delay: 220ms; }
.fade-up-3 { animation-delay: 360ms; }
.fade-up-4 { animation-delay: 500ms; }

/* ============================================================
   UTILITY
   ============================================================ */
.flow > * + * { margin-top: 1.25rem; }
.text-center { text-align: center; }
.muted {
  color: var(--slate);
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
.italic { font-style: italic; }

/* CTA-style internal link */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 500;
  border-bottom: 1px solid var(--gold);
  padding: 0.5rem 0 0.4rem;
  transition: gap 240ms var(--ease), color 220ms var(--ease);
}
.cta-link::after {
  content: '→';
  font-family: var(--font-mono);
  color: var(--gold);
  transition: transform 240ms var(--ease);
}
.cta-link:hover { color: var(--deep-sea); }
.cta-link:hover::after { transform: translateX(4px); }
