/* Canadian Energy Standard — site styles */

:root {
  --ink: #0a0c0f;
  --ink-2: #16191e;
  --ink-deep: #050607;
  --bg: #ffffff;
  --bg-soft: #f1f3f5;
  --line: #dde1e6;
  --line-dark: rgba(255, 255, 255, 0.13);
  --text: #111418;
  --muted: #5b6470;
  --muted-dark: #a8b0ba;

  /* Brand: Canadian Energy Standard — deep blue, white, grey, green accent */
  --blue-deep: #0b2f6b;
  --blue: #1d5fd1;
  --green: #0f9d76;
  --green-dark: #0b7a5b;
  --green-soft: #e6f6f1;
  --blue-hover: #174cae;
  --blue-bright: #5aa2ff;
  --blue-soft: #e8f0fd;
  --steel: #3f4a56;
  --silver: #c3cad2;
  --silver-soft: #edf0f3;
  --silver-grad: linear-gradient(145deg, #fcfdfd 0%, #dde2e7 42%, #f4f6f8 58%, #c5ccd4 100%);
  --error: #b3261e;

  --radius: 18px;
  --shadow: 0 2px 4px rgba(10, 12, 15, 0.04), 0 14px 36px rgba(10, 12, 15, 0.09);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1240px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-h, 116px) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
a[href^="tel:"] { white-space: nowrap; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.dark .eyebrow { color: var(--blue-bright); }

.lead { font-size: 1.14rem; color: var(--muted); max-width: 60ch; }
.dark .lead { color: var(--muted-dark); }

section { padding: clamp(72px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.section-head h2 { margin-bottom: 16px; }

.soft { background: var(--bg-soft); }

.i {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.9em 1.35em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 0.98rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn .i { width: 19px; height: 19px; stroke-width: 2.2; transition: transform 0.15s; }
.btn:hover .i-arrow { transform: translateX(3px); }
.btn-lg { padding: 1.05em 1.6em; font-size: 1.04rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn-outline-dark { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-outline { border-color: var(--line); background: #fff; color: var(--text); }
.btn-outline:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #eef1f3; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Announcement bar ---------- */

.topbar { background: var(--bg-soft); color: var(--text); border-bottom: 1px solid var(--line); font-size: 0.86rem; font-weight: 600; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; min-height: 40px; padding: 8px 0; text-align: center; }
.topbar .sep { opacity: 0.35; }
.topbar a { color: var(--blue); text-underline-offset: 3px; }
.topbar a:hover { color: var(--blue-hover); }
.topbar-call { color: var(--ink) !important; font-weight: 700; text-decoration: none; }
.topbar-call:hover { color: var(--blue) !important; }

/* ---------- Header ---------- */

.site-top {
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header {
  position: relative;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s;
}
.site-header.scrolled { box-shadow: 0 8px 28px rgba(15, 26, 36, 0.08); }

.nav { display: flex; align-items: center; gap: 20px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-name { display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.brand-name small { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.brand-name strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.dark .brand { color: #fff; }
.site-footer .brand-name small { color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 18px; margin: 0; padding: 0; list-style: none; }
.nav-links > li > a:not(.btn) { font-size: 0.92rem; font-weight: 600; white-space: nowrap; color: var(--text); text-decoration: none; transition: color 0.15s; }
.mega a { white-space: normal; }
.nav-links a:not(.btn):hover { color: var(--blue); }
.menu-only { display: none; }

.call-btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.call-btn .ring { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg-soft); transition: background-color 0.15s, color 0.15s; }
.call-btn .ring .i { width: 19px; height: 19px; }
.call-btn:hover .ring { background: var(--ink); color: #fff; }
.nav-cta { padding: 0.78em 1.2em; font-size: 0.94rem; }

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.2s, top 0.2s; }
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { position: relative; display: flex; align-items: center; min-height: min(86vh, 780px); overflow: hidden; padding: 0; background: var(--ink); color: #fff; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
/* Three hero photos: 7s each, crossfading, with a slow zoom (21s round trip). */
.hero-slide { position: absolute; inset: 0; opacity: 0; animation: heroCycle 21s linear infinite; will-change: opacity, transform; }
.hero-slide:nth-of-type(1) { animation-delay: 0s; }
.hero-slide:nth-of-type(2) { animation-delay: 7s; }
.hero-slide:nth-of-type(3) { animation-delay: 14s; }
@keyframes heroCycle {
  0%     { opacity: 0; transform: scale(1.02); }
  3%     { opacity: 1; }
  30%    { opacity: 1; }
  33.33% { opacity: 0; transform: scale(1.12); }
  100%   { opacity: 0; transform: scale(1.02); }
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 8, 11, 0.94) 0%, rgba(6, 8, 11, 0.82) 36%, rgba(6, 8, 11, 0.3) 72%, rgba(6, 8, 11, 0.12) 100%),
    linear-gradient(0deg, rgba(6, 8, 11, 0.55) 0%, transparent 35%);
}
.hero-inner { position: relative; z-index: 1; padding: 96px 0 150px; }
.hero-copy { max-width: 720px; }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.86rem;
  font-weight: 600;
  color: #e5ebf0;
}
.hero-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-bright), var(--silver)); }
.hero h1 { margin-bottom: 24px; font-size: clamp(2.7rem, 6.2vw, 5.1rem); line-height: 1.01; letter-spacing: -0.035em; }
.hero h1 .accent {
  background: linear-gradient(90deg, #ffffff 0%, #c9d1da 40%, var(--blue-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { max-width: 56ch; font-size: 1.18rem; color: rgba(255, 255, 255, 0.84); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Trust strip ---------- */

.trust { position: relative; z-index: 2; padding: 0; background: transparent; }
.trust-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: -70px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.trust-item { display: flex; align-items: center; gap: 14px; padding: 26px 24px; border-left: 1px solid var(--line); }
.trust-item:first-child { border-left: 0; }
.trust-icon { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 50%; background: var(--silver-grad); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(10, 12, 15, 0.06); }
.trust-item strong { display: block; font-size: 1rem; line-height: 1.3; }
.trust-item span { font-size: 0.87rem; color: var(--muted); }

/* ---------- Offers ---------- */

.offers h2 .muted { color: #9aa5ae; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.offer { padding: 32px 30px; border-radius: var(--radius); background: var(--bg-soft); }
.offer .icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; border-radius: 14px; background: #fff; color: var(--blue); box-shadow: 0 1px 2px rgba(15, 26, 36, 0.06); }
.offer .icon.cool { color: var(--steel); }
.offer .icon .i { width: 27px; height: 27px; }
.offer h3 { margin-bottom: 8px; font-size: 1.3rem; }
.offer p { margin: 0; color: var(--muted); }
.offer-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.offer-note p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Services ---------- */

.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.svc {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  /* white card with a shiny blue gradient edge */
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(140deg, #d3e3fc 0%, #2f7cf6 26%, #a6caff 48%, #1d5fd1 72%, #d3e3fc 100%) border-box;
  box-shadow: 0 1px 2px rgba(10, 12, 15, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.svc:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(29, 95, 209, 0.18), 0 2px 6px rgba(10, 12, 15, 0.06);
}
.svc .icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.svc .icon.cool { background: var(--silver-grad); color: var(--ink); }
.svc .icon .i { width: 26px; height: 26px; }
.svc h3 { margin: 20px 0 8px; }
.svc p { flex: 1; margin: 0 0 20px; font-size: 0.95rem; color: var(--muted); }
.svc-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; font-weight: 700; color: var(--blue); text-decoration: none; }
.svc-link .i { width: 17px; height: 17px; stroke-width: 2.2; transition: transform 0.15s; }
.svc:hover .svc-link .i { transform: translateX(3px); }
.svc .svc-cat { flex: 0 0 auto; margin: 20px 0 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.svc-cat + h3 { margin-top: 6px; }

.svc-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -16px 0 36px; }
.svc-filter button {
  padding: 0.65em 1.2em;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: 700 0.92rem var(--font);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.svc-filter button:hover { border-color: var(--ink); }
.svc-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.svc.featured { background: var(--ink); border-color: var(--ink); color: #fff; }
.svc.featured .svc-cat { color: var(--muted-dark); }
.svc.featured p { color: var(--muted-dark); }
.svc.featured .icon { background: var(--silver-grad); color: var(--ink); }
.svc.featured .svc-link { color: var(--blue-bright); }

.hero-note { margin: 22px 0 0; font-size: 0.93rem; color: rgba(255, 255, 255, 0.75); }
.hero-note a { color: #fff; font-weight: 700; text-underline-offset: 3px; }

.save-card .stat { margin: 0 0 12px; font-size: 3rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--blue); }
.stat span { display: block; margin-bottom: 8px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.bill-tip { display: grid; grid-template-columns: 28px 1fr; gap: 14px; margin-top: 34px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 0.95rem; color: var(--muted); }
.bill-tip strong { display: block; margin-bottom: 2px; color: var(--text); }
.bill-tip .i { color: var(--green); }

.hero-brand { display: block; margin-bottom: 20px; font-size: clamp(0.95rem, 1.5vw, 1.15rem); font-weight: 800; letter-spacing: 0.22em; line-height: 1.3; text-transform: uppercase; color: #cfd6dd; }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.about-copy h2 { margin-bottom: 20px; }
.about-copy > p:not(.eyebrow):not(.lead) { max-width: 60ch; color: var(--muted); }
.about-points { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; margin: 30px 0 0; padding: 0; list-style: none; }
.about-points li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 0.97rem; font-weight: 700; line-height: 1.45; }
.about-points .tick { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.about-points .tick .i { width: 14px; height: 14px; stroke-width: 3; }
.about-media { position: relative; margin: 0; }
.about-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24px; }
.about-card { position: absolute; left: -28px; bottom: 32px; max-width: 300px; padding: 20px 22px; border-radius: 16px; background: var(--ink); color: #fff; box-shadow: 0 20px 40px rgba(10, 12, 15, 0.25); }
.about-card::before { content: ""; display: block; width: 38px; height: 3px; margin-bottom: 12px; border-radius: 2px; background: var(--silver-grad); }
.about-card strong { display: block; margin-bottom: 4px; font-size: 1.1rem; }
.about-card span { font-size: 0.92rem; color: var(--muted-dark); }
.about-sub { margin-top: clamp(80px, 10vw, 120px); }

@media (max-width: 1080px) {
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-media img { aspect-ratio: 16 / 10; }
  .about-card { left: 20px; }
}
@media (max-width: 640px) {
  .about-points { grid-template-columns: 1fr; }
  .about-card { position: relative; left: auto; bottom: auto; max-width: none; margin: -48px 16px 0; }
}

/* ---------- Whole-home plan ---------- */

.plan { position: relative; overflow: hidden; background: var(--bg-soft); color: var(--text); }
.plan::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 420px at 0% 100%, rgba(47, 124, 246, 0.05), transparent 70%),
    radial-gradient(620px 420px at 100% 0%, rgba(15, 157, 118, 0.05), transparent 70%);
}
.plan .wrap { position: relative; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card { display: flex; flex-direction: column; padding: 0 0 30px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 2px rgba(10, 12, 15, 0.04); }
.plan-media { aspect-ratio: 3 / 2; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.plan-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.plan-card:hover .plan-media img { transform: scale(1.04); }
.plan-card > :not(.plan-media) { margin-left: 30px; margin-right: 30px; }
.plan-card .plan-num { display: inline-block; margin-top: 24px; }
.plan-num { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.plan-card h3 { margin: 12px 0 4px; font-size: 1.55rem; }
.plan-what { margin: 0 0 16px; font-size: 0.95rem; font-weight: 700; color: var(--steel); }
.plan-card p:last-child { margin: 0; color: var(--muted); }
.plan-note { margin: 28px 0 0; color: var(--muted); }
.plan-note a { color: var(--blue); font-weight: 700; }

/* ---------- Heat pumps ---------- */

.hp-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.hp-copy h2 { margin-bottom: 18px; }

.hp-more { margin: 28px 0 0; }
.check-list { display: grid; gap: 18px; margin: 30px 0 0; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--muted); }
.check-list strong { display: block; color: var(--text); }
.check-list .tick { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.check-list .tick .i { width: 15px; height: 15px; stroke-width: 3; }

.diagram {
  /* solid brand blue card, white line art; winter = white, summer = pale blue */
  --flow: #ffffff;
  --room: rgba(255, 255, 255, 0.14);
  margin: 0;
  padding: 20px 20px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 34px rgba(29, 95, 209, 0.28);
}
.diagram[data-mode="cool"] { --flow: #b9dcff; --room: rgba(185, 220, 255, 0.20); }
.diagram-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 4px 0; }
.diagram-label { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #c3dcff; }

.mode-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); }
.mode-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.55em 1.05em;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #e3efff;
  font: 700 0.9rem var(--font);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.mode-toggle button .i { width: 18px; height: 18px; }
.mode-toggle button:hover { color: #fff; }
.mode-toggle button[aria-pressed="true"] { background: #fff; color: var(--blue); }

.hp-svg { display: block; width: 100%; height: auto; margin: 10px 0 2px; }
.d-ground { stroke: rgba(255, 255, 255, 0.35); stroke-width: 2; }
.d-room { fill: var(--room); transition: fill 0.5s; }
.d-house { fill: none; stroke: #ffffff; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.d-unit { fill: #ffffff; }
.d-louvre { stroke: #7ea6da; stroke-width: 2; stroke-linecap: round; }
.d-air { fill: none; stroke: var(--flow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 3 7; animation: air 0.9s linear infinite; transition: stroke 0.5s; }
.d-pipe { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.d-flow { fill: none; stroke: var(--flow); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 10; animation: flow 1.1s linear infinite; transition: stroke 0.5s; }
/* Paths run indoor → outdoor. In winter heat travels the other way. */
.diagram[data-mode="heat"] .d-flow { animation-direction: reverse; }
.d-fan-well { fill: #14479a; }
.d-blade { fill: #cfe2ff; }
.d-hub { fill: #ffffff; }
.d-fan { animation: spin 1.4s linear infinite; }
.d-arrow { transition: transform 0.5s ease; }
.d-arrow path { fill: none; stroke: var(--flow); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.5s; }
.diagram[data-mode="heat"] .d-arrow { transform: scaleX(-1); }
.d-arrow-label { font: 800 11px var(--font); letter-spacing: 0.2em; fill: var(--flow); transition: fill 0.5s; }
.d-temp { font: 700 13px var(--font); fill: #ffffff; }
.d-label { font: 700 11px var(--font); letter-spacing: 0.12em; fill: #c3dcff; }
.d-snow path { fill: none; stroke: #ffffff; stroke-width: 2.5; stroke-linecap: round; }
.d-sun circle { fill: #dcebff; }
.d-sun path { stroke: #dcebff; stroke-width: 2.5; stroke-linecap: round; }
.d-snow, .d-sun, .d-t-heat, .d-t-cool { transition: opacity 0.4s; }
.diagram[data-mode="heat"] .d-sun,
.diagram[data-mode="heat"] .d-t-cool,
.diagram[data-mode="cool"] .d-snow,
.diagram[data-mode="cool"] .d-t-heat { opacity: 0; }
.diagram-caption { min-height: 3.2em; margin: 4px 6px; font-size: 0.95rem; color: #d5e6ff; }

@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes air { to { stroke-dashoffset: -20; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Savings & financing ---------- */

.save-grid { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 20px; }
.save-card { display: flex; flex-direction: column; padding: 32px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.save-card .icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.save-card .icon.cool { background: var(--silver-grad); color: var(--ink); }
.save-card .icon .i { width: 27px; height: 27px; }
.save-card h3 { margin-bottom: 10px; font-size: 1.3rem; }
.save-card p { margin: 0; color: var(--muted); }
.save-card.cta { position: relative; overflow: hidden; background: var(--blue-soft); border-color: #bcd6fb; color: var(--text); }
.save-card.cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(360px 240px at 100% 0%, rgba(47, 124, 246, 0.10), transparent 70%); }
.save-card.cta > * { position: relative; }
.save-card.cta p { color: var(--muted); }
.save-card.cta .btn { align-self: flex-start; margin-top: auto; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 26px; padding: 0; list-style: none; }
.pills li { display: inline-flex; align-items: center; gap: 6px; padding: 0.4em 0.85em; border: 1px solid #bcd6fb; border-radius: 999px; background: #fff; font-size: 0.85rem; font-weight: 700; color: var(--text); }
.pills .i { width: 15px; height: 15px; stroke-width: 3; color: var(--green); }

.promise { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 28px; align-items: start; margin-top: 44px; padding: 30px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.promise-title { max-width: 12ch; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.promise-item { display: grid; grid-template-columns: 26px 1fr; gap: 12px; font-size: 0.94rem; color: var(--muted); }
.promise-item strong { display: block; margin-bottom: 2px; color: var(--text); }
.promise-item .i { margin-top: 1px; color: var(--blue); stroke-width: 2.1; }
.fine-print { max-width: 100ch; margin: 24px 0 0; font-size: 0.82rem; color: var(--muted); }

/* ---------- Process ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { counter-increment: step; }
.step-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.step-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.step:hover .step-media img { transform: scale(1.04); }
.step-media::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(15, 26, 36, 0.15);
}
.step h3 { margin: 22px 0 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--muted); }

/* ---------- FAQ ---------- */

.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.faq-intro h2 { margin-bottom: 18px; }
.faq-intro a { color: var(--blue); font-weight: 700; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: box-shadow 0.2s; }
.faq-list details[open] { box-shadow: var(--shadow); border-color: transparent; }
.faq-list summary {
  position: relative;
  padding: 20px 60px 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transition: transform 0.2s;
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list details p { max-width: 64ch; margin: -6px 24px 22px; color: var(--muted); }

/* ---------- Booking ---------- */

.book { position: relative; overflow: hidden; background: var(--bg-soft); color: var(--text); }
.book::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 440px at 0% 0%, rgba(47, 124, 246, 0.07), transparent 70%),
    radial-gradient(620px 440px at 100% 100%, rgba(15, 157, 118, 0.06), transparent 70%);
}
.book-grid { position: relative; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: start; }
.book-copy h2 { margin-bottom: 18px; }

.contact-list { display: grid; gap: 18px; margin: 34px 0 0; padding: 0; list-style: none; }
.contact-list li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; }
.contact-list .ci { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--blue); }
.contact-list .ci .i { width: 21px; height: 21px; }
.contact-list small { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-list a, .contact-list .v { font-size: 1.04rem; font-weight: 700; text-decoration: none; }
.contact-list a:hover { color: var(--blue); }

.form-card { padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: 22px; background: #fff; color: var(--text); box-shadow: 0 18px 46px rgba(11, 47, 107, 0.10); }
.form-card h3 { margin-bottom: 6px; font-size: 1.45rem; }
.form-card > p { margin-bottom: 26px; font-size: 0.95rem; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .field-label { font-size: 0.92rem; font-weight: 700; }
.opt { font-weight: 500; color: var(--muted); }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.8em 0.95em;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fafbfb;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field select {
  appearance: none;
  padding-right: 2.4em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6772' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8em center;
  background-size: 18px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 4px rgba(29, 95, 209, 0.18); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.error-msg { display: none; font-size: 0.85rem; color: var(--error); }
.field.invalid .error-msg { display: block; }

.chips { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.chips legend { margin-bottom: 9px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.55em 1em;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fafbfb;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip span:hover { border-color: #b7c0c7; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--silver); outline-offset: 2px; }

.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 0.88rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); }
.consent a { color: var(--text); }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 6px; }
.form-note { margin: 0; font-size: 0.86rem; color: var(--muted); }
.form-alert { margin-top: 18px; padding: 14px 16px; border: 1px solid rgba(179, 38, 30, 0.3); border-radius: 12px; background: #fdf0ef; color: #7c1b15; font-size: 0.95rem; }
.form-alert a { color: inherit; font-weight: 700; }

/* ---------- Footer ---------- */

.site-footer { padding: 72px 0 32px; background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 0.9fr 1.1fr 0.8fr 1.1fr; gap: 36px; }
.footer-brand .brand { margin-bottom: 18px; }
.disclaimer { max-width: 44ch; font-size: 0.88rem; color: var(--muted); }
.site-footer h4 { margin: 0 0 16px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.site-footer ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }

/* ---------- Mobile action bar ---------- */

.mobile-bar { display: none; }

/* ---------- Simple pages (thank you, privacy) ---------- */

.page-hero { padding: clamp(52px, 7vw, 92px) 0 clamp(44px, 5vw, 68px); background: var(--bg-soft); color: var(--text); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.5rem); }
.page-hero p { margin: 16px 0 0; color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 { margin: 44px 0 14px; font-size: 1.55rem; }
.prose p, .prose li { color: #33404b; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--blue); font-weight: 700; }

.thanks-card { max-width: 640px; padding: clamp(28px, 5vw, 48px); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.thanks-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 22px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.thanks-icon .i { width: 30px; height: 30px; stroke-width: 2.4; }
.thanks-card h1 { margin-bottom: 14px; font-size: clamp(2rem, 4vw, 2.7rem); }
.thanks-card p { color: var(--muted); }
.thanks-card ol { margin: 0 0 28px; padding-left: 1.2em; color: #33404b; }
.thanks-card ol li { margin-bottom: 8px; }
.thanks-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Scroll reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.plan-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.plan-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.svc-grid .reveal:nth-child(4n + 2), .offer-grid .reveal:nth-child(2), .save-grid .reveal:nth-child(2), .steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.svc-grid .reveal:nth-child(4n + 3), .offer-grid .reveal:nth-child(3), .save-grid .reveal:nth-child(3), .steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.svc-grid .reveal:nth-child(4n + 4) { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */

@media (max-width: 1380px) {
  .call-btn .call-text { display: none; }
  .nav, .nav-links { gap: 20px; }
}

@media (max-width: 1080px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-card { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(3) { border-left: 0; }
  .trust-item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .hp-grid, .faq-grid, .book-grid { grid-template-columns: 1fr; gap: 44px; }
  .save-grid { grid-template-columns: 1fr 1fr; }
  .save-card.cta { grid-column: 1 / -1; }
  .promise { grid-template-columns: 1fr; gap: 18px; }
  .promise-title { max-width: none; }
}

@media (max-width: 960px) {
  .offer-grid, .steps, .plan-grid { grid-template-columns: 1fr; }
  .plan-grid { gap: 14px; }
  .offer-grid { gap: 14px; }
  .steps { gap: 40px; }
  .step-media { aspect-ratio: 16 / 9; }
}

@media (max-width: 760px) {
  body.has-mobile-bar { padding-bottom: 78px; }
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .mobile-bar .btn { padding: 0.85em 1em; }

  .topbar .sep, .topbar .topbar-extra { display: none; }
  /* keep the sticky stack short on phones */
  :root { --header-h: 64px; }
  .topbar .wrap { gap: 4px 12px; min-height: 0; padding: 6px 0; font-size: 0.78rem; }
  .brand-logo { height: 32px; }
  .hero { min-height: 0; }
  .hero-media img { object-position: 62% center; }
  .hero-media::after { background: linear-gradient(180deg, rgba(6, 8, 11, 0.7) 0%, rgba(6, 8, 11, 0.88) 55%, rgba(6, 8, 11, 0.95) 100%); }
  .hero-inner { padding: 64px 0 120px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name strong { font-size: 1.15rem; }
  .brand-logo { height: 34px; }
  .brand-mark { width: 38px; height: 38px; }
  .call-btn .ring { width: 40px; height: 40px; }
  .svc-grid, .form-grid, .save-grid, .footer-grid { grid-template-columns: 1fr; }
  .site-footer a, .contact-list a { overflow-wrap: anywhere; }
  .trust-card { grid-template-columns: 1fr; }
  .trust-item { border-left: 0; padding: 18px 20px; }
  .trust-item + .trust-item { border-top: 1px solid var(--line); }
  .hero-actions .btn { width: 100%; }
  .section-head { margin-bottom: 36px; }
  .diagram { padding: 16px 12px 12px; border-radius: 18px; }
  .form-foot .btn { width: 100%; }
  .offer-note .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { opacity: 0; }
  .hero-slide:nth-of-type(1) { opacity: 1; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ==================================================================
   Premium corporate sections (solutions, why, resources, final CTA)
   ================================================================== */

/* --- Featured energy solutions: photo cards --- */
.sol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.sol-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 340px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(10, 12, 15, 0.06);
  transition: transform 0.25s, box-shadow 0.25s;
}
.sol-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.sol-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 47, 107, 0.10) 0%, rgba(8, 26, 56, 0.82) 78%);
}
.sol-body { position: relative; z-index: 1; padding: 28px; }
.sol-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 0.35em 0.8em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sol-card h3 { margin-bottom: 8px; font-size: 1.45rem; }
.sol-card p { margin: 0 0 14px; color: rgba(255, 255, 255, 0.88); font-size: 0.98rem; max-width: 42ch; }
.sol-more { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 0.95rem; }
.sol-more .i { width: 17px; height: 17px; stroke-width: 2.2; transition: transform 0.15s; }
.sol-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(11, 47, 107, 0.22); }
.sol-card:hover img { transform: scale(1.05); }
.sol-card:hover .sol-more .i { transform: translateX(4px); }

/* --- Why Canadian Energy Standard: deep blue band --- */
.why { background: #fff; color: var(--text); border-block: 1px solid var(--line); }
.why .eyebrow { color: var(--green-dark); }
.why .lead { color: var(--muted); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 12px; }
.why-item { display: flex; flex-direction: column; gap: 10px; padding-top: 22px; border-top: 2px solid var(--line); }
.why-item .i { width: 26px; height: 26px; color: var(--green); }
.why-item h3 { font-size: 1.15rem; }
.why-item p { margin: 0; font-size: 0.96rem; color: var(--muted); }

/* --- Resources --- */
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.res-card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.res-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.res-tag {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 0.35em 0.8em;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.res-card h3 { margin-bottom: 10px; font-size: 1.25rem; }
.res-card p { flex: 1; margin: 0 0 18px; font-size: 0.97rem; color: var(--muted); }
.res-more { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 0.95rem; color: var(--blue); }
.res-more .i { width: 17px; height: 17px; stroke-width: 2.2; transition: transform 0.15s; }
.res-card:hover .res-more .i { transform: translateX(4px); }

/* --- Final call to action --- */
.final-cta { position: relative; overflow: hidden; background: #fff; color: var(--text); text-align: center; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final-cta.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.93) 0%, rgba(240, 246, 255, 0.90) 100%);
}
.final-cta.has-photo .wrap { z-index: 1; }
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(700px 340px at 50% -10%, rgba(47, 124, 246, 0.08), transparent 70%);
}
.final-cta .wrap { position: relative; max-width: 760px; }
.final-cta h2 { margin-bottom: 18px; }
.final-cta p { margin: 0 auto 32px; max-width: 56ch; font-size: 1.14rem; color: var(--muted); }
.final-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #eaf1fd; }

/* --- Article pages (resources) --- */
.article { max-width: 760px; }
.article h2 { margin: 44px 0 14px; font-size: 1.6rem; }
.article h3 { margin: 28px 0 10px; font-size: 1.2rem; }
.article p, .article li { color: #33404b; }
.article ul, .article ol { padding-left: 1.2em; }
.article li { margin-bottom: 8px; }
.article .callout {
  margin: 32px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--green);
  border-radius: 0 14px 14px 0;
  background: var(--green-soft);
}
.article .callout p:last-child { margin: 0; }
.article-meta { margin-bottom: 8px; font-size: 0.86rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }

@media (max-width: 1080px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .res-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sol-grid { grid-template-columns: 1fr; gap: 16px; }
  .sol-card { min-height: 280px; }
  .why-grid { grid-template-columns: 1fr; gap: 18px; }
  .final-actions .btn { width: 100%; }
}

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-row: span 2; }
}


/* ==================================================================
   Mega menu navigation
   ================================================================== */

.mainnav { display: contents; }

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  font: 600 0.92rem var(--font);
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s;
}
.nav-trigger .chev { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.has-mega { position: static; }
.has-mega > .nav-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 0.2s, transform 0.2s;
}
.nav-links > li { position: relative; display: flex; align-items: center; }
.nav-links > li.has-mega { position: static; }          /* panel spans the full header width */
.nav-links > li.menu-only { display: none; }            /* mobile-only CTA */
.has-mega.open > .nav-trigger { color: var(--blue); }
.has-mega.open > .nav-trigger .chev { transform: rotate(180deg); }
.has-mega.open > .nav-trigger::after { opacity: 1; transform: scaleX(1); }

.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 24px 48px rgba(11, 47, 107, 0.14);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s ease;
}
.has-mega.open .mega { opacity: 1; transform: translateY(0); pointer-events: auto; }

.mega-inner { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 44px; padding: 34px 0 38px; align-items: stretch; }
.mega-links, .mega-feature { min-width: 0; }
.mega-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; align-content: start; }
.mega-head {
  margin: 0 0 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.mega-col { display: flex; flex-direction: column; }
.mega-link {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 13px;
  align-items: center;
  padding: 11px 12px;
  margin: 0 -12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.15s, transform 0.15s;
}
.mega-link:hover { background: var(--bg-soft); transform: translateX(2px); }
.mega-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}
.mega-ico .i { width: 21px; height: 21px; }
.mega-link:hover .mega-ico { background: var(--blue); color: #fff; }
.mega-text strong { display: block; font-size: 0.97rem; font-weight: 700; }
.mega-text small { display: block; margin-top: 2px; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.mega-note {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.mega-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 280px;
  overflow: hidden;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
}
.mega-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.mega-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 47, 107, 0.20) 0%, rgba(8, 26, 56, 0.92) 78%);
}
.mega-feature:hover img { transform: scale(1.05); }
.mega-feature-card { position: relative; z-index: 1; display: block; width: 100%; padding: 24px; }
.mega-feature-kicker { display: block; margin-bottom: 8px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #9ec6ff; }
.mega-feature-card strong { display: block; margin-bottom: 6px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.mega-feature-card small { display: block; margin-bottom: 14px; font-size: 0.9rem; line-height: 1.5; color: rgba(255, 255, 255, 0.86); }
.mega-feature-cta { display: inline-flex; align-items: center; gap: 7px; font-size: 0.92rem; font-weight: 700; }
.mega-feature-cta .i { width: 16px; height: 16px; stroke-width: 2.2; transition: transform 0.15s; }
.mega-feature:hover .mega-feature-cta .i { transform: translateX(4px); }

/* keyboard users get the same panel */
.has-mega:focus-within .mega { opacity: 1; transform: translateY(0); pointer-events: auto; }

@media (max-width: 1180px) {
  .nav-links { gap: 14px; }
  .nav-links > li > a:not(.btn), .nav-trigger { font-size: 0.88rem; }
}

/* ---------- mobile / tablet navigation ---------- */
@media (max-width: 1024px) {
  /* backdrop-filter would make the header the containing block for the fixed menu */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav-cta { display: none; }
  .menu-toggle { display: block; }
  .mainnav { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 40px;
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open { display: flex; }
  body.nav-open { overflow: hidden; }
  .nav-links > li { display: block; border-bottom: 1px solid var(--line); }
  .nav-links > li > a:not(.btn) { display: block; padding: 16px 0; font-size: 1.05rem; }
  .nav-trigger { width: 100%; justify-content: space-between; padding: 16px 0; font-size: 1.05rem; }
  .has-mega > .nav-trigger::after { display: none; }
  .nav-links > li.menu-only { display: block; border-bottom: 0 !important; padding: 20px 0 0; }
  .menu-only .btn { width: 100%; }

  .mega {
    position: static;
    border-top: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
  }
  .mega-inner { display: block; width: 100%; padding: 0 0 14px; }
  .mega-links { grid-template-columns: 1fr; gap: 0; }
  .mega-head { margin-top: 10px; border-bottom: 0; padding-bottom: 4px; }
  .mega-link { margin: 0; padding: 12px 0; }
  .mega-link:hover { background: none; transform: none; }
  .mega-feature { min-height: 150px; margin-top: 14px; }
  .mega-feature-card { padding: 18px; }
  .mega-feature-card small { display: none; }
  .mega-note { margin-top: 10px; }
}

@media (max-width: 640px) {
  .mega-feature { display: none; }
}
