/* Base reset */
html { color-scheme: light; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: fixed index column on the left (name, statement, stack of project cards);
   one large rounded reading panel on the right that previews on hover and opens the case study on click. */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --card: #f4f4f4;
  --card-hover: #e9e9e9;
  --live: #13a538;
  --live-dot: #22c55e;
  --card-deep: #e0dfde;
  --ink: #111111;
  --ink-2: #5f5f5f;
  --ink-3: #8e8e8e;
  --line: #e4e4e4;
  --mark: #ffe45c;
  --link: #1f4fd8;
  --tile-s: 42%;
  --tile-l: 91%;
  --glyph-l: 30%;
  --shadow: 0 1px 2px rgba(18, 23, 26, .05), 0 8px 24px rgba(18, 23, 26, .05);
  /* One sans family throughout. To try the Porto Rocha feel later, change the first name in --sans. */
  --sans: "Google Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans);
  --mono: var(--sans);
}
/* Single light theme by choice: the site always renders light. */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  display: grid;
  grid-template-columns: clamp(270px, 30vw, 440px) minmax(0, 1fr);
  gap: 20px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

/* ---------- Index column ---------- */
.index {
  position: relative;
  min-width: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 12px 4px 8px;
  scrollbar-width: none;
}
.index::-webkit-scrollbar { display: none; }
.who { display: flex; flex-direction: column; gap: 14px; }
.name {
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  text-decoration: none;
}
.statement {
  margin: 0;
  font-size: clamp(15.5px, 1.35vw, 18px); line-height: 1.42; font-weight: 400;
}
.statement em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.06em; }
.label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.stack { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.stack-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.card {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  height: 92px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--card-deep) calc(var(--t, 0) * 100%), var(--card));
  border-radius: 10px;
  text-decoration: none;
  transform-origin: 50% 100%;
  will-change: transform;
  transition: background .2s ease;
  animation: fadein .5s ease backwards;
  animation-delay: calc(var(--i) * 60ms);
}
@keyframes fadein { from { opacity: 0; } }
.card > * { transition: opacity .2s ease; }
.stack:hover .card:not(:hover) > * { opacity: .45; }
.card:hover, .card:focus-visible, .card[aria-current="page"] { background: var(--card-hover); }
.thumb {
  width: 60px; height: 60px; border-radius: 10px;
  background: hsl(var(--h) var(--tile-s) var(--tile-l));
  color: hsl(var(--h) 45% var(--glyph-l));
  display: grid; place-items: center;
}
.thumb svg { width: 32px; height: 32px; }
.card-title { display: block; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-line {
  color: var(--ink-2); font-size: 13.5px; line-height: 1.32; margin-top: 3px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
/* In-progress marker: bright green with a slow pulsing dot and glow */
.status { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--live); white-space: nowrap; animation: live-glow 2.4s ease-in-out infinite; }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--live-dot); vertical-align: 1px; animation: live-dot 2.4s ease-out infinite; }
.label .status { font-size: inherit; }
@keyframes live-dot { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70%, 100% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); } }
@keyframes live-glow { 0%, 100% { text-shadow: 0 0 0 rgba(34, 197, 94, 0); } 50% { text-shadow: 0 0 8px rgba(34, 197, 94, .55); } }
@media (prefers-reduced-motion: reduce) { .status, .status::before { animation: none; } }
.foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.foot a { text-underline-offset: 3px; }

/* ---------- Reading panel ---------- */
.index { grid-column: 1; grid-row: 1; }
.panel, .peek { grid-column: 2; grid-row: 1; }
.peek { min-width: 0; min-height: 0; display: grid; background: var(--panel); border-radius: 14px; overflow: hidden; z-index: 5; }
.panel {
  min-width: 0;
  background: var(--panel);
  border-radius: 14px;
  overflow-y: auto;
  position: relative;
}

/* Preview (no project open) */
.preview { min-height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 24px; padding: 0 0 12px; }
.preview-tile {
  border-radius: 14px; min-height: 280px;
  background: hsl(var(--h) var(--tile-s) var(--tile-l));
  color: hsl(var(--h) 45% var(--glyph-l));
  display: grid; place-items: center;
  transition: background .35s ease, color .35s ease;
}
.preview-tile svg { width: min(34%, 220px); height: auto; }
.preview-text { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; padding: 0 8px 8px; }
.preview-text h2 { margin: 6px 0 6px; font-size: clamp(26px, 3vw, 38px); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.preview-text p { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--ink-2); max-width: 52ch; }
.open {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--panel);
  padding: 11px 18px; border-radius: 99px; text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap;
}
.open:hover { opacity: .88; }

/* Case study */
.case { padding: clamp(22px, 4vw, 56px); display: flex; flex-direction: column; gap: clamp(36px, 5vw, 64px); max-width: 1080px; margin: 0 auto; }
.back { font-size: 13px; color: var(--ink-2); text-decoration: none; display: none; }
.case-head { display: flex; flex-direction: column; gap: 18px; }
.case-head h1 { margin: 0; font-size: clamp(36px, 5.2vw, 64px); line-height: 1; font-weight: 500; letter-spacing: -.03em; }
.lede { margin: 0; font-family: var(--serif); font-size: clamp(21px, 2.3vw, 28px); line-height: 1.3; max-width: 30ch; text-wrap: balance; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 28px; border-top: 1px solid var(--line); padding-top: 18px; margin: 0; }
.meta div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.meta dd { margin: 0; font-size: 14px; }
.ph {
  margin: 0; border-radius: 14px; border: 1px dashed var(--ink-3);
  background: hsl(var(--h) var(--tile-s) var(--tile-l));
  min-height: 200px; display: grid; place-items: center; text-align: center; padding: 20px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
}
.ph.tall { min-height: clamp(220px, 34vw, 420px); }
.ph-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.sec { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 32px; border-top: 1px solid var(--line); padding-top: 22px; }
.sec > h2 { margin: 3px 0 0; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.body { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.body p { margin: 0; font-size: 17px; line-height: 1.55; max-width: 62ch; }
.body h3 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; font-weight: 500; letter-spacing: -.02em; max-width: 24ch; text-wrap: balance; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px 28px; margin: 4px 0; }
.figs div { border-left: 1px solid var(--line); padding-left: 14px; }
.figs b { display: block; font-size: 34px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.figs span { font-size: 13px; color: var(--ink-2); }
.versus { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.versus div { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.versus .heard { border-color: var(--ink); }
.versus p { font-size: 17px; }
.needs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.needs li { font-size: 17px; line-height: 1.45; padding: 12px 0; border-bottom: 1px solid var(--line); max-width: 62ch; }
.needs li:first-child { padding-top: 0; }
.todo { color: var(--ink-3); }
.next { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.next a { text-underline-offset: 3px; }

/* ---------- Case study media ---------- */
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.preview-tile { overflow: hidden; }
.preview-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero { margin: 0; }
/* Logo covers: the mark sits centered on a light tile instead of filling it */
.preview-tile.logo, .hero.logo { background: #fafafa; border-radius: 14px; }
.preview-tile.logo img, .hero.logo img { object-fit: contain; mix-blend-mode: multiply; }
/* Heroes that must show whole (a logo panel) sit on their own background color */
.preview-tile.fit { background: var(--fitbg, #fbf5ed); }
.preview-tile.fit img { object-fit: contain; }
.hero.fit img { object-fit: contain; background: var(--fitbg, #fbf5ed); }
.fig-row.even img { aspect-ratio: 4 / 3; object-fit: cover; }
.fig.framework { align-items: center; }
.fig.framework a { display: block; width: 100%; max-width: 760px; margin: 0 auto; }
.fig.framework img { background: #fff; }
.thumb.logo { background: #fff; }
.pixel img { image-rendering: pixelated; }
.thumb.logo img { object-fit: contain; }
/* Scroll animation */
.reveal { opacity: 0; transform: scale(.9); transition: opacity 1s cubic-bezier(.2, .6, .2, 1), transform 1s cubic-bezier(.2, .6, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: block; }
.fig { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fig img, .fig video { width: 100%; height: auto; border-radius: 14px; display: block; background: var(--card); }
.fig figcaption { font-size: 13px; color: var(--ink-3); }
.fig-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.fig-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fig a { display: block; }
.body p.cap { font-size: 13px; color: var(--ink-3); line-height: 1.4; margin-top: -8px; }
/* Interviewees: persona and name centered over that person's notes board */
.interviewees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.interviewee { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
/* Persona tiles match the Give & Grow persona size; each sits centered over its own notes board */
.interviewee .persona { width: 75%; aspect-ratio: 1; object-fit: contain; background: var(--card); border-radius: 14px; display: block; }
.interviewee > a { width: 100%; display: block; }
.interviewee .board { width: 100%; height: auto; display: block; border-radius: 10px; background: #fff; }
.interviewees.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.interviewees.four .persona { width: 100%; }
.who-name { font-size: 13px; color: var(--ink-3); }
.ext { font-size: 15px; text-underline-offset: 3px; }

.persons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.persons > div { background: var(--card); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.persons p { font-size: 15.5px; line-height: 1.5; }
.persons .label { color: var(--ink); font-size: 12px; }
.people .ph { min-height: 0; aspect-ratio: 1; padding: 12px; }
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.people img { width: 100%; height: auto; display: block; background: var(--card); border-radius: 14px; }
.quote { margin: 0; font-size: clamp(19px, 2vw, 24px); line-height: 1.35; letter-spacing: -.01em; max-width: 34ch; }
.hmw { background: var(--card); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; max-width: 62ch; }
.hmw p { font-size: 18px; line-height: 1.45; }
.plain { margin: 0; padding-left: 20px; font-size: 17px; line-height: 1.55; max-width: 62ch; }
@media (max-width: 620px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Narrow screens ---------- */
@media (max-width: 620px) {
  html, body { height: auto; }
  body { display: block; }
  .index { overflow: visible; padding-bottom: 24px; }
  .statement { font-size: 19px; }
  .panel { overflow: visible; }
  body:not(.reading) .panel { display: none; }
  .peek { display: none; }
  body.reading .index { display: none; }
  .back { display: inline-block; }
  .sec { grid-template-columns: minmax(0, 1fr); }
  .case { padding: 22px 18px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; transition: none; }
  .preview-tile { transition: none; }
}
