/* ============================================================
   ImProWise Solutions — improwise.ca  ·  PREMIUM BUILD v2
   Dark-first cinematic design on locked brand tokens.
   Orange #F18A1A · Charcoal #2D3033 · Steel #6B6F73
   Silver #B5B9BC · Off-white #FAFAFA · Montserrat / Inter
   ============================================================ */

:root {
  --orange: #F18A1A;
  --orange-bright: #FFA53F;
  --orange-dark: #D97810;
  --orange-glow: rgba(241, 138, 26, 0.35);
  --charcoal: #2D3033;
  --char-deep: #1C1E21;
  --char-deeper: #141618;
  --steel: #6B6F73;
  --silver: #B5B9BC;
  --offwhite: #FAFAFA;
  --white: #FFFFFF;
  --line-dark: rgba(255,255,255,0.09);
  --line-light: #E6E7E8;
  --glass: rgba(255,255,255,0.045);

  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --maxw: 1180px;
  --radius: 10px;
  --notch: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--char-deep);
  color: var(--offwhite);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--orange-bright); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Type system ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 5.8vw, 4.4rem); font-weight: 800; letter-spacing: -1.5px; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 800; letter-spacing: -0.8px; }
h3 { font-size: 1.25rem; font-weight: 700; }

.grad-text {
  background: linear-gradient(100deg, var(--orange-bright), var(--orange) 55%, #FFC97E);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: linear-gradient(90deg, var(--orange), transparent); }

.lead { font-size: 1.14rem; color: var(--silver); max-width: 700px; }

/* ---------- Scroll progress ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--orange), var(--orange-bright));
  z-index: 200;
  box-shadow: 0 0 12px var(--orange-glow);
}

/* ---------- Cursor glow (desktop) ---------- */
.cursor-glow {
  position: fixed; left: 0; top: 0;
  width: 480px; height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241,138,26,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .4s;
}
body.cursor-on .cursor-glow { opacity: 1; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(20, 22, 24, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-dark);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; color: var(--white); letter-spacing: -0.4px; position: relative; z-index: 2; }
.logo .wise { color: var(--orange); }
.logo small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.58rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--silver); }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav > a {
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 600;
  color: var(--offwhite); padding: 8px 0; position: relative;
}
.main-nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--orange); transition: width .25s ease;
}
.main-nav > a:not(.btn):hover::after, .main-nav > a.active::after { width: 100%; }
.main-nav > a.active { color: var(--orange-bright); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; position: relative; z-index: 2; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 9px; width: 26px; height: 2.5px;
  background: var(--offwhite); transition: transform .22s, opacity .22s; border-radius: 2px;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -8px; }
.nav-toggle span::after { left: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.03em; padding: 16px 34px; border: 0; cursor: pointer;
  position: relative; overflow: hidden; border-radius: 4px;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}
.btn::before { /* shine sweep */
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg); transition: left .55s ease;
}
.btn:hover::before { left: 130%; }
.btn-primary { background: linear-gradient(120deg, var(--orange-bright), var(--orange)); color: var(--char-deeper); box-shadow: 0 6px 28px var(--orange-glow); }
.btn-primary:hover { box-shadow: 0 10px 40px rgba(241,138,26,0.5); }
.btn-ghost { background: var(--glass); color: var(--offwhite); box-shadow: inset 0 0 0 1.5px var(--line-dark); backdrop-filter: blur(6px); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--orange); color: var(--orange-bright); }
.main-nav .btn { padding: 11px 24px; font-size: 0.84rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media img.poster { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 22% 40%, rgba(20,22,24,0.88) 30%, rgba(20,22,24,0.55) 65%, rgba(20,22,24,0.35)),
    linear-gradient(to top, var(--char-deep) 2%, transparent 30%);
}
.hero-inner { position: relative; z-index: 2; padding: 150px 0 110px; max-width: 860px; }

.hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--orange-bright);
  padding: 10px 18px; border: 1px solid rgba(241,138,26,0.35); border-radius: 100px;
  background: rgba(241,138,26,0.07); margin-bottom: 30px;
}
.hero .kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }

.hero h1 { color: var(--white); margin-bottom: 26px; }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(34px) rotate(2deg); }
html.js .hero h1 .w.up { animation: wordUp .7s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes wordUp { to { opacity: 1; transform: none; } }
html:not(.js) .hero h1 .w { opacity: 1; transform: none; }

.hero p.sub { font-size: 1.18rem; color: var(--silver); max-width: 620px; margin-bottom: 42px; }
.hero-ctas { display: flex; gap: 18px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 44px; border: 2px solid rgba(255,255,255,0.3);
  border-radius: 16px; display: flex; justify-content: center;
}
.scroll-cue::after { content: ""; width: 4px; height: 9px; background: var(--orange); border-radius: 3px; margin-top: 8px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Stats strip ---------- */
.stats { border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); background: rgba(255,255,255,0.015); position: relative; z-index: 2; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 44px 24px; text-align: center; border-left: 1px solid var(--line-dark); }
.stat:first-child { border-left: 0; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 3.6vw, 2.9rem); color: var(--white); }
.stat .num .accent { color: var(--orange); }
.stat .lbl { font-size: 0.84rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel); margin-top: 6px; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 26px 0; border-bottom: 1px solid var(--line-dark); position: relative; z-index: 2; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--steel);
  display: flex; align-items: center; gap: 56px; white-space: nowrap;
}
.marquee span::after { content: "◆"; color: var(--orange); font-size: 0.6rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; z-index: 2; }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head.center .lead { margin: 14px auto 0; }

.section-light { background: var(--offwhite); color: var(--charcoal); }
.section-light h2, .section-light h3 { color: var(--charcoal); }
.section-light .lead, .section-light p { color: var(--steel); }
.section-light::before { /* angled top divider */
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 70px;
  background: var(--char-deep);
  clip-path: polygon(0 0, 100% 0, 100% 18%, 0 100%);
}
.section-light.flip-divider::before { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 18%); }
.section-light .inner-pad { padding-top: 50px; }

/* ---------- Glass cards / tilt ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.glass-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 38px 32px 34px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color .25s, box-shadow .25s;
  --mx: 50%; --my: 50%;
}
.glass-card::before { /* notch */
  content: ""; position: absolute; top: 0; left: 0;
  border-top: var(--notch) solid var(--orange);
  border-right: var(--notch) solid transparent;
  filter: drop-shadow(0 0 8px var(--orange-glow));
}
.glass-card::after { /* pointer-follow glow */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(241,138,26,0.12), transparent 45%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.glass-card:hover { border-color: rgba(241,138,26,0.45); box-shadow: 0 18px 50px rgba(0,0,0,0.45); }
.glass-card:hover::after { opacity: 1; }

.glass-card .icon {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, rgba(241,138,26,0.22), rgba(241,138,26,0.06));
  border: 1px solid rgba(241,138,26,0.35); border-radius: 12px; margin-bottom: 22px;
}
.glass-card .icon svg { width: 25px; height: 25px; stroke: var(--orange-bright); }
.glass-card h3 { color: var(--white); margin-bottom: 12px; }
.glass-card p { color: var(--silver); font-size: 0.97rem; }
.glass-card ul { margin: 14px 0 0 18px; color: var(--silver); font-size: 0.94rem; }
.glass-card ul li { margin-bottom: 6px; }
.glass-card ul li::marker { color: var(--orange); }
.card-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; color: var(--orange-bright); }
.card-link svg { width: 16px; height: 16px; stroke: currentColor; transition: transform .2s; }
.glass-card:hover .card-link svg { transform: translateX(5px); }

/* Light-section card variant */
.section-light .glass-card { background: var(--white); border-color: var(--line-light); }
.section-light .glass-card h3 { color: var(--charcoal); }
.section-light .glass-card p, .section-light .glass-card ul { color: var(--steel); }
.section-light .glass-card:hover { box-shadow: 0 18px 50px rgba(45,48,51,0.12); }

/* ---------- Practice pillars ---------- */
.pillar-card { padding: 48px 42px; }
.pillar-card h3 { font-size: 1.55rem; margin-bottom: 14px; }
.pillar-card .taglist { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.taglist span {
  font-family: var(--font-display); font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.05em; padding: 8px 15px; border: 1px solid var(--line-dark);
  border-radius: 100px; color: var(--silver); background: var(--glass);
}
.pillar-card:hover .taglist span { border-color: rgba(241,138,26,0.4); }

/* ---------- Value items ---------- */
.value-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.value-item { position: relative; padding: 26px 0 0; }
.value-item::before { content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 3px; background: linear-gradient(90deg, var(--orange), transparent); }
.value-item h3 { font-size: 1.04rem; margin-bottom: 8px; }
.value-item p { font-size: 0.93rem; }

/* ---------- Process timeline ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.process::before { content: ""; position: absolute; top: 58px; left: 6%; right: 6%; height: 1px; background: linear-gradient(90deg, transparent, var(--line-dark) 15%, var(--line-dark) 85%, transparent); }
.step { text-align: left; padding: 30px 26px; }
.step .step-num {
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem;
  background: linear-gradient(180deg, var(--orange-bright), var(--orange-dark));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: block; margin-bottom: 12px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--white); }
.step p { color: var(--silver); font-size: 0.92rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-media { position: absolute; inset: 0; }
.cta-media video { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.cta-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 100% at 50% 50%, rgba(20,22,24,0.55), rgba(20,22,24,0.92)); }
.cta-inner { position: relative; z-index: 2; padding: 110px 0; text-align: center; }
.cta-inner h2 { color: var(--white); max-width: 720px; margin: 0 auto 16px; }
.cta-inner p { color: var(--silver); max-width: 540px; margin: 0 auto 38px; }

/* ---------- Founders ---------- */
.founder-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.founder-card .role { font-family: var(--font-display); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange-bright); margin-bottom: 6px; }
.founder-card h3 { font-size: 1.4rem; }
.founder-card .contact-line { margin-top: 18px; font-size: 0.93rem; display: grid; gap: 4px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.contact-info-block { margin-bottom: 30px; }
.contact-info-block h3 { font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange-bright); margin-bottom: 8px; }
.contact-info-block p, .contact-info-block a { color: var(--silver); font-size: 0.99rem; }
.contact-info-block a:hover { color: var(--orange-bright); }

.contact-form { padding: 42px 38px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 8px; color: var(--offwhite); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 14px 16px; font-family: var(--font-body); font-size: 0.97rem;
  color: var(--offwhite); background: rgba(255,255,255,0.05);
  border: 1px solid var(--line-dark); border-radius: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.form-field select option { color: var(--charcoal); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(241,138,26,0.18);
}
.map-embed { margin-top: 70px; border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
.map-embed iframe { width: 100%; height: 400px; border: 0; display: block; filter: grayscale(35%) contrast(1.02); }

/* ---------- Page hero (interior) ---------- */
.page-hero { position: relative; overflow: hidden; min-height: 56vh; display: flex; align-items: flex-end; }
.page-hero .hero-media::after {
  background:
    radial-gradient(110% 100% at 25% 55%, rgba(20,22,24,0.9) 35%, rgba(20,22,24,0.5)),
    linear-gradient(to top, var(--char-deep) 4%, transparent 40%);
}
.page-hero-inner { position: relative; z-index: 2; padding: 170px 0 78px; max-width: 820px; }
.page-hero h1 { color: var(--white); margin-bottom: 16px; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.page-hero p { color: var(--silver); font-size: 1.12rem; max-width: 640px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--char-deeper); color: var(--silver); padding: 80px 0 30px; font-size: 0.93rem; border-top: 1px solid var(--line-dark); position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 50px; border-bottom: 1px solid var(--line-dark); }
.site-footer h4 { color: var(--offwhite); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer a { color: var(--silver); display: block; margin-bottom: 10px; transition: color .15s, transform .15s; }
.site-footer a:hover { color: var(--orange-bright); transform: translateX(3px); }
.footer-brand p { margin-top: 14px; max-width: 280px; }
.footer-tagline { color: var(--orange); font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 20px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; font-size: 0.84rem; color: var(--steel); }

/* ---------- Reveal system ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero h1 .w { opacity: 1 !important; transform: none !important; }
  .cursor-glow, .scroll-cue { display: none; }
  .marquee-track { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .value-row, .process { grid-template-columns: repeat(2, 1fr); }
  .process::before { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--line-dark); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cursor-glow { display: none; }
}
@media (max-width: 700px) {
  .grid-3, .grid-2, .founder-grid, .value-row, .process { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-inner { padding: 130px 0 90px; }
  .section { padding: 80px 0; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: fixed; inset: 0; z-index: 1;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 6px; background: rgba(20,22,24,0.97); backdrop-filter: blur(16px); padding: 0 32px;
  }
  .main-nav.open { display: flex; }
  .main-nav > a { font-size: 1.5rem; padding: 14px 0; }
  .main-nav .btn { margin-top: 24px; font-size: 1rem; padding: 16px 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
