/* Chartering Solutions B.V. — shared styles */

@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --navy: #16202B;      /* hero, footer */
  --navy-2: #1F2C3A;    /* raised dark surface */
  --ink: #1E2730;       /* body text on light */
  --muted: #56636F;     /* secondary text on light */
  --line: #D6DDE4;      /* rules and borders */
  --paper: #FFFFFF;
  --mist: #EEF2F5;      /* alternate light section */
  --accent: #2F6DB5;    /* logo blue, the only accent */
  --accent-dark: #245892;
  --on-dark: #E9EEF3;
  --on-dark-muted: #A9B6C3;

  --font-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 68ch; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: #8DB6E6; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 88px; gap: 24px; }
.brand { display: block; flex-shrink: 0; }
.brand img { height: 64px; width: auto; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; cursor: pointer; color: var(--ink);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--ink);
  font-family: var(--font-head); font-weight: 500; font-size: 1.1rem; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.site-nav .nav-cta { margin-left: 12px; }
.site-nav .nav-cta a { border: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: var(--radius);
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.site-nav .btn { padding: 10px 20px; color: #fff; }
.site-nav .btn[aria-current="page"] { color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn[disabled] { opacity: .65; cursor: wait; }

/* ---------- Hero (main) ---------- */
.hero { background: var(--navy); color: var(--on-dark); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
  align-items: center; padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px);
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero h1 span { display: block; font-weight: 500; color: var(--on-dark-muted); }
.hero-lead { color: var(--on-dark); font-size: 1.15rem; margin-bottom: 2rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-figure { margin: 0; justify-self: end; max-width: 545px; width: 100%; }
.hero-figure img { width: 100%; border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(255,255,255,.08); }

/* ---------- Page head (inner pages) ---------- */
.page-head { background: var(--navy); color: var(--on-dark); padding: clamp(44px, 6vw, 76px) 0 clamp(36px, 5vw, 56px); }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: var(--on-dark-muted); font-size: 1.15rem; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-mist { background: var(--mist); }
.section-intro { max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-intro p { color: var(--muted); }

/* Directions on main page: a three-column ruled list, not cards */
.directions { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.direction { padding: 28px 28px 8px 0; }
.direction + .direction { padding-left: 28px; border-left: 1px solid var(--line); }
.direction p { color: var(--muted); }
.direction a { font-weight: 500; }

/* Vessel types */
.vessel-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
.vessel-list li { padding: 20px 0; border-top: 1px solid var(--line); }
.vessel-list h3 { margin-bottom: .2em; }
.vessel-list p { margin: 0; color: var(--muted); }

/* Split block */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split figure { margin: 0; }
.split figure img { width: 100%; border-radius: var(--radius); }

.check-list { list-style: none; margin: 0 0 1.5em; padding: 0; }
.check-list li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--line); max-width: 68ch; }
.check-list li::before {
  content: ""; position: absolute; left: 4px; top: 19px; width: 10px; height: 10px;
  background: var(--accent); border-radius: 1px;
}

/* Industries */
.industries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.industries li { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 20px; border-top: 2px solid var(--accent); }
.industries img { height: 48px; width: auto; }
.industries span { font-family: var(--font-head); font-weight: 500; font-size: 1.15rem; line-height: 1.25; }

/* CTA banner */
.cta { background: var(--navy-2); color: var(--on-dark); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: clamp(44px, 6vw, 64px); padding-bottom: clamp(44px, 6vw, 64px); }
.cta h2 { color: #fff; margin-bottom: .2em; }
.cta p { color: var(--on-dark-muted); margin: 0; }
.cta .btn { flex-shrink: 0; }

/* ---------- Contacts ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.contact-list { margin: 0; }
.contact-list div { padding: 16px 0; border-top: 1px solid var(--line); }
.contact-list dt { font-size: .95rem; color: var(--muted); }
.contact-list dd { margin: 2px 0 0; font-size: 1.15rem; font-weight: 500; }
.contact-list a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.contact-list a:hover { color: var(--accent); }
.legal-note { margin-top: 24px; color: var(--muted); font-size: .95rem; }

.request-form { background: var(--mist); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); }
.request-form h2 { margin-bottom: .25em; }
.request-form .form-intro { color: var(--muted); margin-bottom: 1.5em; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; }
.field .req { color: #A3281E; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #A9B4BF; border-radius: var(--radius);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field input:invalid:not(:placeholder-shown) { border-color: #A3281E; }
.hidden-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 16px 0 0; padding: 0; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-success { padding: 14px 16px; background: #E3F1E8; color: #1D5A33; border-left: 4px solid #2E7D4F; }
.form-status.is-error { padding: 14px 16px; background: #FBE9E7; color: #8A2318; border-left: 4px solid #A3281E; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-dark-muted); font-size: .97rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: start; padding-top: 48px; padding-bottom: 40px; }
.footer-brand img { height: 60px; width: auto; }
.footer-company p { margin: 0 0 .3em; }
.footer-company strong { color: var(--on-dark); font-weight: 500; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: var(--on-dark); text-decoration: none; display: inline-block; padding: 3px 0; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-nav a[aria-current="page"] { color: #8DB6E6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; padding-bottom: 22px; font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .industries { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(22, 32, 43, .12);
    display: none;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
  .site-nav .nav-cta { margin: 16px 0 0; }
  .site-nav .nav-cta a { text-align: center; padding: 14px; box-shadow: none; }
  /* without JS the menu stays visible */
  .no-js .site-nav { display: block; position: static; box-shadow: none; }
  .no-js .nav-toggle { display: none; }
  .no-js .header-inner { flex-wrap: wrap; }

  .hero-inner, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero-figure { justify-self: start; }
  .directions { grid-template-columns: 1fr; }
  .direction, .direction + .direction { padding: 24px 0 4px; border-left: 0; }
  .direction + .direction { border-top: 1px solid var(--line); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .brand img { height: 52px; }
  .header-inner { min-height: 72px; }
  .vessel-list { grid-template-columns: 1fr; }
  .industries { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .btn { width: 100%; text-align: center; }
  .site-nav .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
.list-cta { margin-top: 32px; }
