/* dtschart.com, theme "dts".
   "Waterline": the ship's hull as the page - deep sea navy above, a light boot-top line, antifouling red below.
   Project pages use the "specification" layout: facts in a table, weights in hull red. */
:root {
  --sea: #0E2235;
  --sea-2: #183552;
  --hull: #B03A2E;
  --hull-2: #C9473A;
  --foam: #F4F6F8;
  --steel: #8FA3B5;
  --ink: #1B2B3A;
  --muted: #4F6577;
  --rule: #D3DCE4;
  --white: #FFFFFF;
  --cond: "Fira Sans Extra Condensed", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--foam); color: var(--ink); font: 400 1.0625rem/1.6 "Fira Sans", "Segoe UI", system-ui, sans-serif; }
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #F2B84B; outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); color: var(--ink); padding: 8px 12px; z-index: 10; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
h1, h2, h3 { font-family: var(--cond); font-weight: 700; line-height: 1.05; margin: 0 0 .45em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); max-width: 18ch; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
h3 { font-size: 1.5rem; font-weight: 600; }
h2 a, h3 a { text-decoration: none; }
h2 a:hover { color: var(--hull); }
p { margin: 0 0 1em; max-width: 68ch; }

/* ---------- header on the dark background.
   Line 1: logo + company name | membership icons (centre) | languages. Line 2: menu across the whole width. */
.top, .main, .hero-text { width: 100%; }   /* the home header is a column flex box: without this the lines shrink to the centre */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding-top: 16px; color: var(--white); position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; justify-self: start; }
.brand img { width: 54px; height: 54px; background: var(--white); border-radius: 6px; padding: 3px; }   /* a white rounded square, like the membership icons */
.brand span { font-size: 1.05rem; opacity: .9; }
.orgs { display: flex; gap: 8px; justify-self: center; }
.orgs a { display: block; background: var(--white); border-radius: 5px; padding: 3px; line-height: 0; }
.orgs a:hover { outline: 2px solid var(--hull); }
.orgs img { width: 26px; height: 26px; object-fit: contain; }
.top .lang { justify-self: end; }
.main { display: flex; justify-content: space-between; gap: 6px 22px; flex-wrap: wrap; font-weight: 500; font-size: 1.05rem; color: var(--white); position: relative; z-index: 1; margin-top: 14px; padding-top: 12px; padding-bottom: 4px; }
.main::before { content: ""; position: absolute; top: 0; left: 28px; right: 28px; border-top: 1px solid rgba(255,255,255,.18); }
.main a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.main a:hover, .main a[aria-current] { border-bottom-color: var(--hull); }
.lang { display: flex; gap: 10px; }
.lang a { text-decoration: none; opacity: .7; }
.lang a[aria-current] { opacity: 1; font-weight: 500; }

/* ---------- home: full photo, text on the dark water and sky */
.hero { position: relative; min-height: min(88vh, 860px); color: var(--white); display: flex; flex-direction: column; background: var(--sea); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,34,53,.92) 0%, rgba(14,34,53,.70) 38%, rgba(14,34,53,.10) 75%), linear-gradient(0deg, rgba(14,34,53,.85) 0%, rgba(14,34,53,0) 45%); }
.hero-text { position: relative; z-index: 1; }
.hero-text { margin-top: auto; padding-top: 48px; padding-bottom: 64px; }
.hero-text h1 { max-width: 20ch; font-size: clamp(2.6rem, 6.2vw, 5.2rem); }
.hero-text h1:lang(uk) { max-width: 26ch; font-size: clamp(2.3rem, 5vw, 4.3rem); }
.hero-text p { font-size: 1.25rem; color: #D9E3EC; }
.btn { display: inline-block; margin-top: 12px; background: var(--hull); color: var(--white); text-decoration: none; padding: 14px 26px; font-weight: 500; border-radius: 2px; }
.btn:hover { background: var(--hull-2); }

/* the waterline: dark hull edge, light boot-top line, then antifouling red */
.waterline { height: 6px; background: var(--foam); border-top: 3px solid var(--sea); }
.waterline.thin { height: 4px; border-top-width: 2px; border-bottom: 6px solid var(--hull); }
.facts { list-style: none; margin: 0; padding: 18px max(28px, calc((100vw - 1240px) / 2 + 28px)); background: var(--hull); color: var(--white); display: flex; gap: 40px; flex-wrap: wrap; font-family: var(--cond); font-size: 1.45rem; font-weight: 600; }

/* services */
.services { padding: 72px 0; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.cols ul { margin: 0; padding: 0; list-style: none; }
.cols li { padding: 10px 0; border-top: 1px solid var(--rule); }

/* projects: a sheet of photos at their real size */
.projects { background: var(--white); padding: 72px 0; }
.sheet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 24px; }
.sheet a { display: block; text-decoration: none; }
.sheet img { width: 100%; max-width: 300px; aspect-ratio: 3 / 2; object-fit: cover; }
.sheet .t { display: block; font-family: var(--cond); font-weight: 600; font-size: 1.35rem; line-height: 1.15; margin-top: 10px; }
.sheet a:hover .t { color: var(--hull); }
.sheet .m { display: block; color: var(--muted); font-size: .98rem; }
.sheet .m b { color: var(--hull); font-weight: 500; margin-right: 6px; }

/* full-width photo band */
.band { margin: 0; }
.band img { width: 100%; height: min(62vh, 620px); min-height: 320px; object-fit: cover; object-position: 50% 62%; }
.band figcaption { color: var(--muted); padding-top: 10px; padding-bottom: 10px; font-size: .95rem; }

/* about + memberships */
.about { background: var(--sea); color: #D9E3EC; padding: 72px 0; }
.about h2 { color: var(--white); }
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 64px; }
.members { list-style: none; margin: 0; padding: 0; }
.members li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--sea-2); }
.members a { text-decoration: none; }
.members a:hover { text-decoration: underline; }
.members img { background: var(--white); padding: 4px; width: 40px; height: 40px; object-fit: contain; flex: none; }

/* contacts */
.contacts { padding: 72px 0; }
.deps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.deps ul { list-style: none; margin: 0; padding: 0; }
.deps li { padding: 4px 0; }
.deps a { color: var(--ink); text-decoration-color: var(--hull); }
.addr { margin: 0; display: grid; gap: 6px; }
.addr div { display: grid; grid-template-columns: 180px 1fr; }
.addr dt { color: var(--muted); }
.addr dd { margin: 0; }
s, del { text-decoration-color: var(--hull); color: #6B7F90; }
s a { color: inherit; }

/* ---------- inner pages: dark header with crumbs, title and second-level menu */
.phead { background: var(--sea); color: var(--white); padding-bottom: 40px; }
.phead.slim { padding-bottom: 14px; }
.crumbs { margin: 36px 0 10px; color: var(--steel); font-size: .98rem; }
.phead .wrap > h1:first-child { margin-top: 36px; }   /* no path line above the title */
.crumbs a { color: var(--steel); }
.subnav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-weight: 500; }
.subnav a { text-decoration: none; color: #D9E3EC; padding: 4px 0; border-bottom: 2px solid transparent; }
.subnav a:hover, .subnav a[aria-current] { color: var(--white); border-bottom-color: var(--hull); }
.body { padding-top: 48px; padding-bottom: 72px; }

/* text from the old site */
.prose { max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--hull); }
.prose img { margin: 16px 0; }
.prose table { border-collapse: collapse; margin: 16px 0; background: var(--white); max-width: 100%; }
.prose td, .prose th { border: 1px solid var(--rule); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose a { color: var(--ink); text-decoration-color: var(--hull); }

/* list of articles (ship maintenance) */
.items { display: grid; gap: 28px; max-width: 80ch; }
.item { background: var(--white); border-left: 4px solid var(--hull); padding: 22px 26px; }
.item h2 { font-size: 1.7rem; }
.more { font-weight: 500; color: var(--ink); text-decoration-color: var(--hull); }

/* certificates */
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.certs a { display: block; text-decoration: none; background: var(--white); padding: 14px; border: 1px solid var(--rule); height: 100%; }
.certs img { margin: 0 auto 12px; height: 260px; width: 100%; object-fit: contain; }
.certs span { display: block; font-weight: 500; }
.certs a:hover span { color: var(--hull); }
.cert img { margin: 0 auto; border: 1px solid var(--rule); background: var(--white); }

/* ---------- project page ("specification") */
.proj { padding-top: 40px; padding-bottom: 72px; }
.proj h1 { color: var(--ink); font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.proj-head { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; align-items: start; margin-bottom: 40px; }
.proj-head .prose { font-size: 1.15rem; }
.spec { margin: 0; background: var(--white); border: 1px solid var(--rule); }
.spec div { display: grid; grid-template-columns: 130px 1fr; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.spec div:last-child { border-bottom: 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 500; }
.spec dd.w { color: var(--hull); font-family: var(--cond); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; align-items: start; }
.gallery figure { margin: 0; background: var(--white); border: 1px solid var(--rule); }
.gallery img { width: 100%; }
.gallery figure:not(.large) img { max-width: 300px; margin: 0 auto; }
.gallery figure.large { grid-column: span 2; }
.gallery figcaption { font-size: .95rem; color: var(--muted); padding: 8px 12px; }
.back { margin-top: 36px; }
.back a { font-weight: 500; text-decoration-color: var(--hull); }

/* ---------- footer: copyright and a letter icon leading to Contacts */
.foot { background: var(--sea); color: var(--steel); padding: 18px 0; font-size: .95rem; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.foot-mail { color: #D9E3EC; display: inline-flex; padding: 6px; }
.foot-mail:hover { color: var(--white); outline: 2px solid var(--hull); }

/* ---------- m/v LAURUS (former laurus.dtschart.com) */
.vessel h2 { margin-top: 48px; }
.vessel h3 { margin-top: 28px; font-size: 1.35rem; }
.particulars { background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--hull); padding: 18px 22px; overflow-x: auto; font: .95rem/1.55 ui-monospace, Consolas, "Liberation Mono", monospace; }
.vphotos, .vcerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.vphotos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.vphotos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.vphotos a:hover img { outline: 3px solid var(--hull); }
.vcerts { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.vcerts a { display: block; text-decoration: none; background: var(--white); border: 1px solid var(--rule); padding: 12px; height: 100%; }
.vcerts img { height: 220px; width: 100%; object-fit: contain; margin-bottom: 10px; }
.vcerts span { display: block; font-weight: 500; line-height: 1.3; }
.vcerts small { color: var(--hull); font-weight: 500; }
.vcerts a:hover span { color: var(--hull); }

@media (max-width: 900px) {
  .cols, .deps, .about-grid, .proj-head { grid-template-columns: 1fr; gap: 28px; }
  .top { grid-template-columns: 1fr auto; }
  .orgs { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .main { justify-content: flex-start; gap: 6px 16px; }
  .hero { min-height: min(92vh, 760px); }
  .facts { flex-direction: column; gap: 4px; font-size: 1.25rem; }
  .gallery figure.large { grid-column: auto; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  .main::before { left: 18px; right: 18px; }
  .addr div, .spec div { grid-template-columns: 1fr; }
  .sheet img, .gallery figure:not(.large) img { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
