/* Obsidian Project (from "Obsidian Project.dc.html") */
.p-media { padding: clamp(32px, 4vw, 56px) var(--gutter) 0; }
.shell-media, .media-image, .grid-cell {
  border-radius: 28px; background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.shell-media { padding: 8px; }
.shell-media iframe { width: 100%; border: none; display: block; border-radius: 20px; }
.media-video { aspect-ratio: 96 / 47; }
.media-demo { aspect-ratio: 16 / 10; background: #fff; }

.media-pair {
  aspect-ratio: 16 / 8; border-radius: 28px; padding: 20px;
  background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .06);
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px;
}
.media-pair img { width: 100%; height: 100%; min-height: 0; }
.media-pair img:first-child { object-fit: cover; border-radius: 6px; }
.media-pair img:last-child { object-fit: contain; }

.media-banner {
  position: relative; display: block; width: 100%; min-height: 220px; border-radius: 28px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); background: #000;
}
.media-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--ease-out); }
.banner-shade {
  position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .6) 100%);
  transition: opacity .5s var(--ease-out);
}
.banner-label {
  position: absolute; left: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 16px; font-weight: 500;
  opacity: 0; transform: translateY(6px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.media-banner.is-link:hover img, .media-banner.is-link:focus-visible img { transform: scale(1.03); }
.media-banner.is-link:hover .banner-shade, .media-banner.is-link:focus-visible .banner-shade { opacity: 1; }
.media-banner.is-link:hover .banner-label, .media-banner.is-link:focus-visible .banner-label { opacity: 1; transform: translateY(0); }

.media-image {
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 4vw, 64px);
}
.media-image img { max-width: 100%; max-height: 100%; border-radius: 6px; }

.media-grid { display: grid; gap: 16px; }
.grid-cell { overflow: hidden; display: flex; align-items: center; justify-content: center; }
.grid-cell img { width: 100%; height: 100%; object-fit: cover; }
.grid-cell.is-ph { padding: 20px; }
.grid-cell span { font-size: 14px; font-weight: 500; color: var(--fg-muted); text-align: center; }

.p-head {
  display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start;
  padding: 48px var(--gutter) 64px;
}
.p-title { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.p-tag {
  display: inline-block; align-self: flex-start; padding: 7px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: #c9c9c9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.p-title h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); letter-spacing: -0.045em; line-height: 1; color: #fff; text-wrap: balance; }
.p-lede { flex: 2 1 480px; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.p-lede .ml-heading-xs { color: var(--fg-muted); line-height: 1.35; max-width: 40ch; text-wrap: pretty; }
.p-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }

.p-body { display: flex; flex-direction: column; padding: 0 var(--gutter); }
.p-row { display: flex; flex-wrap: wrap; gap: 16px 48px; border-top: 1px solid var(--hair); padding: 24px 0 48px; }
.p-row h2 { flex: 1 1 280px; font-size: 14px; font-weight: 500; }
.p-copy { flex: 2 1 480px; display: flex; flex-direction: column; gap: 16px; max-width: 62ch; }
.p-copy p { font-size: 18px; text-wrap: pretty; }
.p-stack { flex: 2 1 480px; font-size: 18px; color: var(--fg-muted); max-width: 62ch; }

.p-next { padding: clamp(48px, 6vw, 80px) var(--gutter) clamp(96px, 11vw, 160px); }
.next-link { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px; color: #fff; transition: color .45s var(--ease-out); }
.next-label { font-size: 14px; font-weight: 500; color: var(--fg-muted); }
.next-title { display: inline-flex; align-items: center; gap: 12px; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.2; }
.next-arrow { display: inline-flex; transition: transform .45s var(--ease-out); }
.next-link:hover .next-arrow, .next-link:focus-visible .next-arrow { transform: translateX(4px); }

/* Interactive story sheet */
.story { position: fixed; inset: 0; z-index: 1000; background: #05080e; overscroll-behavior: contain; font-family: var(--font-family-body); }
.story-loading {
  position: absolute; left: 0; right: 0; top: 50%; margin: 0; transform: translateY(-50%);
  text-align: center; font-size: 14px; font-weight: 500; color: #93a7bd;
  transition: opacity .4s var(--ease-out); pointer-events: none;
}
.story-loading.is-done { opacity: 0; }
.story iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #05080e;
  opacity: 0; transition: opacity .7s var(--ease-out);
}
.story iframe.is-loaded { opacity: 1; }
.story-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 11px); right: clamp(16px, 4vw, 40px);
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(74, 96, 118, .42); background: rgba(5, 8, 14, .6); color: #eaf1f8;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: opacity .3s var(--ease-out), visibility .3s, background .3s var(--ease-out), border-color .3s var(--ease-out);
}
.story-close:hover { background: rgba(96, 214, 240, .08); border-color: rgba(96, 214, 240, .55); }
.story-close.is-hidden { opacity: 0; visibility: hidden; }
.story-close span { position: relative; display: block; width: 14px; height: 14px; }
.story-close span::before, .story-close span::after {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 1.5px; border-radius: 1px; background: currentColor;
}
.story-close span::before { transform: rotate(45deg); }
.story-close span::after { transform: rotate(-45deg); }

/* Play button on linked hero banners (opens the interactive story) */
.banner-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: clamp(64px, 8vw, 96px); aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(12, 12, 12, .55);
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 18px 40px -16px rgba(0, 0, 0, .7);
  transition: background .5s var(--ease-out), color .5s var(--ease-out), scale .6s var(--ease-out);
}
.banner-play svg { width: 34%; height: auto; margin-left: 6%; }
/* ring that pulses outward on hover, like the story is about to start */
.banner-play::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); opacity: 0;
}
.media-banner.is-link:hover .banner-play, .media-banner.is-link:focus-visible .banner-play {
  background: #fff; color: var(--ink); scale: 1.1;
}
.media-banner.is-link:hover .banner-play::after, .media-banner.is-link:focus-visible .banner-play::after {
  animation: play-pulse 1.4s var(--ease-out) infinite;
}
.media-banner.is-link:active .banner-play { scale: 1.02; }
@keyframes play-pulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .media-banner.is-link:hover .banner-play::after { animation: none; }
}

/* On phones, show banner images whole: the 220px minimum would crop wide charts at the sides */
@media (max-width: 599px) {
  .media-banner { min-height: 0; }
}
