/* THE TOP OF A CASE STUDY: the bar (the house that leads home, and the three words), the breadcrumb, the title, and the product reel. */

h1 {
  margin: 0;
}
/* the bar and the title block */
.bar {
  height: 88px;
  padding: 44px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font:
    500 16px/20px 'Geist Mono',
    monospace;
}
.bar nav {
  display: flex;
  gap: 32px;
}
.bar nav a {
  text-decoration: none;
  color: var(--tertiary);
}
.bar nav a.on {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 8%;
  text-underline-offset: 4px;
}
/* home: a pen-drawn house in place of a word. Grey at rest like Work and Resume; black and filled on hover and on its own page,
     the way the text goes black; smoke from the chimney only while hovered */
.home {
  display: block;
  line-height: 0;
  color: var(--tertiary);
  border-radius: 4px;
  transition: color 0.15s;
}
.home.on,
.home:hover {
  color: var(--primary);
}
.home:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
}
.home svg {
  width: 30px;
  height: 26px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home svg {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
} /* hover: the house lifts a touch */
.home:hover svg {
  transform: translateY(-2px) scale(1.06);
}
.home .ink path {
  stroke-width: 1.5;
}
.home .ink .p2 {
  stroke-width: 1;
  opacity: 0.45;
}
.home .fill,
.home .door {
  stroke: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.home .fill {
  fill: var(--primary);
}
.home .door {
  fill: var(--paper);
}
.home:hover .fill,
.home.on .fill,
.home:hover .door,
.home.on .door {
  opacity: 1;
}
.home .smoke path {
  stroke-width: 1.1;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.home:hover .smoke path {
  animation: home-puff 1.8s ease-out infinite;
}
.home:hover .smoke .s2 {
  animation-delay: 0.6s;
}
.home:hover .smoke .s3 {
  animation-delay: 1.2s;
}
@keyframes home-puff {
  0% {
    opacity: 0;
    transform: translate(0, 2px) scale(0.55);
  }
  25% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translate(1.6px, -7px) scale(1.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home:hover .smoke path {
    animation: none;
    opacity: 0.7;
  }
  .home:hover svg {
    transform: none;
  }
}
.crumb {
  margin-top: 48px;
  font:
    500 16px/21px 'Geist Mono',
    monospace;
  color: var(--placeholder);
}
.crumb b {
  font-weight: 500;
  color: var(--primary);
}
/* the way back: "work" in the breadcrumb is a quiet link; it takes the page's main colour only under the pointer */
.crumb a {
  color: inherit;
  text-decoration: none;
  padding: 8px 0;
  margin: -8px 0;
  transition: color 0.15s;
}
.crumb a:hover {
  color: var(--primary);
}
.crumb a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
  border-radius: 3px;
  color: var(--primary);
}
h1 {
  margin-top: 28px;
  font: 600 56px/60px Inter;
  color: var(--primary);
}
.sub {
  margin-top: 10px;
  font:
    500 14px/18px 'Geist Mono',
    monospace;
  color: var(--placeholder);
}
.hero {
  margin-top: 42px;
  padding: 20px 16px 0;
  border-radius: 12px;
  background: var(--grain), var(--field);
}
.hero img,
.hero video {
  display: block;
  width: 100%;
  aspect-ratio: 1456 / 860;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  background: #fff;
}
.hero-wrap {
  position: relative;
  margin-top: 42px;
}
.hero-wrap .hero {
  margin-top: 0;
}
.reel-pp {
  position: absolute;
  right: 28px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  opacity: 0;
  transition:
    opacity 0.2s,
    background 0.15s;
}
.hero-wrap:hover .reel-pp,
.reel-pp:focus-visible,
.reel-pp.paused {
  opacity: 1;
}
.reel-pp:hover {
  background: rgba(15, 23, 42, 0.68);
}
.reel-pp svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}
.reel-pp:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
@media (hover: none) {
  .reel-pp {
    opacity: 1;
  }
}
@media (max-width: 820px) {
  .reel-pp {
    width: 26px;
    height: 26px;
    right: 18px;
    bottom: 8px;
  }
  .reel-pp svg {
    width: 10px;
    height: 10px;
  }
}
@media (max-width: 820px) {
  h1 {
    font-size: 40px;
    line-height: 44px;
  }
}
