*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 30;
  padding: 8px 12px; background: var(--bg); color: var(--text);
}
.skip:focus { top: 12px; }

/* Layout */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.side-right .shell { flex-direction: row-reverse; }
.main { flex: 1; min-width: 0; padding: var(--margin); }

/* Sidebar */
.side {
  flex: 0 0 248px;
  position: sticky; top: 0;
  align-self: flex-start;
  display: flex; flex-direction: column;
  width: 248px; height: 100vh; height: 100dvh;
  padding: 36px 24px 24px 36px;
  overflow-y: auto;
  background: var(--side-bg);
  color: var(--side-text);
}

.side-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: block; text-decoration: none; }
.brand img { max-height: 120px; width: auto; }
.brand-name {
  display: block;
  font-size: 22px; font-weight: 300; line-height: 1.15;
  letter-spacing: .16em; text-transform: uppercase;
}
.brand-tag {
  display: block; margin-top: 6px;
  font-size: 11px; font-weight: 400;
  letter-spacing: .24em; text-transform: uppercase;
  opacity: .62;
}

.nav { display: flex; flex: 1; flex-direction: column; margin-top: 44px; }

.nav-list li + li { margin-top: 12px; }
.nav-list a {
  display: inline-block;
  font-size: 16px;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .15s ease;
}
.nav-list a:hover { text-decoration-line: underline; text-decoration-color: currentColor; }
.nav-list a[aria-current="page"] {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
}

.nav-list--quiet { margin-top: 36px; }
.nav-list--quiet li + li { margin-top: 6px; }
.nav-list--quiet a { font-size: 14px; }
.nav-list--quiet a:not([aria-current="page"]) { opacity: .68; }
.nav-list--quiet a:hover { opacity: 1; }

.side-foot { margin-top: auto; padding-top: 32px; }
.social { display: inline-block; margin-bottom: 10px; opacity: .75; }
.social:hover { opacity: 1; }
.copyright { margin: 0; font-size: 12px; line-height: 1.4; opacity: .6; }

.menu-heading {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: .04em;
  opacity: .68;
}

.nav-list .is-open > a { font-weight: 500; }
.nav-sub { margin: 12px 0 4px; padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--side-text) 22%, transparent); }
.nav-sub li + li { margin-top: 8px; }
.nav-sub a { font-size: 15px; }

.menu-toggle {
  display: none;
  padding: 8px 0 8px 12px;
  border: 0; background: none; color: inherit;
  font: inherit; font-size: 14px;
  cursor: pointer;
}

/* Home */
.hero {
  position: relative;
  height: calc(100vh - 2 * var(--margin));
  height: calc(100dvh - 2 * var(--margin));
  min-height: 320px;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: var(--ratio);
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 7%, var(--bg));
}
.tile img, .tile video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .25s ease, transform .6s ease;
}
.tile:hover img, .tile:hover video { opacity: .9; transform: scale(1.015); }

.grid--natural { display: block; column-count: var(--cols); column-gap: var(--gap); }
.grid--natural .tile { aspect-ratio: auto; margin-bottom: var(--gap); break-inside: avoid; }
.grid--natural .tile img, .grid--natural .tile video { height: auto; }

.play {
  position: absolute; left: 50%; top: 50%;
  display: grid; place-items: center;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff;
}

.intro { max-width: 62ch; margin: 0 0 var(--margin); }
.empty { padding: 48px 0; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--bg); color: var(--text);
}
.lightbox::backdrop { background: var(--bg); }
.lightbox[open] { display: flex; flex-direction: column; }
.lb-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 64px 12px;
}
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-stage iframe { width: 100%; height: 100%; max-width: 1400px; border: 0; }
.lb-caption { min-height: 44px; padding: 0 64px 18px; font-size: 14px; text-align: center; }
.lb-caption strong { font-weight: 500; }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border: 0; background: none; color: inherit;
  font: inherit; font-size: 34px; font-weight: 300; line-height: 1;
  cursor: pointer;
  opacity: .7;
}
.lb-btn:hover { opacity: 1; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 8px; top: calc(50% - 24px); }
.lb-next { right: 8px; top: calc(50% - 24px); }

/* Text pages */
.prose-page { display: grid; gap: 32px; max-width: 1100px; }
.page-image { width: 100%; max-height: 62vh; object-fit: cover; }
.prose { max-width: 62ch; }
.prose h1 { margin: 0 0 20px; font-size: 28px; font-weight: 300; letter-spacing: .02em; line-height: 1.2; }
.prose p { margin: 0 0 16px; }

.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; max-width: 1000px; padding-top: 12px; }
.contact-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 24px 0 0; }
.contact-details dt { opacity: .62; }
.contact-details dd { margin: 0; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 4px; font-size: 14px; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--text) 30%, var(--bg));
  border-radius: 0;
  background: var(--bg); color: var(--text);
  font: inherit;
}
.field-trap { position: absolute; left: -9999px; }
.errorlist { margin-top: 4px; color: #b3261e; font-size: 14px; }
.notice { margin: 0 0 16px; padding: 10px 12px; border-left: 2px solid var(--accent); }
.button {
  padding: 10px 28px;
  border: 1px solid var(--text);
  background: var(--text); color: var(--bg);
  font: inherit;
  cursor: pointer;
}
.button:hover { background: var(--bg); color: var(--text); }

/* Smaller screens */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(var(--cols-md), minmax(0, 1fr)); }
  .grid--natural { column-count: var(--cols-md); }
}

@media (max-width: 760px) {
  .shell, .side-right .shell { display: block; }
  .side {
    position: sticky; top: 0; z-index: 10;
    width: auto; height: auto; max-height: 100dvh;
    padding: 12px 16px;
  }
  .js .menu-toggle { display: block; }
  .brand-name { font-size: 18px; }
  .brand-tag { margin-top: 3px; font-size: 10px; }
  .brand img { max-height: 76px; }
  .nav { margin-top: 20px; padding-bottom: 12px; }
  .js .nav:not(.is-open) { display: none; }
  .side-foot { padding-top: 24px; }
  .main { padding: min(var(--margin), 12px); }
  .grid { grid-template-columns: repeat(var(--cols-sm), minmax(0, 1fr)); }
  .grid--natural { column-count: var(--cols-sm); }
  .hero { height: 72dvh; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 12px 4px; }
  .prose { padding: 12px 4px; }
  .lb-stage { padding: 56px 8px 8px; }
  .lb-caption { padding: 0 16px 16px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
