/* ISA Design — design system (DSM-1058).
 *
 * Palette per the brief: white primary background, light grey section panels,
 * soft grey borders, dark charcoal text. ISA Red is an ACCENT only - quote
 * buttons, icons, active nav underlines, card links. The vibrant green is
 * reserved exclusively for "WhatsApp Us" so that button always means the same
 * thing; it is never used for anything else anywhere on the site.
 */

:root {
  --red: #D90000;
  --red-dark: #B00000;
  --wa: #3ae85b;          /* WhatsApp ONLY - never reuse */
  --wa-dark: #2FCB4B;
  --ink: #1A1A1A;
  --charcoal: #111213;
  --muted: #5F6368;
  --line: #E3E5E8;
  --panel: #F5F6F7;
  --white: #fff;
  --radius: 12px;
  --wrap: 1200px;
  --shadow: 0 2px 10px rgba(17,18,19,.06);
  --shadow-lift: 0 14px 30px rgba(17,18,19,.14);
  --header-h: 78px;
}

* { box-sizing: border-box; }
/* `hidden` must win over a layout rule. `.filters { display: flex }` beat the
   browser default and left the empty projects filter bar on screen. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: Montserrat, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { line-height: 1.18; margin: 0; letter-spacing: -.01em; }
h1 { font-weight: 800; }
h2 { font-weight: 800; }
h3 { font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--red); color: #fff;
        padding: 10px 16px; font-weight: 700; z-index: 300; }
.skip:focus { left: 8px; top: 8px; }

/* ── Header ─────────────────────────────────────────────────────
   Transparent over the hero, then solid on scroll - the brief asks for the
   transition rather than a permanent black block. */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 200; height: var(--header-h);
  display: flex; align-items: center;
  background: transparent; transition: background .28s ease, box-shadow .28s ease;
}
.hdr.solid { background: rgba(17,18,19,.97); box-shadow: 0 2px 18px rgba(0,0,0,.22); }
.hdr-inner { display: flex; align-items: center; gap: 20px; width: min(100% - 32px, var(--wrap));
             margin-inline: auto; min-width: 0; }

.logo-link { flex: none; display: block; min-width: 0; }
.logo-link img { height: 46px; width: auto; }   /* proportional - never stretched */

.menu { display: none; gap: 30px; margin: 0 auto; }
.menu a {
  color: rgba(255,255,255,.92); text-decoration: none; font-weight: 600; font-size: 14.5px;
  padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.menu a:hover { color: #fff; }
.menu a.active { color: #fff; border-bottom-color: var(--red); }

.hdr-cta { display: none; gap: 10px; flex: none; }

.burger { display: grid; gap: 5px; background: none; border: 0; cursor: pointer;
          padding: 8px; margin-left: auto; }
.burger span { width: 24px; height: 2px; background: #fff; display: block; }

@media (min-width: 1040px) {
  .menu, .hdr-cta { display: flex; }
  .burger { display: none; }
}

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 190;
  background: var(--charcoal); padding: 14px 16px 22px; display: none;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; color: #fff; text-decoration: none; font-weight: 600;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.10);
}
.mobile-menu .btn { margin-top: 14px; width: 100%; text-align: center; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 14.5px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background .15s ease, transform .12s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
/* WhatsApp green - reserved, per the brief, for this button alone. */
.btn-wa { background: var(--wa); color: #06310F; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
/* Call Us (DSM-1076 #4): ISA Design red with white text, everywhere it appears
   - including on dark heroes, where it used to be a white outline. */
.btn-call { background: var(--red); color: #fff; border-color: var(--red); }
.btn-call:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-lg { padding: 15px 30px; font-size: 15.5px; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero { position: relative; min-height: 640px; display: grid; align-items: center;
        padding: calc(var(--header-h) + 40px) 0 60px; color: #fff; overflow: hidden; }
.hero-split { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.hero-split > div { background-size: cover; background-position: center; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(17,18,19,.90) 0%, rgba(17,18,19,.72) 52%, rgba(17,18,19,.55) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(34px, 6.4vw, 62px); font-weight: 800; margin-bottom: 18px; max-width: 15ch; }
.hero-tag { color: var(--red); font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
            font-size: 12px; margin: 0 0 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ── Sections ───────────────────────────────────────────────── */
.section { padding: 74px 0; }
.section-panel { background: var(--panel); }
.section-head { margin-bottom: 34px; max-width: 62ch; }
.section-head h2 { font-size: clamp(25px, 3.6vw, 36px); margin-bottom: 10px; }
.section-head p { color: var(--muted); margin: 0; }
.eyebrow { color: var(--red); font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
           font-size: 11.5px; margin: 0 0 8px; }

/* ── Cards ──────────────────────────────────────────────────── */
.cards { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
/* Fixed aspect + object-fit:cover so a photo of any shape is never distorted. */
/* The photo box keeps its ratio and the image FILLS it. `height: 100%` alone
   resolved against an auto height, so with real photographs (DSM-1076) each
   card cropped to its own picture and the cards sat at different heights;
   pinning the image inside the box removes that. */
.card-photo { aspect-ratio: 16 / 10; background: var(--panel); position: relative; overflow: hidden; }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%;
                  object-fit: cover; display: block; }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.card-ico { color: var(--red); margin-bottom: 2px; }
.card h3 { font-size: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); }
.card-meta span { background: var(--panel); border: 1px solid var(--line);
                  border-radius: 999px; padding: 2px 10px; }
.card-link {
  margin-top: auto; padding-top: 12px; color: var(--red); font-weight: 700; font-size: 14.5px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.card-link .arw { transition: transform .18s ease; }
.card:hover .card-link .arw { transform: translateX(4px); }

/* ── CTA band ───────────────────────────────────────────────── */
.cta {
  background: var(--charcoal); color: #fff; text-align: center; padding: 66px 0;
}
.cta h2 { font-size: clamp(24px, 3.6vw, 34px); margin-bottom: 10px; }
.cta p { color: rgba(255,255,255,.72); margin: 0 0 26px; }

/* ── Footer ─────────────────────────────────────────────────── */
.foot { background: var(--charcoal); color: rgba(255,255,255,.72); padding: 56px 0 0; }
.foot-grid { display: grid; gap: 34px; padding-bottom: 38px; }
@media (min-width: 760px)  { .foot-grid { grid-template-columns: 1.5fr 1fr; } }
@media (min-width: 1040px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.foot img { height: 44px; width: auto; margin-bottom: 16px; }
.foot h4 { color: var(--red); font-size: 12.5px; font-weight: 800; letter-spacing: .14em;
           text-transform: uppercase; margin: 0 0 14px; }
.foot p { margin: 0 0 16px; font-size: 14px; max-width: 42ch; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.foot a { color: rgba(255,255,255,.80); text-decoration: none; font-size: 14px; }
.foot a:hover { color: #fff; }
.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff;
}
.foot-social a:hover { background: var(--red); }
.foot-base { border-top: 1px solid rgba(255,255,255,.10); padding: 18px 0 24px;
             font-size: 12.5px; color: rgba(255,255,255,.52); }

/* ── Floating WhatsApp ──────────────────────────────────────── */
/* DSM-1076 #1: bottom of the site, WhatsApp green, ISA Design red border, with
   the words "WhatsApp Us" next to the logo. */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--wa); color: #06310F; font-weight: 800; font-size: 15px;
  text-decoration: none; border: 3px solid var(--red);
  box-shadow: 0 6px 20px rgba(0,0,0,.26);
}
.wa-float:hover { background: var(--wa-dark); }
.wa-float-label { white-space: nowrap; }
/* On a phone the label would crowd the screen edge, so the pill tightens up
   but keeps the wording - the brief asks for the words, not for an icon. */
@media (max-width: 420px) {
  .wa-float { right: 12px; bottom: 12px; padding: 10px 14px; font-size: 14px; gap: 8px; }
}
/* The cookie bar sits below the widget; lift it clear while the bar is showing.
   --cookie-h is the bar's measured height, set by site.js. */
body.has-cookie-bar .wa-float { bottom: calc(var(--cookie-h, 140px) + 16px); }

/* ── Inner page headers ─────────────────────────────────────── */
.page-head {
  background: var(--charcoal); color: #fff; padding: calc(var(--header-h) + 54px) 0 54px;
}
.page-head h1 { font-size: clamp(28px, 4.6vw, 44px); margin-bottom: 10px; }
.page-head p { color: rgba(255,255,255,.74); margin: 0; max-width: 60ch; }
.crumbs { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 14px; }
.crumbs a { color: rgba(255,255,255,.75); text-decoration: none; }
.crumbs a:hover { color: var(--red); }

/* ── Contact ────────────────────────────────────────────────── */
.contact-grid { display: grid; gap: 34px; }
@media (min-width: 950px) { .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 54px; } }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-ico { width: 38px; height: 38px; flex: none; border-radius: 9px; display: grid;
            place-items: center; background: rgba(217,0,0,.08); color: var(--red); }
.info-list a { text-decoration: none; font-weight: 600; }
.info-list a:hover { color: var(--red); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
             padding: 26px 24px; box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; margin-bottom: 15px; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 8px; width: 100%; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,0,0,.10);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field-row { display: grid; gap: 15px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-msg { margin: 12px 0 0; font-weight: 600; font-size: 14px; min-height: 20px; }
.form-msg.ok { color: #10793C; }
.form-msg.err { color: var(--red); }

/* ── Filters (projects) ─────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 28px; }
.filter {
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 17px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.filter:hover { border-color: var(--red); color: var(--red); }
.filter.active { background: var(--red); border-color: var(--red); color: #fff; }

.note {
  background: #FFF8E6; border: 1px solid #F0DCA6; border-radius: 10px;
  padding: 12px 16px; font-size: 13.5px; color: #6B5410; margin-bottom: 26px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ── Sub-service cards (DSM-1060) ────────────────────────────── */
/* Home Works shows 8 across 4 columns; Marine and Custom show 6 across 3.
   Both collapse to 2 then 1 as the screen narrows. */
.cards-4 { grid-template-columns: 1fr; }
@media (min-width: 620px)  { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 620px) and (max-width: 899px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }

.card-actions {
  margin-top: auto; padding-top: 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.card-actions .card-link { margin-top: 0; padding-top: 0; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 7px; }

/* Hero on the service pages: same treatment as home, without the split art. */
.hero-simple {
  position: relative; background: var(--charcoal); color: #fff;
  padding: calc(var(--header-h) + 66px) 0 66px;
}
.hero-simple h1 { font-size: clamp(30px, 5.4vw, 50px); font-weight: 800; margin: 0 0 12px; }
.hero-simple .sub { color: rgba(255,255,255,.78); font-size: 18px; margin: 0; }
.hero-simple .hero-actions { margin-top: 26px; }
.hero-simple .btn-outline { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.hero-simple .btn-outline:hover { border-color: var(--red); color: var(--red); }
/* .btn-call keeps its red on dark heroes - it is a colour rule, not a context one. */


/* ── Footer legal row (DSM-1076 #8) ──────────────────────────── */
.foot-base-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
                 justify-content: space-between; }
.foot-legal a { color: rgba(255,255,255,.72); text-decoration: none; }
.foot-legal a:hover { color: #fff; text-decoration: underline; }

/* ── Cookie consent (DSM-1076 #9) ────────────────────────────── */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--charcoal); color: #fff; border-top: 3px solid var(--red);
  box-shadow: 0 -8px 30px rgba(0,0,0,.28);
}
.cookie-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 18px 20px;
  display: flex; gap: 18px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-text { max-width: 70ch; }
.cookie-text strong { display: block; font-size: 15px; margin-bottom: 4px; }
.cookie-text p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.76); line-height: 1.55; }
.cookie-text a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.cookie-actions .btn-outline:hover { border-color: #fff; color: #fff; }

/* ── Contact form consent (DSM-1076 #7) ──────────────────────── */
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.consent label { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.consent a { color: var(--red); font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── Photo heroes (DSM-1076 #12) ─────────────────────────────── */
/* The service and Projects heroes carry the client's approved photograph with
   the same dark wash as the home hero, so the white headline stays readable
   whatever the photo does. */
.hero-photo { position: relative; overflow: hidden; }
.hero-photo .hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(17,18,19,.90) 0%, rgba(17,18,19,.70) 55%, rgba(17,18,19,.52) 100%);
}
.hero-photo .wrap { position: relative; z-index: 2; }

/* ── Empty states (DSM-1076 #10, #11) ────────────────────────── */
.empty-state {
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel);
  padding: 34px 26px; text-align: center; color: var(--muted); font-size: 15px;
}
.empty-state strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

/* ── Privacy Policy page ─────────────────────────────────────── */
.legal { max-width: 820px; }
.legal h2 { font-size: 21px; margin: 30px 0 10px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--muted); line-height: 1.7; }
.legal ul { margin: 10px 0 0; padding-left: 20px; }
.legal .updated { font-size: 13.5px; color: var(--muted); margin-bottom: 26px; }
