/* =========================================================
   CS LAW — Columbia Square Law Office
   Faithful rebuild of the original cslaw.ca homepage.
   Fonts:  Playfair Display (headings) + Open Sans (body)
   Brand:  navy #002741 · services blue #00548E · accent #27A5EA
           gold logo gradient · grays #4a4a4a / #474c4c
   ========================================================= */

:root {
  --navy:        #002741;
  --services:    #00548E;
  --blue:        #27A5EA;
  --blue-dark:   #1f8fcf;
  --blue-rule:   #289CDC;
  --gold:        #b8924e;

  --text:        #4a4a4a;
  --text-2:      #474c4c;
  --line:        #cbcbcb;
  --card-border: #dedede;

  --bg:          #ffffff;
  --footer:      #002741;
  --footer-2:    #00203a;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --maxw: 1180px;
  --header-h: 90px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s, opacity .2s; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); margin: 0; font-weight: 700; }
p { margin: 0 0 1.2rem; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 90px 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- buttons (blue, square, uppercase, dark text — as original) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--navy);
  font-family: var(--sans); font-weight: 700; font-size: 1rem;
  letter-spacing: .03em; text-transform: uppercase;
  padding: 15px 32px; border: 2px solid var(--blue); border-radius: 0;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s;
  min-width: 150px;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--navy); transform: translateY(-2px); }

/* =========================================================
   HEADER — solid white bar, colour logo, navy nav, blue accent bar
   ========================================================= */
.site-header {
  position: sticky; top: 0; left: 0; right: 0; z-index: 100;
  background: #fff;
  transition: box-shadow .3s ease, padding .3s ease;
  padding: 18px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { height: 54px; width: auto; transition: height .3s ease; }

.main-nav { display: flex; align-items: center; gap: 38px; }
.nav-list { display: flex; align-items: center; gap: 34px; }
.nav-list a {
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  color: var(--navy); padding: 4px 0;
}
.nav-list a:hover { color: var(--blue); }

/* the thin blue brand bar to the right of the menu */
.nav-accent-bar { display: block; width: 120px; height: 2px; background: var(--blue); }

.site-header.scrolled { box-shadow: 0 6px 22px rgba(0,39,65,.10); padding: 12px 0; }
.site-header.scrolled .brand-logo { height: 46px; }

/* hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--navy); border-radius: 2px; transition: all .3s ease; }

/* =========================================================
   HERO BANNER
   ========================================================= */
.page-banner {
  position: relative; overflow: hidden;
  min-height: 560px; display: flex; align-items: center;
  padding: 90px 0; color: #fff; background: #afafaf;
}
.banner-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center right;
}
.banner-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(3,58,104,.94) 0%,
      rgba(4,60,107,.78) 28%,
      rgba(5,52,93,.50) 55%,
      rgba(6,38,67,.26) 80%,
      rgba(6,33,58,.10) 100%),
    linear-gradient(180deg, rgba(0,30,55,.10), rgba(0,25,45,.35));
}
.page-banner .container { position: relative; z-index: 2; }
.banner-content { max-width: 560px; }
.banner-title {
  color: #fff; font-weight: 700;
  font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.25rem); line-height: 1.12;
  text-shadow: 0 2px 24px rgba(0,0,0,.22);
}
.banner-underline { display: block; height: 3px; width: 82px; background: var(--blue-rule); margin: 26px 0; }
.banner-underline.center { margin-left: auto; margin-right: auto; }
.page-banner p {
  color: #fff; font-weight: 600; font-size: clamp(1.1rem, 1rem + .55vw, 1.4rem);
  max-width: 460px; margin-bottom: 30px;
}
.banner-button { box-shadow: 0 10px 26px rgba(0,0,0,.18); }

/* =========================================================
   CS LAW (ABOUT)
   ========================================================= */
.about { background: #fff; }
.about-grid { display: grid; grid-template-columns: 4fr 7fr; gap: 0; align-items: start; }
.global-heading {
  color: var(--navy); font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.1rem); line-height: 1.2;
  letter-spacing: .02em;
}
.about-body {
  position: relative; padding-left: 56px; margin-left: 56px;
}
.about-body::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 1px; background: var(--line);
}
.about-body .intro {
  color: var(--navy); font-weight: 700; font-family: var(--sans);
  font-size: clamp(1.2rem, 1.05rem + .5vw, 1.5rem); line-height: 1.45; margin-bottom: 1.4rem;
}
.about-body p { color: var(--text); }

/* =========================================================
   SERVICES (BLUE) with side image
   ========================================================= */
.services {
  position: relative; background: var(--services); color: #fff; overflow: hidden;
}
.services-grid { display: block; padding: 86px 28px 86px; }
.services-content { max-width: 520px; position: relative; z-index: 2; }
.services-heading { color: #fff; font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 2.2vw, 2.9rem); }
.services .banner-underline { background: #cfe6f6; }
.services-content > p {
  color: #fff; font-family: var(--sans); font-weight: 600; font-size: 1.18rem; line-height: 1.7;
}
.services-list { margin: 4px 0 30px; columns: 1; }
.services-list li {
  position: relative; padding-left: 22px; margin-bottom: 11px;
  color: #fff; font-weight: 600; font-size: 1.06rem; line-height: 1.45;
}
.services-list li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: #bfe0f5;
}
.services-button { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.services-button:hover { background: #fff; border-color: #fff; color: var(--services); }

/* image pinned to the right half */
.services-image {
  position: absolute; top: 0; right: 0; width: 42%; height: 100%;
  background-size: cover; background-position: center;
}
.services-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--services) 0%, rgba(0,84,142,.35) 22%, rgba(0,84,142,0) 55%);
}

/* =========================================================
   LATEST POSTS
   ========================================================= */
.blog { background: #fff; }
.blog-head { text-align: center; margin-bottom: 52px; }
.latest-heading { color: var(--navy); font-size: clamp(2.2rem, 1.6rem + 2.2vw, 2.9rem); }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.post-wrapper {
  display: flex; flex-direction: column; justify-content: space-between;
  background: #fff; border: 6px solid var(--card-border);
  padding: clamp(32px, 2rem + 1.5vw, 54px); transition: border-color .25s, box-shadow .25s, transform .25s;
}
.post-wrapper:hover { border-color: var(--blue); box-shadow: 0 18px 44px rgba(0,39,65,.10); transform: translateY(-4px); }
.hp-loop-title { margin: 0 0 14px; }
.hp-loop-title a {
  color: var(--services); font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.25;
}
.hp-loop-title a:hover { color: var(--blue); }
.post-wrapper > p { color: var(--text-2); font-weight: 300; font-size: 1.15rem; line-height: 1.6; }
.loop-post-right-align { text-align: right; margin-top: 10px; }
.read-more {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--blue); font-family: var(--sans); font-weight: 700; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.read-more svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.read-more:hover { opacity: .8; }
.read-more:hover svg { transform: translateX(4px); }

/* =========================================================
   PRE-FOOTER CALLOUT (blue, white inset border)
   ========================================================= */
.pre-footer-global-callout-wrapper { background: #fff; padding: 0 0 70px; }
.pre-footer-global-callout {
  position: relative; width: min(95%, 1180px); margin: 0 auto;
  background: var(--services);
  background-image:
    radial-gradient(circle at 82% 18%, rgba(39,165,234,.35), transparent 46%),
    linear-gradient(120deg, #013a66 0%, #00548E 100%);
  color: #fff; text-align: center; padding: 70px 24px;
}
.pre-footer-global-callout::before {
  content: ""; position: absolute; inset: 24px; border: 1px solid rgba(255,255,255,.85); pointer-events: none;
}
.callout-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.global-callout-heading {
  font-family: var(--serif); font-weight: 700; color: #fff;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); margin: 0;
}
.pre-footer-global-callout .callout-sub { color: #fff; font-size: 1.2rem; line-height: 1.65; margin-bottom: 30px; }
.pre-footer-global-callout .btn { background: var(--blue); border-color: var(--blue); color: var(--navy); }
.pre-footer-global-callout .btn:hover { background: #fff; border-color: #fff; color: var(--services); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--footer); color: rgba(255,255,255,.8); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 3fr 7fr; gap: 40px; padding-bottom: 56px; }
.footer-logo { height: 60px; width: auto; }

.footer-menu { display: flex; flex-wrap: wrap; gap: 30px; }
.footer-menu a { color: #fff; font-weight: 600; font-size: 1.02rem; }
.footer-menu a:hover { color: var(--blue); }
.footer-nav-underline { height: 2px; width: 100%; max-width: 520px; background: rgba(255,255,255,.18); margin: 16px 0 24px; }

.footer-address .address { color: rgba(255,255,255,.82); font-style: normal; margin-bottom: 14px; }
.footer-contact-lists p { margin: 0 0 6px; color: rgba(255,255,255,.82); }
.footer-contact-lists a { color: rgba(255,255,255,.82); }
.footer-contact-lists a:hover { color: var(--blue); }
.fax-number { color: rgba(255,255,255,.55) !important; }

.social-lists { display: flex; gap: 12px; margin-top: 22px; }
.social-lists a {
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.10);
  display: grid; place-items: center; transition: background .2s, transform .2s;
}
.social-lists svg { width: 20px; height: 20px; fill: rgba(255,255,255,.85); }
.social-lists a:hover { background: var(--blue); transform: translateY(-3px); }
.social-lists a:hover svg { fill: #fff; }

.footer-copyright { background: var(--footer-2); padding: 20px 0; }
.footer-copyright-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-copyright { margin: 0; font-size: .9rem; color: rgba(255,255,255,.6); }
.privacy-menu { display: flex; gap: 22px; }
.privacy-menu a { color: rgba(255,255,255,.6); font-size: .9rem; }
.privacy-menu a:hover { color: var(--blue); }

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .services-image { width: 50%; }
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .section { padding: 64px 0; }
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 330px);
    background: var(--navy); flex-direction: column; align-items: flex-start;
    gap: 0; padding: calc(var(--header-h) + 22px) 32px 32px;
    transform: translateX(100%); transition: transform .32s ease;
    box-shadow: -20px 0 60px rgba(0,0,0,.3);
  }
  .main-nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; }
  .nav-list li { width: 100%; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-list a { display: block; color: #fff; padding: 16px 0; font-size: 1.08rem; }
  .nav-accent-bar { display: none; }

  body.menu-open { overflow: hidden; }
  body.menu-open .nav-toggle span { background: #fff !important; }
  body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* About: stack, divider becomes a top rule */
  .about-grid { grid-template-columns: 1fr; gap: 22px; }
  .about-body { padding-left: 0; margin-left: 0; padding-top: 24px; }
  .about-body::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; }

  /* Services: stack content over a banner image */
  .services-grid { padding: 56px 28px; }
  .services-content { max-width: none; }
  .services-image { position: relative; width: 100%; height: 260px; }
  .services-image::after { background: linear-gradient(180deg, rgba(0,84,142,.35), rgba(0,84,142,0) 40%); }

  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 540px) {
  body { font-size: 16px; }
  .page-banner { min-height: 480px; }
  .banner-content { max-width: none; }
  .footer-copyright-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
