.portfolio-cover {
  --header-height: 90px;
  --paper: #f6f1e8;
  padding-top: var(--header-height);
  color: var(--paper);
  background: #101211;
}
.cover-bar { padding: 24px var(--gutter); display: flex; align-items: center; gap: 16px; }
.cover-carousel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "stage stage stage" "heading controls actions";
  align-items: center;
  background: #101110;
  border-bottom: 1px solid #30312e;
}
.cover-carousel > .eyebrow {
  grid-area: heading;
  margin: 0 12px 0 var(--gutter);
  color: #c8c9c1;
  font: 500 11px/1.5 var(--sans);
  letter-spacing: .11em;
  text-transform: uppercase;
}
.cover-stage {
  grid-area: stage;
  border-bottom: 1px solid rgb(245 240 231 / 14%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: size;
  height: clamp(230px, calc(100svh - var(--header-height) - 70px), 900px);
  touch-action: pan-y pinch-zoom;
}
.cover-slide {
  --matte: #171d1a;
  --aperture: 75%;
  --max-aperture: 180cqh;
  --focus: 50% 50%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  margin: 0;
  background: var(--matte);
  opacity: 0;
  transition: opacity 1050ms ease-in-out;
  pointer-events: none;
}
.cover-slide[data-current] { z-index: 1; opacity: 1; pointer-events: auto; }
.cover-slide[data-series="of-earth-and-ether"] { --aperture: 58%; --max-aperture: 120cqh; --focus: 50% 21%; }
.cover-slide[data-series="sophie"] { --matte: #21151a; --focus: 45% 0%; --phone-focus: 50% 0%; }
.cover-slide[data-series="dreamland"] { --matte: #202721; --focus: 54% 50%; }
.cover-slide[data-series="kintsugi"] { --matte: #100e0e; --aperture: 58%; --max-aperture: 120cqh; --focus: 50% 28%; }
.cover-slide[data-series="roxana"] { --matte: #151427; --focus: 48% 34%; }
.cover-slide[data-series="cosmic"] { --matte: #090c11; --focus: 66% 33%; }
.cover-slide[data-series="julia"] { --matte: #211e1c; --aperture: 58%; --max-aperture: 120cqh; --focus: 42% 24%; }
.cover-slide[data-series="kihaya-blues"] { --matte: #101421; --focus: 53% 38%; }
.cover-slide picture {
  position: absolute;
  inset: 0 0 0 auto;
  width: var(--aperture);
  width: min(var(--aperture), var(--max-aperture));
}
.cover-slide picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--matte), transparent 26%),
              linear-gradient(0deg, rgb(0 0 0 / 24%), transparent 32%);
}
.cover-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus); }
.cover-legend {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(50px, 18cqh, 160px);
  width: calc(100% - 2 * var(--gutter));
  pointer-events: none;
}
.cover-service {
  margin: 0 0 14px;
  color: #fff8ea;
  font: 600 clamp(12px, 1vw, 15px)/1.5 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.cover-legend h2 {
  max-width: 12ch;
  margin: 0 0 0 -.045em;
  font: italic 400 clamp(68px, 7.8vw, 145px)/.98 var(--display);
  letter-spacing: -.055em;
  text-wrap: balance;
}
.cover-legend a { pointer-events: auto; color: inherit; text-decoration: none; }
.cover-legend a:hover .cover-story-arrow, .cover-legend a:focus-visible .cover-story-arrow { background: var(--paper); color: #111; }
.cover-story-arrow {
  display: inline-grid;
  place-items: center;
  vertical-align: .55em;
  width: 1.85em;
  height: 1.85em;
  margin-left: .55em;
  border: 1px solid rgb(245 240 230 / 50%);
  border-radius: 50%;
  font: 400 clamp(14px, 1.2vw, 19px)/1 var(--sans);
  letter-spacing: 0;
}
.cover-legend { opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .4s; }
[data-current] .cover-legend { opacity: 1; transform: none; transition: opacity .65s .18s, transform .8s .14s cubic-bezier(.16,1,.3,1); }
.cover-controls { grid-area: controls; display: flex; align-items: center; margin-block: 12px; }
.cover-controls[hidden] { display: none; }
.cover-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  font: 22px/1 var(--sans);
  cursor: pointer;
}
.cover-controls button:hover, .cover-controls button:focus-visible { background: #292a27; }
.cover-controls [data-play] { border: 1px solid #595b54; border-radius: 50%; }
.cover-controls [data-play] span { width: 9px; height: 12px; border-inline: 2px solid currentColor; }
.cover-controls [data-play][data-paused] span { width: 0; height: 0; margin-left: 2px; border: solid transparent; border-width: 6px 0 6px 9px; border-left-color: currentColor; }
.cover-count { margin-inline: 18px 8px; color: #abaea6; font: 12px/1 ui-monospace, monospace; white-space: nowrap; }
.cover-count b { font-weight: 500; color: var(--paper); }
.cover-actions { grid-area: actions; justify-self: end; margin-right: var(--gutter); }
.cover-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 44px;
  padding-inline: 20px;
  border-radius: 24px;
  color: #191a17;
  background: var(--paper);
  font: 600 13px/1.2 var(--sans);
  white-space: nowrap;
}
.cover-actions a:hover, .cover-actions a:focus-visible { background: white; text-decoration: underline; text-underline-offset: 3px; }
[data-cover-privacy] .privacy-banner {
  position: static;
  max-width: none;
  margin: 0;
  padding: 24px var(--gutter);
  border: 0;
  border-bottom: 1px solid #32332f;
  box-shadow: none;
  background: #181917;
  align-items: center;
}
[data-cover-privacy] .privacy-banner .section-kicker { display: none; }
[data-cover-privacy] .privacy-banner h2 { font-size: 24px; }
[data-cover-privacy] .privacy-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cover-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 1280px) { .portfolio-cover { --header-height: 80px; } }
@media (max-width: 740px) {
  .portfolio-cover { --header-height: 76px; }
  .cover-carousel { grid-template-columns: 1fr auto; grid-template-areas: "heading heading" "stage stage" "controls actions"; }
  .cover-carousel > .eyebrow { margin: 0; padding: 8px var(--gutter); font-size: 10px; }
  .cover-stage { height: clamp(220px, calc(100svh - var(--header-height) - 98px), min(132vw, 740px)); }
  .cover-slide picture { width: 100%; }
  .cover-slide img { object-position: var(--phone-focus, center); }
  .cover-slide picture::after { background: linear-gradient(0deg, rgb(0 0 0 / 80%), rgb(0 0 0 / 36%) 21%, transparent 47%); }
  .cover-legend { bottom: 24px; text-shadow: 0 1px 4px rgb(0 0 0 / 65%); }
  .cover-service { font-size: 12px; margin-bottom: 7px; }
  .cover-legend h2 { max-width: 14ch; font-size: clamp(41px, 11vw, 75px); }
  .cover-story-arrow { vertical-align: .28em; font-size: 13px; }
  .cover-controls { margin: 8px 0 8px max(4px, calc(var(--gutter) - 8px)); }
  .cover-controls [data-play] { border: 0; }
  .cover-count { margin-inline: 3px; }
  .cover-actions { margin-right: max(12px, calc(var(--gutter) - 4px)); }
  .cover-actions a { padding-inline: 14px; gap: 8px; }
  [data-cover-privacy] .privacy-banner { gap: 14px; padding-block: 20px; }
}
@media (max-width: 360px) {
  .cover-controls { margin-left: 4px; }
  .cover-count { font-size: 11px; margin-inline: 0; }
  .cover-actions { margin-right: 8px; }
  .cover-actions a { padding-inline: 10px; gap: 5px; }
}
@media (min-width: 741px) and (max-height: 500px) {
  .cover-legend { bottom: 20px; }
  .cover-legend h2 { font-size: clamp(42px, 6vw, 72px); }
  .cover-service { margin-bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-slide, .cover-legend, [data-current] .cover-legend { transition: none; transform: none; }
}
