/* ==========================================================================
   GAA-MinRef Canada Inc. — Site Stylesheet
   Design tokens per brand brief: charcoal / steel grey / off-white / red / navy
   ========================================================================== */

:root{
  --charcoal:#161A1D;
  --steel:#4B5563;
  --steel-light:#8A93A0;
  --offwhite:#F5F5F2;
  --white:#FFFFFF;
  --red:#D71920;
  --red-dark:#A9131A;
  --navy:#15243A;
  --line:#D8D6D0;
  --line-dark:#2A2F35;

  --font-head:'Space Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-body:'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --font-mono:'IBM Plex Mono', 'Courier New', monospace;

  --max-w:1180px;
  --gap:24px;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--charcoal);
  background:var(--white);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{margin:0;padding:0;list-style:none;}
h1,h2,h3,h4{
  font-family:var(--font-head);
  font-weight:600;
  line-height:1.15;
  margin:0 0 .5em;
  letter-spacing:-0.01em;
}
h1{font-size:clamp(2.1rem,4vw,3.4rem);}
h2{font-size:clamp(1.6rem,2.6vw,2.2rem);}
h3{font-size:1.25rem;}
p{margin:0 0 1em;}
p:last-child{margin-bottom:0;}

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

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

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

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-body);
  font-weight:600;
  font-size:0.95rem;
  padding:13px 26px;
  border:1px solid transparent;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary{background:var(--red);color:var(--white);}
.btn-primary:hover{background:var(--red-dark);}
.btn-outline{background:transparent;color:var(--charcoal);border-color:var(--charcoal);}
.btn-outline:hover{background:var(--charcoal);color:var(--white);}
.btn-outline-light{background:transparent;color:var(--white);border-color:rgba(255,255,255,.55);}
.btn-outline-light:hover{background:var(--white);color:var(--charcoal);}

/* ---------- Header ---------- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:var(--white);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 24px;
  max-width:var(--max-w);
  margin:0 auto;
  gap:24px;
}
.brand{display:flex;align-items:center;gap:12px;}
.brand img{height:38px;width:auto;}
.brand-name{
  font-family:var(--font-head);
  font-weight:700;
  font-size:1.05rem;
  color:var(--charcoal);
  white-space:nowrap;
}
.brand-name span{color:var(--red);}

.main-nav{display:flex;align-items:center;gap:2px;}
.main-nav>ul{display:flex;align-items:center;gap:4px;}
.main-nav a.nav-link{
  display:block;padding:10px 14px;
  font-size:0.94rem;font-weight:500;color:var(--charcoal);
  border-bottom:2px solid transparent;
}
.main-nav a.nav-link:hover{color:var(--red);}
.has-mega{position:relative;}
.mega-panel{
  display:none;
  position:absolute;top:100%;left:50%;transform:translateX(-50%);
  background:var(--white);
  border:1px solid var(--line);
  box-shadow:0 12px 28px rgba(22,26,29,.12);
  padding:18px;
  min-width:560px;
  grid-template-columns:1fr 1fr;
  gap:4px 28px;
  z-index:50;
}
.has-mega:hover .mega-panel,.has-mega:focus-within .mega-panel{display:grid;}
.mega-panel a{
  display:block;padding:10px 8px;border-bottom:1px solid var(--line);
}
.mega-panel a:hover{color:var(--red);}
.mega-panel a .mega-title{font-weight:600;display:block;font-size:.92rem;}
.mega-panel a .mega-desc{display:block;font-size:.8rem;color:var(--steel);margin-top:2px;}

.header-cta{display:flex;align-items:center;gap:16px;}
.header-cta .btn{padding:10px 20px;font-size:.88rem;}

.nav-toggle{display:none;background:none;border:0;cursor:pointer;padding:6px;}
.nav-toggle span{display:block;width:24px;height:2px;background:var(--charcoal);margin:5px 0;}

@media (max-width:920px){
  .main-nav{position:fixed;inset:64px 0 0 0;background:var(--white);flex-direction:column;align-items:stretch;
    transform:translateX(100%);transition:transform .2s ease;overflow-y:auto;padding:12px 0;}
  .main-nav.open{transform:translateX(0);}
  .main-nav>ul{flex-direction:column;align-items:stretch;width:100%;}
  .main-nav a.nav-link{padding:14px 24px;border-bottom:1px solid var(--line);}
  .mega-panel{position:static;transform:none;box-shadow:none;border:0;min-width:0;grid-template-columns:1fr;padding:0 24px 8px;display:none;}
  .has-mega.open .mega-panel{display:grid;}
  .nav-toggle{display:block;}
  .header-cta .btn-outline{display:none;}
}

/* ---------- Hero ---------- */
.hero{
  background:var(--charcoal);
  color:var(--white);
  padding:88px 0 72px;
  position:relative;
  overflow:hidden;
}
.hero .container{position:relative;z-index:2;display:grid;grid-template-columns:1.1fr .9fr;gap:56px;align-items:center;}
.hero-eyebrow{font-size:.82rem;color:var(--red);font-weight:600;letter-spacing:.02em;margin-bottom:14px;}
.hero h1{margin-bottom:20px;}
.hero p.lede{font-size:1.08rem;color:#D8DAE0;max-width:52ch;margin-bottom:32px;}
.hero-ctas{display:flex;gap:14px;flex-wrap:wrap;}
.hero-diagram{width:100%;height:auto;}

@media (max-width:860px){
  .hero .container{grid-template-columns:1fr;}
  .hero-diagram{max-width:380px;margin:0 auto;}
}

.page-hero{
  background:var(--navy);color:var(--white);padding:64px 0 48px;
}
.page-hero .hero-grid{
  display:grid;grid-template-columns:1.15fr .85fr;gap:40px;align-items:center;
}
.page-hero .hero-diagram{width:100%;height:auto;max-width:380px;}
@media (max-width:860px){
  .page-hero .hero-grid{grid-template-columns:1fr;}
  .page-hero .hero-diagram{max-width:280px;margin:0 auto;}
}
.page-hero .eyebrow{color:var(--red);font-weight:600;font-size:.82rem;margin-bottom:10px;}
.page-hero p{color:#C9CFDA;max-width:62ch;font-size:1.02rem;}
.breadcrumb{font-size:.82rem;color:#9FA8B8;margin-bottom:18px;}
.breadcrumb a:hover{color:var(--white);}
.breadcrumb span{margin:0 6px;}

/* ---------- Sections ---------- */
section{padding:72px 0;}
.section-tight{padding:48px 0;}
.section-alt{background:var(--offwhite);}
.section-dark{background:var(--navy);color:var(--white);}
.section-head{max-width:64ch;margin-bottom:44px;}
.section-head .eyebrow{color:var(--red);font-weight:600;font-size:.82rem;margin-bottom:10px;}
.section-dark .eyebrow{color:#FF6A6F;}

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

.card{
  border:1px solid var(--line);
  padding:28px 24px;
  background:var(--white);
  position:relative;
}
.card::before{
  content:"";position:absolute;top:0;left:0;width:26px;height:3px;background:var(--red);
}
.card h3{margin-bottom:10px;}
.card p{color:var(--steel);font-size:.94rem;margin-bottom:16px;}
.card .card-link{font-size:.88rem;font-weight:600;color:var(--red);}
.card .card-link:hover{color:var(--red-dark);}

.stat-row{display:flex;gap:40px;flex-wrap:wrap;}
.stat{border-left:2px solid var(--red);padding-left:16px;}
.stat b{display:block;font-family:var(--font-head);font-size:1.6rem;}
.stat span{font-size:.85rem;color:var(--steel);}

.list-check li{
  position:relative;padding-left:26px;margin-bottom:12px;font-size:.96rem;
}
.list-check li::before{
  content:"";position:absolute;left:0;top:.5em;width:9px;height:9px;background:var(--red);
}

/* ---------- Spec / data tables ---------- */
.spec-table{width:100%;border-collapse:collapse;font-family:var(--font-mono);font-size:.86rem;margin:20px 0;}
.spec-table caption{text-align:left;font-family:var(--font-body);font-weight:600;margin-bottom:8px;caption-side:top;}
.spec-table th,.spec-table td{
  border:1px solid var(--line);padding:10px 12px;text-align:left;
}
.spec-table th{background:var(--offwhite);font-weight:600;font-family:var(--font-body);}
.spec-table td.num{text-align:right;}
.table-scroll{overflow-x:auto;}

.disclaimer{
  border-left:3px solid var(--steel);
  background:var(--offwhite);
  padding:16px 20px;
  font-size:.86rem;
  color:var(--steel);
  margin:28px 0;
}

.product-meta{display:grid;grid-template-columns:repeat(2,1fr);gap:10px 30px;margin:24px 0;font-size:.92rem;}
.product-meta dt{color:var(--steel);font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;}
.product-meta dd{margin:2px 0 0;font-weight:600;}
@media (max-width:640px){.product-meta{grid-template-columns:1fr;}}

/* ---------- CTA band ---------- */
.cta-band{
  background:var(--red);color:var(--white);text-align:center;padding:56px 24px;
}
.cta-band h2{color:var(--white);}
.cta-band .btn-outline-light{border-color:rgba(255,255,255,.7);}

/* ---------- Forms ---------- */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
.form-grid .full{grid-column:1/-1;}
@media (max-width:700px){.form-grid{grid-template-columns:1fr;}}
label{display:block;font-size:.85rem;font-weight:600;margin-bottom:6px;}
input[type=text],input[type=email],input[type=tel],input[type=date],input[type=number],select,textarea{
  width:100%;padding:11px 12px;border:1px solid var(--line);font-family:var(--font-body);font-size:.95rem;background:var(--white);
}
textarea{resize:vertical;min-height:110px;}
.field-note{font-size:.78rem;color:var(--steel);margin-top:4px;}
.consent{display:flex;align-items:flex-start;gap:10px;font-size:.86rem;color:var(--steel);}
.consent input{margin-top:3px;}
.form-success{background:#EAF6EC;border:1px solid #BFE3C4;color:#1E5A2A;padding:16px 20px;font-size:.92rem;margin-bottom:24px;}
.form-error{background:#FBEAEA;border:1px solid #EFC0C0;color:#7A1A1A;padding:16px 20px;font-size:.92rem;margin-bottom:24px;}

/* ---------- Footer ---------- */
.site-footer{background:var(--charcoal);color:#C7CBD1;padding:64px 0 28px;}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;margin-bottom:44px;}
.footer-brand img{height:34px;margin-bottom:14px;}
.footer-brand p{font-size:.88rem;color:#9BA1AA;max-width:34ch;}
.site-footer h4{color:var(--white);font-size:.82rem;text-transform:uppercase;letter-spacing:.05em;margin-bottom:14px;font-family:var(--font-body);}
.site-footer ul li{margin-bottom:9px;font-size:.9rem;}
.site-footer a:hover{color:var(--white);}
.footer-bottom{
  border-top:1px solid var(--line-dark);
  padding-top:22px;
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;
  font-size:.8rem;color:#8A909A;
}
@media (max-width:860px){.footer-grid{grid-template-columns:1fr 1fr;}}
@media (max-width:520px){.footer-grid{grid-template-columns:1fr;}}

/* ---------- Industry / applications list ---------- */
.industry-row{
  display:grid;grid-template-columns:280px 1fr;gap:32px;
  padding:32px 0;border-top:1px solid var(--line);
}
.industry-row:last-child{border-bottom:1px solid var(--line);}
.industry-row h3{margin-bottom:4px;}
@media (max-width:700px){.industry-row{grid-template-columns:1fr;gap:12px;}}

/* ---------- Resources ---------- */
.resource-filter{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:32px;}
.resource-filter button{
  background:var(--white);border:1px solid var(--line);padding:8px 16px;font-size:.85rem;cursor:pointer;font-family:var(--font-body);
}
.resource-filter button.active,.resource-filter button:hover{border-color:var(--charcoal);background:var(--charcoal);color:var(--white);}
.resource-item{
  display:flex;justify-content:space-between;align-items:center;gap:20px;
  border:1px solid var(--line);padding:20px 22px;margin-bottom:14px;
}
.resource-item .tag{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--steel);margin-bottom:4px;display:block;}
.resource-item h3{font-size:1.02rem;margin-bottom:0;}
@media (max-width:600px){.resource-item{flex-direction:column;align-items:flex-start;}}

/* utility */
.mt-0{margin-top:0;}
.text-steel{color:var(--steel);}
.small{font-size:.85rem;}
