/* =====================================================================
   Naval Architect Bureau: site styles
   Editing guide
   - Colours and fonts live in the :root block below. Change a value there and the whole site follows.
   - The site uses ONE blue (--blue) for the hero panel, page headers and footer, plus white and a very light
     blue tint (--tint) for alternating sections. The yellow accent (--sun) comes from the logo.
   - The dark theme values are in the two dark blocks right under :root.
   ===================================================================== */
:root {
  --paper: #FFFFFF;          /* page background */
  --tint: #F1F3FA;          /* alternating section background */
  --sheet: #FFFFFF;         /* cards */
  --ink: #1A2044;           /* body text */
  --muted: #555C80;         /* secondary text */
  --line: #D3D8E8;          /* thin dividers */
  --line-strong: #9AA1C4;   /* ruler, table rules */
  --head: #39408C;          /* headings (booklet blue) */
  --brand: #39408C;         /* buttons */
  --on-brand: #FFFFFF;
  --link: #39408C;
  --focus: #39408C;
  --blue: #39408C;          /* the blue panels: hero, page headers, footer */
  --on-blue: #FFFFFF;
  --on-blue-muted: #D2D6F2;
  --blue-line: rgba(255, 255, 255, .28);
  --sun: #F2C400;           /* accent from the logo */
  --on-sun: #1A2044;
  --img-bg: #FFFFFF;
  --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1200px;            /* content width */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1228; --tint: #131838; --sheet: #171C3E; --ink: #E9EBF8; --muted: #A8AED0;
    --line: #2B3260; --line-strong: #5A629A; --head: #E9EBF8; --brand: #5560D0; --on-brand: #FFFFFF;
    --link: #AEB5FF; --focus: #AEB5FF; --blue: #232A6E; --on-blue-muted: #B4BAEA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1228; --tint: #131838; --sheet: #171C3E; --ink: #E9EBF8; --muted: #A8AED0;
  --line: #2B3260; --line-strong: #5A629A; --head: #E9EBF8; --brand: #5560D0; --on-brand: #FFFFFF;
  --link: #AEB5FF; --focus: #AEB5FF; --blue: #232A6E; --on-blue-muted: #B4BAEA;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.6 var(--font-body); -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.on-blue :focus-visible { outline-color: var(--sun); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1; margin: 0; color: var(--head); text-wrap: balance; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; }
.band { padding-inline: max(1rem, calc((100% - var(--max)) / 2)); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.tint { background: var(--tint); border-block: 1px solid var(--line); }
.on-blue { background: var(--blue); color: var(--on-blue); }
.on-blue h1, .on-blue h2, .on-blue h3, .on-blue h4 { color: var(--on-blue); }
.eyebrow { font: 500 .75rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.on-blue .eyebrow { color: var(--on-blue-muted); }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 52ch; }
.on-blue .lead { color: var(--on-blue-muted); }
.section-head { display: grid; gap: .9rem; max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
.section-head p { color: var(--muted); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.9rem; padding: .6rem 1.2rem;
  font: 600 .95rem/1.1 var(--font-body); text-decoration: none; border-radius: 3px; border: 1.5px solid transparent;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sun { background: var(--sun); color: var(--on-sun); }
.btn-sun:hover { background: #FFD92E; }
.btn-line { color: var(--on-blue); border-color: var(--blue-line); background: transparent; }
.btn-line:hover { border-color: var(--on-blue); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { filter: brightness(1.12); }
.btn-outline { color: var(--link); border-color: var(--line-strong); background: transparent; }
.btn-outline:hover { border-color: var(--link); }

/* ---------- top bar (white) ---------- */
.top { background: var(--paper); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--head); text-decoration: none; margin-right: auto; }
.brand img { width: 46px; height: 46px; }
.brand span { font: 600 1.15rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
.nav-links { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; list-style: none; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .92rem; padding-block: .35rem; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--line-strong); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--sun); font-weight: 500; }
.theme-btn {
  font: 500 .72rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 3px; padding: .55rem .7rem; cursor: pointer;
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- home hero: photos on the left, blue panel on the right (like the booklet cover) ---------- */
.hero2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.hero-media { position: relative; min-height: 440px; background: var(--tint); margin: 0; }
.hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hero-panel {
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  padding-left: clamp(1.5rem, 4.5vw, 4.5rem);
  padding-right: max(1rem, calc((100vw - var(--max)) / 2));
}
.hero-panel h1 { font-size: clamp(2.5rem, 5vw, 4.3rem); line-height: .97; margin-block: 1.1rem 1.3rem; letter-spacing: -.01em; }
.hl { background: linear-gradient(transparent 80%, var(--sun) 80%, var(--sun) 93%, transparent 93%); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- inner page header (blue band) ---------- */
.pagehead-band { padding-block: clamp(2.4rem, 5vw, 3.6rem); }
.pagehead { max-width: 58rem; }
.pagehead h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: .98; margin-block: 1rem 1.1rem; }

/* ---------- ruler ---------- */
.ruler {
  height: 18px; border-bottom: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px) 0 100% / 10px 7px repeat-x,
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px) 0 100% / 50px 14px repeat-x;
}

/* ---------- key figures ---------- */
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: clamp(2rem, 4vw, 3rem); }
.fig { padding: .25rem 1.4rem; border-left: 1px solid var(--line); }
.fig:first-child { border-left: 0; padding-left: 0; }
.fig b { display: block; font: 600 clamp(2.4rem, 4.4vw, 3.4rem)/1 var(--font-display); color: var(--head); font-variant-numeric: tabular-nums; }
.fig span { display: block; margin-top: .6rem; color: var(--muted); font-size: .9rem; line-height: 1.45; max-width: 26ch; }

/* ---------- services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem clamp(2rem, 5vw, 4.5rem); }
.teasers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.2rem clamp(1.4rem, 3vw, 2.4rem); }
.svc { border-top: 2px solid var(--brand); padding-top: 1.1rem; min-width: 0; }
.svc h3 { font-size: 1.85rem; margin-bottom: .6rem; }
.teasers .svc h3 { font-size: 1.6rem; }
.svc p { color: var(--muted); max-width: 46ch; margin-bottom: 1.1rem; }
.svc ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .45rem 1.5rem; }
.teasers .svc ul { grid-template-columns: minmax(0, 1fr); }
.svc li { position: relative; padding-left: 1.1rem; font-size: .95rem; line-height: 1.45; }
.svc li::before { content: ""; position: absolute; left: 0; top: .5em; width: .42rem; height: .42rem; background: var(--sun); outline: 1px solid var(--brand); }
.more-link { display: inline-block; margin-top: 1.1rem; font-weight: 600; font-size: .92rem; }
.section-foot { margin-top: 2rem; }

/* ---------- project cards ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.chip {
  font: 500 .8rem/1 var(--font-mono); letter-spacing: .04em; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--line-strong); border-radius: 3px; padding: .65rem .9rem; cursor: pointer;
}
.chip span { color: var(--muted); margin-left: .35rem; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.chip[aria-pressed="true"] span { color: var(--on-brand); opacity: .8; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.card { display: flex; flex-direction: column; min-width: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.shot { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--img-bg); border-bottom: 1px solid var(--line); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.shot.cover img { object-fit: cover; }
.shot.contain img { object-fit: contain; }
.card-body { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem 1.2rem 1.25rem; flex: 1; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; font: 500 .68rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-size: 1.65rem; }
.desc { font-size: .93rem; line-height: 1.5; }
.specs { margin-top: auto; border-top: 1px solid var(--line-strong); padding-top: .35rem; }
.specs > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1rem; padding: .38rem 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); font-size: .8rem; }
.specs dd { margin: 0 0 0 auto; font: 500 .82rem/1.35 var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.arr { color: var(--muted); margin-inline: .15em; }
.supplied { font-size: .8rem; line-height: 1.45; color: var(--muted); }
.supplied b { font-weight: 600; color: var(--ink); }
.more { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: baseline; color: var(--muted); font-size: .92rem; }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.6rem; list-style: none; }
.steps li { position: relative; padding-top: 1.6rem; border-top: 1px solid var(--line-strong); }
.steps li::before { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; background: var(--sun); outline: 1px solid var(--brand); }
.steps .n { font: 500 .75rem/1 var(--font-mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.steps h3 { font-size: 1.7rem; margin-block: .6rem; }
.steps p { font-size: .93rem; line-height: 1.55; color: var(--muted); }

/* ---------- company ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); }
.about p { max-width: 62ch; }
.about p + p { margin-top: 1rem; }
.dl-list { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.facts { list-style: none; align-self: start; border-top: 2px solid var(--brand); }
.facts li { display: flex; justify-content: space-between; gap: 1.2rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts b { font: 500 .85rem/1.4 var(--font-mono); text-align: right; }
.partners-list { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; }
.partners-list li { font: 500 .8rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: .8rem 1rem; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--sheet); }

/* ---------- call to action ---------- */
.cta { background: var(--paper); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 3.8rem); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 22ch; }
.cta .hero-cta { margin: 0; }

/* ---------- contacts page ---------- */
.contact-page { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
.contact-grid h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: .98; margin-block: 1rem 1.1rem; }
.contact-grid .lead { margin-bottom: 1.6rem; }
.send-list { list-style: none; display: grid; gap: .55rem; margin-bottom: 1.8rem; }
.send-list li { position: relative; padding-left: 1.2rem; font-size: .95rem; }
.send-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: .42rem; height: .42rem; background: var(--sun); outline: 1px solid var(--brand); }
.card-contact { background: var(--tint); border: 1px solid var(--line); padding: .4rem 1.3rem; align-self: start; min-width: 0; }
.row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: .4rem 1rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row dt { font: 500 .7rem/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.row dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.row dd .ln { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.row dd .ln + .ln { margin-top: .45rem; }
.addr { font-size: .95rem; line-height: 1.5; }
.copy {
  font: 500 .68rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 3px; padding: .4rem .55rem; cursor: pointer; min-width: 4.4rem;
}
.copy:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- footer (blue) ---------- */
.sitefoot { padding-block: 2.6rem 1.6rem; font-size: .9rem; color: var(--on-blue-muted); }
.sitefoot a { color: var(--on-blue); text-decoration-color: var(--blue-line); }
.sitefoot a:hover { text-decoration-color: var(--sun); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr 1.2fr; gap: 2rem; }
.foot-grid > * { min-width: 0; }
.foot-brand { display: flex; align-items: center; gap: .7rem; color: var(--on-blue); font: 600 1.05rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.foot-brand img { width: 38px; height: 38px; }
.sitefoot h4 { margin: 0 0 .7rem; font: 500 .7rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-blue-muted); }
.sitefoot ul { list-style: none; display: grid; gap: .4rem; }
.sitefoot p + p { margin-top: .4rem; }
.foot-bottom { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--blue-line); font-size: .82rem; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero2 { grid-template-columns: minmax(0, 1fr); }
  .hero-media { min-height: 0; aspect-ratio: 16 / 10; }
  .hero-panel { padding-inline: max(1rem, 5vw); }
  .contact-grid, .about { grid-template-columns: minmax(0, 1fr); }
  .grid, .teasers, .steps, .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 0; }
  .fig:nth-child(odd) { border-left: 0; padding-left: 0; }
}
@media (max-width: 720px) {
  .svc-grid, .grid { grid-template-columns: minmax(0, 1fr); }
  .brand span { font-size: 1rem; letter-spacing: .09em; }
  .nav { gap: .5rem 1rem; }
  .nav-links { gap: .1rem 1.1rem; order: 3; width: 100%; }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row dt { grid-column: 1 / -1; }
  .hero-media { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .teasers, .steps, .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- Reference letters ---- */
.letters { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.4rem; }
.letter { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--sheet); overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.letter:hover, .letter:focus-visible { border-color: var(--blue); transform: translateY(-2px); }
.letter img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: #fff; border-bottom: 1px solid var(--line-strong); }
.lcap { display: flex; flex-direction: column; gap: .25rem; padding: .85rem 1rem 1rem; }
.lcap b { font-weight: 600; line-height: 1.3; }
.lcap span { font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.lcap em { font-style: normal; font-size: .88rem; line-height: 1.45; opacity: .85; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10, 14, 40, .88); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: min(92vw, 900px); max-height: 94vh; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-close, .lb-nav { position: fixed; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 2rem; line-height: 1; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; margin-top: -1.5rem; }
.lb-next { right: 1rem; top: 50%; margin-top: -1.5rem; }
@media (max-width: 560px) { .letters { grid-template-columns: repeat(2, 1fr); gap: .8rem; } .lcap em { display: none; } .lb-nav { top: auto; bottom: 1rem; margin: 0; } }

/* make the "hidden" attribute win over display:flex (project filters) */
[hidden] { display: none !important; }
