/* ═══════════════════════════════════════════════════════════════
   BLOG.CSS — /blog (index + article pages) page-scoped redesign
   layer, loaded after styles.min.css. Brings the blog into the same
   visual language as the rest of the redesign: Big Shoulders Display
   type, orange accent, black atmosphere + grain, plus the index and
   article layouts that scripts/build-blog.mjs writes out.
   ═══════════════════════════════════════════════════════════════ */

body {
  --cream: #F3ECDF;
  --accent: var(--orange);
  --ink: #0c0a08;
  --display: 'Russo One', system-ui, sans-serif;
  --mono: 'Space Mono', 'Space Grotesk', monospace;
  --max: 100%;
  background: #000 !important;
  background-image: none !important;
  color: var(--cream);
}
body::after {
  display: block !important; content: ''; position: fixed; inset: 0; z-index: -1;
  pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 10% 8%, rgba(247,147,30,.16), transparent),
    radial-gradient(ellipse 50% 38% at 92% 14%, rgba(233,30,99,.14), transparent),
    radial-gradient(ellipse 55% 42% at 50% 88%, rgba(47,167,167,.12), transparent);
}
main, .footer { color: var(--cream); }
main p { color: rgba(243,236,223,.62); }

/* Shared --max (1140px) caps this page's sections — uncap so it matches
   the full-width redesigned pages elsewhere on the site. */
.wrap { max-width: 100%; }

main h1, main h2 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  letter-spacing: 0; color: var(--cream);
}
.eyebrow { color: var(--accent); }

/* ── NAV / FOOTER: match the new palette (mirrors web-design-calgary.css) ── */
.nav { background: transparent; border-bottom: 1px solid transparent; height: 96px; }
.nav.scrolled { background: rgba(0,0,0,.9); backdrop-filter: blur(16px); border-color: rgba(243,236,223,.1); }
.nav-inner { height: 96px; align-items: center; padding-left: clamp(12px, 2vw, 20px); }
.nav-brand img { height: 44px; width: 44px; }
.nav-brand-word { background: none; -webkit-text-fill-color: currentColor; color: var(--cream); font-family: var(--display); font-weight: 900; letter-spacing: .04em; }
.nav-links { gap: clamp(1rem, 3vw, 2.4rem); }
.nav-links a {
  display: flex; flex-direction: column; line-height: 1.05;
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(.85rem, 1.3vw, 1.05rem);
  color: rgba(243,236,223,.55);
}
.nav-links a span:first-child { color: rgba(243,236,223,.35); font-size: .8em; }
.nav-links a:hover, .nav-links a.active { color: var(--cream); }
.nav-links a:hover span:first-child, .nav-links a.active span:first-child { color: var(--accent); }
.nav-links a::after { display: none; }
.nav-cta { background: var(--accent); border: 1px solid var(--accent); padding: .6rem 1.2rem; font-family: var(--mono); text-transform: uppercase; font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--ink); transition: background .2s ease, color .2s ease; }
.nav-cta:hover { background: transparent; color: var(--cream); }
.footer { border-color: rgba(243,236,223,.1) !important; }
.footer-col-heading { font-family: var(--mono) !important; color: rgba(243,236,223,.5); }


/* The base stylesheet sets overflow-x: hidden on html and body, which turns
   body into a scroll container and stops the article rail from sticking.
   clip hides sideways overflow the same way without doing that. */
html:has(body.bl), body.bl { overflow-x: clip; }

/* ═══ SHARED ═══════════════════════════════════════════════════ */
.bl-wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.bl [data-c="orange"] { --c: var(--orange); --hatch: 60deg; }
.bl [data-c="red"]    { --c: var(--red);    --hatch: 115deg; }
.bl [data-c="mag"]    { --c: var(--mag);    --hatch: 135deg; }
.bl [data-c="teal"]   { --c: var(--teal);   --hatch: 45deg; }
.bl-tag { font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c, var(--orange)); }
.bl-meta { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(243,236,223,.45); }
.bl-link { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cream); border-bottom: 1px solid var(--c, var(--orange)); padding-bottom: .2rem; text-decoration: none; }
.bl-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1.4rem; border-top: 1px solid rgba(243,236,223,.1); margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.bl-sec-head .eyebrow-num { margin: 0; }
.bl main h2, .bl main h3 { text-transform: uppercase; color: var(--cream); margin: 0; }
.bl-btn { display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap;
  background-color: var(--orange);
  background-image: repeating-linear-gradient(60deg, rgba(0,0,0,.1) 0, rgba(0,0,0,.1) 1px, transparent 1px, transparent 5px);
  color: var(--ink); border: 1px solid var(--orange); padding: 1.1rem 2rem; text-decoration: none;
  font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transition: background-color .2s, color .2s; }
.bl-btn:hover { background-color: transparent; background-image: none; color: var(--cream); }

/* ═══ INDEX ════════════════════════════════════════════════════ */
.bl-head { display: grid; grid-template-columns: 1fr minmax(0, 340px); align-items: end; gap: 2rem;
  padding-top: calc(var(--nav, 70px) + clamp(4rem, 9vw, 7.5rem)); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.bl-head h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(3.4rem, 10vw, 8.5rem); line-height: .9; margin: 0; color: var(--cream); }
.bl-head p { margin: 0; font-size: 1rem; line-height: 1.65; }

/* bento: latest post large, the next two stacked beside it */
.bl-bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto auto; gap: clamp(10px, 1.4vw, 16px); margin-bottom: clamp(4rem, 9vw, 7rem); }
.bl-feature { grid-column: span 8; grid-row: span 2; position: relative; min-height: clamp(420px, 44vw, 620px); border-radius: clamp(14px, 2vw, 22px); overflow: hidden; display: flex; align-items: flex-end; text-decoration: none; background: #111; }
.bl-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.bl-feature::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.94) 100%); }
.bl-feature:hover img { transform: scale(1.03); }
.bl-feature-body { position: relative; z-index: 1; padding: clamp(1.5rem, 3.5vw, 3rem); max-width: 760px; }
.bl-feature h2 { font-size: clamp(1.9rem, 3.6vw, 3.2rem); line-height: 1; margin: .8rem 0 1rem !important; }
.bl-feature .bl-tag { display: inline-block; background: var(--c); color: var(--ink); padding: .35rem .6rem; }
.bl-feature p { color: rgba(243,236,223,.72); font-size: 1rem; line-height: 1.6; margin: 0 0 1.6rem; max-width: 56ch; }

.bl-solid { grid-column: span 4; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 260px;
  border-radius: clamp(14px, 2vw, 22px); padding: clamp(1.4rem, 2.4vw, 2rem); text-decoration: none; color: var(--ink);
  background-color: var(--c);
  background-image: repeating-linear-gradient(var(--hatch), rgba(0,0,0,.09) 0, rgba(0,0,0,.09) 1px, transparent 1px, transparent 6px); transition: transform .3s; }
.bl-solid:hover { transform: translateY(-3px); }
.bl-solid .bl-tag, .bl-solid .bl-meta, .bl main .bl-solid h3 { color: var(--ink); }
.bl-solid h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.05; }
.bl-solid .bl-meta { opacity: .7; display: flex; justify-content: space-between; }

.bl-card { display: flex; flex-direction: column; text-decoration: none; border-radius: clamp(14px, 2vw, 22px); overflow: hidden; background: #0e0f11; border: 1px solid rgba(243,236,223,.08); transition: border-color .25s; }
.bl-card:hover { border-color: var(--c); }
.bl-card.is-side { grid-column: span 4; }
.bl-card-img { aspect-ratio: 16 / 9; overflow: hidden; }
.bl-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.bl-card:hover .bl-card-img img { transform: scale(1.04); }
.bl-card-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.bl-card h3 { font-size: 1.12rem; line-height: 1.15; }
.bl-card .bl-meta { margin-top: auto; }

/* numbered list of every other post */
.bl-all { margin-bottom: clamp(4rem, 9vw, 7rem); }
.bl-list { list-style: none; margin: 0; padding: 0; }
.bl-row { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 13rem 9.5rem; gap: clamp(1rem, 2.5vw, 2.5rem); align-items: center;
  padding: clamp(1.4rem, 2.6vw, 2.2rem) 0; border-bottom: 1px solid rgba(243,236,223,.1); text-decoration: none; }
.bl-row-num { font-family: var(--mono); font-style: normal; font-weight: 700; font-size: .95rem; color: var(--c); }
.bl-row h3 { font-size: clamp(1.2rem, 2.2vw, 1.9rem); line-height: 1.05; transition: color .2s; }
.bl-row:hover h3 { color: var(--c) !important; }
.bl-row-main p { margin: .6rem 0 0; font-size: .92rem; line-height: 1.55; max-width: 62ch; }
.bl-row-side { display: flex; flex-direction: column; gap: .5rem; }
.bl-row-img { aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; }
.bl-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) brightness(.8); transition: filter .3s; }
.bl-row:hover .bl-row-img img { filter: none; }

/* ═══ ARTICLE ══════════════════════════════════════════════════ */
.ar-hero { padding-top: calc(var(--nav, 70px) + clamp(3rem, 7vw, 6rem)); padding-bottom: clamp(2rem, 4vw, 3rem); }
.ar-back { display: inline-block; font-family: var(--mono); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(243,236,223,.5); text-decoration: none; margin-bottom: clamp(2rem, 4vw, 3rem); }
.ar-back:hover { color: var(--cream); }
.ar-hero .eyebrow-num em { color: var(--c); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.ar-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.4rem, 6.2vw, 5.4rem); line-height: .94; margin: 0; max-width: 17ch; color: var(--cream); }
.ar-dek { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; max-width: 60ch; margin: clamp(1.4rem, 2.5vw, 2rem) 0 0; }
.ar-cover { margin: 0 auto clamp(3rem, 6vw, 5rem); }
.ar-cover img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: clamp(14px, 2vw, 22px); display: block; }

.ar-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 700px) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); margin-bottom: clamp(4rem, 9vw, 7rem); }
.ar-rail { position: sticky; top: calc(var(--nav, 70px) + 2rem); align-self: start; max-width: 260px; }
.ar-rail-label { font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(243,236,223,.45); margin-bottom: 1rem; }
.ar-toc { list-style: none; margin: 0 0 2.5rem; padding: 0; border-top: 1px solid rgba(243,236,223,.1); }
.ar-toc a { display: grid; grid-template-columns: 2rem 1fr; gap: .4rem; padding: .7rem 0; border-bottom: 1px solid rgba(243,236,223,.1); text-decoration: none; font-size: .84rem; line-height: 1.35; color: rgba(243,236,223,.62); transition: color .2s; }
.ar-toc a:hover { color: var(--cream); }
.ar-toc em { font-family: var(--mono); font-style: normal; font-weight: 700; font-size: .72rem; color: var(--orange); padding-top: .1rem; }
.ar-byline { font-size: .84rem; line-height: 1.5; color: var(--cream); }
.ar-byline span { display: block; font-family: var(--mono); font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(243,236,223,.45); margin-bottom: .4rem; }
.ar-byline a { color: rgba(243,236,223,.55); text-decoration: none; }

.ar-body { font-size: 1.06rem; line-height: 1.8; }
.ar-body > :first-child { margin-top: 0; }
.ar-body p { margin: 0 0 1.5rem; color: rgba(243,236,223,.74); }
.ar-body p:first-child { font-size: 1.2rem; line-height: 1.65; color: var(--cream); }
.bl main .ar-body h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.02; margin: clamp(3rem, 6vw, 4.5rem) 0 1.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(243,236,223,.1); scroll-margin-top: calc(var(--nav, 70px) + 1.5rem); }
.bl main .ar-body h3 { font-size: 1.2rem; line-height: 1.2; margin: 2.2rem 0 .9rem; }
.ar-body ul, .ar-body ol { margin: 0 0 1.6rem; padding-left: 1.3rem; }
.ar-body li { margin-bottom: .6rem; color: rgba(243,236,223,.74); padding-left: .3rem; }
.ar-body li::marker { color: var(--orange); }
.ar-body strong { color: var(--cream); font-weight: 700; }
.ar-body a { color: var(--cream); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.ar-body blockquote { margin: 1.8rem 0; padding: 1.4rem 1.6rem; background: #0e0f11; border: 1px solid rgba(243,236,223,.08); border-left: 3px solid var(--orange); border-radius: 0 14px 14px 0; color: rgba(243,236,223,.74); }
.ar-body code { font-family: var(--mono); font-size: .9em; background: rgba(243,236,223,.08); padding: .1em .35em; }
.ar-body img { max-width: 100%; border-radius: 12px; }

.bl-more { margin-bottom: clamp(4rem, 9vw, 7rem); }
.bl-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 16px); }

/* ═══ CLOSING CTA ══════════════════════════════════════════════ */
.bl-cta { padding-bottom: clamp(4rem, 8vw, 6rem); }
.bl-cta-inner { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 2rem; padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid rgba(243,236,223,.1); }
.bl main .bl-cta h2 { font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: .95; max-width: 14ch; }
.bl-cta p { margin: 1.2rem 0 0; max-width: 46ch; }

/* ═══ RESPONSIVE ═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .ar-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .bl-row { grid-template-columns: 3.5rem minmax(0, 1fr) 11rem; }
  .bl-row-img { display: none; }
}
@media (max-width: 900px) {
  .bl-head { grid-template-columns: 1fr; }
  .bl-feature { grid-column: 1 / -1; grid-row: auto; }
  .bl-solid, .bl-card.is-side { grid-column: span 6; }
  .ar-layout { grid-template-columns: minmax(0, 1fr); }
  .ar-rail { display: none; }
  .bl-more-grid { grid-template-columns: 1fr 1fr; }
  .bl-more-grid > :nth-child(3) { display: none; }
}
@media (max-width: 640px) {
  .bl-solid, .bl-card.is-side { grid-column: 1 / -1; }
  .bl-solid { min-height: 0; }
  .bl-feature { min-height: 480px; }
  .bl-row { grid-template-columns: 2.4rem minmax(0, 1fr); align-items: start; }
  .bl-row-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; gap: .4rem 1rem; }
  .bl-row-num { padding-top: .35rem; }
  .ar-cover img { aspect-ratio: 16 / 10; }
  .bl-more-grid { grid-template-columns: 1fr; }
  .bl-more-grid > :nth-child(3) { display: flex; }
  .bl-btn { width: 100%; justify-content: center; }
}
