/* ECO Portal — Unisea
   Used by index.html and SystemAvailability.html.
   Font: Montserrat, self-hosted in /fonts (SIL Open Font License). */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0f2a5c;          /* Unisea logo navy */
  --navy-deep: #081833;
  --ink: #14202e;
  --muted: #5b6878;
  --line: #e3e8ef;
  --bg-soft: #f3f5f9;
  --accent: #f29a3a;        /* sunset orange */
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header (logo + menu) ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);   /* thin line under the menu */
  position: sticky; top: 0; z-index: 10;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.site-logo img { height: 40px; width: auto; display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  padding: 8px 14px; border-radius: 8px;
  color: var(--navy); font-weight: 600; font-size: 14px;
  transition: background .15s;
}
.site-nav a:hover, .site-nav a:focus-visible { background: #eef2f8; outline: none; }

/* ---------- Title: Edison Chouest Offshore / Family of Companies ---------- */
.intro { background: #fff; text-align: center; padding: 22px 0 24px; }
.intro h1 {
  margin: 0; color: var(--navy);
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  font-size: clamp(24px, 3vw, 36px); line-height: 1.1;
}

/* "Family of Companies" and "Select your company" share one style */
.intro .sub, .section-title {
  font-size: 15px; font-weight: 600;
  letter-spacing: .25em; text-transform: uppercase;
}
.intro .sub { margin: 10px 0 0; color: var(--muted); }

/* ---------- Photo banner: vessel, sea & sunset ---------- */
.banner {
  /* Scales with screen width AND height, so laptops still see the cards */
  height: clamp(150px, min(24vw, 27vh), 380px);
  background: url("images/banner-sea.jpg") center 53% / cover no-repeat;
}

/* ---------- Company cards ---------- */
.picker { background: var(--bg-soft); padding: 36px 0 52px; }
.section-title { text-align: center; color: var(--navy); margin: 0 0 22px; }
.section-title::after {
  content: ""; display: block; width: 40px; height: 2px;
  margin: 10px auto 0; background: var(--accent); border-radius: 2px;
}

/* Rows fill left to right; an incomplete last row is centred.
   --cols = cards per row (6 on desktop: 11 companies = 6 + 5). */
.cards {
  --cols: 6; --gap: 16px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap);
}
.card {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,32,48,.05), 0 8px 24px rgba(16,32,48,.06);
  transition: transform .18s, box-shadow .18s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(16,32,48,.16);
  outline: none;
}
.card .logo {
  height: 116px; padding: 18px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, #1b3f7d 0%, var(--navy) 55%, var(--navy-deep) 100%);
}
.card .logo img { max-height: 76px; max-width: 82%; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.card .name {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 64px; padding: 12px 14px;
  color: var(--navy); font-weight: 600; font-size: 14px; line-height: 1.3;
}
.card .arrow { flex: none; color: var(--accent); transition: transform .18s; }
.card:hover .arrow { transform: translateX(4px); }

/* ---------- "Not available" message (SystemAvailability.html) ---------- */
.notice {
  max-width: 620px; margin: 0 auto; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 24px rgba(16,32,48,.06);
  padding: 36px 28px;
}
.notice h2 {
  margin: 0 0 10px; color: var(--navy);
  font-size: 20px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.notice p { margin: 0 0 24px; color: var(--muted); }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  background: var(--navy); color: #fff; font-weight: 600;
  transition: background .15s;
}
.btn:hover, .btn:focus-visible { background: #1b3f7d; outline: none; }

/* ---------- Footer / certifications ---------- */
.site-footer { background: #fff; padding: 22px 0; }
.certs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.certs img { height: 56px; width: auto; }
.copyright { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* ---------- Tablets & phones ---------- */
@media (max-width: 1100px) { .cards { --cols: 4; } }
@media (max-width: 860px)  { .cards { --cols: 3; } }

@media (max-width: 720px) {
  /* Header: logo on top, menu centred on one line below; the Windows-only
     UniSea Remote download is hidden on phones */
  .site-header { position: static; }
  .site-header .container { flex-direction: column; gap: 6px; padding-top: 12px; padding-bottom: 8px; min-height: 0; }
  .site-logo img { height: 34px; }
  .site-nav { justify-content: center; gap: 2px; }
  .site-nav a { font-size: 13px; padding: 8px 10px; }
  .nav-desktop { display: none; }

  .intro { padding: 18px 0 20px; }
  .intro .sub, .section-title { font-size: 13px; letter-spacing: .2em; }
  .picker { padding: 28px 0 40px; }

  .certs { gap: 10px; }
  .certs img { height: 44px; }
}

/* Short laptop screens (e.g. 1366x625): tighten vertical spacing so the
   first row of cards is visible without scrolling */
@media (min-width: 721px) and (max-height: 720px) {
  .intro { padding: 16px 0 18px; }
  .intro .sub { margin-top: 6px; }
  .picker { padding-top: 26px; }
  .section-title { margin-bottom: 18px; }
}

/* Laptops & PCs (6 + 5 layout): everything fits on one screen.
   Cards and photo scale with the screen HEIGHT, so both rows of companies
   are visible without scrolling at any laptop resolution. */
@media (min-width: 1101px) {
  .banner { height: clamp(100px, min(24vw, calc(57vh - 262px)), 380px); }
  .card .logo { height: clamp(62px, 11vh, 132px); padding: clamp(8px, 1.6vh, 18px); }
  .card .logo img { max-height: 100%; max-width: 78%; }
  .card .name {
    min-height: clamp(40px, 6.5vh, 64px);
    padding: clamp(6px, 1.2vh, 12px) 14px;
    font-size: clamp(12px, 1.9vh, 15px);
  }
}

/* Large PC screens: use more of the width */
@media (min-width: 1600px) {
  .container { max-width: 1400px; }
}

/* Phones: cards become a compact one-column list (logo left, name right) */
@media (max-width: 560px) {
  .cards { --cols: 1; --gap: 10px; }
  .card { display: flex; align-items: stretch; border-radius: 12px; }
  .card:hover, .card:focus-visible { transform: none; }
  .card .logo { flex: 0 0 108px; height: 72px; padding: 10px; }
  .card .logo img { max-height: 52px; max-width: 100%; }
  .card .name { flex: 1; min-height: 0; padding: 0 16px; font-size: 15px; }
}
