@import url("../fonts/fonts.css");

/* ------------------------------------------------------------------ *
 * Marevia Gas Shipping — design tokens
 * ------------------------------------------------------------------ */
:root {
  --abyss: #061522;
  --hull: #0b2032;
  --hull-soft: #15344b;
  --paper: #ffffff;
  --mist: #eff2f4;
  --brass: #b07d3a;
  --brass-light: #d2a269;
  --ink: #16242e;
  --steel: #5d6e7b;
  --rule: #d5dce1;
  --rule-dark: rgba(255, 255, 255, 0.16);

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --header-h: 76px;
  --gap: clamp(2.5rem, 1.5rem + 3vw, 5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1.1em;
  max-width: 68ch;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--hull);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}

.skip:focus {
  left: 0;
}

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */
.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.masthead.is-stuck {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom-color: var(--rule);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: block;
  text-decoration: none;
  line-height: 1;
}

.wordmark b {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  color: #fff;
  transition: color 0.35s ease;
}

.wordmark span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  font-weight: 500;
  color: var(--brass-light);
  transition: color 0.35s ease;
}

.is-stuck .wordmark b {
  color: var(--hull);
}

.is-stuck .wordmark span {
  color: var(--brass);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 450;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav a:hover {
  border-bottom-color: var(--brass);
}

.is-stuck .nav a {
  color: var(--steel);
}

.is-stuck .nav a:hover {
  color: var(--hull);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1px;
  background: #fff;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: relative;
  top: -6px;
}

.nav-toggle span::after {
  top: 5px;
}

.is-stuck .nav-toggle {
  border-color: var(--rule);
}

.is-stuck .nav-toggle span,
.is-stuck .nav-toggle span::before,
.is-stuck .nav-toggle span::after {
  background: var(--hull);
}

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  padding-block: calc(var(--header-h) + 3rem) clamp(3rem, 6vh, 5.5rem);
  background: var(--abyss);
  overflow: hidden;
}

.hero picture,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
  object-position: 58% 54%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(6, 21, 34, 0.78) 0%, rgba(6, 21, 34, 0) 20%),
    linear-gradient(104deg, rgba(6, 21, 34, 0.94) 0%, rgba(6, 21, 34, 0.78) 38%, rgba(6, 21, 34, 0.28) 78%),
    linear-gradient(to top, rgba(6, 21, 34, 0.85) 0%, rgba(6, 21, 34, 0) 45%);
}

.hero .wrap {
  position: relative;
  z-index: 2;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 1.1rem + 3.9vw, 4.3rem);
  max-width: 17ch;
  font-weight: 600;
}

.hero-lede {
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  max-width: 54ch;
  margin-top: 1.6rem;
}

.hero-keel {
  width: 76px;
  height: 2px;
  background: var(--brass);
  margin: 2.1rem 0 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.4rem;
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero-meta a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}

.hero-meta a:hover {
  color: var(--brass-light);
}

/* one orchestrated entrance, nothing else moves on the page */
.hero h1,
.hero-lede,
.hero-keel,
.hero-meta {
  animation: rise 0.9s cubic-bezier(0.22, 0.75, 0.3, 1) both;
}

.hero-keel {
  animation-delay: 0.1s;
}

.hero-lede {
  animation-delay: 0.16s;
}

.hero-meta {
  animation-delay: 0.26s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ *
 * Sections
 * ------------------------------------------------------------------ */
.band {
  padding-block: var(--gap);
  scroll-margin-top: var(--header-h);
}

.band + .band {
  border-top: 1px solid var(--rule);
}

.band--tint {
  background: var(--mist);
}

.band--tint + .band,
.band--dark + .band {
  border-top: 0;
}

.band--dark {
  background: var(--hull);
  color: rgba(255, 255, 255, 0.82);
}

.band--dark h2,
.band--dark h3 {
  color: #fff;
}

.section-head {
  max-width: 64ch;
}

.section-head h2 {
  max-width: 21ch;
}

h2 + .lede {
  margin-top: 1.45rem;
}

.band h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.7vw, 2.55rem);
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--steel);
  max-width: 56ch;
}

.company .lede {
  margin-bottom: 1.6rem;
}

.band--dark .lede {
  color: rgba(255, 255, 255, 0.72);
}

/* Company: text next to the registry panel */
.company {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: start;
}

.registry {
  margin: 0;
  border-top: 2px solid var(--hull);
  padding-top: 1.4rem;
}

.registry div + div {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.registry dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 0.35rem;
}

.registry dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}

.registry a {
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.registry a:hover {
  border-bottom-color: var(--brass);
}

/* Management services: ledger rows, not cards */
.ledger {
  margin-top: clamp(2.5rem, 1.5rem + 2vw, 3.75rem);
  border-top: 1px solid var(--rule);
}

.ledger > div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.9fr);
  gap: clamp(1rem, 0.4rem + 2.2vw, 3.5rem);
  padding-block: clamp(1.75rem, 1.2rem + 1.4vw, 2.6rem);
  border-bottom: 1px solid var(--rule);
}

.ledger h3 {
  font-size: 1.3rem;
  letter-spacing: -0.008em;
}

.ledger p {
  margin: 0;
  color: var(--steel);
  max-width: 62ch;
}

/* Vessel types */
.types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 0.5rem + 2.6vw, 3rem);
  margin-top: clamp(2.5rem, 1.5rem + 2vw, 3.5rem);
}

.type {
  border-top: 2px solid var(--brass);
  padding-top: 1.5rem;
}

.type svg {
  width: 100%;
  height: auto;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.5rem;
}

.type svg .tank {
  color: var(--brass-light);
}

.type h3 {
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}

.spec {
  margin: 0;
  font-size: 0.9375rem;
}

.spec div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--rule-dark);
}

.spec dt {
  color: rgba(255, 255, 255, 0.55);
  flex: none;
}

.spec dd {
  margin: 0;
  text-align: right;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.type-cargo {
  margin-top: 1.2rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

/* Compliance */
.compliance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: start;
}

.standards {
  margin: 0;
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.standards li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9688rem;
  color: var(--steel);
}

.standards b {
  font-weight: 600;
  color: var(--ink);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: start;
}

.contact-mail {
  display: inline-block;
  margin-top: 1.8rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2.05rem);
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid var(--brass);
  padding-bottom: 0.35rem;
  word-break: break-word;
}

.contact-mail:hover {
  color: var(--brass-light);
}

.address {
  font-style: normal;
  border-top: 2px solid var(--brass);
  padding-top: 1.4rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.75;
}

.address strong {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Footer */
.colophon {
  background: var(--abyss);
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.875rem;
  padding-block: 2.75rem;
}

.colophon .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2.5rem;
}

.colophon p {
  margin: 0;
  max-width: none;
}

.colophon a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.colophon a:hover {
  color: #fff;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 920px) {
  .company,
  .compliance,
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .types {
    grid-template-columns: minmax(0, 1fr);
    max-width: 30rem;
  }

  .ledger > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--hull);
    padding: 0.5rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--rule-dark);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a,
  .is-stuck .nav a {
    color: rgba(255, 255, 255, 0.88);
    padding-block: 0.95rem;
    border-bottom: 1px solid var(--rule-dark);
  }

  .standards li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .hero {
    min-height: 0;
    padding-block: calc(var(--header-h) + 5.5rem) 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
