/* =========================================================================
   MeltGrid Canada — Design System
   Palette: deep navy / ice blue / warm amber (underground heat) / grey / white
   Type: Space Grotesk (display) + Inter (body) + IBM Plex Mono (data/labels)
   Signature motif: blueprint heating-grid lines + coverage-zone diagrams
   ========================================================================= */

:root {
  /* Colour tokens */
  --navy-900: #0a1a30;
  --navy-800: #0c2038;
  --navy-700: #142c4b;
  --navy-600: #1e3a5f;
  --ice-400: #6fb8e0;
  --ice-300: #9ccfe8;
  --ice-100: #e6f3fa;
  --amber-500: #e0862f;
  --amber-600: #c06f22;
  --amber-100: #fdeee0;
  --grey-100: #f4f6f8;
  --grey-200: #e8ecef;
  --grey-400: #b7c1c9;
  --slate-700: #33424f;
  --slate-500: #5b6b78;
  --white: #ffffff;
  --danger: #b3261e;
  --success: #1e7a4c;

  /* Typography */
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --container-width: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-card: 0 6px 24px rgba(10, 26, 48, 0.08);
  --shadow-lift: 0 14px 40px rgba(10, 26, 48, 0.16);
  --grid-line: rgba(111, 184, 224, 0.16);
}

/* ---------------------------------------------------------------------
   Reset & base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate-700);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--amber-600); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--amber-600);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.75em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber-500);
  display: inline-block;
}

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

section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.bg-navy { background: var(--navy-900); color: var(--ice-100); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-grey { background: var(--grey-100); }
.bg-ice { background: var(--ice-100); }

/* Visually-hidden utility for accessible labels */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy-900);
  color: var(--white); padding: 12px 18px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Blueprint grid backdrop (signature motif)
   --------------------------------------------------------------------- */
.grid-backdrop {
  position: relative;
  overflow: hidden;
}
.grid-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at top right, black 0%, transparent 70%);
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  min-height: 48px;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--amber-500);
  color: var(--navy-900);
}
.btn-primary:hover { background: var(--amber-600); color: var(--white); box-shadow: var(--shadow-lift); }
.btn-secondary {
  background: transparent;
  border-color: var(--ice-300);
  color: var(--white);
}
.btn-secondary:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,0.08); }
.btn-outline-navy {
  background: transparent;
  border-color: var(--navy-700);
  color: var(--navy-700);
}
.btn-outline-navy:hover { background: var(--navy-700); color: var(--white); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ---------------------------------------------------------------------
   Header / Navigation
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--navy-900);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand:hover { color: var(--ice-300); }
.brand-mark {
  width: 34px; height: 34px;
  flex-shrink: 0;
}
.brand-tagline {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ice-300);
  text-transform: uppercase;
}

.primary-nav { display: none; }
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--ice-100);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--amber-500);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  color: var(--white);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  background: var(--navy-800);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 24px 18px; }
.mobile-nav a {
  display: block;
  color: var(--ice-100);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 1rem;
}
.mobile-nav .btn { margin-top: 14px; }

@media (min-width: 960px) {
  .primary-nav { display: block; }
  .header-phone { display: inline-flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Sticky mobile CTA bar */
.mobile-cta-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 400;
  display: flex;
  background: var(--navy-900);
  border-top: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 -6px 18px rgba(0,0,0,0.18);
}
.mobile-cta-bar a {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--white);
  border-right: 1px solid rgba(255,255,255,0.12);
}
.mobile-cta-bar a:last-child { border-right: none; }
.mobile-cta-bar a.is-primary { background: var(--amber-500); color: var(--navy-900); }
@media (min-width: 960px) {
  .mobile-cta-bar { display: none; }
}
body.has-mobile-cta { padding-bottom: 60px; }
@media (min-width: 960px) {
  body.has-mobile-cta { padding-bottom: 0; }
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  padding: 72px 0 96px;
  position: relative;
}
.hero .container {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.05fr 0.95fr; }
}
.hero-copy p.lead {
  font-size: 1.15rem;
  color: var(--ice-100);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-phone {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ice-300);
}
.hero-phone a { color: var(--white); font-weight: 600; }

/* ---------------------------------------------------------------------
   Trust strip
   --------------------------------------------------------------------- */
.trust-strip {
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  padding: 30px 0;
}
.trust-strip ul {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.trust-strip li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--slate-700);
}
.trust-strip svg { flex-shrink: 0; color: var(--amber-500); margin-top: 2px; }

/* ---------------------------------------------------------------------
   Cards / grids
   --------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 40px;
}
.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card .icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--amber-100);
  color: var(--amber-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 0.4em; font-size: 1.15rem; }
.card p { color: var(--slate-500); font-size: 0.95rem; margin-bottom: 0.5em; }
.card a.card-link { font-weight: 600; font-size: 0.9rem; }

.section-head {
  max-width: 68ch;
  margin-bottom: 8px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Two-column layout with image / copy */
.split {
  display: grid;
  gap: 44px;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse { direction: rtl; }
  .split.reverse > * { direction: ltr; }
}
.split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* ---------------------------------------------------------------------
   Coverage diagram (signature interactive element)
   --------------------------------------------------------------------- */
.coverage-widget {
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--white);
}
.coverage-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.coverage-tabs button {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  color: var(--ice-100);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.coverage-tabs button[aria-pressed="true"] {
  background: var(--amber-500);
  border-color: var(--amber-500);
  color: var(--navy-900);
}
.coverage-caption {
  font-size: 0.92rem;
  color: var(--ice-100);
  margin-top: 16px;
}

/* ---------------------------------------------------------------------
   Steps / process
   --------------------------------------------------------------------- */
.steps-list {
  counter-reset: step;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.steps-list li {
  counter-increment: step;
  background: var(--grey-100);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  position: relative;
}
.steps-list li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--amber-600);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.steps-list h3 { font-size: 1.02rem; margin-bottom: 6px; }
.steps-list p { font-size: 0.9rem; color: var(--slate-500); margin: 0; }

/* ---------------------------------------------------------------------
   CTA band
   --------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--white);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band .hero-actions { justify-content: center; }

/* ---------------------------------------------------------------------
   Breadcrumbs
   --------------------------------------------------------------------- */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0; padding: 0;
  font-size: 0.82rem;
  color: var(--slate-500);
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--grey-400);
}
.breadcrumbs a { color: var(--slate-500); }
.breadcrumbs a:hover { color: var(--amber-600); }

/* ---------------------------------------------------------------------
   FAQ accordion
   --------------------------------------------------------------------- */
.faq-accordion { margin-top: 32px; }
.faq-item {
  border-bottom: 1px solid var(--grey-200);
  padding: 6px 0;
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-900);
  padding: 14px 28px 14px 0;
  position: relative;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 12px;
  font-size: 1.4rem;
  color: var(--amber-500);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding: 0 0 18px; color: var(--slate-500); font-size: 0.96rem; }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
}
.form-field .hint { font-size: 0.78rem; color: var(--slate-500); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 12px 14px;
  border: 1px solid var(--grey-400);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--slate-700);
  width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
fieldset { border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 14px 16px; }
legend { font-size: 0.85rem; font-weight: 600; color: var(--navy-900); padding: 0 6px; }
.radio-row, .checkbox-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.radio-row input, .checkbox-row input { width: auto; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-actions { margin-top: 22px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.form-msg { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.92rem; margin-bottom: 18px; }
.form-msg.success { background: #e7f6ee; color: var(--success); border: 1px solid #bfe6cf; }
.form-msg.error { background: #fbeceb; color: var(--danger); border: 1px solid #f2c6c2; }
.field-error { color: var(--danger); font-size: 0.8rem; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--ice-100);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.3fr repeat(3, 1fr);
}
.footer-brand p { color: var(--ice-300); font-size: 0.9rem; max-width: 32ch; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--ice-100); font-size: 0.9rem; }
.footer-col a:hover { color: var(--amber-500); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ice-300);
}
.footer-bottom a { color: var(--ice-300); }
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Utility classes
   --------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.tag-list li {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: var(--ice-100);
  color: var(--navy-700);
  padding: 6px 12px;
  border-radius: 999px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
  font-size: 0.94rem;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--grey-200);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}
.compare-table th { background: var(--navy-900); color: var(--white); font-family: var(--font-display); }
.compare-table tr:nth-child(even) td { background: var(--grey-100); }

.article-body h2 { margin-top: 1.6em; }
.article-body h3 { margin-top: 1.2em; }
.article-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.06em; }
.article-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); margin-top: 36px; }
.pill { display: inline-block; background: var(--amber-100); color: var(--amber-600); font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
