/* ============================================================
   editorial.css — Noova-inspired design system for portfolio
   case study pages. Add after style.css.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --ed-paper:     #ffffff;
  --ed-limestone: #f1ece3;
  --ed-stone:     #e6ddce;
  --ed-ink:       #1a1917;
  --ed-charcoal:  #24211d;
  --ed-grey:      #6e6a63;
  --ed-light:     #b8b2a8;
  --ed-rule:      #e0d9cc;
  --ed-rule-dark: #3a362f;
  --ed-oxblood:   #7a2e2e;
  --ed-ease:      cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------- base overrides for editorial pages ---------- */
body.editorial {
  background: var(--ed-paper);
  color: var(--ed-ink);
  font-size: 17px;
  line-height: 1.6;
  /* clip rather than hidden so the sticky navbar keeps working */
  overflow-x: clip;
}
body.editorial a { color: inherit; text-decoration: none; }
body.editorial p { max-width: 1300px; }
body.editorial .text-center p { margin-inline: auto; }

/* editorial emphasis: weight carries hierarchy, not colour */
.ed-overview__body,
.ed-section__body,
.ed-section__sub {
  font-weight: 300;
}
.ed-overview__body strong,
.ed-section__body strong,
.ed-section__sub strong {
  font-weight: 400;
  color: inherit;
}

/* ---------- container ---------- */
.ed-wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.625rem, 4vw, 3rem);
}

/* ---------- typography primitives ---------- */
.ed-eyebrow {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6875rem;
  line-height: 1.5;
  display: block;
}
.ed-eyebrow.oxblood { color: var(--ed-oxblood); }
.ed-eyebrow.grey    { color: var(--ed-grey); }

.ed-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.08;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.01em;
}
.ed-display--sm {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.15;
}

/* ---------- film grain (sits over any position:relative overflow:hidden) ---------- */
.ed-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='gs'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23gs)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: 0.09;
  mix-blend-mode: overlay;
}

/* ---------- scroll reveal ---------- */
.ed-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.1s var(--ed-ease), transform 1.1s var(--ed-ease);
  will-change: opacity, transform;
}
.ed-reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .ed-reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   NAV — slides in from top as hero exits viewport
   (works alongside existing .navbar from style.css)
   ============================================================ */
.ed-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(250,248,243,0.88);
  backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid var(--ed-rule);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s var(--ed-ease), opacity 0.6s var(--ed-ease);
}
.ed-nav.shown {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.ed-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding-inline: clamp(1.625rem, 4vw, 3.5rem);
}
.ed-nav__logo {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ed-ink);
  letter-spacing: 0.02em;
}
.ed-nav__logo span { font-weight: 300; }
.ed-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.ed-nav__links a {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ed-ink);
  opacity: 0.7;
  transition: opacity 0.25s;
}
.ed-nav__links a:hover { opacity: 1; }
.ed-nav__cta {
  border: 1px solid var(--ed-ink);
  padding: 10px 22px;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ed-ink);
  transition: background 0.25s var(--ed-ease), color 0.25s var(--ed-ease);
}
.ed-nav__cta:hover { background: var(--ed-ink); color: var(--ed-paper); }
@media (max-width: 720px) { .ed-nav__links { display: none; } }

/* ============================================================
   § 1 — HERO: full-screen editorial cover
   ============================================================ */
.ed-hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--ed-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* overlay darkens any BG image */
.ed-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  z-index: 1;
}
/* background image (optional — set via inline style) */
.ed-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
/* centered lockup */
.ed-hero__lockup {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}
.ed-hero__title {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 5rem);
  color: #fff;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0;
}
.ed-hero__sub {
  margin: 1.25rem auto 0;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: clamp(0.65rem, 1vw, 0.78rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
/* back link — top-left */
.ed-hero__back {
  position: absolute;
  top: clamp(1.5rem, 3vh, 2.5rem);
  left: clamp(1.625rem, 4vw, 3rem);
  z-index: 3;
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: color 0.25s;
}
.ed-hero__back:hover { color: #fff; }
/* scroll cue — bottom center */
.ed-hero__cue {
  position: absolute;
  bottom: clamp(1.5rem, 4vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.ed-hero__cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(rgba(255,255,255,0.5), transparent);
  animation: cuedrop 2.4s var(--ed-ease) infinite;
}
@keyframes cuedrop {
  0%,100% { opacity:0.3; transform:scaleY(0.7); transform-origin:top; }
  50%      { opacity:0.9; transform:scaleY(1);   transform-origin:top; }
}

/* ============================================================
   § 2 — OVERVIEW: centered, white, generous top space
   ============================================================ */
.ed-overview {
  background: var(--ed-paper);
  padding: clamp(5rem, 14vh, 10rem) 0 clamp(3rem, 8vh, 6rem);
  text-align: center;
}
.ed-overview__inner {
  max-width: 1300px;
  margin-inline: auto;
}
.ed-overview__heading {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.85rem);
  color: var(--ed-ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 1.75rem 0 1.75rem;
}
.ed-overview__body {
  font-family: 'Lato', sans-serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ed-grey);
  margin-inline: auto;
  text-align: justify;
}

/* ============================================================
   § 3 — SNAPSHOT: 4-col minimal metadata grid
   ============================================================ */
.ed-snapshot {
  background: var(--ed-paper);
  padding-bottom: clamp(2rem, 5vh, 4rem);
  border-bottom: 1px solid var(--ed-rule);
}
.ed-snapshot__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  max-width: 980px;
  margin-inline: auto;
  text-align: center;
}
@media (max-width: 640px) {
  .ed-snapshot__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
}
.ed-snap-col__label {
  display: block;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6rem;
  color: var(--ed-oxblood);
  margin-bottom: 1.1rem;
}
.ed-snap-col__item {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ed-ink);
}

/* ============================================================
   § 4a — SECTIONS: noova-pattern image+label blocks
   ============================================================ */
.ed-sections {
  background: var(--ed-paper);
  padding-bottom: clamp(4rem, 10vh, 8rem);
}
.ed-section { margin-top: clamp(5rem, 12vh, 9rem); }
.ed-sections > .ed-section:not(:first-child) {
  padding-top: clamp(3rem, 7vh, 5rem);
  border-top: 1px solid var(--ed-rule);
}

.ed-section__text {
  text-align: center;
  margin-bottom: clamp(1.75rem, 4vh, 2.75rem);
  padding-inline: clamp(1.625rem, 4vw, 3rem);
}
.ed-section__title {
  font-family: 'Lato', sans-serif;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  color: var(--ed-ink);
  margin: 0 0 0.55rem;
  letter-spacing: -0.01em;
}
.ed-section__sub {
  font-family: 'Lato', sans-serif;
  font-size: 0.875rem;
  color: var(--ed-grey);
  max-width: 58ch;
  margin-inline: auto;
  line-height: 1.7;
}

/* single full image */
.ed-section__img {
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
.ed-section__img img {
  width: 100%;
  height: auto;
  display: block;
}
/* single portfolio-wide NDA/recreation disclosure, once per project page */
.ed-disclosure {
  max-width: 720px;
  margin: 2rem auto 0;
  padding: 0.9rem clamp(1.25rem, 4vw, 2rem);
  border-top: 1px solid var(--ed-rule);
  border-bottom: 1px solid var(--ed-rule);
  text-align: center;
}
.ed-disclosure p {
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--ed-light);
  margin: 0;
}
.ed-img-caption {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ed-light);
}

/* two images side by side */
.ed-section__duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
.ed-section__duo img { width: 100%; height: auto; display: block; }
@media (max-width: 600px) { .ed-section__duo { grid-template-columns: 1fr; } }

/* duo images that are also links to a live tool — subtle lift/border on hover */
.ed-section__duo a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--ed-rule);
  transition: border-color 0.25s var(--ed-ease), transform 0.25s var(--ed-ease);
}
.ed-section__duo a:hover {
  border-color: var(--ed-oxblood);
  transform: translateY(-2px);
}

/* centred call-to-action link beneath a section (e.g. "launch the live tool") */
.ed-section__cta {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ed-oxblood);
}
.ed-section__cta:hover { text-decoration: underline; }

/* snapshot stat that links out to supporting evidence */
a.ed-snap-col__item--link {
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s var(--ed-ease), color 0.2s var(--ed-ease);
}
a.ed-snap-col__item--link:hover {
  color: var(--ed-oxblood);
  text-decoration-color: var(--ed-oxblood);
}

/* tool/skill tags — image-free section variant */
.ed-section__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: clamp(1.625rem, 4vw, 3rem);
  margin-top: 2.5rem;
}
.ed-section__tag {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ed-ink);
  padding: 0.45rem 1.1rem;
  border: 1px solid #d5d0c9;
  letter-spacing: 0.03em;
}

/* text body for image-free sections */
.ed-section__body {
  max-width: 1300px;
  margin-inline: auto;
  padding-inline: clamp(1.625rem, 4vw, 3rem);
  margin-top: 2rem;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ed-grey);
  text-align: justify;
}
.ed-section__body + .ed-section__body {
  margin-top: 1.1em;
}

/* four images in a single row, each with a caption/link */
.ed-section__quad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
.ed-section__quad img { width: 100%; height: auto; display: block; }
.ed-section__quad figure { margin: 0; }
.ed-section__quad a {
  display: block;
  border: 1px solid var(--ed-rule);
  overflow: hidden;
  transition: border-color 0.2s var(--ed-ease);
}
.ed-section__quad a:hover { border-color: var(--ed-oxblood); }
.ed-section__quad figcaption {
  margin-top: 0.6rem;
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  color: var(--ed-charcoal);
}
@media (max-width: 900px) { .ed-section__quad { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .ed-section__quad { grid-template-columns: 1fr; } }

/* ============================================================
   § 4b — BLOCKS: editorial image rhythm (legacy, kept)
   ============================================================ */
.ed-blocks {
  background: var(--ed-paper);
  padding-bottom: clamp(3rem, 8vh, 6rem);
}
/* spacing between blocks */
.ed-block { margin-top: clamp(4.5rem, 12vh, 9rem); }
.ed-block--tight { margin-top: clamp(1.5rem, 3vh, 2.5rem); }

/* full-width block */
.ed-block--full .ed-img-wrap {
  position: relative;
  overflow: hidden;
}
.ed-block--full .ed-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* duo block */
.ed-block--duo .ed-img-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.75rem, 2vw, 2rem);
}
.ed-block--duo .ed-img-wrap > div {
  position: relative;
  overflow: hidden;
}
.ed-block--duo .ed-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 600px) {
  .ed-block--duo .ed-img-wrap { grid-template-columns: 1fr; }
}

/* portrait block — narrower, centered */
.ed-block--portrait .ed-img-wrap {
  max-width: 760px;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
}
.ed-block--portrait .ed-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* caption block — centered text interlude */
.ed-block--caption {
  text-align: center;
}
.ed-block--caption .ed-block-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  color: var(--ed-ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 1rem;
}
.ed-block--caption .ed-block-note {
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ed-grey);
  max-width: 500px;
  margin-inline: auto;
}

/* stat block — dark bg, big numbers */
.ed-block--stat {
  background: var(--ed-charcoal);
  padding: clamp(4rem, 10vh, 8rem) 0;
  text-align: center;
}
.ed-block--stat .ed-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--ed-rule-dark);
  border-bottom: 1px solid var(--ed-rule-dark);
  max-width: 960px;
  margin-inline: auto;
}
@media (max-width: 640px) {
  .ed-block--stat .ed-stat-grid { grid-template-columns: repeat(2,1fr); }
}
.ed-stat-cell {
  padding: clamp(2rem, 5vh, 4rem) clamp(1rem, 3vw, 2rem);
  border-right: 1px solid var(--ed-rule-dark);
  text-align: center;
}
.ed-stat-cell:last-child { border-right: none; }
@media (max-width: 640px) {
  .ed-stat-cell:nth-child(2) { border-right: none; }
  .ed-stat-cell:nth-child(3) { border-right: 1px solid var(--ed-rule-dark); }
  .ed-stat-cell:nth-child(3),
  .ed-stat-cell:nth-child(4) { border-top: 1px solid var(--ed-rule-dark); }
}
.ed-stat-num {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
}
.ed-stat-label {
  display: block;
  margin-top: 0.75rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.38);
  line-height: 1.4;
}

/* quote block — inside stat section */
.ed-quote {
  max-width: 680px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}
.ed-quote__text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.55;
  color: rgba(255,255,255,0.62);
}
.ed-quote__cite {
  display: block;
  margin-top: 1.25rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-oxblood);
}

/* CSS visual panels — editorial stand-ins for photography */
.ed-panel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* ============================================================
   § 5 — NEXT PROJECT
   ============================================================ */
.ed-next {
  background: var(--ed-paper);
  border-top: 1px solid var(--ed-rule);
  padding: clamp(5rem, 14vh, 10rem) 0;
  text-align: center;
}
.ed-next__label {
  display: block;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-grey);
  margin-bottom: 2.5rem;
}
.ed-next__card {
  display: block;
  position: relative;
  max-width: 1100px;
  margin-inline: auto;
  overflow: hidden;
  background: var(--ed-charcoal);
  aspect-ratio: 2.2 / 1;
}
@media (max-width: 640px) { .ed-next__card { aspect-ratio: 16 / 10; } }
.ed-next__card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.ed-next__card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.32);
  z-index: 1;
  transition: background 0.5s;
}
.ed-next__card:hover .ed-next__card-overlay { background: rgba(0,0,0,0.48); }
.ed-next__card-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  color: #fff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem;
  transition: letter-spacing 1.6s var(--ed-ease);
}
.ed-next__card:hover .ed-next__card-title { letter-spacing: 0.1em; }

/* ============================================================
   FOOTER (editorial variant)
   ============================================================ */
.ed-footer {
  background: var(--ed-charcoal);
  color: rgba(255,255,255,0.55);
  padding: clamp(3rem, 7vh, 5rem) 0 clamp(1.5rem, 3vh, 2.5rem);
}
.ed-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (max-width: 640px) { .ed-footer__grid { grid-template-columns: 1fr; gap: 2rem; } }
.ed-footer__logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.75rem;
}
.ed-footer__tagline {
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 30ch;
}
.ed-footer__email {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  transition: color 0.25s;
}
.ed-footer__email:hover { color: #fff; }
.ed-footer__heading {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1.25rem;
}
.ed-footer__nav { list-style: none; margin: 0; padding: 0; }
.ed-footer__nav li { margin-bottom: 0.6rem; }
.ed-footer__nav a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.25s;
}
.ed-footer__nav a:hover { color: #fff; }
.ed-footer__bottom {
  border-top: 1px solid var(--ed-rule-dark);
  padding-top: 1.5rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.04em;
}

/* ============================================================
   § 8 — SQL / BI CASE STUDY COMPONENTS
   ============================================================ */

/* labelled SQL code block */
.ed-code-wrap {
  max-width: 900px;
  margin: 1.75rem auto 0;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
.ed-code-wrap__label {
  font-family: 'Lato', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ed-oxblood);
  margin-bottom: 0.6rem;
  display: block;
}
.ed-code {
  background: var(--ed-ink);
  color: #ded8c9;
  border-radius: 6px;
  padding: 1.35rem 1.6rem;
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.ed-code .kw { color: #e2a3ac; }
.ed-code .fn { color: #8fbfd6; }
.ed-code .cm { color: #8a8578; font-style: italic; }
.ed-code .st { color: #b9cf9a; }

/* query result table */
.ed-result-wrap {
  max-width: 900px;
  margin: 1.1rem auto 0;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
  overflow-x: auto;
}
.ed-result {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Lato', sans-serif;
  font-size: 0.82rem;
}
.ed-result caption {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ed-light);
  padding-bottom: 0.6rem;
}
.ed-result th {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ed-light);
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--ed-rule-dark);
  white-space: nowrap;
}
.ed-result td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--ed-rule);
  color: var(--ed-charcoal);
  white-space: nowrap;
}
.ed-result tr:last-child td { border-bottom: none; }
.ed-result td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ed-ink); font-weight: 700; }
.ed-result__note {
  font-size: 0.72rem;
  color: var(--ed-light);
  margin-top: 0.7rem;
  font-style: italic;
}

/* callout — a grounded finding, not a chart */
.ed-callout {
  max-width: 900px;
  margin: 1.5rem auto 0;
  padding: 1.1rem clamp(1.25rem, 5vw, 1.75rem);
  border-left: 3px solid var(--ed-oxblood);
  background: var(--ed-limestone);
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ed-charcoal);
}
.ed-callout strong { color: var(--ed-ink); }

/* KPI tile grid */
.ed-kpi-wrap {
  max-width: 900px;
  margin: 2rem auto 0;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
.ed-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ed-rule);
  border: 1px solid var(--ed-rule);
}
@media (max-width: 700px) { .ed-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.ed-kpi {
  background: var(--ed-paper);
  padding: 1.25rem 1.4rem;
}
.ed-kpi__value {
  font-family: 'Lato', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--ed-ink);
  letter-spacing: -0.01em;
  display: block;
}
.ed-kpi__label {
  font-family: 'Lato', sans-serif;
  font-size: 0.72rem;
  color: var(--ed-grey);
  margin-top: 0.25rem;
  display: block;
}

/* horizontal bar rows — single-hue magnitude comparison */
.ed-bars-wrap {
  max-width: 900px;
  margin: 1.75rem auto 0;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
.ed-bars__title {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ed-ink);
  margin-bottom: 1rem;
}
.ed-bar-row {
  display: grid;
  grid-template-columns: 150px 1fr 52px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ed-bar-row__label {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  color: var(--ed-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ed-bar-row__track {
  background: var(--ed-limestone);
  border-radius: 4px;
  height: 12px;
  overflow: hidden;
}
.ed-bar-row__fill {
  background: var(--ed-ink);
  height: 100%;
  border-radius: 4px;
}
.ed-bar-row.is-top .ed-bar-row__fill { background: var(--ed-oxblood); }
.ed-bar-row__value {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ed-ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .ed-bar-row { grid-template-columns: 100px 1fr 40px; }
}

/* dashboard mockup frame — groups KPIs + bars as one "screen" */
.ed-dashboard {
  max-width: 1000px;
  margin: 2rem auto 0;
  margin-inline: auto;
  border: 1px solid var(--ed-rule);
  background: var(--ed-paper);
  box-shadow: 0 1px 3px rgba(26,25,23,0.06);
}
.ed-dashboard__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--ed-rule);
  background: var(--ed-limestone);
}
.ed-dashboard__bar-title {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ed-ink);
}
.ed-dashboard__bar-meta {
  font-family: 'Lato', sans-serif;
  font-size: 0.7rem;
  color: var(--ed-light);
}
.ed-dashboard__body {
  padding: 1.75rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
}
.ed-dashboard .ed-kpi-wrap,
.ed-dashboard .ed-bars-wrap { padding-inline: 0; margin-top: 0; max-width: none; }
.ed-dashboard__row { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 2rem; }
@media (max-width: 700px) { .ed-dashboard__row { grid-template-columns: 1fr; gap: 2rem; } }

/* ============================================================
   § 9 — ASSET PLACEHOLDER GALLERY
   (holds the layout/spacing for real photography to come later)
   ============================================================ */
.ed-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
@media (max-width: 720px) { .ed-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .ed-gallery { grid-template-columns: 1fr; } }

.ed-ph { margin: 0; }
.ed-ph__frame {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--ed-rule-dark, #d5d0c9);
  background: var(--ed-limestone);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ed-light);
}
.ed-ph__frame svg { width: 30px; height: 30px; opacity: 0.55; }
.ed-ph figcaption {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ed-ph__file {
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  color: var(--ed-light);
  word-break: break-all;
}
.ed-ph__caption {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  color: var(--ed-charcoal);
}

/* light funnel row — a sequence of real numbers narrowing to an outcome */
.ed-funnel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  max-width: 1000px;
  margin: 2.5rem auto 0;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}
.ed-funnel__cell {
  flex: 1 1 140px;
  text-align: center;
  padding: 0 0.75rem;
}
.ed-funnel__num {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  color: var(--ed-ink);
  line-height: 1;
}
.ed-funnel__cell--outcome .ed-funnel__num { color: var(--ed-oxblood); }
.ed-funnel__label {
  display: block;
  margin-top: 0.5rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ed-grey);
}
.ed-funnel__arrow {
  align-self: center;
  padding-top: 0.2rem;
  color: var(--ed-light);
  font-size: 1.1rem;
  flex: 0 0 auto;
}
@media (max-width: 640px) {
  .ed-funnel__arrow { display: none; }
  .ed-funnel__cell { flex: 1 1 45%; margin-bottom: 1.5rem; }
}

/* highlights list */
.ed-highlights {
  max-width: 780px;
  margin: 1.75rem auto 0;
  padding-inline: clamp(1.625rem, 4vw, 3rem);
  list-style: none;
}
.ed-highlights li {
  position: relative;
  padding-left: 1.4rem;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ed-grey);
  margin-bottom: 0.6rem;
}
.ed-highlights li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ed-oxblood);
}

/* two-line snapshot item (name + venue/date) */
.ed-snap-col__item small {
  display: block;
  font-size: 0.75rem;
  color: var(--ed-grey);
  margin-top: 0.15rem;
  line-height: 1.5;
}

/* recreated asset in a gallery slot — sits in the same grid as .ed-ph placeholders */
.ed-shot { margin: 0; }
.ed-shot__frame {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--ed-rule);
  background: var(--ed-paper);
  overflow: hidden;
  display: block;
  transition: border-color 0.2s var(--ed-ease);
}
.ed-shot__frame:hover { border-color: var(--ed-oxblood); }
.ed-shot__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: #fff;
}
.ed-shot figcaption {
  margin-top: 0.6rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  color: var(--ed-charcoal);
}
.ed-shot figcaption small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  color: var(--ed-light);
  font-style: italic;
}
/* Notion screenshots — wider, uncropped */
.ed-notion-gallery {
  max-width: 1200px;
  padding-inline: 0;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.ed-notion-gallery .ed-shot__frame {
  aspect-ratio: auto;
  height: auto;
}

.ed-notion-gallery .ed-shot__frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top;
}
/* ============================================================
   JOURNAL ARTICLE PAGES (.jr-*)
   Long-form essays. Narrower measure than case studies,
   serif display heading, single prose column.
   ============================================================ */
.jr-wrap {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: clamp(1.625rem, 5vw, 2rem);
}
.jr-masthead {
  padding: clamp(4.5rem, 9vw, 8rem) 0 0;
}
.jr-back {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ed-grey);
  margin-bottom: 2.5rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ed-ease), border-color 0.25s var(--ed-ease);
}
.jr-back:hover { color: var(--ed-ink); border-bottom-color: var(--ed-rule); }
.jr-issue {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6875rem;
  color: var(--ed-light);
}
.jr-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ed-ink);
  margin: 1.25rem 0 0;
}
.jr-deck {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.6;
  color: var(--ed-grey);
  margin: 1.5rem 0 0;
}
.jr-byline {
  display: block;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ed-rule);
  font-family: 'Lato', sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--ed-grey);
}
.jr-byline strong { font-weight: 700; color: var(--ed-ink); }
.jr-byline__sep { color: var(--ed-light); padding: 0 0.5rem; }
@media (max-width: 460px) {
  .jr-byline { line-height: 2; }
  .jr-byline__sep { display: none; }
  .jr-byline span:not(.jr-byline__sep) { display: block; }
}

.jr-cover {
  width: 100%;
  max-width: 760px;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-inline: clamp(1.625rem, 5vw, 2rem);
}
.jr-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.jr-body {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 0;
}
.jr-body p {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--ed-charcoal);
  max-width: none;
  margin: 0 0 1.6rem;
}
.jr-body p.jr-lead {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--ed-ink);
}
.jr-pull {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0;
  padding: 0 0 0 clamp(1.25rem, 3vw, 2rem);
  border-left: 2px solid var(--ed-stone);
}
.jr-pull p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ed-ink);
  margin: 0;
}
.jr-pull cite {
  display: block;
  margin-top: 1rem;
  font-family: 'Lato', sans-serif;
  font-style: normal;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-light);
}
.jr-sign {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--ed-rule);
}
.jr-sign p {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ed-grey);
}
.jr-sign p:first-child { color: var(--ed-ink); font-weight: 700; }
.jr-body p.jr-source {
  margin-top: 2rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ed-light);
}
.jr-source a {
  color: var(--ed-grey);
  border-bottom: 1px solid var(--ed-rule);
  transition: color 0.25s var(--ed-ease);
}
.jr-source a:hover { color: var(--ed-ink); }

.jr-next {
  margin-top: clamp(4rem, 8vw, 6.5rem);
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(4rem, 8vw, 6rem);
  border-top: 1px solid var(--ed-rule);
}
.jr-next__label {
  display: block;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.6875rem;
  color: var(--ed-light);
  margin-bottom: 1.5rem;
}
.jr-next__card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
}
.jr-next__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ed-limestone);
}
.jr-next__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jr-next__issue {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-light);
  margin-bottom: 0.5rem;
}
.jr-next__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.25;
  color: var(--ed-ink);
  margin: 0;
  transition: color 0.25s var(--ed-ease);
}
.jr-next__card:hover .jr-next__title { color: var(--ed-oxblood); }

@media (max-width: 560px) {
  .jr-next__card { grid-template-columns: 1fr; gap: 1rem; }
  .jr-next__thumb { aspect-ratio: 16 / 9; }
}
