/* ============================================
   KEVIN DELURY — SITE STYLES
   Single source of truth for all pages.
   Palette: deep indigo + warm cream + oxblood accent
   Type: Inter, weights 300-900 + italics
   ============================================ */

:root {
  --indigo: #2a2d4a;        /* warmer, slight violet undertone — rope-dyed feel */
  --indigo-soft: #3d4060;
  --indigo-muted: #6a6d85;
  --cream: #f7f3ec;
  --cream-deep: #efe9dd;
  --cream-deeper: #e6dfd0;
  --oxblood: #5a1e1b;       /* accent on cream sections */
  --oxblood-soft: #7a3530;
  --oxblood-bright: #b04540;
  --amber: #d4a04a;         /* accent on dark indigo sections */
  --amber-soft: #b88838;
  --amber-bright: #e6b34d;
  --rule: rgba(42, 45, 74, 0.15);
  --rule-strong: rgba(42, 45, 74, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--indigo);
  line-height: 1.6;
  font-weight: 400;
}

a { color: inherit; }

/* ============================================
   NAV — sitewide
   ============================================ */

.nav {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  position: relative;
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 0.65; }

.nav-links a.current { font-weight: 700; }

.nav-links a.current::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--oxblood);
}

/* ============================================
   FOOTER — sitewide
   ============================================ */

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  background: var(--cream-deep);
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--indigo-soft);
  font-weight: 400;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   FADE-IN ON SCROLL
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   COMMON: EYEBROW
   ============================================ */

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 1.5rem;
}

/* ============================================
   HOME — minimal directory
   ============================================ */

.home-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
}

@media (max-width: 800px) {
  .home-hero { padding: 5rem 1.5rem 4rem; }
}

.home-hero h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
  margin-bottom: 3rem;
}

.home-hero-intro {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  font-weight: 300;
  line-height: 1.5;
  max-width: 55ch;
  color: var(--indigo-soft);
}

.home-hero-intro strong {
  font-weight: 500;
  color: var(--indigo);
}

.home-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

@media (max-width: 800px) {
  .home-nav {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem 5rem;
  }
}

.home-nav-link {
  text-decoration: none;
  padding: 3rem 2rem;
  border-right: 1px solid var(--rule);
  transition: background 0.2s;
}

.home-nav-link:last-child { border-right: none; }

.home-nav-link:hover { background: var(--cream-deep); }

@media (max-width: 800px) {
  .home-nav-link {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 2rem 0;
  }
  .home-nav-link:last-child { border-bottom: none; }
}

.home-nav-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--oxblood);
  margin-bottom: 1rem;
}

.home-nav-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.home-nav-desc {
  font-size: 0.9375rem;
  color: var(--indigo-soft);
  line-height: 1.5;
}

/* ============================================
   WORK INDEX
   ============================================ */

.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}

@media (max-width: 800px) {
  .page-header { padding: 3rem 1.5rem 2rem; }
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.page-intro {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 300;
  line-height: 1.5;
  max-width: 60ch;
  color: var(--indigo-soft);
}

.work-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

@media (max-width: 800px) {
  .work-list { padding: 1rem 1.5rem 3rem; }
}

.work-item {
  display: block;
  text-decoration: none;
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
  transition: padding-left 0.2s;
}

.work-item:hover { padding-left: 1rem; }

.work-item:last-child { border-bottom: 1px solid var(--rule); }

@media (max-width: 800px) {
  .work-item { padding: 2rem 0; }
  .work-item:hover { padding-left: 0; }
}

.work-item-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 1rem;
}

.work-item-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 24ch;
}

.work-item-deck {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--indigo-soft);
  max-width: 60ch;
  margin-bottom: 1.25rem;
}

.work-item-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.8125rem;
  color: var(--indigo-muted);
  font-weight: 500;
}

@media (max-width: 600px) {
  .work-item-meta { flex-wrap: wrap; gap: 0.75rem 1.5rem; }
}

.work-item-arrow {
  display: inline-block;
  color: var(--oxblood);
  font-weight: 700;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.work-item:hover .work-item-arrow { transform: translateX(4px); }

/* ============================================
   ABOUT — pulled from v2 mockup
   ============================================ */

.about-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

@media (max-width: 800px) {
  .about-hero { padding: 4rem 1.5rem 3rem; }
}

.about-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 3rem;
}

.about-intro {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  font-weight: 300;
  line-height: 1.5;
  max-width: 55ch;
  color: var(--indigo-soft);
}

.about-intro p + p { margin-top: 1.25rem; }

.about-intro strong {
  font-weight: 500;
  color: var(--indigo);
}

section.about-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

@media (max-width: 800px) {
  section.about-section { padding: 3rem 1.5rem; }
}

.section-divided { border-top: 1px solid var(--rule); }

.section-grid {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 4rem;
  align-items: start;
}

.section-grid.flip { grid-template-columns: 2.2fr 1fr; }
.section-grid.flip .section-heading { order: 2; text-align: right; }
.section-grid.flip .section-body { order: 1; }

@media (max-width: 800px) {
  .section-grid, .section-grid.flip {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .section-grid.flip .section-heading { order: 0; text-align: left; }
  .section-grid.flip .section-body { order: 1; }
}

h2.section-h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h2.section-h2 .num {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--oxblood);
  margin-bottom: 0.75rem;
}

.section-body {
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 62ch;
}

@media (max-width: 800px) {
  .section-body {
    line-height: 1.55;
    max-width: 42ch;
  }
}

.section-body p { margin-bottom: 1rem; }

@media (max-width: 800px) {
  .section-body p { margin-bottom: 0.875rem; }
}

.section-body em { font-style: italic; }

.section-body strong {
  font-weight: 700;
  color: var(--indigo);
  background: linear-gradient(transparent 60%, rgba(90, 30, 27, 0.12) 60%);
  padding: 0 2px;
}

.section-body .opener {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--indigo);
  margin-bottom: 1.25rem;
}

@media (max-width: 800px) {
  .section-body .opener {
    font-size: 1.125rem;
    line-height: 1.5;
  }
}

.section-body .opener::first-letter {
  font-size: 3.5rem;
  font-weight: 900;
  float: left;
  line-height: 0.9;
  margin: 0.25rem 0.5rem 0 0;
  color: var(--oxblood);
}

@media (max-width: 800px) {
  .section-body .opener::first-letter {
    font-size: 3rem;
    margin: 0.2rem 0.4rem 0 0;
  }
}

.section-body h3 {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.section-body h3:first-of-type {
  padding-top: 0;
  border-top: none;
  margin-top: 1.5rem;
}

.section-body .callout {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--indigo);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 3px solid var(--oxblood);
  background: rgba(230, 223, 208, 0.4);
}

@media (max-width: 800px) {
  .section-body .callout {
    font-size: 1.125rem;
    padding: 1.25rem 1rem 1.25rem 1.25rem;
    margin: 1.25rem -0.5rem;
  }
}

.section-body .standout {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--oxblood);
  letter-spacing: -0.015em;
  margin: 1.5rem 0;
  max-width: 30ch;
}

@media (max-width: 800px) {
  .section-body .standout {
    font-size: 1.25rem;
    margin: 1.25rem 0;
  }
}

/* ============================================
   PULL QUOTE — full bleed
   ============================================ */

.pullquote-wrap {
  background: var(--cream-deeper);
  width: 100%;
  margin: 3rem 0;
  padding: 5rem 2rem;
}

@media (max-width: 800px) {
  .pullquote-wrap { padding: 3.5rem 1.5rem; margin: 2rem 0; }
}

.pullquote-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.pullquote-rule {
  width: 4rem;
  height: 2px;
  background: var(--oxblood);
  margin: 0 auto 2rem;
}

.pullquote-inner blockquote {
  font-size: clamp(1.375rem, 3vw, 2.25rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.pullquote-rule-bottom {
  width: 4rem;
  height: 2px;
  background: var(--oxblood);
  margin: 2rem auto 0;
}

/* ============================================
   ABOUT — CLOSE
   ============================================ */

.about-close {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 6rem 2rem 4rem;
  border-top: 1px solid var(--rule);
}

@media (max-width: 800px) {
  .about-close { padding: 4rem 1.5rem 3rem; }
}

.about-close-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 1.5rem;
}

.about-close-line {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 30ch;
  margin-bottom: 2.5rem;
}

.about-close-cta {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 2px solid var(--oxblood);
  padding-bottom: 4px;
  transition: opacity 0.2s;
}

.about-close-cta:hover { opacity: 0.6; }

/* ============================================
   CASE STUDY PAGE
   ============================================ */

.case-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}

@media (max-width: 800px) {
  .case-header { padding: 3rem 1.5rem 2rem; }
}

.case-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 1.5rem;
}

.case-title {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 22ch;
  margin-bottom: 2rem;
}

.case-deck {
  font-size: clamp(1.0625rem, 1.5vw, 1.375rem);
  font-weight: 300;
  line-height: 1.5;
  max-width: 55ch;
  color: var(--indigo-soft);
}

.case-deck strong {
  font-weight: 500;
  color: var(--indigo);
}

.case-hero {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

@media (max-width: 800px) {
  .case-hero { margin: 2rem auto; padding: 0 1.5rem; }
}

.case-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.case-hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(247, 243, 236, 0.03) 20px, rgba(247, 243, 236, 0.03) 21px);
}

.case-hero-image span {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem;
  font-size: 0.9375rem;
}

.case-hero-caption {
  font-size: 0.8125rem;
  color: var(--indigo-soft);
  font-style: italic;
  margin-top: 1rem;
  text-align: center;
}

.case-facts {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 800px) {
  .case-facts {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
}

.fact-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 0.4rem;
}

.fact-value {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}

section.case-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

@media (max-width: 800px) {
  section.case-section { padding: 3rem 1.5rem; }
}

/* Diagram + media blocks */

.diagram-block {
  width: 100%;
  margin: 3rem 0;
  padding: 4rem 2rem;
  background: var(--cream-deep);
}

@media (max-width: 800px) {
  .diagram-block { padding: 3rem 1.5rem; margin: 2rem 0; }
}

.diagram-inner { max-width: 1000px; margin: 0 auto; }

.diagram-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 1.25rem;
  text-align: center;
}

.diagram-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  background: var(--indigo-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.diagram-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(247, 243, 236, 0.04) 20px, rgba(247, 243, 236, 0.04) 21px);
}

.diagram-image span { position: relative; z-index: 1; }

.media-block { margin: 2rem 0; }

.media-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--indigo-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.media-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(247, 243, 236, 0.04) 20px, rgba(247, 243, 236, 0.04) 21px);
}

.media-image span { position: relative; z-index: 1; }

.media-caption {
  font-size: 0.8125rem;
  color: var(--indigo-soft);
  font-style: italic;
  margin-top: 0.75rem;
  text-align: center;
}

.case-closing {
  max-width: 900px;
  margin: 4rem auto 0;
  padding: 5rem 2rem 3rem;
  border-top: 1px solid var(--rule);
}

@media (max-width: 800px) {
  .case-closing { padding: 4rem 1.5rem 2rem; }
}

.case-closing-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 1.5rem;
}

.case-closing-text {
  font-size: clamp(1.1875rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  max-width: 60ch;
}

.case-closing-text p + p { margin-top: 1.25rem; }

.next-case {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 3rem 2rem 5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  text-decoration: none;
}

@media (max-width: 800px) {
  .next-case {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 2rem 1.5rem 3rem;
  }
}

.next-case-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo-soft);
  margin-bottom: 0.5rem;
}

.next-case-title {
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.next-case-arrow {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--oxblood);
}

/* ============================================
   CONTACT
   ============================================ */

.contact-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 8rem 2rem 6rem;
}

@media (max-width: 800px) {
  .contact-wrap { padding: 5rem 1.5rem 4rem; }
}

.contact-line {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
  max-width: 22ch;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--oxblood);
  text-decoration: none;
  border-bottom: 3px solid var(--oxblood);
  padding-bottom: 6px;
  margin-bottom: 4rem;
  transition: opacity 0.2s;
  word-break: break-all;
}

.contact-email:hover { opacity: 0.7; }

.contact-disqualifier {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--indigo-soft);
  max-width: 55ch;
  border-top: 1px solid var(--rule);
  padding-top: 3rem;
}

.contact-disqualifier strong {
  font-weight: 500;
  color: var(--indigo);
}

/* ============================================
   404
   ============================================ */

.fourohfour-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 10rem 2rem 6rem;
  text-align: center;
}

@media (max-width: 800px) {
  .fourohfour-wrap { padding: 6rem 1.5rem 4rem; }
}

.fourohfour-num {
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--oxblood);
  margin-bottom: 2rem;
}

.fourohfour-line {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.fourohfour-cta {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--oxblood);
  padding-bottom: 4px;
  transition: opacity 0.2s;
}

.fourohfour-cta:hover { opacity: 0.6; }

/* ============================================================
   REAL IMAGE HANDLING (overrides for FPO-style placeholders)
   ============================================================ */

/* Case study hero — flexible, no forced aspect ratio when img child present */
.case-hero-image:has(img) {
  aspect-ratio: auto;
  background: transparent;
  padding: 0;
}
.case-hero-image:has(img)::before { display: none; }
.case-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Media block image — for inline photos within case studies */
.media-image:has(img) {
  aspect-ratio: auto;
  background: transparent;
  padding: 0;
}
.media-image:has(img)::before { display: none; }
.media-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Diagram block image */
.diagram-image:has(img) {
  aspect-ratio: auto;
  background: transparent;
  padding: 0;
}
.diagram-image:has(img)::before { display: none; }
.diagram-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Full-bleed wide image — for centerfolds, panoramic spreads */
.media-fullbleed {
  margin: 4rem 0;
  width: 100%;
}
.media-fullbleed img {
  width: 100%;
  height: auto;
  display: block;
}
.media-fullbleed .media-caption {
  max-width: 800px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.875rem;
  color: var(--indigo-soft);
  font-style: italic;
  text-align: center;
}

/* Dark-frame variant — for vintage screenshots like AirRaid */
.media-dark {
  background: var(--indigo);
  padding: 2rem;
  margin: 3rem 0;
}
.media-dark .media-image {
  background: transparent;
}
.media-dark .media-caption {
  color: var(--cream);
  font-style: italic;
  font-size: 0.875rem;
  margin-top: 1rem;
  opacity: 0.85;
}

/* Two-column image pair (for paired artifacts) */
.media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 3rem 0;
}
.media-pair .media-image { aspect-ratio: auto; background: transparent; padding: 0; }
.media-pair .media-image::before { display: none; }
.media-pair img { width: 100%; height: auto; display: block; }
.media-pair .media-caption {
  font-size: 0.8125rem;
  color: var(--indigo-soft);
  font-style: italic;
  margin-top: 0.75rem;
}
@media (max-width: 700px) {
  .media-pair { grid-template-columns: 1fr; }
}

/* Inline image within section body — smaller, contained */
.media-inline {
  margin: 2.5rem 0;
}
.media-inline img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(26, 31, 46, 0.08);
}
.media-inline .media-caption {
  font-size: 0.8125rem;
  color: var(--indigo-soft);
  font-style: italic;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* Video embed placeholder */
.media-video {
  margin: 3rem 0;
  position: relative;
}
.media-video .video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--indigo);
  overflow: hidden;
}
.media-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.media-video .video-fpo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 0.9375rem;
  text-align: center;
  padding: 2rem;
}
.media-video .media-caption {
  font-size: 0.875rem;
  color: var(--indigo-soft);
  font-style: italic;
  margin-top: 1rem;
}

/* Tall mobile screenshot — for blog Audree byline */
.media-mobile {
  display: flex;
  justify-content: center;
  margin: 3rem 0;
}
.media-mobile .media-mobile-frame {
  max-width: 280px;
  width: 100%;
  border: 1px solid rgba(26, 31, 46, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.media-mobile img {
  width: 100%;
  height: auto;
  display: block;
}
.media-mobile .media-caption {
  max-width: 280px;
  font-size: 0.8125rem;
  color: var(--indigo-soft);
  font-style: italic;
  margin-top: 1rem;
  text-align: center;
}

/* ============================================================
   IMAGE LIGHTBOX — click any image in a media block to enlarge
   ============================================================ */

/* All case-study images become clickable */
.case-hero-image img,
.media-image img,
.media-inline img,
.media-fullbleed img,
.media-pair img,
.media-mobile img,
.diagram-image img {
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.case-hero-image img:hover,
.media-image img:hover,
.media-inline img:hover,
.media-fullbleed img:hover,
.media-pair img:hover,
.media-mobile img:hover,
.diagram-image img:hover {
  opacity: 0.92;
}

/* Lightbox modal */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 46, 0.96);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lightbox-overlay.is-active {
  display: flex;
  opacity: 1;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--cream);
  color: var(--cream);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s ease;
}

.lightbox-close:hover {
  background: rgba(247, 243, 236, 0.1);
}

.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
  color: var(--cream);
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
  opacity: 0.85;
  padding: 0 2rem;
}

@media (max-width: 700px) {
  .lightbox-overlay { padding: 3rem 1rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
}

/* ============================================================
   LAYOUT v2 — COLOR BANDING, FLOATED PULL QUOTES, SCALE SHIFTS
   ============================================================ */

/* --- COLOR BANDING ---
   Apply .section-dark to any case-section to invert it.
   Adjacent sections naturally alternate cream / indigo / cream / indigo.
   Pull quotes between bands sit on cream by default. */

section.case-section.section-dark {
  background: var(--indigo);
  color: var(--cream);
  padding-top: 6rem;
  padding-bottom: 6rem;
  position: relative;
}

@media (max-width: 800px) {
  section.case-section.section-dark {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Inside dark sections: invert all the colors */
section.case-section.section-dark .section-h2 { color: var(--cream); }
section.case-section.section-dark .section-h2 .num { color: rgba(247, 243, 236, 0.4); }
section.case-section.section-dark .section-body { color: var(--cream); }
section.case-section.section-dark .section-body h3 {
  color: var(--amber-bright);
  border-color: rgba(212, 160, 74, 0.25);
}
section.case-section.section-dark .section-body strong { color: var(--cream); font-weight: 600; }
section.case-section.section-dark .section-body em { color: rgba(247, 243, 236, 0.92); }

/* Opener drop cap inverted — use amber for proper complementary contrast on indigo */
section.case-section.section-dark .section-body .opener::first-letter {
  color: var(--amber-bright);
}

/* Standout lines on dark — amber jumps off indigo where oxblood couldn't */
section.case-section.section-dark .section-body .standout {
  color: var(--amber-bright);
  font-weight: 700;
}

/* Callouts on dark — solid cream-tinted bar with amber accent stripe */
section.case-section.section-dark .section-body .callout {
  background: var(--cream);
  border-left: 3px solid var(--amber);
  color: var(--indigo);
}
section.case-section.section-dark .section-body .callout strong {
  color: var(--indigo);
}

/* Inline images inside dark sections need cream borders */
section.case-section.section-dark .media-inline img {
  border-color: rgba(247, 243, 236, 0.15);
}
section.case-section.section-dark .media-caption {
  color: rgba(247, 243, 236, 0.75);
}

/* --- FLOATED PULL QUOTES ---
   Floats alongside body text instead of breaking between sections.
   Use .floatquote-right or .floatquote-left inside .section-body */

.floatquote-right,
.floatquote-left {
  margin: 0.5rem 0 1.5rem 0;
  padding: 1rem 0;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.875rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--oxblood);
  border-top: 2px solid var(--oxblood);
  border-bottom: 2px solid var(--oxblood);
  max-width: 18rem;
  text-wrap: balance;
}

.floatquote-right {
  float: right;
  margin-left: 2.5rem;
  text-align: right;
}

.floatquote-left {
  float: left;
  margin-right: 2.5rem;
  text-align: left;
}

/* On dark sections, float quotes use amber for visible borders */
section.case-section.section-dark .floatquote-right,
section.case-section.section-dark .floatquote-left {
  color: var(--cream);
  border-color: var(--amber);
}

/* Clear after floats */
.section-body::after {
  content: '';
  display: block;
  clear: both;
}

/* Mobile: floats become full-width pull quotes, no float */
@media (max-width: 700px) {
  .floatquote-right,
  .floatquote-left {
    float: none;
    margin: 2rem 0;
    max-width: 100%;
    text-align: left;
  }
}

/* --- SCALE SHIFTS ---
   Use .scale-huge for oversized display moments inside section-body.
   Use .scale-tight for compressed-density passages (smaller, tighter). */

.section-body .scale-huge {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 3rem 0;
  color: var(--indigo);
  max-width: 100%;
  text-wrap: balance;
}

section.case-section.section-dark .section-body .scale-huge {
  color: var(--cream);
}

.section-body .scale-tight {
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--cream-deep);
  border-left: 2px solid var(--indigo-muted);
  color: var(--indigo-soft);
}

section.case-section.section-dark .section-body .scale-tight {
  background: rgba(247, 243, 236, 0.08);
  color: rgba(247, 243, 236, 0.92);
  border-left-color: var(--cream);
}

.section-body .scale-tight strong { color: var(--indigo); }
section.case-section.section-dark .section-body .scale-tight strong { color: var(--cream); }

/* --- CASE HERO contextual handling ---
   The hero image needs a tiny adjustment when followed by a dark section */

.case-hero + .case-section.section-dark {
  margin-top: 0;
}


/* ============================================================
   LAYOUT v3 — BUG FIXES & POLISH
   Mobile nav, drop cap robustness, dark-section readability,
   pull quote contrast, whitespace trimming
   ============================================================ */

/* --- MOBILE NAV FIX ---
   The sticky nav was scrunching on mobile, with "Kevin DeLury" crashing
   into "Work" and "Contact" being pushed off the page. Stack vertically
   on small screens, then a hamburger if needed. For now, stack with smaller
   font sizes and tighter gaps. */

@media (max-width: 820px) {
  .nav {
    padding: 0.75rem 0;
  }
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0 1rem;
  }
  .nav-name {
    font-size: 0.9375rem;
    flex-shrink: 0;
    line-height: 1.2;
  }
  .nav-links {
    width: 100%;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    padding-top: 0.25rem;
  }
  .nav-links a {
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
  }
}

@media (max-width: 380px) {
  .nav-links { gap: 0.875rem; }
  .nav-links a { font-size: 0.75rem; }
}

/* --- DROP CAP ROBUSTNESS ---
   Short openers were creating orphaned giant letters with no text to wrap.
   Reduce drop cap size, lower its line-height impact, ensure it always
   sits properly even with one-sentence openers. */

.section-body .opener::first-letter {
  font-size: 2.75rem;
  font-weight: 800;
  float: left;
  line-height: 0.85;
  margin: 0.5rem 0.625rem 0 0;
  color: var(--oxblood);
  letter-spacing: -0.02em;
}

@media (max-width: 800px) {
  .section-body .opener::first-letter {
    font-size: 2.25rem;
    margin: 0.4rem 0.5rem 0 0;
  }
}

/* Drop cap on dark sections — bright cream for contrast */
section.case-section.section-dark .section-body .opener::first-letter {
  color: var(--cream);
  text-shadow: 0 0 1px rgba(247, 243, 236, 0.3);
}

/* --- DARK SECTION READABILITY ---
   Body text on indigo needs HIGH contrast. Override the soft cream variants
   that were making bullets and body copy hard to read. */

section.case-section.section-dark .section-body {
  color: var(--cream);
}
section.case-section.section-dark .section-body p {
  color: var(--cream);
}
section.case-section.section-dark .section-body strong {
  color: #ffffff;
  font-weight: 700;
}
section.case-section.section-dark .section-body em {
  color: var(--cream);
}

/* --- PULL QUOTES ON DARK ---
   The pullquote-wrap between sections renders ON cream by default.
   But callouts INSIDE dark sections used dark oxblood text — invisible.
   Brighten everything in callouts on dark. */

section.case-section.section-dark .section-body .callout {
  background: rgba(247, 243, 236, 0.08);
  border-left: 3px solid var(--oxblood-bright);
  color: var(--cream);
  font-style: italic;
}

section.case-section.section-dark .section-body .standout {
  color: var(--cream);
  border-left: 3px solid var(--oxblood-bright);
  border-bottom: 1px solid rgba(247, 243, 236, 0.18);
  font-weight: 500;
}

/* --- WHITESPACE TRIMMING ---
   Kevin flagged "huge strips of blank space" between copy blocks on dark
   sections. Trim section padding more aggressively on smaller screens
   and tighten the section-grid gap. */

section.case-section {
  padding: 4.5rem 2rem;
}
section.case-section.section-dark {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 1000px) {
  section.case-section,
  section.case-section.section-dark {
    padding: 3.5rem 1.5rem;
  }
}

@media (max-width: 700px) {
  section.case-section,
  section.case-section.section-dark {
    padding: 2.75rem 1.25rem;
  }
}

/* Tighten gaps between paragraphs in section-body */
.section-body p { margin-bottom: 1rem; }
.section-body p:last-child { margin-bottom: 0; }

/* --- IMAGES INSIDE DARK SECTIONS ---
   Reduce padding around full-bleed images that sit inside dark sections,
   and make sure image captions are readable */

section.case-section.section-dark .media-fullbleed,
section.case-section.section-dark .media-inline {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

section.case-section.section-dark .media-caption {
  color: rgba(247, 243, 236, 0.85);
  font-size: 0.875rem;
}

/* --- FULL-BLEED IMAGE PADDING TRIM ---
   The newsletter and other full-bleed images had too much page padding
   making them feel disconnected. */

.media-fullbleed {
  margin: 3rem 0;
}

@media (max-width: 800px) {
  .media-fullbleed {
    margin: 2rem 0;
  }
}

/* --- LIGHTBOX ENHANCE ---
   Make lightbox image bigger by default */
.lightbox-image {
  max-width: 95vw;
  max-height: 88vh;
}

/* --- DRAMA: ADD AN OXBLOOD ACCENT BAR ABOVE DARK SECTIONS ---
   Subtle transition cue between cream and indigo bands.
   A thin 4px oxblood rule sits at the top edge of each dark section. */

section.case-section.section-dark {
  border-top: 4px solid var(--oxblood);
}

/* --- HERO IMAGE FIT FOR CS-1 BPE LOGO ---
   Kevin wants the static lockup hero "framed with piping or trim" 
   because there's too much empty space. Adding a subtle bordered frame. */

.case-hero-image.with-frame {
  border: 1px solid var(--rule);
  background: var(--cream-deep);
  padding: 2rem;
}

@media (max-width: 800px) {
  .case-hero-image.with-frame {
    padding: 1rem;
  }
}

/* --- AUDIO PLAYER STYLE ---
   For the Meat of the Matter sizzle reel */

.media-audio {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--cream-deep);
  border-left: 3px solid var(--oxblood);
}

.media-audio .media-audio-title {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--oxblood);
  font-weight: 600;
  margin-bottom: 1rem;
}

.media-audio audio {
  width: 100%;
  height: 40px;
}

.media-audio .media-caption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--indigo-soft);
  font-style: italic;
}

section.case-section.section-dark .media-audio {
  background: rgba(247, 243, 236, 0.05);
  border-left-color: var(--oxblood-bright);
}
section.case-section.section-dark .media-audio .media-audio-title {
  color: var(--cream);
}
section.case-section.section-dark .media-audio .media-caption {
  color: rgba(247, 243, 236, 0.85);
}

/* --- PROFILE PICTURE STYLE FOR ABOUT PAGE --- */

.about-portrait {
  max-width: 320px;
  margin: 0 0 2rem;
}
.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}
.about-portrait .portrait-caption {
  font-size: 0.8125rem;
  color: var(--indigo-soft);
  font-style: italic;
  margin-top: 0.75rem;
  line-height: 1.4;
}

