/* Besties — case study page. Amelia's cream + Sometype Mono aesthetic,
   single-column editorial layout modeled on christina-lu.com/work/onepratt. */

:root {
  --bg: #FAF9F5;
  --ink: #1a1a1a;
  --body: #33322e;
  --muted: #9C9C9C;
  --line: rgba(30, 40, 60, .13);
  --coral: #6b5f4e;          /* warm taupe accent (shared with the Booth case study) */
  --coral-ink: #1a1a1a;      /* ink for active nav + emphasis */
  --panel: #F1EEE7;          /* neutral warm panel */
  --panel-line: rgba(60, 50, 40, .16);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Sometype Mono', ui-monospace, monospace;
  color: var(--body);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.wrap { max-width: 1500px; margin-left: 380px; padding: 0 clamp(48px, 6vw, 96px) 128px 64px; }
.measure { max-width: none; }   /* prose runs full-width, aligned with the figures */

a { color: inherit; }

/* ---------- Fixed left nav: back link + vertical section list ---------- */
.sidenav {
  position: fixed; top: 0; left: 0; z-index: 20;
  width: 380px; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 40px 30px 30px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink); text-decoration: none;
  cursor: pointer; transition: color .2s ease;
}
.back-link svg { width: 15px; height: 15px; }
.back-link:hover { color: var(--coral-ink); }

.toc { margin-top: 42px; display: flex; flex-direction: column; gap: 3px; }
.toc a {
  font-size: 14px; color: var(--muted); text-decoration: none;
  padding: 6px 0; transition: color .2s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--coral-ink); }

.sidenav .wordmark { margin-top: auto; padding-top: 30px; font-size: 12px; color: var(--muted); }

/* below tablet: collapse the sidebar into a sticky top bar */
@media (max-width: 900px) {
  .sidenav {
    position: sticky; top: 0; width: auto; height: auto; overflow: visible;
    flex-direction: row; align-items: center; gap: 22px;
    padding: 13px clamp(20px, 5vw, 40px);
    border-right: none; border-bottom: 1px solid var(--line);
    background: rgba(250, 249, 245, .85);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
  }
  .back-link { font-size: 13px; white-space: nowrap; }
  .toc { display: none; }                                  /* no section nav on mobile */
  .sidenav .wordmark { margin: 0 0 0 auto; padding: 0; font-size: 13px; }
  .wrap { margin-left: auto; margin-right: auto; max-width: 960px; padding: 0 clamp(20px, 5vw, 40px); }
}

/* ---------- Hero ---------- */
.hero { padding: 64px 0 24px; }
.eyebrow {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral); font-weight: 500;
}
.hero h1 {
  font-size: clamp(38px, 7vw, 60px); font-weight: 500; letter-spacing: -.02em;
  color: var(--ink); line-height: 1.02; margin: 14px 0 0;
}
.hero .lede {
  font-size: clamp(16px, 2.2vw, 19px); color: var(--body); line-height: 1.6;
  margin-top: 20px;
}

/* category chips under the hero title */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--coral);
  border: 1px solid var(--panel-line); border-radius: 999px; padding: 5px 12px;
}
.tags .dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #b8823f; display: inline-block;      /* status indicator */
}

.hero-banner {
  margin-top: 44px;
  border-radius: 22px; overflow: hidden; position: relative;
  background:
    radial-gradient(120% 140% at 12% 0%, #f7b9c2 0%, rgba(247,185,194,0) 55%),
    linear-gradient(118deg, #f7a7b0 0%, #ff8a6d 46%, #ff6347 100%);
  display: flex; justify-content: center; align-items: center;
  padding: clamp(36px, 4.5vw, 52px) clamp(20px, 5vw, 56px);
  min-height: 300px;
}
.hero-banner::after {   /* faint grain to match the Figma texture */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px; opacity: .10; mix-blend-mode: overlay;
}
.hero-banner img { position: relative; width: 100%; max-width: 960px; height: auto; display: block; }

/* ---------- Meta block (role / timeline / tools / skills) ---------- */
.meta {
  margin-top: 40px; padding: 26px 30px;
  background: var(--panel); border-radius: 18px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.meta .label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--coral); font-weight: 500; margin-bottom: 8px;
}
.meta .val { font-size: 15px; color: var(--ink); line-height: 1.5; }
.meta .val + .val { margin-top: 3px; }
@media (max-width: 680px) { .meta { grid-template-columns: repeat(2, 1fr); gap: 22px; } }

/* ---------- Sections ---------- */
.section { padding: 74px 0 0; scroll-margin-top: 36px; }
@media (max-width: 900px) { .section { scroll-margin-top: 76px; } }
.section > .eyebrow { display: block; }
.section h2 {
  font-size: clamp(26px, 4vw, 33px); font-weight: 500; letter-spacing: -.01em;
  color: var(--ink); line-height: 1.12; margin: 12px 0 0;
}
.section h3 {
  font-size: 18px; font-weight: 500; color: var(--ink); margin: 0 0 4px;
}
.section p { font-size: 15px; line-height: 1.85; color: var(--body); }
.section p + p { margin-top: 16px; }
.lead { margin-top: 20px; }

.sub { margin-top: 52px; }
.sub .kicker {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}

/* ---------- Figures ---------- */
figure { margin: 26px 0 0; }
.fig {
  border-radius: 16px; overflow: hidden;
}
.fig img { display: block; width: 100%; height: auto; }
figcaption { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.55; }

/* text + tall image side by side (problem / distance map) */
.split { display: grid; grid-template-columns: 1fr 244px; gap: 48px; align-items: center; margin-top: 8px; }
.split .fig { border-radius: 20px; }
.split figure { margin-top: 0; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; gap: 24px; max-width: 340px; } }

/* ---------- Cards (interview themes / competitors) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 20px;
}
.card .ct { font-size: 16px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.card p { font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.card .tag {
  display: inline-block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 10px;
}
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Callout (How Might We) ---------- */
.callout {
  margin-top: 30px; display: flex; gap: 20px; align-items: center;
  background: var(--panel);
  border-radius: 18px; padding: 26px 28px;
}
.callout .bulb { font-size: 42px; line-height: 1; flex-shrink: 0; }
.callout p {
  font-size: clamp(17px, 2.4vw, 21px); line-height: 1.45; color: var(--ink);
}
.callout .hmw { color: var(--coral); }

/* ---------- Takeaway list (competitive analysis) ---------- */
.takes { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.take { display: grid; grid-template-columns: 132px 1fr; gap: 20px; align-items: start; }
.take .who { font-size: 15px; font-weight: 500; color: var(--ink); }
.take p { font-size: 14px; line-height: 1.7; color: var(--body); }
@media (max-width: 680px) { .take { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Solution flows ---------- */
.flow { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: center; margin-top: 40px; }
.flow:first-of-type { margin-top: 30px; }
.flow .shot {
  display: flex; justify-content: center;
}
.flow .shot img,
.flow .shot video { width: 100%; max-width: 240px; height: auto; display: block; border-radius: 20px; }
.flow .txt h3 { font-size: 22px; margin-bottom: 10px; }
.flow .txt p { font-size: 15px; line-height: 1.8; color: var(--body); }
.flow.rev { grid-template-columns: 1fr 300px; }
.flow.rev .shot { order: 2; }
@media (max-width: 720px) {
  .flow, .flow.rev { grid-template-columns: 1fr; gap: 20px; }
  .flow.rev .shot { order: 0; }
  .flow .shot { max-width: 320px; }
}

/* ---------- Learnings ---------- */
.learn { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 28px; }
.learn .item h3 { font-size: 19px; margin-bottom: 8px; }
.learn .item p { font-size: 14.5px; line-height: 1.75; color: var(--body); }
@media (max-width: 680px) { .learn { grid-template-columns: 1fr; gap: 22px; } }


/* entrance */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero h1 { animation-delay: .05s; }
  .hero .lede { animation-delay: .1s; }
  .hero-banner { animation-delay: .16s; }
}
