/* ============================================
   ION Industrial Services Ltd — Design System
   Style direction: Energy Sector Bold
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0b0c0d;
  --bg-alt: #141618;
  --bg-card: #1a1d20;
  --line: #2b2e31;
  --line-soft: #232629;

  --navy: #1c3a5e;
  --navy-light: #2e5788;
  --gold: #c9a15a;
  --gold-light: #e0bd7e;
  --gold-dim: #8a7040;

  --text: #f2f0ec;
  --text-dim: #a7a9ab;
  --text-faint: #6b6e71;

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, Segoe UI, sans-serif;

  --container: 1200px;
  --radius: 4px;

  --dur: 0.6s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: #fff;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: 0.02em; }

p { margin: 0 0 1em; color: var(--text-dim); }

a { color: var(--gold); text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line-soft);
}
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 64px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 30px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold-light);
  background: transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform 0.2s ease;
}
.btn:hover { background: var(--gold); color: #14100a; transform: translateY(-2px); }
.btn--solid { background: var(--gold); color: #14100a; }
.btn--solid:hover { background: var(--gold-light); }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-dim); background: rgba(255,255,255,0.04); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #0b0c0d;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled {
  border-color: var(--line-soft);
  background: rgba(11,12,13,0.98);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { position: relative; display: inline-block; line-height: 0; }
.brand-mark img { height: 92px; width: auto; display: block; }
.brand-mark::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,246,225,0.55) 47%, rgba(255,250,238,0.9) 50%, rgba(255,246,225,0.55) 53%, transparent 60%);
  background-size: 300% 100%;
  background-position: 130% 0;
  -webkit-mask-image: url('../assets/img/logo-metal.png');
  mask-image: url('../assets/img/logo-metal.png');
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  mix-blend-mode: screen;
  animation: logo-sheen 6s cubic-bezier(0.45, 0, 0.25, 1) 1.5s infinite;
  pointer-events: none;
}
.footer-grid .brand-mark img { height: 84px; }
.brand-mark--emblem img { height: 76px; }
.brand-mark--emblem::after {
  -webkit-mask-image: url('../assets/img/logo-emblem.png');
  mask-image: url('../assets/img/logo-emblem.png');
}
@keyframes logo-sheen {
  0%   { background-position: 130% 0; }
  24%  { background-position: -30% 0; }
  100% { background-position: -30% 0; }
}
.brand-text { font-family: var(--font-head); font-size: 0.95rem; letter-spacing: 0.08em; color: #fff; text-transform: uppercase; }
.brand-text span { display: block; font-size: 0.62rem; color: var(--gold); letter-spacing: 0.16em; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
}
.nav a:hover, .nav a.active { color: #fff; }
.nav a.active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: #fff; transition: transform 0.3s ease, opacity 0.3s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 70%;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,7,8,0.78) 0%, rgba(6,7,8,0.5) 38%, rgba(6,7,8,0) 72%),
    linear-gradient(180deg, rgba(8,9,10,0.15) 0%, rgba(8,9,10,0.15) 40%, rgba(6,7,8,0.92) 100%);
}
@media (max-width: 720px) {
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(6,7,8,0.55) 0%, rgba(6,7,8,0.55) 55%, rgba(6,7,8,0.92) 100%);
  }
}
.hero-particles {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.9;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 150px 24px 90px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 720px) {
  .hero-content { padding-top: 110px; }
}
.hero-content p.lead { max-width: 560px; font-size: 1.05rem; color: #d7d5cf; }
.hero-actions { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.hero-locations {
  display: flex; gap: 28px; margin-top: 56px; padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.14); flex-wrap: wrap;
}
.hero-locations div { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--text-dim); text-transform: uppercase; }
.hero-locations strong { display: block; color: #fff; font-size: 0.85rem; margin-bottom: 2px; }
.hero-locations .loc--ca { display: flex; align-items: center; gap: 12px; }
.hero-locations .leaf { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6)); }

.scroll-cue {
  position: absolute; bottom: 28px; right: 32px; z-index: 2;
  font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 0.15em; color: var(--text-dim);
  writing-mode: vertical-rl; display: flex; align-items: center; gap: 10px;
}
.scroll-cue::after { content: ''; width: 1px; height: 40px; background: var(--gold); display: block; }

/* ---------- Page header (non-home) ---------- */
.page-hero {
  position: relative;
  padding: 180px 0 70px;
  background: linear-gradient(180deg, #14171a 0%, var(--bg) 100%);
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero p.lead { max-width: 640px; }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.card:hover { border-color: var(--gold-dim); transform: translateY(-4px); }
.card .num { font-family: var(--font-head); color: var(--gold); font-size: 0.8rem; letter-spacing: 0.1em; margin-bottom: 14px; display: block; }

.media-card { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-soft); }
.media-card img { width: 100%; height: 260px; object-fit: cover; transition: transform 0.6s ease; }
.media-card:hover img { transform: scale(1.06); }
.media-card .media-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
}
.media-card .media-caption .eyebrow { margin-bottom: 4px; }
.media-card .media-caption h3 { color: #fff; margin: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: left; border-left: 2px solid var(--gold); padding-left: 18px; }
.stat .val { font-family: var(--font-head); font-size: clamp(2rem, 3.6vw, 2.8rem); color: #fff; font-weight: 700; }
.stat .label { font-size: 0.82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Client banner ---------- */
.clients { padding: 56px 0 64px; border-bottom: 1px solid var(--line-soft); overflow: hidden; background: var(--bg-alt); }
.clients .eyebrow { display: block; text-align: center; margin-bottom: 28px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 72px;
  width: max-content; margin: 0; padding: 0; list-style: none;
  animation: marquee-scroll 45s linear infinite;
}
.marquee-track li {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
  color: var(--text-faint); transition: color 0.3s ease;
}
.marquee-track li:hover { color: var(--gold-light); }
.marquee-track li img {
  display: block; height: 46px; width: auto; max-width: none;
  filter: grayscale(1); opacity: 0.6;
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.marquee-track li:hover img { filter: grayscale(0); opacity: 1; }
.marquee-track li.wordmark { color: #8a8d90; font-size: 1.5rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 36px)); }
}

/* ---------- Placeholder note ---------- */
.placeholder-note {
  border: 1px dashed var(--gold-dim);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--gold-light);
  font-size: 0.9rem;
  background: rgba(201,161,90,0.06);
}

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
input, textarea, select {
  width: 100%; background: var(--bg-alt); border: 1px solid var(--line);
  color: var(--text); padding: 12px 14px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold-dim); }
textarea { resize: vertical; min-height: 130px; }
.form-status { margin-top: 16px; font-size: 0.9rem; }
.form-status.ok { color: #8fc98f; }
.form-status.err { color: #e59a8f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button:disabled { opacity: 0.6; cursor: wait; }

/* ---------- Footer ---------- */
.site-footer { background: #08090a; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 48px; }
.footer-grid h4 { color: var(--gold); font-size: 0.82rem; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a, .footer-grid p { color: var(--text-dim); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid var(--line-soft); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-faint); font-size: 0.8rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Breadcrumb / misc ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tag { border: 1px solid var(--line); color: var(--text-dim); font-size: 0.78rem; padding: 6px 14px; border-radius: 30px; letter-spacing: 0.04em; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

.capability-list {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px;
}
.capability-list li {
  position: relative; padding: 16px 0 16px 28px;
  border-bottom: 1px solid var(--line-soft); color: var(--text-dim);
}
.capability-list li::before {
  content: ''; position: absolute; left: 0; top: 1.55em; width: 14px; height: 2px; background: var(--gold);
}
.capability-list li strong { color: #fff; font-weight: 600; }
.capability-list--single { grid-template-columns: 1fr; margin-top: 24px; }
.project-group { margin-top: 56px; }
.project-group:first-of-type { margin-top: 28px; }
.project-group h2 { margin-bottom: 0; }
.split--reverse > :first-child { order: 2; }
.photo-slot {
  width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius);
  border: 1px dashed var(--line); background: rgba(255,255,255,0.02);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
}
@media (max-width: 980px) {
  .split--reverse > :first-child { order: 0; }
}
@media (max-width: 720px) {
  .capability-list { grid-template-columns: 1fr; }
}
.video-card {
  justify-self: end; width: 100%; max-width: 470px;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.55) 80%, rgba(0,0,0,0.25) 90%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 60%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.55) 80%, rgba(0,0,0,0.25) 90%, transparent 100%);
}
.video-card video { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 980px) {
  .video-card { justify-self: start; max-width: 400px; }
}
.team-card { text-align: center; }
.team-photo {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.06em;
  margin-bottom: 16px;
  overflow: hidden;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .brand-text span { display: none; }
  .nav { gap: 22px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav { position: fixed; z-index: 99; top: 70px; left: 0; right: 0; bottom: 0; background: var(--bg); flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: 32px 28px; gap: 22px; transform: translateX(100%); transition: transform 0.35s var(--ease); }
  .nav.is-open { transform: translateX(0); }
  .nav a { font-size: 1.1rem; }
  .nav-toggle { display: flex; }
  .brand-mark img { height: 52px; }  .site-header { padding: 10px 20px; }
  .brand-text { font-size: 0.82rem; }
  .brand-text span { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-locations { gap: 20px; }
  .section { padding: 64px 0; }
}
.req { color: var(--gold-light); }
.form-note { margin-top: 14px; font-size: 0.8rem; color: var(--text-faint); }
