:root {
  color-scheme: light;
  --content-width: 1518px;
  --page-pad: clamp(18px, 2vw, 36px);
  --radius: clamp(20px, 2.1vw, 34px);
  --shadow: 0 14px 25px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }

html { background: #fff; }

body {
  margin: 0;
  min-width: 320px;
  background: #fff;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(48px, 5.6vw, 86px) var(--page-pad) clamp(54px, 5vw, 82px);
}

.brand-mark {
  display: block;
  width: clamp(220px, 23vw, 350px);
  max-height: 145px;
  object-fit: contain;
}

.tagline {
  margin: 12px 0 20px;
  font-size: clamp(17px, 1.45vw, 25px);
  font-weight: 400;
  letter-spacing: -.025em;
}

.tagline span { padding: 0 .16em; font-weight: 700; }

.mail-button {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  background: #000;
  color: #fff;
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.mail-button svg {
  width: 39px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mail-button:hover,
.mail-button:focus-visible {
  color: #000;
  background: transparent;
  outline: none;
  transform: scale(1.05);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(34px, 3.1vw, 58px) clamp(28px, 2.6vw, 48px);
  width: min(calc(100% - (2 * var(--page-pad))), var(--content-width));
  margin: 0 auto;
}

.portfolio-card {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: #111;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.portfolio-card:hover,
.portfolio-card:focus-visible {
  z-index: 1;
  outline: none;
  transform: translateY(-4px);
  box-shadow: 0 19px 32px rgba(0, 0, 0, .23);
}

.portfolio-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-footer {
  display: flex;
  min-height: 325px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 38px;
  padding: 72px var(--page-pad) 48px;
  text-align: center;
}

.site-footer p { margin: 0; font-size: 13px; }

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: #fff;
}

.lightbox::backdrop { background: #000; }

.lightbox-shell { position: relative; width: 100%; height: 100%; }

.lightbox-content {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(250px, .72fr);
  gap: clamp(34px, 4vw, 80px);
  width: min(88vw, 1540px);
  height: 100%;
  margin: 0 auto;
  align-items: center;
}

.video-stage {
  display: grid;
  min-height: 0;
  place-items: center;
}

.project-video {
  display: block;
  width: 100%;
  max-height: 78vh;
  background: #000;
  object-fit: contain;
}

.project-copy { align-self: center; padding-right: 18px; }

.project-count {
  margin: 0 0 18px;
  color: #aaa;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.project-copy h2 {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.project-description {
  max-width: 38ch;
  margin: 24px 0 0;
  color: #ddd;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.55;
}

.lightbox-toolbar {
  position: absolute;
  z-index: 4;
  top: max(18px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
}

.icon-button,
.nav-button {
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  cursor: pointer;
}

.icon-button { width: 48px; height: 48px; border-radius: 50%; }
.icon-button svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.icon-button:hover,
.icon-button:focus-visible,
.nav-button:hover,
.nav-button:focus-visible { background: #fff; color: #000; outline: none; }

.nav-button {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 52px;
  height: 72px;
  font: 300 58px/1 Georgia, serif;
  transform: translateY(-50%);
}

.nav-button--prev { left: 0; }
.nav-button--next { right: 0; }

body.lightbox-open { overflow: hidden; }

@media (max-width: 760px) {
  :root { --page-pad: 28px; --radius: 28px; }
  .site-header { padding-top: 68px; padding-bottom: 64px; }
  .brand-mark { width: min(78vw, 330px); }
  .tagline { margin-top: 12px; font-size: clamp(18px, 5vw, 23px); }
  .mail-button { width: 70px; height: 70px; }
  .gallery { grid-template-columns: 1fr; gap: 54px; width: min(calc(100% - 56px), 530px); }
  .site-footer { min-height: 420px; padding-top: 90px; }

  .lightbox { overflow-y: auto; }
  .lightbox-shell { min-height: 100%; }
  .lightbox-content {
    display: flex;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    flex-direction: column;
    gap: 26px;
    padding: max(88px, calc(env(safe-area-inset-top) + 68px)) 24px 92px;
    align-items: stretch;
    justify-content: center;
  }
  .project-video { max-height: 55vh; }
  .project-copy { padding: 0 14px; }
  .project-count { margin-bottom: 12px; }
  .project-copy h2 { font-size: clamp(24px, 7vw, 34px); }
  .project-description { margin-top: 16px; }
  .nav-button { position: fixed; top: auto; bottom: 12px; width: 54px; height: 54px; border-radius: 50%; transform: none; }
  .nav-button--prev { left: 18px; }
  .nav-button--next { right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
