/* hyundai-gotc.css */

.js,
.js body {
  height: 100%;
  overflow: hidden;
}

.hyundai-page {
  background: #000;
  color: var(--off-white);
}

.viewport {
  position: fixed;
  inset: var(--frame-size);
  overflow: hidden;
}

.track {
  display: flex;
  height: 100%;
  width: max-content;
  transition: transform 1.5s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
}

.track.is-instant {
  transition: none;
}

.section {
  position: relative;
  flex: none;
  width: calc(100vw - var(--frame-size) * 2);
  height: 100%;
  overflow: hidden;
}

.section-inner {
  width: 100%;
  height: 100%;
  padding: 70px var(--gutter) 90px;
}

.divider-line {
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: rgba(240, 239, 232, .1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-smooth);
}

.section.in-view .divider-line {
  transform: scaleX(1);
}

/* =========================================================
   PROJECT LAYOUT
   ========================================================= */

.project-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-copy {
  flex: none;
  margin-bottom: 16px;
}

.section-headline {
  font: 700 clamp(22px, 2.2vw, 35px) / .95 var(--display);
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.section-kicker {
  margin-top: 10px;
  font: 500 clamp(14px, 1.3vw, 20px) / 1.1 var(--display);
}

.section-copy {
  max-width: 58em;
  margin-top: 12px;
  font: 400 clamp(10px, .75vw, 12px) / 1.55 var(--mono);
  color: rgba(240, 239, 232, .72);
}

/* =========================================================
   HEADLINE REVEAL
   ========================================================= */

.word-wrap {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
}

.word-space {
  display: inline-block;
  width: .26em;
}

.h-char {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 1.3s var(--ease-smooth);
  transition-delay: min(calc(var(--char-index, 0) * 22ms), 600ms);
}

.section.in-view .h-char {
  transform: translateY(0);
}

/* =========================================================
   HERO
   ========================================================= */

.section--overview {
  background: #000;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, .5),
    transparent 65%
  );
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: 88px;
  max-width: min(700px, 58vw);
}

.hero-copy-panel {
  padding: 22px 24px;
  background: rgba(0, 0, 0, .72);
}

.section--overview .section-headline {
  font-size: clamp(34px, 4.5vw, 72px);
}

/* =========================================================
   VIDEO
   ========================================================= */

.video-stage {
  width: min(
    80vw,
    calc((100vh - 210px) * 16 / 9)
  );
  max-width: 80%;
  aspect-ratio: 16 / 9;
  align-self: center;
  background: #080808;
}

.video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================================================
   IMAGE SECTION
   ========================================================= */

.image-stage {
  width: 80%;
  height: min(67vh, calc(80vw * 9 / 16));
  align-self: center;
  overflow: hidden;
}

.image-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-section:not(.section--overview) .project-copy {
  width: 80%;
  align-self: center;
  text-align: left;
}

/* =========================================================
   IMPACT IN NUMBERS
   ========================================================= */

#impact {
  background: #000;
  color: var(--off-white);
}

#impact .section-headline {
  color: var(--off-white);
}

.results {
  width: 80%;
  min-height: 55vh;
  align-self: center;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;

  /* remove blue box */
  background: transparent;
  color: var(--off-white);
}

.results div {
  padding: 28px;

  border-left: 1px solid rgba(240, 239, 232, .18);
}

.results strong {
  display: block;

  font:
    500
    clamp(58px, 7vw, 116px) / .8
    var(--display);

  color: var(--accent);
}

.results span {
  display: block;
  margin-top: 20px;

  font-family: var(--display);
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 500;
  line-height: 1.1;

  text-transform: uppercase;
  letter-spacing: .05em;

  color: var(--off-white);
}


/* =========================================================
   TEAM CENTURY GALLERY
   ========================================================= */

.gallery-shell {
  position: relative;
  width: 80%;
  align-self: center;
}

.gallery-view {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.gallery-view > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: calc(50% - 35px);
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.gallery-arrow--prev {
  left: -58px;
}

.gallery-arrow--next {
  right: -58px;
}

.gallery-open {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 9px 12px;
  border: 0;
  background: var(--accent);
  font: 600 9px var(--display);
  text-transform: uppercase;
  cursor: pointer;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.gallery-thumb {
  height: 48px;
  padding: 0;
  border: 1px solid transparent;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.is-active {
  border-color: var(--accent);
}

/* =========================================================
   CREDITS
   ========================================================= */

#credits {
  background: #000;
  color: var(--off-white);
}

#credits .divider-line {
  background: rgba(240, 239, 232, .15);
}

.credits-list {
  width: 80%;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
}

.credits-list div {
  padding: 17px 0;
  border-top: 1px solid rgba(240, 239, 232, .18);
}

.credits-list dt {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(240, 239, 232, .55);
}

.credits-list dd {
  margin-top: 7px;
  font: 500 15px var(--display);
  color: var(--off-white);
}

/* =========================================================
   PROJECT DOT NAVIGATION
   ========================================================= */

.project-nav {
  position: fixed;
  z-index: 250;
  top: 50%;
  right: calc(var(--frame-size) + 13px);
  transform: translateY(-50%);
}

.project-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.pt-item {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(240, 239, 232, .5);
  border-radius: 50%;
  font-size: 0;
  background: rgba(0, 0, 0, .25);
  transition: .3s;
}

.pt-item.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.35);
}

.pt-segment {
  width: 1px;
  height: 12px;
  background: rgba(240, 239, 232, .12);
  overflow: hidden;
}

.pt-segment::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .7s var(--ease-expo);
}

.pt-segment.is-filled::after {
  transform: scaleY(1);
}

.pt-segment.is-draining::after {
  transform: scaleY(0);
  transform-origin: bottom;
}

/* Bottom site navigation inherits from global.css. */

/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .94);
}

.lightbox > img {
  max-width: 86vw;
  max-height: 86vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 30px;
  width: 46px;
  height: 46px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
}

.lightbox-arrow--prev {
  left: 28px;
}

.lightbox-arrow--next {
  right: 28px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  font: 400 11px var(--mono);
  letter-spacing: .12em;
}

.lightbox-open {
  overflow: hidden;
}

/* =========================================================
   WORK
   ========================================================= */

.work {
  display: flex;
  flex-direction: column;
}

.work-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding:
    calc(var(--frame-size) + 24px)
    clamp(18px, 2.5vw, 40px)
    calc(var(--frame-size) + 64px);
}

.work-header {
  margin-bottom: clamp(8px, 1vw, 18px);
}

.work-title {
  font: 700 clamp(20px, 2.4vw, 40px) / 1.05 var(--display);
  text-transform: uppercase;
}

.work-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, .55vw, 9px);
}

/* =========================================================


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .js,
  .js body {
    height: auto;
    overflow: auto;
  }

  .viewport {
    position: relative;
    inset: auto;
  }

  .track {
    display: block;
    width: 100%;
    transform: none !important;
  }

  .section {
    width: 100%;
    height: auto;
    min-height: 100svh;
  }

  .section-inner {
    height: auto;
    min-height: 100svh;
    padding: 80px 22px;
  }

  .video-stage,
  .image-stage,
  .gallery-shell,
  .results,
  .credits-list {
    width: 100%;
    max-width: 100%;
  }

  .project-section:not(.section--overview) .project-copy {
    width: 100%;
  }

  .project-nav {
    display: none;
  }

  .gallery-arrow--prev {
    left: 8px;
  }

  .gallery-arrow--next {
    right: 8px;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(5, 1fr);
  }

  .results,
  .credits-list {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    left: 22px;
    right: 22px;
    bottom: 40px;
    max-width: none;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
}