:root {
  color-scheme: dark;
  --bg: #050506;
  --surface: #101113;
  --surface-soft: #17181a;
  --text: #f4f2eb;
  --muted: rgba(244, 242, 235, 0.64);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #d1b34d;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: Avenir, "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

body.section-focus {
  overflow: hidden;
}

button,
video {
  font: inherit;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  background: #030303;
}

.intro {
  position: relative;
  height: 154px;
  min-height: 154px;
  max-height: 154px;
  overflow: hidden;
  background: #e9e9e5;
}

.intro__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 35% center;
}

.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.46) 100%);
}

.intro__copy {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  z-index: 1;
  color: #fff;
}

.eyebrow,
.section-card__index,
.section-card__cue {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 9px 0 0;
  font-size: clamp(30px, 10vw, 45px);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro__line {
  display: none;
  width: min(275px, 84%);
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.section-feed {
  display: grid;
  gap: 42px;
  padding: 0 0 48px;
  background: #030303;
  min-height: auto;
}

.portfolio-section {
  background: #030303;
}

.section-card {
  position: relative;
  width: 100%;
  height: clamp(150px, 42vw, 205px);
  min-height: 150px;
  max-height: 205px;
  display: block;
  padding: 0;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: #111;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.section-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 420ms ease, filter 420ms ease;
}

.section-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.16) 50%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.58) 100%);
}

.section-card__content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}

.section-card__title {
  color: #fff;
  font-size: clamp(19px, 6vw, 30px);
  font-weight: 300;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-card__cue {
  opacity: 0.95;
  color: var(--accent);
  white-space: nowrap;
}

.section-card[aria-expanded="true"] img {
  transform: scale(1.055);
  filter: brightness(0.82);
}

.section-card[aria-expanded="true"] .section-card__cue::after {
  content: " / Close";
}

.section-panel {
  max-height: 0;
  overflow: hidden;
  background: #08090a;
  transition: max-height 520ms cubic-bezier(.2, .9, .2, 1);
}

.portfolio-section.is-open .section-panel {
  max-height: none;
}

.section-feed.has-open {
  display: block;
  min-height: 0;
  background: var(--bg);
  padding: 0;
}

body.section-focus .intro {
  display: none;
}

.section-feed.has-open .portfolio-section:not(.is-open) {
  display: none;
}

.section-feed.has-open .portfolio-section.is-open {
  min-height: 100svh;
  background: #f1f0ec;
  color: #111;
}

.section-feed.has-open .portfolio-section.is-open .section-card {
  height: 148px;
  min-height: 148px;
  max-height: 148px;
}

.section-feed.has-open .portfolio-section.is-open .section-panel {
  height: calc(100svh - 148px);
  overflow: auto;
  background: #f1f0ec;
  color: #111;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.panel-close {
  width: calc(100% - 24px);
  min-height: 38px;
  margin: 12px 12px 0;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-copy {
  padding: 16px 18px 18px;
}

.panel-copy p {
  margin: 0;
  color: rgba(0, 0, 0, 0.58);
  font-size: 11px;
  line-height: 1.45;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: stretch;
  gap: 8px;
  padding: 0 10px 14px;
}

.media-grid--stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 0 16px 32px;
}

.media-grid--masonry {
  display: block;
  columns: 2;
  column-gap: 10px;
  padding: 0 12px 18px;
}

.media-item,
.single-feature img {
  width: 100%;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  background: #deddd7;
}

.media-item {
  object-fit: contain;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  aspect-ratio: var(--media-ratio, auto);
}

.media-grid--masonry .media-item {
  width: 100%;
  height: auto;
  margin: 0 0 10px;
  break-inside: avoid;
  display: inline-block;
  vertical-align: top;
  object-fit: contain;
}

.media-item--landscape {
  aspect-ratio: var(--media-ratio, 16 / 9);
}

.media-item--portrait {
  width: min(100%, 340px);
  aspect-ratio: var(--media-ratio, 9 / 13);
  align-self: center;
  object-fit: contain;
  object-position: center top;
}

.media-item--video {
  object-fit: contain;
  background: #0b0b0c;
}

.media-item--phone {
  width: min(100%, 340px);
  max-height: none;
  aspect-ratio: var(--media-ratio, 9 / 16);
  justify-self: center;
  object-fit: contain;
  background: var(--surface-soft);
}

.single-feature {
  padding: 0 8px 10px;
}

.single-feature img {
  aspect-ratio: 1920 / 805;
  object-fit: cover;
  max-height: 24svh;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  grid-template-rows: auto 1fr;
  background: rgba(0, 0, 0, 0.94);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
}

.lightbox.is-open {
  display: grid;
}

.lightbox__stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 12px 34px 0;
}

.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 82svh;
  display: block;
  border-radius: var(--radius);
  background: #050506;
  object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: var(--radius);
}

.lightbox__close {
  justify-self: end;
  min-height: 36px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 58px;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.lightbox__nav--prev {
  left: 8px;
}

.lightbox__nav--next {
  right: 8px;
}

@media (max-width: 360px) {
  .intro__copy,
  .section-card__content {
    left: 18px;
    right: 18px;
  }

  .section-card {
    height: 142px;
    min-height: 142px;
    max-height: 142px;
  }

  .section-card__title {
    font-size: 17px;
    letter-spacing: 0.11em;
  }

  .section-card__cue {
    font-size: 8px;
  }
}

@media (min-width: 481px) {
  body {
    background:
      linear-gradient(90deg, #1d1e20, #050506 28%, #050506 72%, #1d1e20);
  }
}
