/* Shared CSS for case study pages — Venus Rabbani site */

:root {
  --bg: #F1ECE2;
  --bg-deep: #E8E2D4;
  --ink: #1A1916;
  --ink-2: #3B3934;
  --muted: #807B72;
  --line: #D7CFBE;
  --line-2: #C4BBA6;
  --paper: #FAF6EC;
  --acid: #C9E040;
  --pink: #F2C4CB;
  --yellow: #F2D34A;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", "Söhne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); overflow-x: hidden; }
body { font-family: var(--sans); font-weight: 400; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--acid); }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
em.it { font-style: italic; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap { padding: 0 22px; } }

/* NAV */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgba(241, 236, 226, 0.85);
  border-bottom: 1px solid var(--line);
}
nav.top .row { display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; gap: 24px; }
nav.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
nav.top .brand .dot { width: 10px; height: 10px; background: var(--ink); border-radius: 50%; position: relative; }
nav.top .brand .dot::after { content: ""; position: absolute; inset: 2px; background: var(--acid); border-radius: 50%; }
nav.top .crumb { display: flex; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; }
nav.top .crumb a:hover { color: var(--ink); }
nav.top .crumb .sep { color: var(--line-2); }
nav.top .back { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
nav.top .back:hover { color: var(--ink); }
@media (max-width: 720px) {
  nav.top .row { padding: 12px 22px; }
  nav.top .crumb { display: none; }
}

/* HEADER */
section.header { padding: 130px 0 50px; border-bottom: 1px solid var(--line); position: relative; }
.header-meta {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 44px;
  align-items: start;
}
.header-meta .cell .k { display: block; margin-bottom: 6px; }
.header-meta .cell .v { font-size: 14px; color: var(--ink-2); }
.header h1 {
  margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 7vw, 116px);
  line-height: 0.96; letter-spacing: -0.025em;
  max-width: 14ch;
}
.header h1 .em { font-style: italic; }
.header h1 .em::after {
  content: ""; display: inline-block; width: 0.6em; height: 0.18em; background: var(--acid); margin-left: 0.12em; transform: translateY(-0.18em);
}
.header .thesis {
  margin-top: 44px;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start;
}
.header .thesis .lab { padding-top: 8px; }
.header .thesis p { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 32px); line-height: 1.3; color: var(--ink-2); margin: 0; max-width: 38ch; }
.header .thesis p em { font-style: italic; }
@media (max-width: 820px) {
  .header { padding: 110px 0 40px; }
  .header-meta { grid-template-columns: 1fr 1fr; gap: 14px; }
  .header .thesis { grid-template-columns: 1fr; gap: 16px; }
}

/* BANNER */
section.banner {
  padding: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.banner-img {
  width: 100%;
  aspect-ratio: 998 / 555;
  object-fit: cover;
  display: block;
}
.banner-caption {
  display: flex; justify-content: space-between; padding: 14px 40px 16px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em;
}
@media (max-width: 720px) { .banner-caption { padding: 14px 22px 16px; } }

/* PRODUCT SHOT */
section.product { padding: 80px 0 90px; border-bottom: 1px solid var(--line); }
.product-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center; }
.product-shot {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.product-shot.gridded::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35; pointer-events: none;
}
.product-shot img { position: relative; width: 100%; height: auto; }
.product-side h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 22px; max-width: 18ch; }
.product-side h3 em { font-style: italic; color: var(--ink-2); }
.product-side p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 16px; max-width: 42ch; }
.product-side .stack { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 26px; }
.product-side .stack .row { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.product-side .stack .row b { font-weight: 500; color: var(--ink); }
@media (max-width: 820px) {
  .product-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* CHAPTER */
section.chapter { padding: 90px 0; border-bottom: 1px solid var(--line); }
section.chapter.alt { background: var(--bg-deep); }
.chapter-head {
  display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: end;
  padding-bottom: 30px; margin-bottom: 40px; border-bottom: 1px solid var(--line-2);
}
.chapter-head .lab { padding-bottom: 6px; }
.chapter-head .num { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.chapter-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.0; letter-spacing: -0.02em; max-width: 18ch; }
.chapter-head h2 em { font-style: italic; color: var(--ink-2); }
.chapter-body { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: start; }
.chapter-body .side { padding-top: 8px; }
.chapter-body .side .pull { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.35; color: var(--ink-2); max-width: 22ch; }
.chapter-body .side .note { margin-top: 18px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.chapter-body p { margin: 0 0 18px; font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 60ch; }
.chapter-body p em { font-style: italic; color: var(--ink); }
.chapter-body p .hl { background: linear-gradient(transparent 65%, var(--acid) 65%); padding: 0 1px; }
@media (max-width: 820px) {
  section.chapter { padding: 60px 0; }
  .chapter-head { grid-template-columns: 1fr; gap: 8px; align-items: start; }
  .chapter-body { grid-template-columns: 1fr; gap: 24px; }
}

/* ARTIFACT */
.artifact {
  margin-top: 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 26px 28px 28px;
  position: relative;
}
.artifact.tight { padding: 18px 18px 22px; }
.artifact .a-head {
  display: flex; justify-content: space-between; gap: 20px;
  padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px dashed var(--line);
  align-items: end; flex-wrap: wrap;
}
.artifact .a-head .lab { display: flex; flex-direction: column; gap: 4px; }
.artifact .a-head .ttl { font-family: var(--serif); font-size: 22px; line-height: 1.2; letter-spacing: -0.005em; }
.artifact .a-head .ttl em { font-style: italic; }
.artifact .a-head .sub { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.artifact img { width: 100%; height: auto; }
.artifact .a-foot {
  margin-top: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
}
.artifact-pair { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .artifact-pair { grid-template-columns: 1fr; } }

.artifact-trio {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}
.artifact-trio .cell { padding: 22px 22px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.artifact-trio .cell:last-child { border-right: none; }
.artifact-trio .cell .lab { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.artifact-trio .cell h5 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.15; letter-spacing: -0.005em; }
.artifact-trio .cell h5 em { font-style: italic; }
.artifact-trio .cell p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.artifact-trio .cell .img { background: var(--bg); border: 1px solid var(--line); margin-top: 6px; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.artifact-trio .cell .img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .artifact-trio { grid-template-columns: 1fr; }
  .artifact-trio .cell { border-right: none; border-bottom: 1px solid var(--line); }
  .artifact-trio .cell:last-child { border-bottom: none; }
}

/* TWO-COL contrast */
.two-problems {
  margin-top: 40px;
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.two-problems .col { padding: 28px 26px 32px; border-right: 1px solid var(--line); position: relative; }
.two-problems .col:last-child { border-right: none; }
.two-problems .col .ttl { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; font-family: var(--mono); font-size: 11px; }
.two-problems .col .ttl .sw { width: 12px; height: 12px; }
.two-problems .col.h .ttl .sw { background: var(--pink); }
.two-problems .col.a .ttl .sw { background: var(--acid); }
.two-problems .col.y .ttl .sw { background: var(--yellow); }
.two-problems .col h4 { margin: 0 0 14px; font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; max-width: 16ch; }
.two-problems .col h4 em { font-style: italic; }
.two-problems .col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.two-problems .col ul li { display: grid; grid-template-columns: 28px 1fr; padding: 12px 0; border-top: 1px dashed var(--line); gap: 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.two-problems .col ul li:first-child { border-top: none; padding-top: 0; }
.two-problems .col ul li .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.two-problems .col ul li b { font-weight: 500; color: var(--ink); }
@media (max-width: 720px) {
  .two-problems { grid-template-columns: 1fr; }
  .two-problems .col { border-right: none; border-bottom: 1px solid var(--line); }
  .two-problems .col:last-child { border-bottom: none; }
}

/* THREE-COL contrast */
.three-cols {
  margin-top: 40px;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.three-cols .col { padding: 28px 24px 32px; border-right: 1px solid var(--line); }
.three-cols .col:last-child { border-right: none; }
.three-cols .col .ttl { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; font-family: var(--mono); font-size: 11px; }
.three-cols .col .ttl .sw { width: 12px; height: 12px; }
.three-cols .col.h .ttl .sw { background: var(--pink); }
.three-cols .col.a .ttl .sw { background: var(--acid); }
.three-cols .col.y .ttl .sw { background: var(--yellow); }
.three-cols .col h4 { margin: 0 0 12px; font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1.18; letter-spacing: -0.005em; }
.three-cols .col h4 em { font-style: italic; }
.three-cols .col p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; line-height: 1.5; max-width: 32ch; }
.three-cols .col .meta { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); }
@media (max-width: 820px) {
  .three-cols { grid-template-columns: 1fr; }
  .three-cols .col { border-right: none; border-bottom: 1px solid var(--line); }
  .three-cols .col:last-child { border-bottom: none; }
}

/* PATTERNS */
.patterns {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.pattern {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 26px 24px 28px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--paper);
  min-height: 220px;
}
.pattern .num { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.pattern h4 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1.15; letter-spacing: -0.005em; }
.pattern h4 em { font-style: italic; }
.pattern p { font-size: 13px; color: var(--ink-2); margin: 0; line-height: 1.5; }
@media (max-width: 820px) { .patterns { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .patterns { grid-template-columns: 1fr; } }

/* OUTCOME */
.outcome {
  margin-top: 24px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.outcome .o { padding: 26px 22px 30px; border-right: 1px solid var(--line); }
.outcome .o:last-child { border-right: none; }
.outcome .o .lab { display: block; margin-bottom: 14px; }
.outcome .o .big { font-family: var(--serif); font-size: clamp(40px, 4vw, 56px); font-weight: 400; line-height: 1.0; letter-spacing: -0.02em; }
.outcome .o .big em { font-style: italic; }
.outcome .o .big sup { font-size: 0.5em; vertical-align: super; color: var(--muted); margin-left: 4px; }
.outcome .o .sub { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
@media (max-width: 820px) {
  .outcome { grid-template-columns: 1fr 1fr; }
  .outcome .o:nth-child(2) { border-right: none; }
  .outcome .o:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* LEARNED */
.learned {
  padding: 80px 0 110px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.learned .wrap { color: var(--paper); }
.learned .num { font-family: var(--mono); font-size: 12px; color: rgba(250,246,236,0.55); margin-bottom: 8px; }
.learned .lab { color: rgba(250,246,236,0.55); }
.learned h2 {
  margin: 0 0 40px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5vw, 76px); line-height: 0.98; letter-spacing: -0.02em;
  max-width: 18ch;
}
.learned h2 em { font-style: italic; }
.learned h2 em.acid { color: var(--acid); }
.lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid rgba(250,246,236,0.15); }
.lesson { padding: 28px 24px 36px; border-right: 1px solid rgba(250,246,236,0.15); border-bottom: 1px solid rgba(250,246,236,0.15); }
.lesson:nth-child(2n) { border-right: none; }
.lesson .n { font-family: var(--mono); font-size: 11px; color: rgba(250,246,236,0.5); margin-bottom: 14px; }
.lesson h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
.lesson h3 em { font-style: italic; }
.lesson p { font-size: 14.5px; color: rgba(250,246,236,0.78); line-height: 1.6; margin: 0; max-width: 42ch; }
@media (max-width: 720px) {
  .lessons { grid-template-columns: 1fr; }
  .lesson { border-right: none; }
}

/* NEXT */
section.next { padding: 80px 0 60px; border-bottom: 1px solid var(--line); }
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next-grid a { display: flex; flex-direction: column; gap: 18px; padding: 34px 30px; border-right: 1px solid var(--line); transition: background .2s; }
.next-grid a:last-child { border-right: none; text-align: right; align-items: flex-end; }
.next-grid a:hover { background: var(--paper); }
.next-grid .dir { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.next-grid h3 { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 42px); font-weight: 400; line-height: 1.1; letter-spacing: -0.015em; }
.next-grid h3 em { font-style: italic; }
@media (max-width: 720px) {
  .next-grid { grid-template-columns: 1fr; }
  .next-grid a { border-right: none; border-bottom: 1px solid var(--line); }
  .next-grid a:last-child { border-bottom: none; text-align: left; align-items: flex-start; }
}

footer.foot { padding: 30px 0 36px; font-size: 12px; color: var(--muted); }
footer.foot .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.foot .row .colophon { font-family: var(--mono); }
