/* Khadi Wool (CRD) case study — Figma: portfolio / Desktop - 1 (331:1473)
   Desktop from Figma; iPad/iPhone derived (see end of file). 1400 frame + 20px gutter at 1440. */

:root {
  --font: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: var(--font);   /* was IBM Plex Mono: the whole site uses Google Sans Flex */
  --ink: #000;
  --text: #464646;
  --muted: #838383;
  --muted-2: #8c8c8c;
  --surface: #f5f5f5;
  --accent: #748eff;
  --section-gap: 168px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #fff;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-variation-settings: "GRAD" 0, "ROND" 0, "wdth" 100;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p,
h1,
h2,
h3,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: none;
}

b {
  font-weight: 500;
}

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

.frame {
  padding: 0 20px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  /* hero starts below the fixed navbar: 20 (nav top) + 42 (nav) + 20 */
  padding: 82px 0 var(--section-gap);
}

/* ---------- Type ---------- */
.label {
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -0.28px;
  color: var(--muted);
  white-space: nowrap;
}

.label.muted2 {
  color: var(--muted-2);
}

.t16 {
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.32px;
  color: var(--text);
}

.t14 {
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.28px;
  color: var(--text);
}

.t14l {
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.28px;
  font-weight: 300;
  color: var(--text);
}

h2 {
  font-size: 28px;
  line-height: 35px;
  font-weight: 500;
  letter-spacing: -0.56px;
  color: var(--ink);
}

.accent {
  color: var(--accent);
}

.w206 {
  width: 206px;
}

.w690 {
  width: 100%;
  max-width: 690px;
}

.w832 {
  width: 100%;
  max-width: 832px;
}

.r12,
.f-row img,
.ac > img,
.crop {
  border-radius: 12px;
}

.txt {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
}

.txt-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.32px;
  color: var(--text);
}

/* ---------- Hero — 331:4806 ---------- */
.hero {
  position: relative;
  height: 782px;
  overflow: hidden;
  border-radius: 21.354px;
}

/* Figma crop: image 109% wide, offset -1.09% → ~12% horizontal focus */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 12% 50%;
}

.hero-word {
  position: absolute;
  left: 20px;
  top: 354px;
}

/* ---------- Title + meta — 331:4822 ---------- */
.head {
  display: flex;
  flex-direction: column;
  gap: 92px;
  padding-left: 140px;
}

.head-top {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 598px;
}

.head-title {
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
  letter-spacing: -0.64px;
  color: var(--ink);
}

.tags {
  display: flex;
  gap: 20px;
}

.tags li {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.32px;
  color: #3a3a3a;
  white-space: nowrap;
}

.meta {
  display: flex;
  justify-content: space-between;
  width: 974px;
  margin-left: auto;
}

.meta-g {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Research objectives — 331:3862 ---------- */
.obj {
  display: flex;
  gap: 20px;
  width: 561px;
  margin: 0 auto;
}

.obj-body {
  width: 406px;
  flex-shrink: 0;
}

.obj-body b {
  font-weight: 500;
}

/* ---------- Abstract — 331:4808 ---------- */
.abs {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.abs-imgs {
  display: flex;
  gap: 21px;
  align-items: flex-start;
  justify-content: center;
}

.abs-imgs img {
  flex-shrink: 0;
}

.abs-imgs img:nth-child(1) {
  width: 406px;
  height: 173px;
}

.abs-imgs img:nth-child(2) {
  width: 405px;
  height: 304px;
}

.abs-imgs img:nth-child(3) {
  width: 406px;
  height: 229px;
}

/* ---------- Context — 331:4809 ---------- */
.ctx {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

/* ---------- Approach + field work — 331:4821 ---------- */
.method {
  display: flex;
  flex-direction: column;
  gap: 65px;
  padding-bottom: 20px;
}

.approach {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 294px;
}

.approach-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 398px;
}

.pills {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 812px;
}

.pill-row {
  display: flex;
  gap: 8px;
}

.pill {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 17px 12px 10px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -0.32px;
  color: var(--text);
  white-space: nowrap;
  background:
    linear-gradient(var(--g) 16.031%, rgba(245, 245, 245, 0) 87.467%),
    var(--surface);
}

/* 7px dot, top-aligned to the 20px line (Figma: 6px from the top) */
.pill i,
.card h3 i {
  flex: none;
  align-self: flex-start;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--dot, #cbe8ef);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 75px;
  height: 1420px;
}

/* Figma frame is 1420; its content overflows by ~37px */
.field-h {
  padding-left: 426px;
  font-size: 20px;
  line-height: 25px;
  letter-spacing: -0.4px;
}

.field-rows {
  display: flex;
  flex-direction: column;
  gap: 102px;
  padding-top: 0;
}

.f-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.f-row3 {
  gap: 41px;
}

.f-row figure {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  flex: none;
}

.f-row figcaption {
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.32px;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}

.f-row3 figure {
  align-items: stretch;
}

.f-row3 figcaption {
  white-space: normal;
}

.f-row img {
  width: 100%;
  height: auto;
}

.f-row figure {
  width: var(--w);
}

.f-row1 figcaption,
.f-row2 figcaption {
  white-space: normal;
}

.f-row1 figure:nth-child(1) figcaption,
.f-row2 figure:nth-child(1) figcaption {
  white-space: nowrap;
}

/* ---------- Scope and limitations — 331:4001 ---------- */
.scope {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 71px 140px 0;
}

/* ---------- Insights — 331:5002 ---------- */
.ins {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 1230px;
  margin: 0 auto;
}

.ins-grid {
  display: grid;
  grid-template-columns: 605px 605px;
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 10px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(var(--g)), var(--surface);
}

.card h3 {
  display: flex;
  gap: 4px;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -0.32px;
  color: var(--text);
}

.card-p {
  padding-left: 10px;
}

.c1 .card-p {
  padding-left: 14.5px;
  padding-right: 4.5px;
}

/* Figma row 1 is 1226 wide, centred in 1230 → 2px in */
.c1,
.c2 {
  position: relative;
  left: 2px;
}

.c2 {
  width: 601px;
}

/* ---------- Artisans — 331:5037 ---------- */
.art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 85px;
}

.art-head {
  display: flex;
  gap: 20px;
  width: 770px;
  height: 152px;
}

.art-head h2 {
  width: 202px;
}

.art-intro {
  display: flex;
  gap: 20px;
  padding-top: 72px;
}

.art-intro p {
  width: 264px;
  flex: none;
}

.art-rows {
  display: flex;
  flex-direction: column;
  gap: 120px;
  width: 100%;
}

.a-row {
  display: flex;
  align-items: center;
}

.a-row1 {
  justify-content: space-between;
}

.a-row2 {
  gap: 10px;
  justify-content: space-between;
}

.ac {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

.ac img {
  flex: none;
}

.ac .flip {
  transform: scaleX(-1);
  object-position: bottom;
}

.ac-card {
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  letter-spacing: -0.07em;
  color: #1c1c1c;
  box-shadow: inset 0 0 0 1.279px #fff;
  /* Figma white stroke */
  border-radius: 24.305px;
}

.ac-card p {
  text-box: trim-both cap alphabetic;
  line-height: 1.5;
  font-size: 14px;
}

.ac-card b {
  font-weight: 500;
}

.ac-card .lh13 {
  line-height: 1.3;
}

.ac-card .nw {
  white-space: nowrap;
}

.ac-id {
  display: flex;
  flex-direction: column;
  gap: 10.233px;
}

.ac-card .ac-name {
  font-size: 16px;
  font-weight: 600;
  color: #c44758;
  white-space: nowrap;
}

.ac-card .ac-meta {
  font-size: 12px;
  font-weight: 400;
  color: #535353;
  text-align: justify;
  white-space: nowrap;
}

.ac-info {
  display: flex;
  flex-direction: column;
  gap: 15.35px;
}

.ac-card .ac-lang {
  font-size: 12px;
}

/* per-person sizes (Figma) */
.a1 .ac-card {
  width: 270px;
  padding: 34px 8px;
  gap: 18px;
}

.a1 .ac-id {
  width: 127.919px;
}

.a1 .ac-info p:last-child {
  width: 241px;
}

.a1 .ac-lang {
  font-size: 12.792px;
}

.a2 .ac-card {
  width: 254px;
  padding: 32px 0;
  gap: 21px;
}

.a2 .ac-meta {
  font-size: 12.792px;
}

.a2 .ac-more {
  display: flex;
  flex-direction: column;
  gap: 20.467px;
}

.a2 .ac-more .ac-lang {
  width: 247px;
}

.a2 .f128 {
  font-size: 12.792px;
}

.a3 .ac-card {
  width: 222px;
  padding: 16px 12px 34px;
  gap: 22px;
  justify-content: center;
}

.a3 .ac-lang {
  width: 198px;
}

.a3 .ac-info p:first-child {
  width: 198px;
}

.a3 .ac-info p:last-child {
  width: 179px;
}

.a4 .ac-card {
  width: 207px;
  gap: 22px;
}

.a4 .ac-lang {
  width: 207px;
}

.a5 {
  width: 488px;
}

.a5 .ac-card {
  gap: 20px;
}

.a5 .ac-info {
  gap: 16px;
}

.a5 .ac-lang {
  width: 191px;
}

.a6 .ac-card {
  width: 197px;
  padding: 0 16px 34px;
  gap: 16px;
}

.a6 .ac-lang {
  width: 165px;
}

/* ---------- Full report — 331:5177 ---------- */
.rep {
  display: flex;
  flex-direction: column;
  gap: 74px;
}

.rep-head {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 293px;
}

.rep-title {
  font-family: var(--font);
  font-size: 32px;
  line-height: normal;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink);
}

.rep-btns {
  display: flex;
  gap: 20px;
}

.rep-btn {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 20px;
  line-height: 25px;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 0.25s ease;
}

.rep-btn:hover {
  background: #ececec;
}

.books {
  display: flex;
  flex-direction: column;
  gap: 88px;
}

.crop {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.crop img {
  position: absolute;
}

/* ---------- Next project nav — 331:5189 ---------- */
.next-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: flex-end;
}

.btn-icon,
.btn-next {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface);
  transition: background-color 0.25s ease;
}

.btn-icon {
  padding: 12px;
}

.btn-icon img {
  transform: rotate(-90deg);
}

.btn-next {
  gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: -0.28px;
}

.btn-icon:hover,
.btn-next:hover {
  background: #ececec;
}

.btn-icon:focus-visible,
.btn-next:focus-visible,
.rep-btn:focus-visible {
  outline: 2px solid #7c5cff;
  outline-offset: 2px;
}

/* ---------- Reveal: hidden until JS animates it in ---------- */
.js-motion [data-reveal] {
  opacity: 0;
}
/* =====================================================================================
   RESPONSIVE — iPad (768–1199) and iPhone (≤767). Same breakpoints/gutters/gaps as the other pages.
   No Figma frames exist for these sizes: layout is derived from the desktop design.
   ===================================================================================== */

@media (max-width: 1199px) {
  :root { --section-gap: 120px; }
  .frame { padding: 0 32px; }
  .page { padding-top: 82px; } /* hero sits below the fixed navbar */

  .hero { height: auto; aspect-ratio: 1400 / 782; border-radius: 16px; }
  .hero-word { left: 1.43%; top: 45.3%; width: 26.3%; height: auto; }

  .head { padding-left: 0; gap: 64px; }
  .head-top { width: auto; max-width: 598px; }
  .meta { width: 100%; margin-left: 0; }

  .abs-imgs { gap: 16px; }
  .abs-imgs img:nth-child(n) { flex: 1 1 0; width: auto; min-width: 0; height: auto; }
  .ctx img { width: 100%; max-width: 580px; height: auto; }

  .approach { padding-left: 0; }
  .approach-head { width: auto; }
  .pills { width: auto; }
  .pill-row { flex-wrap: wrap; }
  .method { padding-bottom: 0; }
  .field { height: auto; gap: 56px; }
  .field-h { padding-left: 0; }
  .field-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 32px; align-items: start; }
  .f-row { display: contents; }
  .f-row figure { width: 100%; }
  .f-row1 figure:nth-child(n) figcaption,
  .f-row2 figure:nth-child(n) figcaption,
  .f-row3 figcaption { white-space: normal; }

  .scope { padding: 0; }
  .ins { width: 100%; }
  .ins-grid { grid-template-columns: 1fr 1fr; }
  .c1, .c2 { left: 0; }
  .c2 { width: auto; }
  .c1 .card-p { padding-left: 10px; padding-right: 0; }

  .art-head { width: 100%; height: auto; flex-direction: column; }
  .art-intro { padding-top: 0; }
  .art-rows { gap: 80px; }
  .a-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 56px 32px; align-items: start; }
  .a5 { width: auto; }
}

@media (max-width: 767px) {
  :root { --section-gap: 100px; }
  .frame { padding: 0 16px; }
  .page { padding-top: 78px; }

  .hero { aspect-ratio: 343 / 420; border-radius: 12px; }
  .hero-word { left: 5%; top: 50%; width: 70%; transform: translateY(-50%); }

  h2 { font-size: 24px; line-height: 30px; letter-spacing: -0.48px; }
  .t16, .txt-body { font-size: 14px; line-height: 18px; letter-spacing: -0.28px; }
  .head { gap: 48px; }
  .head-title { font-size: 28px; line-height: 35px; letter-spacing: -0.56px; }
  .tags { flex-wrap: wrap; gap: 8px; }
  .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .w206 { width: auto; }

  .obj { flex-direction: column; gap: 12px; width: 100%; }
  .obj-body { width: 100%; }

  .abs-imgs { flex-direction: column; gap: 16px; }
  .abs-imgs img:nth-child(n) { flex: none; width: 100%; }

  .pill { font-size: 14px; line-height: 18px; padding: 10px 14px 10px 10px; }
  .field-h { font-size: 18px; line-height: 23px; letter-spacing: -0.36px; }
  .field-rows { grid-template-columns: 1fr; gap: 40px; }
  .f-row figcaption { font-size: 14px; line-height: 18px; letter-spacing: -0.28px; }

  .ins-grid { grid-template-columns: 1fr; }
  .card h3 { font-size: 14px; line-height: 18px; letter-spacing: -0.28px; }

  .art-intro { flex-direction: column; gap: 12px; }
  .art-intro p { width: auto; }
  .a-row { grid-template-columns: 1fr; }
  .ac { flex-direction: column; align-items: flex-start; }

  .rep { gap: 48px; }
  .rep-title { font-size: 28px; }
  .rep-btn { font-size: 16px; line-height: 20px; }
  .books { gap: 40px; }
  .next-nav { gap: 12px; }
}
