/* ==================================================
   RES Engineering Services — Stylesheet v3
   "The Test Certificate" — engineering-document design
   Signature device: the busbar rule (R/Y/B phase colours)
   ================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,62..125,100..900;1,62..125,100..900&display=swap');

/* === TOKENS === */
:root {
  /* v3 palette */
  --ink:        #0C1118;
  --ink-2:      #414B5A;
  --ink-3:      #5B6474;
  --paper:      #FFFFFF;
  --paper-2:    #F2F4F8;
  --line:       #D9DEE7;
  --line-strong:#AEB7C6;
  --brand:      #1D2FBF;
  --brand-deep: #131F86;
  --brand-ink:  #0D1560;
  --phase-r:    #E03C31;
  --phase-y:    #F2B705;
  --phase-b:    #2E5BFF;
  --ok:         #0E8345;

  /* legacy aliases — inline styles across pages reference these */
  --primary:       var(--ink);
  --primary-mid:   var(--brand-deep);
  --primary-light: var(--brand);
  --accent:        var(--brand);
  --accent-dark:   var(--brand-deep);
  --accent-light:  var(--phase-b);
  --accent-glow:   rgba(29,47,191,0.07);
  --accent-border: rgba(29,47,191,0.28);
  --text:          var(--ink);
  --text-light:    var(--ink-2);
  --text-muted:    var(--ink-3);
  --bg-light:      var(--paper-2);
  --bg-section:    var(--paper-2);
  --white:         #FFFFFF;
  --border:        var(--line);
  --shadow:        none;
  --shadow-lg:     0 24px 48px -24px rgba(12,17,24,0.18);
  --shadow-blue:   0 16px 40px -16px rgba(19,31,134,0.35);
  --radius:        3px;
  --radius-lg:     4px;
  --transition:    0.3s cubic-bezier(0.16,1,0.3,1);
  --max-width:     1200px;
  --font:          'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* busbar rule — the signature device */
  --busbar: linear-gradient(to bottom,
    var(--phase-r) 0 33.4%,
    var(--phase-y) 33.4% 66.7%,
    var(--phase-b) 66.7% 100%);

  /* grid-paper texture for drenched panels */
  --grid-lines:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* === UTILITY === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(72px, 9vw, 120px) 0; }
.text-center { text-align: center; }

/* Eyebrow labels retired in v3 — headings carry the hierarchy */
.section-label { display: none; }
.page-hero .badge.section-label { display: inline-flex; } /* course pages reuse badge chips */

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 16px;
}
.section-title.light { color: #fff; }
.section-desc {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.75;
}
.section-desc.light { color: rgba(255,255,255,0.78); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brand); color: #fff; }

.btn-outline {
  border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff;
  background: transparent;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.85); }

.btn-outline-dark {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline-dark:hover { background: var(--ink); color: #fff; }

.btn-lg { padding: 16px 34px; font-size: 0.95rem; }

/* Drenched contexts invert the primary */
.hero .btn-primary,
.cta-banner .btn-primary { background: #fff; color: var(--brand-ink); }
.hero .btn-primary:hover,
.cta-banner .btn-primary:hover { background: var(--paper-2); color: var(--brand-ink); }

/* === NAVIGATION === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
/* the busbar rule — R/Y/B phase colours, top of every page */
.site-header::after {
  content: '';
  display: block;
  height: 3px;
  background: var(--busbar);
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 40px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  display: block;
  padding: 8px 13px;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--ink-2);
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); font-weight: 650; }

.nav-links .btn-nav {
  background: var(--ink);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius);
  margin-left: 10px;
  font-weight: 650;
  transition: background var(--transition);
}
.nav-links .btn-nav::after { display: none; }
.nav-links .btn-nav:hover { background: var(--brand); color: #fff; }
.nav-links a.btn-nav.active { color: #fff; background: var(--brand); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}

/* === HERO (drenched cobalt) === */
.hero {
  background: var(--brand-ink);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: clamp(88px, 11vw, 150px) 0 clamp(72px, 9vw, 120px);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: var(--grid-lines);
  background-size: 56px 56px;
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.hero-content { max-width: 620px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  margin-bottom: 30px;
}
.hero-badge::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--phase-y);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.3rem);
  font-weight: 800;
  font-stretch: 114%;
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin-bottom: 24px;
}
.hero h1 span { color: var(--phase-y); }

.hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.75;
  max-width: 54ch;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero single-line diagram */
.hero-diagram { width: 100%; height: auto; display: block; }
.hero-diagram .wire { stroke: rgba(255,255,255,0.38); stroke-width: 1.5; fill: none; }
.hero-diagram .node-r { fill: var(--phase-r); }
.hero-diagram .node-y { fill: var(--phase-y); }
.hero-diagram .node-b { fill: var(--phase-b); }
.hero-diagram .lbl { fill: rgba(255,255,255,0.5); font-family: var(--font); font-size: 9px; letter-spacing: 0.08em; }

html.js .hero-diagram .wire {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-wire 2.4s cubic-bezier(0.16,1,0.3,1) 0.3s forwards;
}
@keyframes draw-wire { to { stroke-dashoffset: 0; } }

/* === TRUST BAR === */
.trust-bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 22px 0;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-2);
}
.trust-item svg { color: var(--brand); flex-shrink: 0; }

/* === SERVICES LEDGER (index) === */
.svc-ledger { margin-top: 52px; border-top: 1.5px solid var(--ink); }
.svc-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  gap: 16px 40px;
  align-items: center;
  padding: 26px 4px;
  border-bottom: 1px solid var(--line);
  transition: background var(--transition), padding var(--transition);
}
.svc-row:hover { background: var(--paper-2); padding-left: 16px; padding-right: 16px; }
.svc-row h3 {
  font-size: 1.15rem;
  font-weight: 750;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.svc-row .svc-spec {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-top: 5px;
}
.svc-row p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.65; }
.svc-arrow {
  width: 40px; height: 40px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.svc-row:hover .svc-arrow { background: var(--ink); border-color: var(--ink); color: #fff; }

/* legacy service cards (kept for safety, unused on index in v3) */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 48px; }
.service-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; transition: border-color var(--transition); }
.service-card:hover { border-color: var(--line-strong); }
.service-icon { width: 44px; height: 44px; color: var(--brand); margin-bottom: 18px; }
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 { font-size: 1.05rem; font-weight: 750; margin-bottom: 10px; }
.service-card p { font-size: 0.88rem; color: var(--ink-2); line-height: 1.7; }
.learn-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-size: 0.83rem; font-weight: 650; color: var(--brand);
  transition: gap var(--transition);
}
.service-card:hover .learn-more { gap: 10px; }

/* === RATING PLATE (stats) === */
.stats-strip { padding: clamp(56px, 7vw, 88px) 0; background: var(--paper); }
.stats-strip .container { max-width: 1080px; }
.plate {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.plate::before, .plate::after,
.plate .screw-l, .plate .screw-r {
  content: '';
  position: absolute;
  width: 9px; height: 9px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-2);
}
.plate::before { top: 10px; left: 10px; }
.plate::after  { top: 10px; right: 10px; }
.plate .screw-l { bottom: 10px; left: 10px; }
.plate .screw-r { bottom: 10px; right: 10px; }

.plate-title {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 18px 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 32px 30px;
}
.stat-item {
  text-align: center;
  padding: 10px 16px;
  border-left: 1px solid var(--line);
}
.stat-item:first-child { border-left: none; }
.stat-num {
  display: block;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  font-stretch: 116%;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.1;
}
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* === WHY / CERT === */
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.why-list { margin-top: 40px; display: flex; flex-direction: column; }
.why-item {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.why-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.why-icon svg { width: 21px; height: 21px; }
.why-item h4 { font-size: 0.98rem; font-weight: 750; margin-bottom: 5px; }
.why-item p { font-size: 0.875rem; color: var(--ink-2); line-height: 1.7; }

.why-image { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 100px; }
.cert-card {
  display: flex;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 20px 22px;
  transition: border-color var(--transition), transform var(--transition);
}
.cert-card:hover { border-color: var(--ink); transform: translateX(4px); }
.cert-icon {
  min-width: 56px; height: 56px;
  border: 1.5px solid var(--brand);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-stretch: 116%;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--brand);
  padding: 0 10px;
}
.cert-icon svg { width: 24px; height: 24px; }
.cert-card h4 { font-size: 0.92rem; font-weight: 750; margin-bottom: 3px; }
.cert-card p { font-size: 0.8rem; color: var(--ink-2); line-height: 1.6; }

/* === CLIENTS STRIP === */
.clients-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.clients-strip .container {
  display: flex;
  align-items: center;
  gap: 20px 48px;
  flex-wrap: wrap;
  padding-top: 30px;
  padding-bottom: 30px;
}
.clients-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
  flex-shrink: 0;
}
.clients-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 36px;
  margin-left: auto;
}
.clients-row span {
  font-size: 1rem;
  font-weight: 750;
  font-stretch: 108%;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  transition: color var(--transition);
  cursor: default;
}
.clients-row span:hover { color: var(--brand); }

/* === PROJECT CARDS === */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  transition: border-color var(--transition), transform var(--transition);
}
.project-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.project-thumb {
  position: relative;
  height: 150px;
  background: var(--paper-2);
  background-image:
    linear-gradient(rgba(12,17,24,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12,17,24,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  border-bottom: 1px solid var(--line);
}
.project-thumb svg { width: 44px; height: 44px; }
.project-tag {
  position: absolute;
  top: 14px; left: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 5px 10px;
}
.project-body { padding: 24px; }
.project-body h3 { font-size: 1rem; font-weight: 750; margin-bottom: 8px; letter-spacing: -0.01em; }
.project-body p { font-size: 0.86rem; color: var(--ink-2); line-height: 1.7; }

/* === BLOG === */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 48px; }
.blog-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  transition: border-color var(--transition), transform var(--transition);
}
.blog-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.blog-thumb {
  height: 140px;
  background: var(--paper-2);
  background-image:
    linear-gradient(rgba(12,17,24,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12,17,24,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  border-bottom: 1px solid var(--line);
}
.blog-thumb svg { width: 38px; height: 38px; }
.blog-body { padding: 24px; }
.blog-meta, .blog-category {
  display: flex;
  gap: 14px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.blog-category .category, .blog-meta .category { color: var(--brand); font-weight: 700; }
.blog-body h3 { font-size: 1rem; font-weight: 750; line-height: 1.4; margin-bottom: 8px; letter-spacing: -0.01em; }
.blog-body p { font-size: 0.86rem; color: var(--ink-2); line-height: 1.7; }
.read-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-size: 0.83rem; font-weight: 650; color: var(--brand);
  transition: gap var(--transition);
}
.blog-card:hover .read-more { gap: 10px; }

/* Blog post page */
.blog-post-wrap { max-width: 760px; margin: 0 auto; }
.blog-post-header { padding-bottom: 32px; border-bottom: 1.5px solid var(--ink); margin-bottom: 40px; }
.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.blog-post-meta .category { color: var(--brand); font-weight: 700; }
.blog-post-header h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  font-stretch: 110%;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.blog-post-body { text-wrap: pretty; }
.blog-post-body h2 {
  font-size: 1.35rem;
  font-weight: 750;
  font-stretch: 108%;
  margin: 42px 0 14px;
  letter-spacing: -0.01em;
}
.blog-post-body h3 { font-size: 1.05rem; font-weight: 750; margin: 30px 0 10px; }
.blog-post-body p { font-size: 0.96rem; color: var(--ink-2); line-height: 1.85; margin-bottom: 18px; max-width: 70ch; }
.blog-post-body ul { margin: 0 0 22px; }
.blog-post-body ul li {
  position: relative;
  padding: 5px 0 5px 24px;
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.75;
}
.blog-post-body ul li::before {
  content: '';
  position: absolute;
  left: 2px; top: 15px;
  width: 8px; height: 2px;
  background: var(--brand);
}
.blog-callout {
  border: 1.5px solid var(--brand);
  border-radius: var(--radius-lg);
  background: var(--accent-glow);
  padding: 22px 26px;
  margin: 30px 0;
}
.blog-callout p { margin: 0; color: var(--ink); font-size: 0.92rem; max-width: none; }

/* === CTA BANNER (drenched) === */
.cta-banner {
  background: var(--brand-ink);
  background-image: var(--grid-lines);
  background-size: 56px 56px;
  color: #fff;
  text-align: center;
  padding: clamp(72px, 9vw, 110px) 0;
}
.cta-banner .section-title { color: #fff; }
.cta-banner .section-desc { color: rgba(255,255,255,0.8); margin: 0 auto 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* === PAGE HERO (inner pages) === */
.page-hero {
  background: var(--paper-2);
  background-image:
    linear-gradient(rgba(12,17,24,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12,17,24,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  border-bottom: 1px solid var(--line);
  padding: clamp(52px, 7vw, 84px) 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--ink-3); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span:last-child { color: var(--ink); }
.page-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  max-width: 20ch;
}
.page-hero p { font-size: 1rem; color: var(--ink-2); max-width: 64ch; line-height: 1.75; }

/* === SERVICES PAGE GRID === */
.services-page-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-top: 48px; }
.service-page-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  background: var(--paper);
  transition: border-color var(--transition);
}
.service-page-card:hover { border-color: var(--ink); }
.service-page-card .service-icon { margin-bottom: 20px; }
.service-page-card h3 { font-size: 1.15rem; font-weight: 750; font-stretch: 108%; margin-bottom: 12px; letter-spacing: -0.01em; }
.service-page-card p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.75; margin-bottom: 14px; }
.service-page-card ul li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-size: 0.86rem;
  color: var(--ink-2);
}
.service-page-card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 13px;
  width: 8px; height: 2px;
  background: var(--brand);
}

/* === TRAINING === */
.training-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.training-card {
  display: block;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--paper);
  transition: border-color var(--transition), transform var(--transition);
}
.training-card:hover { border-color: var(--ink); transform: translateY(-3px); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 5px 11px;
  margin-bottom: 18px;
  color: var(--ink-2);
  background: var(--paper);
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.badge-ema::before    { background: var(--phase-b); }
.badge-safety::before { background: var(--ok); }
.badge-tech::before   { background: var(--phase-y); }

.training-card h3 { font-size: 1.08rem; font-weight: 750; font-stretch: 106%; margin-bottom: 10px; letter-spacing: -0.01em; }
.training-card p { font-size: 0.88rem; color: var(--ink-2); line-height: 1.7; }
.training-meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
}
.training-meta span {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.course-link-hint {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.83rem; font-weight: 650; color: var(--brand);
  margin-top: 18px;
  transition: gap var(--transition);
}
.training-card:hover .course-link-hint { gap: 10px; }

/* === COURSE DETAIL === */
.course-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}
.course-body h2 {
  font-size: 1.3rem;
  font-weight: 750;
  font-stretch: 108%;
  margin: 42px 0 14px;
  letter-spacing: -0.01em;
}
.course-body h2:first-child { margin-top: 0; }
.course-body p { color: var(--ink-2); line-height: 1.85; margin-bottom: 16px; font-size: 0.95rem; max-width: 70ch; }
.course-body ul { margin-bottom: 22px; }
.course-body ul li {
  position: relative;
  padding: 5px 0 5px 24px;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.75;
}
.course-body ul li::before {
  content: '';
  position: absolute;
  left: 2px; top: 15px;
  width: 8px; height: 2px;
  background: var(--brand);
}
.course-callout {
  border: 1.5px solid var(--brand);
  border-radius: var(--radius-lg);
  background: var(--accent-glow);
  padding: 22px 26px;
  margin: 30px 0;
}
.course-callout p { margin: 0; color: var(--ink); font-size: 0.9rem; max-width: none; }

.course-agenda-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.course-agenda-item:last-of-type { border-bottom: none; }
.course-agenda-time {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
  padding-top: 3px;
}
.course-agenda-desc { font-size: 0.88rem; color: var(--ink-2); line-height: 1.7; }

.course-info-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 28px;
  position: sticky;
  top: 96px;
}
.course-info-card h4 {
  font-size: 0.78rem;
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.course-info-list { margin: 0 0 22px; }
.course-info-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.course-info-list li:last-child { border-bottom: none; }
.info-label {
  font-weight: 700;
  color: var(--ink-3);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.info-val { color: var(--ink); font-size: 0.88rem; font-weight: 550; }

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-info-card {
  display: flex;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  align-items: flex-start;
  background: var(--paper);
}
.ci-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.ci-icon svg { width: 19px; height: 19px; }
.contact-info-card h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.contact-info-card a, .contact-info-card p { font-size: 0.92rem; color: var(--ink); font-weight: 550; line-height: 1.6; }
.contact-info-card a:hover { color: var(--brand); }

.contact-form-wrap {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  background: var(--paper);
}
.contact-form-wrap h3 { font-size: 1.4rem; font-weight: 800; font-stretch: 110%; margin-bottom: 8px; letter-spacing: -0.01em; }
.contact-form-wrap > p { font-size: 0.9rem; color: var(--ink-2); margin-bottom: 30px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.92rem;
  padding: 13px 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-3); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* === THANK YOU === */
.thankyou-wrap {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  background: var(--paper-2);
}
.thankyou-card {
  max-width: 460px;
  width: 100%;
  text-align: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 52px 40px;
}
.thankyou-icon {
  width: 64px; height: 64px;
  margin: 0 auto 24px;
  border: 2px solid var(--ok);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ok);
  padding: 14px;
}
.thankyou-card h1 { font-size: 1.8rem; font-weight: 800; font-stretch: 112%; margin-bottom: 14px; }
.thankyou-card p { font-size: 0.92rem; color: var(--ink-2); line-height: 1.75; margin-bottom: 18px; }

/* === TEAM (about) === */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 48px; }
.team-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  background: var(--paper);
  transition: border-color var(--transition);
}
.team-card:hover { border-color: var(--ink); }
.team-avatar {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  padding: 18px;
}
.team-card h4 { font-size: 1rem; font-weight: 750; margin-bottom: 4px; }
.team-card .role { font-size: 0.8rem; color: var(--brand); font-weight: 650; margin-bottom: 10px; display: block; }
.team-card p { font-size: 0.84rem; color: var(--ink-2); line-height: 1.65; }

/* === FOOTER === */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  position: relative;
}
/* busbar rule closes the page, mirroring the header */
.site-footer::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--busbar);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: clamp(52px, 7vw, 80px) 0 48px;
}
.footer-brand .logo { margin-bottom: 20px; display: inline-flex; }
.footer-brand .logo-img { height: 38px; background: #fff; padding: 4px 8px; border-radius: var(--radius); }
.footer-brand p { font-size: 0.85rem; line-height: 1.75; max-width: 34ch; }

.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: 0.86rem; color: rgba(255,255,255,0.72); transition: color var(--transition); }
.footer-col a:hover { color: #fff; }

.footer-contact { display: flex; flex-direction: column; gap: 14px; }
.footer-contact-item { display: flex; gap: 11px; align-items: flex-start; font-size: 0.85rem; line-height: 1.6; }
.footer-contact-item svg { flex-shrink: 0; margin-top: 3px; color: var(--phase-y); }
.footer-contact-item a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 22px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.65); }
.footer-bottom a:hover { color: #fff; }

/* === LIVE CURRENT (hero diagram) === */
.hero-diagram .flow {
  stroke: var(--phase-y);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 4 10;
  opacity: 0;
}
html.js .hero-diagram .flow {
  animation:
    flow-dash 1.1s linear infinite,
    flow-in 0.8s cubic-bezier(0.16,1,0.3,1) 2.7s forwards;
}
@keyframes flow-dash { to { stroke-dashoffset: -14; } }
@keyframes flow-in { to { opacity: 0.85; } }

/* === 3D HERO (progressive enhancement, desktop only) === */
.hero-diagram-wrap { position: relative; }
.hero-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  animation: hero3d-in 1.1s cubic-bezier(0.16,1,0.3,1) 0.1s forwards;
}
/* once the 3D scene is up, retire the flat SVG (kept for fallback/no-JS) */
.hero-diagram-wrap.has-3d .hero-diagram {
  opacity: 0;
  transition: opacity 0.6s ease;
}
@keyframes hero3d-in { to { opacity: 1; } }

/* === WHATSAPP FLOATING BUTTON === */
.wa-fab {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: calc(clamp(16px, 3vw, 28px) + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s cubic-bezier(0.16,1,0.3,1);
}
.wa-fab svg { width: 30px; height: 30px; position: relative; z-index: 1; }
/* "Chat with us" hover label (desktop only) */
.wa-fab-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16,1,0.3,1), transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
@media (hover: hover) and (min-width: 768px) {
  .wa-fab:hover .wa-fab-label,
  .wa-fab:focus-visible .wa-fab-label { opacity: 1; transform: translateY(-50%) translateX(0); }
}
@media (max-width: 767px) { .wa-fab-label { display: none; } }
.wa-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 26px rgba(37,211,102,0.45); }
.wa-fab:active { transform: translateY(-1px) scale(1); }
.wa-fab:focus-visible { outline: 3px solid rgba(37,211,102,0.55); outline-offset: 3px; }
/* subtle attention pulse */
.wa-fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  z-index: 0;
  animation: wa-pulse 2.6s ease-out infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}
@media (max-width: 480px) {
  .wa-fab { width: 52px; height: 52px; }
  .wa-fab svg { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-fab { transition: none; }
  .wa-fab::after { animation: none; display: none; }
}

/* === SCROLL CURRENT (progress along the busbar rule) === */
.scroll-current {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--phase-y);
  box-shadow: 0 0 8px rgba(242,183,5,0.8);
  pointer-events: none;
  z-index: 1;
}
.site-header { overflow: visible; }

/* === THE SHUTDOWN SEQUENCE (scroll-driven) === */
.shutdown-scroll {
  background: var(--brand-ink);
  background-image: var(--grid-lines);
  background-size: 56px 56px;
  color: #fff;
  position: relative;
}
html.js .shutdown-scroll { height: 380vh; }
.shutdown-sticky {
  padding: clamp(56px, 7vw, 88px) 0;
}
html.js .shutdown-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 88px 0 56px;
}
.shutdown-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  width: 100%;
}

.shutdown-steps { display: flex; flex-direction: column; }
.shutdown-steps li {
  display: flex;
  gap: 18px;
  padding: 18px 12px;
  margin: 0 -12px;
  border-top: 1px solid rgba(255,255,255,0.14);
  opacity: 0.38;
  transition: opacity 0.45s cubic-bezier(0.16,1,0.3,1), background 0.3s cubic-bezier(0.16,1,0.3,1);
  cursor: pointer;
  border-radius: var(--radius);
}
.shutdown-steps li:hover { opacity: 0.75; background: rgba(255,255,255,0.05); }
.shutdown-steps li:focus-visible { outline: 2px solid var(--phase-y); outline-offset: 2px; }
.sd-step-no {
  font-size: 0.78rem;
  font-weight: 800;
  font-stretch: 116%;
  color: var(--phase-y);
  padding-top: 3px;
  min-width: 28px;
}
.shutdown-steps h4 { font-size: 0.98rem; font-weight: 750; margin-bottom: 4px; }
.shutdown-steps p { font-size: 0.875rem; color: rgba(255,255,255,0.72); line-height: 1.7; }

.shutdown-scroll[data-step="1"] li[data-step="1"],
.shutdown-scroll[data-step="2"] li[data-step="2"],
.shutdown-scroll[data-step="3"] li[data-step="3"],
.shutdown-scroll[data-step="4"] li[data-step="4"] { opacity: 1; }

/* diagram panel */
.shutdown-diagram {
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.03);
  padding: 28px;
}
.sd-svg { width: 100%; height: auto; display: block; }
.sd-svg .wire { stroke: rgba(255,255,255,0.55); stroke-width: 1.5; fill: none; }
.sd-svg .lbl { fill: rgba(255,255,255,0.55); font-family: var(--font); font-size: 9px; letter-spacing: 0.08em; }
.sd-svg .node-r { fill: var(--phase-r); }
.sd-svg .node-y { fill: var(--phase-y); }
.sd-svg .node-b { fill: var(--phase-b); }

/* breaker + earth switch arms */
.sd-arm {
  transform-origin: 220px 110px;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.sd-earth-arm {
  transform-origin: 320px 224px;
  transform: rotate(48deg);
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.shutdown-scroll[data-step="2"] .sd-arm,
.shutdown-scroll[data-step="3"] .sd-arm,
.shutdown-scroll[data-step="4"] .sd-arm { transform: rotate(-38deg); }
.shutdown-scroll[data-step="3"] .sd-earth-arm,
.shutdown-scroll[data-step="4"] .sd-earth-arm { transform: rotate(0deg); }

/* current flow: on at step 1, dies when isolated */
.sd-flow path {
  stroke: var(--phase-y);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 4 10;
}
html.js .sd-flow path { animation: flow-dash 1.1s linear infinite; }
.sd-flow { opacity: 0.9; transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1); }
.shutdown-scroll[data-step="2"] .sd-flow,
.shutdown-scroll[data-step="3"] .sd-flow,
.shutdown-scroll[data-step="4"] .sd-flow { opacity: 0; }

/* LOTO padlock */
.sd-lock { opacity: 0; transform: translateY(6px); transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1), transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.sd-lock-body { fill: var(--phase-y); }
.sd-lock-hole { fill: var(--brand-ink); }
.sd-lock .wire { stroke: var(--phase-y); }
.sd-lock-lbl { fill: var(--phase-y) !important; font-weight: 700; }
.shutdown-scroll[data-step="4"] .sd-lock { opacity: 1; transform: translateY(0); }

/* status chip */
.sd-status {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
  min-height: 30px;
  position: relative;
}
.sd-status span {
  position: absolute;
  top: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: var(--radius);
  padding: 6px 12px;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16,1,0.3,1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sd-status span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sd-status .sd-s1 { color: #FF8A80; border-color: rgba(255,138,128,0.5); }
.sd-status .sd-s2 { color: var(--phase-y); border-color: rgba(242,183,5,0.5); }
.sd-status .sd-s3 { color: #8FB3FF; border-color: rgba(143,179,255,0.5); }
.sd-status .sd-s4 { color: #5EE29A; border-color: rgba(94,226,154,0.5); }
.shutdown-scroll[data-step="1"] .sd-s1,
.shutdown-scroll[data-step="2"] .sd-s2,
.shutdown-scroll[data-step="3"] .sd-s3,
.shutdown-scroll[data-step="4"] .sd-s4 { opacity: 1; }

/* live-status pulse while energised */
html.js .shutdown-scroll[data-step="1"] .sd-s1::before { animation: status-pulse 1.4s ease-in-out infinite; }
@keyframes status-pulse { 50% { opacity: 0.35; } }

/* no-JS: render as a normal static section, sequence complete */
html:not(.js) .shutdown-scroll .sd-arm { transform: rotate(-38deg); }
html:not(.js) .shutdown-scroll .sd-earth-arm { transform: rotate(0deg); }
html:not(.js) .shutdown-scroll .sd-flow { opacity: 0; }
html:not(.js) .shutdown-scroll .sd-lock { opacity: 1; transform: none; }
html:not(.js) .shutdown-scroll .sd-s4 { opacity: 1; }
html:not(.js) .shutdown-steps li { opacity: 1; }

/* === REVEAL SYSTEM ===
   Content is visible by default; the hidden initial state
   only applies when JS is confirmed running (html.js). */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
  transition-delay: var(--delay, 0ms);
}
html.js [data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  html.js .hero-diagram .wire { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  html.js .hero-diagram .flow { animation: none; opacity: 0; }
  html.js .sd-flow path { animation: none; }
  .scroll-current { display: none; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-diagram-wrap { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .why-image { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 73px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 18px;
    gap: 2px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(12,17,24,0.25);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a::after { display: none; }
  .nav-links .btn-nav { margin: 8px 0 0; text-align: center; justify-content: center; }
  .nav-toggle { display: flex; }

  .svc-row { grid-template-columns: 1fr; gap: 10px; }
  .svc-arrow { display: none; }
  html.js .shutdown-scroll { height: 300vh; }
  .shutdown-layout { grid-template-columns: 1fr; gap: 32px; }
  .shutdown-diagram { order: -1; padding: 18px; }
  .shutdown-steps p { display: none; }
  .shutdown-scroll[data-step="1"] li[data-step="1"] p,
  .shutdown-scroll[data-step="2"] li[data-step="2"] p,
  .shutdown-scroll[data-step="3"] li[data-step="3"] p,
  .shutdown-scroll[data-step="4"] li[data-step="4"] p,
  html:not(.js) .shutdown-steps p { display: block; }
  .shutdown-steps li { padding: 12px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .stat-item:nth-child(3) { border-left: none; }
  .training-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .course-wrap { grid-template-columns: 1fr; }
  .course-info-card { position: static; order: -1; }
  .course-agenda-item { grid-template-columns: 1fr; gap: 6px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .clients-row { margin-left: 0; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .cta-actions { flex-direction: column; align-items: center; }
  .stats-grid { padding: 16px 18px 24px; }
  .contact-form-wrap { padding: 24px 20px; }
  .thankyou-card { padding: 40px 24px; }
}
