/* ==========================================================================
   ARK Brothers — Engineering · Procurement · Construction
   Design system + global styles
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --navy:        #0c2340;
  --navy-700:    #13315c;
  --navy-600:    #1b4079;
  --accent:      #f5821f;   /* safety orange */
  --accent-600:  #e06f0c;
  --accent-soft: #fff3e6;
  --ink:         #1f2937;
  --muted:       #5b6677;
  --line:        #e5e9f0;
  --bg:          #ffffff;
  --bg-alt:      #f5f7fa;
  --bg-deep:     #08182e;
  --white:       #ffffff;
  --success:     #1f9d55;

  /* semantic tokens (overridden by [data-theme="dark"]) */
  --surface:     #ffffff;
  --heading:     var(--navy);
  --brand-text:  var(--navy);
  --header-bg:   rgba(255,255,255,.92);
  --link:        var(--navy-600);

  --radius:      14px;
  --radius-sm:   10px;
  --shadow-sm:   0 1px 2px rgba(12,35,64,.06), 0 1px 3px rgba(12,35,64,.10);
  --shadow:      0 10px 30px -12px rgba(12,35,64,.25);
  --shadow-lg:   0 24px 60px -20px rgba(12,35,64,.35);
  --container:   1180px;
  --font-body:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head:   "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-600); }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; font-weight: 800; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section--alt { background: var(--bg-alt); }
.section--deep { background: var(--bg-deep); color: #cdd7e6; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep p { color: #aebccf; }
.center { text-align: center; }
.lead { font-size: 1.16rem; color: var(--muted); max-width: 62ch; }
.center .lead { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-600);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.section--deep .eyebrow { color: var(--accent); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }
.section-head p { margin-top: 14px; font-size: 1.1rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(245,130,31,.7); }
.btn--primary:hover { background: var(--accent-600); color: #fff; box-shadow: 0 12px 26px -8px rgba(245,130,31,.8); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--navy-700); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #eef2f8; color: var(--navy); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn--outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 44px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  font-family: var(--font-head); font-weight: 600; font-size: .96rem; color: var(--navy);
  padding: 9px 14px; border-radius: 8px;
}
.nav__links a:hover { background: var(--bg-alt); color: var(--accent-600); }
.nav__links a.is-active { color: var(--accent-600); }
.nav__links a.is-active::after {
  content: ""; display: block; height: 2px; background: var(--accent); border-radius: 2px; margin-top: 3px;
}
.nav__links .btn { display: none; }   /* shown only inside mobile drawer */
.nav__cta { display: flex; align-items: center; gap: 12px; }
.nav__toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: none; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav__cta .btn { display: none; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 22px 24px;
    box-shadow: var(--shadow); transform: translateY(-130%); transition: transform .3s ease; visibility: hidden;
  }
  .nav__links.is-open { transform: translateY(0); visibility: visible; }
  .nav__links a { padding: 13px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--bg-alt); }
  .nav__links .btn { display: inline-flex; margin-top: 12px; }
  .nav__links a.is-active::after { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(115deg, rgba(8,24,46,.92) 0%, rgba(12,35,64,.78) 45%, rgba(19,49,92,.55) 100%),
              url("../assets/img/projects/project-piping-flanges.jpg") center/cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,130,31,.35), transparent 70%); filter: blur(20px);
}
.hero__inner { position: relative; z-index: 1; padding: clamp(80px, 13vw, 150px) 0 clamp(70px, 10vw, 120px); max-width: 760px; }
.hero h1 { color: #fff; }
.hero h1 span { color: var(--accent); }
.hero__sub { color: #d8e2f0; font-size: 1.2rem; margin: 20px 0 32px; max-width: 56ch; }
.hero .btn-row { margin-bottom: 14px; }
.hero__pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  font-family: var(--font-head); font-weight: 700; font-size: .82rem; letter-spacing: .08em; color: #fff; margin-bottom: 22px;
}
.hero__pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245,130,31,.25); }

/* Stats strip */
.stats {
  position: relative; z-index: 2; margin-top: -46px;
}
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 26px 24px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--navy); line-height: 1; }
.stat__num span { color: var(--accent); }
.stat__label { font-size: .9rem; color: var(--muted); margin-top: 8px; }
@media (max-width: 720px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d7deea; }
.card__icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-600); margin-bottom: 18px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .98rem; }
.card__list { margin-top: 14px; }
.card__list li { position: relative; padding-left: 22px; font-size: .95rem; color: var(--muted); margin-bottom: 6px; }
.card__list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

/* Value chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: .95rem;
  box-shadow: var(--shadow-sm);
}
.chip svg { width: 18px; height: 18px; color: var(--accent); }

/* ==========================================================================
   Split / feature rows
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split--reverse .split__media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse .split__media { order: 0; } }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.feature-list { margin-top: 22px; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 14px; }
.feature-list .ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft);
  color: var(--accent-600); display: grid; place-items: center;
}
.feature-list .ico svg { width: 20px; height: 20px; }
.feature-list strong { display: block; color: var(--navy); font-family: var(--font-head); }
.feature-list span { font-size: .96rem; color: var(--muted); }

/* ==========================================================================
   Clients / logos
   ========================================================================== */
.logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; max-width: 920px; margin-inline: auto; }
@media (max-width: 860px) { .logos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .logos { grid-template-columns: repeat(2, 1fr); } }
.logo-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 18px;
  display: grid; place-items: center; min-height: 120px; box-shadow: var(--shadow-sm); transition: .25s;
}
.logo-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.logo-card img { max-height: 56px; width: auto; filter: grayscale(100%); opacity: .72; transition: .25s; }
.logo-card:hover img { filter: grayscale(0); opacity: 1; }
/* Client grid (mixed logos + text tiles) */
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .client-grid { grid-template-columns: 1fr; } }
.client-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 132px; display: grid; place-items: center; text-align: center; padding: 22px 18px;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.client-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.client-tile img { max-height: 58px; width: auto; filter: grayscale(100%); opacity: .75; transition: .25s; }
.client-tile:hover img { filter: grayscale(0); opacity: 1; }
.client-tile .name { font-family: var(--font-head); font-weight: 800; color: var(--navy); font-size: 1.02rem; line-height: 1.3; }
.client-tile .name span { display: block; color: var(--accent-600); font-size: .76rem; font-weight: 700; letter-spacing: .04em; margin-top: 6px; }

.logo-strip { background: var(--bg-alt); border-block: 1px solid var(--line); }
.logo-strip .container { padding-block: 30px; }
.logo-strip__label { text-align: center; font-family: var(--font-head); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-size: .78rem; margin-bottom: 22px; }

/* ==========================================================================
   Projects gallery
   ========================================================================== */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.filter-btn {
  font-family: var(--font-head); font-weight: 700; font-size: .9rem; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; transition: .2s;
}
.filter-btn:hover { border-color: var(--navy); }
.filter-btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.tile {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-sm); aspect-ratio: 4/3; background: var(--navy);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.07); }
.tile__overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; background: linear-gradient(to top, rgba(8,24,46,.85), rgba(8,24,46,.05) 55%, transparent);
  opacity: 0; transition: opacity .3s ease;
}
.tile:hover .tile__overlay, .tile:focus-within .tile__overlay { opacity: 1; }
.tile__tag { font-family: var(--font-head); font-weight: 800; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.tile__title { color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; margin-top: 4px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(6,16,30,.92); display: none;
  align-items: center; justify-content: center; padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox__cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #e2e8f0; font-family: var(--font-head); }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff;
  width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 1.4rem; transition: .2s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__close { top: 22px; right: 22px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }
@media (max-width: 600px) { .lightbox__nav { width: 42px; height: 42px; } }

/* ==========================================================================
   Certifications
   ========================================================================== */
.cert-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
@media (max-width: 760px) { .cert-badges { grid-template-columns: 1fr; } }
.cert-badge {
  display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.cert-badge .ring {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) 0 75%, var(--line) 0); color: var(--navy);
}
.cert-badge .ring span { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: .82rem; }
.cert-badge h3 { font-size: 1.05rem; }
.cert-badge p { font-size: .9rem; margin-top: 2px; }

.cert-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 760px) { .cert-gallery { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }
.cert-img {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: .2s;
}
.cert-img:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.cert-img img { border-radius: 8px; width: 100%; }
.cert-img figcaption { text-align: center; font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: .92rem; margin-top: 12px; }

/* Registrations table */
.reg-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.reg-table th, .reg-table td { text-align: left; padding: 15px 20px; border-bottom: 1px solid var(--line); font-size: .98rem; }
.reg-table th { font-family: var(--font-head); color: var(--navy); background: var(--bg-alt); width: 42%; }
.reg-table tr:last-child td, .reg-table tr:last-child th { border-bottom: 0; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.office-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.office-card h3 { display: flex; align-items: center; gap: 10px; }
.office-card h3 .pin { color: var(--accent); }
.office-meta { margin-top: 14px; display: grid; gap: 10px; }
.office-meta li { display: flex; gap: 12px; font-size: .97rem; color: var(--muted); }
.office-meta svg { flex: 0 0 auto; width: 19px; height: 19px; color: var(--navy-600); margin-top: 3px; }
.office-meta a { color: var(--link); }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form .field { margin-bottom: 16px; }
.form label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: .92rem; }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: .97rem; color: var(--ink); background: #fcfdff; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,130,31,.15); }
.form textarea { resize: vertical; min-height: 120px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }
.form__note { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.form__status { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .95rem; display: none; }
.form__status.ok { display: block; background: #e9f7ef; color: var(--success); border: 1px solid #b9e6cb; }
.map-embed { border: 0; width: 100%; height: 320px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ==========================================================================
   Page hero (interior pages)
   ========================================================================== */
.page-hero {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 100%); color: #fff; position: relative; overflow: hidden;
}
.page-hero::before { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(245,130,31,.3), transparent 70%); }
.page-hero__inner { position: relative; z-index: 1; padding: clamp(54px, 8vw, 88px) 0; max-width: 720px; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #c6d2e2; font-size: 1.12rem; margin-top: 14px; }
.crumbs { font-size: .85rem; color: #93a6c0; margin-bottom: 16px; font-family: var(--font-head); font-weight: 600; }
.crumbs a { color: #c6d2e2; }
.crumbs a:hover { color: #fff; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { background: linear-gradient(120deg, var(--accent) 0%, var(--accent-600) 100%); color: #fff; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding-block: 48px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); margin-top: 6px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--bg-deep); color: #9fb0c7; padding-top: 64px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; padding-bottom: 44px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer img.flogo { height: 46px; margin-bottom: 16px; }
.footer p { font-size: .95rem; color: #8497b1; }
.footer h4 { color: #fff; font-size: .92rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-head); }
.footer ul li { margin-bottom: 9px; }
.footer ul a { color: #9fb0c7; font-size: .96rem; }
.footer ul a:hover { color: var(--accent); }
.footer__contact li { display: flex; gap: 10px; font-size: .94rem; margin-bottom: 12px; }
.footer__contact svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .86rem; color: #6f82a0; }
.footer__bottom a { color: #9fb0c7; }

/* ==========================================================================
   Reveal-on-scroll animation
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .tile img { transition: none; }
}

/* Utilities */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-white { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ==========================================================================
   Brand lockup (real logo emblem + wordmark)
   ========================================================================== */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__badge { background: #fff; border-radius: 12px; padding: 5px; display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: 0 0 auto; }
.brand__badge img { height: 38px; width: 38px; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong { font-family: var(--font-head); font-weight: 800; font-size: 1.22rem; letter-spacing: .02em; color: var(--brand-text); }
.brand__text strong em { font-style: normal; color: var(--accent); }
.brand__text small { font-family: var(--font-body); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 5px; }
.brand--footer .brand__text strong { color: #fff; }
.brand--footer .brand__text small { color: #8497b1; }
.brand--footer { margin-bottom: 16px; }
@media (max-width: 520px) { .brand__text small { display: none; } .brand__text strong { font-size: 1.05rem; } .brand__badge img { height: 32px; width: 32px; } }

/* ==========================================================================
   Theme toggle
   ========================================================================== */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--heading); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s;
}
.theme-toggle:hover { background: var(--bg-alt); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ==========================================================================
   WhatsApp floating button
   ========================================================================== */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; height: 60px; width: 60px; padding: 0 15px;
  background: #25D366; color: #fff; border-radius: 999px; overflow: hidden;
  box-shadow: 0 12px 26px -8px rgba(37,211,102,.65); transition: width .3s ease;
  white-space: nowrap;
}
.wa-float svg { width: 30px; height: 30px; flex: 0 0 30px; }
.wa-float span { font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin-left: 12px; opacity: 0; transition: opacity .2s ease .05s; }
.wa-float:hover { width: 218px; color: #fff; }
.wa-float:hover span { opacity: 1; }
@media (hover: none) { .wa-float, .wa-float:hover { width: 60px; } .wa-float span { display: none; } }
@media (max-width: 520px) { .wa-float { right: 16px; bottom: 16px; } }

/* ==========================================================================
   HSEQ Policy
   ========================================================================== */
.policy { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: start; }
@media (max-width: 880px) { .policy { grid-template-columns: 1fr; } }
.policy__principles { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; }
@media (max-width: 560px) { .policy__principles { grid-template-columns: 1fr; } }
.policy__principles li { position: relative; padding-left: 28px; font-size: .96rem; color: var(--muted); }
.policy__principles li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e06f0c' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat; }
.policy__doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.policy__doc img { border-radius: 8px; width: 100%; cursor: pointer; }
.policy__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: .85rem; color: var(--muted); }
.policy__meta b { color: var(--heading); font-family: var(--font-head); }
.doc-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.doc-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--link); }
.doc-link svg { width: 18px; height: 18px; }

/* Caption under cert images */
.cert-img figcaption small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: .8rem; margin-top: 3px; letter-spacing: 0; }

/* ==========================================================================
   Dark theme
   ========================================================================== */
[data-theme="dark"] {
  --bg:        #0b1828;
  --bg-alt:    #0f2138;
  --surface:   #142946;
  --ink:       #c6d3e3;
  --muted:     #93a4ba;
  --line:      #23395a;
  --heading:   #f3f7fc;
  --brand-text:#f3f7fc;
  --header-bg: rgba(11,24,40,.9);
  --link:      #6aa6e8;
  --accent-soft: rgba(245,130,31,.18);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 16px 40px -16px rgba(0,0,0,.7);
}
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 { color: var(--heading); }
[data-theme="dark"] .site-header { background: var(--header-bg); }
[data-theme="dark"] .nav__links a { color: var(--heading); }
[data-theme="dark"] .nav__links a:hover { background: rgba(255,255,255,.06); }
[data-theme="dark"] .nav__links { background: var(--surface); }
[data-theme="dark"] .nav__toggle { border-color: var(--line); }
[data-theme="dark"] .nav__toggle span { background: var(--heading); }
[data-theme="dark"] .stats__grid,
[data-theme="dark"] .card,
[data-theme="dark"] .chip,
[data-theme="dark"] .logo-card,
[data-theme="dark"] .client-tile,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .cert-badge,
[data-theme="dark"] .cert-img,
[data-theme="dark"] .reg-table,
[data-theme="dark"] .office-card,
[data-theme="dark"] .policy__doc,
[data-theme="dark"] .form { background: var(--surface); }
[data-theme="dark"] .cert-badge .ring span { background: var(--surface); }
[data-theme="dark"] .stat__num,
[data-theme="dark"] .chip,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .cert-img figcaption,
[data-theme="dark"] .reg-table th,
[data-theme="dark"] .policy__meta b,
[data-theme="dark"] .feature-list strong,
[data-theme="dark"] .form label { color: var(--heading); }
[data-theme="dark"] .reg-table th { background: var(--bg-alt); }
[data-theme="dark"] .btn--ghost { color: var(--heading); border-color: var(--line); }
[data-theme="dark"] .btn--dark { background: var(--accent); }
[data-theme="dark"] .btn--dark:hover { background: var(--accent-600); }
[data-theme="dark"] .form input, [data-theme="dark"] .form select, [data-theme="dark"] .form textarea { background: var(--bg); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .client-tile img, [data-theme="dark"] .logo-card img { filter: grayscale(100%) brightness(0) invert(1); opacity: .65; }
[data-theme="dark"] .client-tile:hover img, [data-theme="dark"] .logo-card:hover img { filter: none; opacity: 1; }
[data-theme="dark"] .hero, [data-theme="dark"] .page-hero { box-shadow: inset 0 -1px 0 var(--line); }

/* ==========================================================================
   Single-page (SPA) modern navigation + sections
   ========================================================================== */
/* Anchored sections clear the fixed header */
main section[id] { scroll-margin-top: 84px; }

/* Overlay header that turns solid on scroll (only on the single-page layout) */
.site-header--spa {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; backdrop-filter: none; border-bottom-color: transparent;
}
.site-header--spa:not(.scrolled) .nav__links > a:not(.btn),
.site-header--spa:not(.scrolled) .brand__text strong { color: #fff; }
.site-header--spa:not(.scrolled) .brand__text strong em { color: var(--accent); }
.site-header--spa:not(.scrolled) .brand__text small { color: rgba(255,255,255,.72); }
.site-header--spa:not(.scrolled) .nav__links > a:not(.btn):hover { background: rgba(255,255,255,.12); color: #fff; }
.site-header--spa:not(.scrolled) .theme-toggle { color: #fff; border-color: rgba(255,255,255,.35); }
.site-header--spa:not(.scrolled) .theme-toggle:hover { background: rgba(255,255,255,.12); }
.site-header--spa:not(.scrolled) .nav__toggle { border-color: rgba(255,255,255,.4); }
.site-header--spa:not(.scrolled) .nav__toggle span { background: #fff; }
.site-header--spa.scrolled {
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(10px);
  box-shadow: var(--shadow-sm); border-bottom: 1px solid var(--line);
}
/* On mobile the open drawer is always solid, so use normal text colours */
@media (max-width: 940px) {
  .site-header--spa:not(.scrolled) .nav__links > a:not(.btn) { color: var(--heading); }
  .site-header--spa:not(.scrolled) .nav__links.is-open { background: var(--surface); }
}

/* Modern hero polish */
.hero::before {
  content: ""; position: absolute; left: -120px; top: -80px; width: 420px; height: 420px; z-index: 0;
  background: radial-gradient(circle, rgba(27,64,121,.55), transparent 70%); filter: blur(10px);
}
.hero__inner { padding-top: clamp(140px, 18vw, 210px); }

/* Section intro divider line */
.section--deep .logo-strip__label { color: #8aa0bd; }

/* ==========================================================================
   Client tiles — readable in BOTH themes (white cards, real logos)
   ========================================================================== */
.client-tile { background: #fff; }
.client-tile img { max-height: 60px; filter: grayscale(100%); opacity: .82; }
.client-tile:hover img { filter: grayscale(0); opacity: 1; }
[data-theme="dark"] .client-tile, [data-theme="dark"] .logo-card { background: #fff; border-color: #e6eaf1; }
[data-theme="dark"] .client-tile img, [data-theme="dark"] .logo-card img { filter: grayscale(100%); opacity: .82; }
[data-theme="dark"] .client-tile:hover img, [data-theme="dark"] .logo-card:hover img { filter: grayscale(0); opacity: 1; }
[data-theme="dark"] .client-tile .name { color: var(--navy); }
[data-theme="dark"] .client-tile .name span { color: var(--accent-600); }

/* Scrollspy active state for in-page nav */
.nav__links a.is-current { color: var(--accent-600); }
.site-header--spa:not(.scrolled) .nav__links a.is-current { color: var(--accent); }
.nav__links a.is-current::after { content: ""; display: block; height: 2px; background: var(--accent); border-radius: 2px; margin-top: 3px; }
@media (max-width: 940px) { .nav__links a.is-current::after { display: none; } }

/* "View more" inline link */
.more-link { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-head); font-weight: 700; color: var(--link); }
.more-link svg { width: 18px; height: 18px; transition: transform .2s; }
.more-link:hover svg { transform: translateX(3px); }

/* ==========================================================================
   Custom cursor (pointer devices only)
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button, .has-cursor [data-lightbox],
  .has-cursor input, .has-cursor select, .has-cursor textarea, .has-cursor .tile,
  .has-cursor label { cursor: none; }

  /* Small dot that sits exactly on the pointer. No movement transition, so it
     never trails. Hover only changes the look instantly (no scaling/animation). */
  .cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; will-change: transform; }
  .cursor i {
    display: block; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
    background: var(--accent); border-radius: 50%;
  }
  /* On interactive elements: become a small hollow ring, instantly */
  .cursor.is-hover i { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: transparent; border: 2px solid var(--accent); }
  .cursor.is-hidden { opacity: 0; }
}

/* ==========================================================================
   Mechanical motion — rotating gears background
   ========================================================================== */
.gears { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.gear { position: absolute; fill: none; stroke: currentColor; stroke-width: 1; }
.gear--spin { animation: spin 26s linear infinite; }
.gear--spin-rev { animation: spin 18s linear infinite reverse; }
.gear--spin-slow { animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Gears over the dark hero */
.hero .gears { color: #ffffff; }
.hero .gear { opacity: .13; }
.hero .gear--a { width: 360px; height: 360px; right: -70px; top: 30px; }
.hero .gear--b { width: 210px; height: 210px; right: 150px; top: 280px; }
.hero .gear--c { width: 150px; height: 150px; left: -40px; bottom: -30px; opacity: .06; }

/* Gears over the orange CTA band */
.cta-band { position: relative; overflow: hidden; }
.cta-band .gears { color: #ffffff; }
.cta-band .gear { opacity: .14; }
.cta-band .gear--a { width: 230px; height: 230px; right: -50px; top: -60px; }
.cta-band .gear--b { width: 150px; height: 150px; right: 120px; bottom: -50px; }
.cta-band .container { position: relative; z-index: 1; }

/* Gears over the deep clients section */
.section--deep .gears { color: var(--accent); }
.section--deep .gear { opacity: .07; }
.section--deep .gear--a { width: 300px; height: 300px; left: -80px; top: 20px; }
.section--deep .gear--b { width: 180px; height: 180px; right: -50px; bottom: 0; }
.section--deep .container { position: relative; z-index: 1; }

/* ==========================================================================
   Animations
   ========================================================================== */
/* Staggered reveal: children animate in sequence */
.reveal-group > * { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s ease; }
.reveal-group.is-visible > * { opacity: 1; transform: none; }
.reveal-group.is-visible > *:nth-child(1) { transition-delay: .00s; }
.reveal-group.is-visible > *:nth-child(2) { transition-delay: .06s; }
.reveal-group.is-visible > *:nth-child(3) { transition-delay: .12s; }
.reveal-group.is-visible > *:nth-child(4) { transition-delay: .18s; }
.reveal-group.is-visible > *:nth-child(5) { transition-delay: .24s; }
.reveal-group.is-visible > *:nth-child(6) { transition-delay: .30s; }
.reveal-group.is-visible > *:nth-child(7) { transition-delay: .36s; }
.reveal-group.is-visible > *:nth-child(8) { transition-delay: .42s; }
.reveal-group.is-visible > *:nth-child(9) { transition-delay: .48s; }

/* Hero entrance */
.hero__pill, .hero h1, .hero__sub, .hero .btn-row { opacity: 0; transform: translateY(26px); animation: heroIn .8s cubic-bezier(.22,.61,.36,1) forwards; }
.hero h1 { animation-delay: .12s; }
.hero__sub { animation-delay: .24s; }
.hero .btn-row { animation-delay: .36s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* Pulsing hero dot */
.hero__pill .dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(245,130,31,.25); } 50% { box-shadow: 0 0 0 8px rgba(245,130,31,0); } }

/* Card / tile lift already exists; add image zoom + icon pop */
.card:hover .card__icon { transform: translateY(-2px) scale(1.06); }
.card__icon { transition: transform .25s ease, background .2s; }

/* Button shine sweep */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn--primary:hover::after { left: 140%; }

/* Animated gradient underline on nav links (desktop) */
@media (min-width: 941px) {
  .nav__links > a:not(.btn) { position: relative; }
  .nav__links > a:not(.btn)::before {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; border-radius: 2px;
  }
  .nav__links > a:not(.btn):hover::before { transform: scaleX(1); }
}

/* Count-up stat: avoid layout shift */
.stat__num { font-variant-numeric: tabular-nums; }

/* WhatsApp gentle attention pulse */
.wa-float { animation: waPulse 2.6s ease-in-out infinite; }
@keyframes waPulse { 0%,100% { box-shadow: 0 12px 26px -8px rgba(37,211,102,.65), 0 0 0 0 rgba(37,211,102,.45); } 50% { box-shadow: 0 12px 26px -8px rgba(37,211,102,.65), 0 0 0 12px rgba(37,211,102,0); } }

/* Float-in for the WhatsApp button on load */
.wa-float { opacity: 0; transform: translateY(20px) scale(.9); animation: waPulse 2.6s ease-in-out infinite, waIn .5s ease .8s forwards; }
@keyframes waIn { to { opacity: 1; transform: none; } }

/* Client logos — livelier pop-in entrance + interactive hover */
.client-grid.reveal-group > * { transform: translateY(26px) scale(.94); }
.client-grid.reveal-group.is-visible > * { transform: none; }
.client-tile { position: relative; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.client-tile::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-600));
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.client-tile:hover { transform: translateY(-6px); box-shadow: 0 20px 42px -16px rgba(245,130,31,.5); }
.client-tile:hover::after { transform: scaleX(1); }
.client-tile img { transition: filter .35s ease, opacity .35s ease, transform .35s ease; }
.client-tile:hover img { transform: scale(1.07); }

/* Reduced motion: never leave content hidden, and calm scroll-linked motion.
   The custom cursor and the slow decorative gears are kept (explicitly requested). */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1 !important; transform: none !important; }
  .hero__pill, .hero h1, .hero__sub, .hero .btn-row { opacity: 1; transform: none; }
}
