/* Shared layout for the case study pages (remembra, laguna, doorway). */
/* HERO: the silver of the project card, as if you stepped into it */
.cs-hero { background: var(--silver); overflow: hidden; }
.cs-hero .wrap {
  display: grid; grid-template-columns: 1fr 520px; gap: 56px 64px; align-items: center; align-content: center;
  min-height: calc(86vh - var(--nav-h));
  padding-top: 56px; padding-bottom: 56px;
}
.back { display: inline-flex; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 40px; transition: color .2s; }
.back:hover { color: var(--red); }
.cs-hero h1 { font-size: clamp(48px, 7vw, 92px); font-weight: 700; letter-spacing: -.035em; line-height: 1; margin-bottom: 24px; }
.cs-hero__lede { font-size: 21px; line-height: 1.5; color: var(--body); max-width: 520px; }
.cs-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* facts run as one full-width row along the bottom of the hero */
.facts {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.facts dd { font-size: 15px; }

/* Lineup: three screens in a row, the middle one raised */
.lineup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4%; align-items: center; }
.lineup img { width: 100%; border-radius: 14px; animation: rise .6s cubic-bezier(.3,1.12,.6,1) both; }
.lineup img:nth-child(2) { transform: translateY(-8%); animation-name: rise-mid; animation-delay: .06s; }
.lineup img:nth-child(3) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(12%); } }
@keyframes rise-mid { from { opacity: 0; transform: translateY(4%); } to { transform: translateY(-8%); } }

/* BODY: sticky contents + reading column */
.cs-body { background: #fff; }
.cs-body .wrap { display: grid; grid-template-columns: 200px 1fr; gap: 72px; }
.toc { position: sticky; top: calc(var(--nav-h) + 40px); align-self: start; display: grid; gap: 10px; font-size: 14px; }
.toc p { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.toc a { color: var(--muted); padding-left: 12px; border-left: 2px solid transparent; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); border-color: var(--red); }
.cs-content { max-width: 820px; display: grid; gap: 96px; }
.cs-section { scroll-margin-top: calc(var(--nav-h) + 32px); }
.cs-section .h2 { margin-bottom: 24px; }
.prose { display: grid; gap: 20px; font-size: 18px; line-height: 1.7; color: var(--body); max-width: 680px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 8px 0 36px; }
.stats div { border-top: 2px solid var(--red); padding-top: 14px; }
.stats b { display: block; font-size: clamp(36px, 4vw, 52px); font-weight: 700; letter-spacing: -.03em; color: var(--red); line-height: 1; margin-bottom: 8px; }
.stats span { font-size: 15px; color: var(--muted); line-height: 1.4; }

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 32px; }
.panel { background: var(--silver); border-radius: 22px; }
.feature .media { margin-bottom: 18px; }
.feature h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.feature p { font-size: 16px; line-height: 1.6; color: var(--body); }

.quote { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--red); max-width: 720px; }

.panel { overflow: hidden; }
.panel iframe { display: block; width: 100%; border: 0; }
.panel--proto iframe { aspect-ratio: 16 / 10; }
.panel--video iframe { aspect-ratio: 16 / 9; }

.rows { border-top: 1px solid var(--line); }
.rows div { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.rows dt { font-weight: 700; }
.rows dd { color: var(--muted); }

/* Building blocks used by the longer case studies */
.flow { display: grid; gap: 28px; }
.h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-top: 12px; }
.media { background: var(--silver); border-radius: 22px; padding: 6%; display: grid; place-items: center; }
/* most screenshots sit on white; multiply lets the silver show through */
.media img { width: 100%; mix-blend-mode: multiply; }
.media--bleed { padding: 0; overflow: hidden; }
.media--bleed img { mix-blend-mode: normal; }
.caption { font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: 12px; }
.gallery { display: grid; gap: 20px; }
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery h3 { font-size: 17px; font-weight: 700; margin: 16px 0 6px; }
.gallery p { font-size: 15px; line-height: 1.6; color: var(--body); }
.ticks { list-style: none; display: grid; gap: 10px; font-size: 17px; line-height: 1.55; color: var(--body); }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .72em; width: 12px; height: 2px; background: var(--red); }
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.paths > div { border-top: 2px solid var(--red); padding-top: 16px; }
.paths h3 { font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 4px; }
.paths > div > p { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.quotes blockquote { background: var(--silver); border-radius: 22px; padding: 26px 28px; font-size: 17px; line-height: 1.55; color: var(--ink); }
.quotes blockquote:first-child { grid-column: 1 / -1; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }

/* TAKEAWAYS: red, like the About section on the homepage */
.takeaways { background: var(--red); color: #fbf3f1; }
.takeaways .eyebrow { color: rgba(255,255,255,.65); }
.takeaways .wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; }
.takeaways .prose { color: rgba(255,245,243,.88); }

/* NEXT PROJECT */
.next { display: block; background: var(--silver); transition: background .3s; }
.next .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 72px; padding-bottom: 72px; }
.next .eyebrow { margin-bottom: 10px; }
.next h2 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 700; letter-spacing: -.03em; }
.next__arrow { font-size: 40px; transition: transform .3s cubic-bezier(.3,1.12,.6,1); }
.next:hover { background: #e9e9e9; }
.next:hover .next__arrow { transform: translateX(10px); color: var(--red); }

@media (max-width: 900px) {
  /* phones: text, then the three screens fully in view, then the facts */
  .cs-hero .wrap { grid-template-columns: 1fr; gap: 0; min-height: 0; padding-top: 28px; padding-bottom: 40px; }
  .back { margin-bottom: 24px; }
  .cs-hero h1 { font-size: 44px; margin-bottom: 16px; }
  .cs-hero__lede { font-size: 17px; }
  .cs-hero__actions { margin-top: 22px; }
  .lineup { width: 100%; max-width: 320px; margin: 36px auto 0; padding-top: 12px; gap: 5%; }
  .lineup img { border-radius: 8px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 36px; padding-top: 18px; }
  .facts dt { font-size: 11px; margin-bottom: 4px; }
  .facts dd { font-size: 14px; }
  .cs-body .wrap { grid-template-columns: 1fr; }
  .toc { display: none; }
  .cs-content { gap: 72px; }
  .prose { font-size: 17px; }
  .stats, .features, .gallery--2, .gallery--3, .paths, .quotes { grid-template-columns: 1fr; }
  .quotes blockquote:first-child { font-size: 18px; }
  .rows div { grid-template-columns: 1fr; gap: 4px; }
  .takeaways .wrap { grid-template-columns: 1fr; gap: 24px; }
  .next .wrap { padding-top: 48px; padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .lineup img { animation: none; }
  .next__arrow { transition: none; }
}
