/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes lbIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lineUp {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}
@keyframes introOut {
  to { opacity: 0; visibility: hidden; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #999;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.muted-small {
  font-size: 13px;
  color: #ccc;
}

/* ==========================================================================
   Intro screen
   ========================================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: introOut 0.7s cubic-bezier(.4, 0, .2, 1) 1.9s forwards;
}

.intro.is-done {
  display: none;
}

.intro-title {
  margin: 0;
  text-align: center;
  font-size: clamp(44px, 11vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding: 0.1em 0.08em 0.28em 0;
  margin: -0.1em -0.08em -0.28em 0;
}

.line-inner {
  display: block;
  animation: lineUp 1s cubic-bezier(.22, .9, .25, 1) both;
}

.line-inner--1 { animation-delay: .15s; }
.line-inner--2 { animation-delay: .27s; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #f0f0f0;
}

.logo {
  font-size: 14px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.contact-link {
  font-size: 14px;
  color: #999;
  transition: color .25s ease;
}

.contact-link:hover {
  color: #000 !important;
}

/* ==========================================================================
   Hero + marquee
   ========================================================================== */

.hero {
  padding: 0 0 96px;
}

.hero-video {
  display: block;
  width: 98vw;
  aspect-ratio: 16 / 9;
  border: 0;
  margin: 0 auto;
}

.marquee {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.marquee.is-dragging {
  cursor: grabbing;
}

.marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  will-change: transform;
}

.marquee-item {
  flex: 0 0 clamp(380px, 56vw, 900px);
}

.marquee-thumb {
  aspect-ratio: 16 / 9;
  background-color: #ededed;
  background-image: var(--thumb-bg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: #b5b5b5;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  user-select: none;
}

.marquee-item:nth-child(even) .marquee-thumb {
  background-color: #e6e6e6;
}

.marquee-hint {
  margin: 16px auto 0;
}

.hint-text {
  font-size: 12px;
  color: #ccc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-size: clamp(34px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
  animation: fadeUp .8s cubic-bezier(.22, .9, .25, 1) 2.3s both;
}

.hero-desc {
  margin: 24px 0 0;
  font-size: clamp(15px, 2.2vw, 20px);
  line-height: 1.45;
  color: #999;
  max-width: 34ch;
  text-wrap: pretty;
  animation: fadeUp .8s cubic-bezier(.22, .9, .25, 1) 2.42s both;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section-hero-desc {
  padding-bottom: 112px;
}

.section-projects {
  padding-bottom: 120px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 40px;
}

/* ==========================================================================
   Projects grid
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 48px 32px;
}

.project-card {
  display: block;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}

.project-card.is-revealed {
  opacity: 1;
  transform: none;
}

.project-thumb-wrap {
  overflow: hidden;
  background: #f2f2f2;
}

.project-thumb {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ededed;
  background-image: var(--thumb-bg);
  background-position: center;
  background-size: cover;
  transition: transform .6s cubic-bezier(.2, .7, .3, 1);
}

.project-thumb.project-thumb-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-card:hover .project-thumb {
  transform: scale(1.035) !important;
}

.project-title {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-desc {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #999;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .35s ease, transform .35s ease;
}

.project-desc.is-visible {
  opacity: 1;
  transform: none;
}

.project-card:hover .project-desc {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid #eee;
  padding: 96px 24px 10px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
  align-items: center;
}

.email-link {
  font-size: clamp(24px, 4.5vw, 44px);
  letter-spacing: -0.035em;
  font-weight: 500;
  transition: color .25s ease;
}

.email-link:hover {
  color: #999 !important;
}

.social-links {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #5e5e5e;
  transition: color .25s ease;
}

.social-link:hover {
  color: #000 !important;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #f2f2f2;
  font-size: 12px;
  color: #ccc;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Project detail page
   ========================================================================== */

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 13px;
  color: #999;
  transition: color .25s ease;
}

.back-link:hover {
  color: #000;
}

.project-hero {
  padding: 56px 24px 48px;
}

.project-hero-eyebrow {
  display: block;
  margin-bottom: 16px;
}

.project-hero-title {
  margin: 0;
  font-size: clamp(34px, 7vw, 57px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
}

.project-hero-desc {
  margin: 24px 0 0;
  font-size: clamp(15px, 2.2vw, 20px);
  line-height: 1.45;
  color: #999;
  max-width: 60ch;
  text-wrap: pretty;
}

.project-video {
  padding-bottom: 64px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-gallery {
  padding-bottom: 96px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.gallery-img {
  display: block;
  width: 100%;
  height: auto;
  background: #ededed;
}

.project-info {
  padding-bottom: 96px;
}

.project-info-grid {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}

.project-credits-col {
  flex: 0 0 435px;
}

.project-description-col {
  flex: 1;
  min-width: 0;
}

.project-description-col p {
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: #101010;
  max-width: 68ch;
  text-wrap: pretty;
}

.credits-list {
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.credits-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 14px;
}

.credits-row dt {
  color: #999;
}

.credits-row dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

@media (max-width: 720px) {
  .project-info-grid {
    flex-direction: column;
    gap: 40px;
  }

  .project-credits-col {
    flex-basis: auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .social-links {
  justify-content: center;
}

.site-footer {
  padding: 46px 24px 10px;
  text-align: center;
}

.project-info {
    padding-bottom: 16px;
}

}

.project-next {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 48px;
  padding-bottom: 96px;
  border-top: 1px solid #eee;
}

.project-next-title {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  transition: color .25s ease;
}

.project-next:hover .project-next-title {
  color: #999;
}

.project-nav {

  margin: 120px auto 0;
  padding: 0 24px;
}

.project-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  background: #eee;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.project-nav-link {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 8px;
  background: #fff;
}

.project-nav-link--next {
  flex-direction: row-reverse;
  text-align: right;
}

.project-nav-arrow {
  flex: 0 0 auto;
  stroke: #999;
  transition: transform .45s cubic-bezier(.2, .7, .3, 1), stroke .3s ease;
}

.project-nav-thumb {
  flex: 0 0 96px;
  aspect-ratio: 16 / 9;
  background-color: #ededed;
  background-image: var(--thumb-bg);
  background-position: center;
  background-size: cover;
  opacity: 0.42;
  filter: grayscale(1);
  transition: opacity .45s ease, filter .45s ease;
}

.project-nav-text {
  min-width: 0;
}

.project-nav-label {
  display: block;
  font-size: 11px;
  color: #ccc;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-nav-title {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #999;
  transition: color .3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-nav-link:hover .project-nav-thumb {
  opacity: 1;
  filter: none;
}

.project-nav-link:hover .project-nav-title {
  color: #000;
}

.project-nav-link:hover .project-nav-arrow {
  stroke: #000;
}

.project-nav-link:not(.project-nav-link--next):hover .project-nav-arrow {
  transform: translateX(-4px);
}

.project-nav-link--next:hover .project-nav-arrow {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .project-nav-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-nav-link,
  .project-nav-link--next {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 8px;
    padding: 20px 12px;
  }

  .project-nav-arrow {
    display: none;
  }

  .project-nav-text {
    display: contents;
  }

  .project-nav-label {
    order: 1;
  }

  .project-nav-thumb {
    order: 2;
    width: 100%;
    flex: none;
  }

  .project-nav-title {
    order: 3;
    white-space: normal;
    text-overflow: initial;
  }
}
