/* maplelaw blog — standalone stylesheet for the Django-rendered marketing blog.
   Mirrors the SPA's public-page tokens (frontend/src/styles.css): ivory
   #FAFAF9 background, ink #0F0E0D, bone #F2F1F0 panels, muted #706D66, with a
   warm-neutral ramp and no chromatic accent. The marketing pages are
   light-only by design, so there is no dark override.

   Fonts are self-hosted rather than pulled from a CDN: these pages argue that
   client material should not leave Canadian infrastructure, so shipping
   visitor IPs to a font host would undercut the point. Files and their OFL
   licences live in ./fonts/, copied from the same @fontsource packages the
   SPA bundles. */

@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/archivo-latin-wght-normal.cd56e2ec63d7.woff2") format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/archivo-latin-ext-wght-normal.c5e41aa17045.woff2")
    format("woff2-variations");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("./fonts/newsreader-latin-opsz-normal.f94a697b1650.woff2")
    format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("./fonts/newsreader-latin-ext-opsz-normal.2e01db0610b1.woff2")
    format("woff2-variations");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #fafaf9;
  --fg: #0f0e0d;
  --fg-soft: #33312c;
  --muted: #706d66;
  --panel: #f2f1f0;
  --line: #e5e5e3;
  --line-strong: #cccac6;
  --accent: #0f0e0d;
  --accent-soft: #e5e5e3;
  --radius: 0.5rem;
  --font-sans:
    "Archivo Variable", ui-sans-serif, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-display:
    "Newsreader Variable", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgb(26 22 20 / 25%) transparent;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- header / footer ---------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgb(250 250 249 / 85%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.15s ease;
}

.nav-link:hover {
  opacity: 0.6;
}

.nav-link[aria-current="page"] {
  color: var(--muted);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  padding: 0 1rem;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.cta-button:hover {
  opacity: 0.85;
}

.cta-button--large {
  height: 2.75rem;
  padding: 0 1.5rem;
  font-size: 0.9375rem;
}

.site-footer {
  background: var(--panel);
  margin-top: 5rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-row p {
  margin: 0;
}

.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.footer-row a {
  color: var(--fg-soft);
  transition: opacity 0.15s ease;
}

.footer-row a:hover {
  opacity: 0.6;
}

/* --- blog index ---------------------------------------------------------- */

.blog-hero {
  padding: 3.5rem 0 2.5rem;
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-size: 2.625rem;
  font-weight: 400;
  letter-spacing: -0.0125em;
  line-height: 1.05;
  margin: 0 0 1rem;
  font-variation-settings: "opsz" 72;
}

.blog-hero p {
  color: var(--fg-soft);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin: 0;
  max-width: 36rem;
}

.blog-hero .eyebrow {
  margin-bottom: 1rem;
}

.post-list {
  display: grid;
  gap: 0;
  padding-bottom: 1rem;
  border-top: 1px solid var(--line);
}

.post-card {
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0;
}

.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -0.0125em;
  line-height: 1.3;
  margin: 0.5rem 0 0.5rem;
  font-variation-settings: "opsz" 72;
}

.post-card h2 a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

.post-card h2 a:hover {
  text-decoration-color: var(--line-strong);
}

.post-description {
  color: var(--fg-soft);
  margin: 0 0 1rem;
}

.read-more {
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.read-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-meta {
  color: var(--muted);
  font-size: 0.8125rem;
  margin: 0;
}

.draft-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--accent);
  color: #a86a3c;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- post page ----------------------------------------------------------- */

.breadcrumb {
  padding: 2rem 0 0;
  font-size: 0.8125rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--fg);
}

.post-header {
  padding: 1.75rem 0 0.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.post-header h1 {
  font-family: var(--font-display);
  font-size: 2.375rem;
  font-weight: 400;
  letter-spacing: -0.0125em;
  line-height: 1.1;
  margin: 0.75rem 0 1rem;
  font-variation-settings: "opsz" 72;
}

.post-lede {
  color: var(--fg-soft);
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.post-tags {
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
}

/* --- article prose -------------------------------------------------------- */

.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--fg);
  padding-bottom: 1rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 2.75rem 0 0.75rem;
}

.prose h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.prose a:hover {
  text-decoration-color: var(--fg);
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose li > p {
  margin-bottom: 0.5rem;
}

.prose strong {
  font-weight: 600;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--fg-soft);
  font-size: 1.0625rem;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--panel);
  padding: 0.125rem 0.375rem;
}

.prose pre {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose figure {
  margin: 2rem 0;
}

.prose figcaption {
  color: var(--muted);
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 600;
  background: var(--panel);
  white-space: nowrap;
}

.prose .footnote,
.prose .footnotes {
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-top: 1rem;
  font-size: 0.875rem;
  color: var(--fg-soft);
}

.prose .footnotes ol {
  padding-left: 1.25rem;
}

.prose sup {
  line-height: 0;
}

/* --- editorial callouts (key takeaways, FAQ, sources) ----------------------- */

.prose .key-takeaways {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.25rem;
}

.prose .key-takeaways .eyebrow {
  margin: 0 0 0.6rem;
}

.prose .key-takeaways ul {
  margin: 0;
  padding-left: 1.2rem;
}

.prose .key-takeaways li {
  margin-bottom: 0.55rem;
  font-size: 1rem;
}

.prose .key-takeaways li:last-child {
  margin-bottom: 0;
}

/* FAQ answers sit tight under their question so each pair reads as one unit. */
.prose h3 + p {
  margin-top: 0;
}

/* --- CTA panel / more posts ------------------------------------------------ */

.cta-panel {
  background: var(--panel);
  padding: 2.5rem 2rem;
  margin: 3rem 0;
  text-align: center;
}

.cta-panel .eyebrow {
  margin-bottom: 0.75rem;
}

.cta-panel h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: -0.0125em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  font-variation-settings: "opsz" 72;
}

.cta-panel p {
  color: var(--fg-soft);
  max-width: 34rem;
  margin: 0 auto 1.5rem;
}

.cta-panel .cta-fineprint {
  color: var(--muted);
  font-size: 0.8125rem;
  margin: 1rem 0 0;
}

.cta-panel .cta-fineprint a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.more-posts {
  padding-bottom: 1rem;
}

.more-posts h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.more-posts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.more-posts li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.more-posts a {
  color: var(--fg);
  font-weight: 500;
}

.more-posts a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  /* Family and optical size are already set on the base rules. */
  .blog-hero h1 {
    font-size: 2rem;
  }

  .post-header h1 {
    font-size: 1.75rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav .nav-link:nth-child(2),
  .site-nav .nav-link:nth-child(3) {
    display: none;
  }

  .cta-panel {
    padding: 2rem 1.25rem;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
