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

.porsche-launch-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;
  background: #000;
}

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


/* =========================================================
   DIVIDER
   ========================================================= */

.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);
}


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

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

.project-copy {
  width: 80%;
  align-self: center;
  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 {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.hero-media::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      0deg,
      rgba(0, 0, 0, .62) 0%,
      rgba(0, 0, 0, .28) 45%,
      transparent 72%
    );
}


/* Main hero copy position */

.hero-copy {
  position: absolute;
  z-index: 2;

  left: var(--gutter);
  bottom: 120px;

  width: min(720px, 60vw);
  max-width: calc(100vw - var(--gutter) * 2);
}


/* Transparent black panel */

.hero-copy-panel {
  padding: 22px 24px;

  background: rgba(0, 0, 0, .72);
}


/* Hero headline */

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


/* Client / collaboration line */

.section--overview .section-kicker {
  margin-top: 12px;

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


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

.hero-description {
  max-width: 620px;

  margin-top: 18px;
}

.hero-description p {
  margin: 0;

  font-family: var(--mono);
  font-size: clamp(11px, .8vw, 13px);
  font-weight: 400;
  line-height: 1.6;

  color: rgba(240, 239, 232, .8);
}

.hero-description p + p {
  margin-top: 10px;
}

.hero-description strong {
  font-weight: 600;

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


/* Also support section-copy if the old hero HTML
   is still using that class */

.section--overview .section-copy {
  max-width: 620px;

  font-size: clamp(11px, .8vw, 13px);
  line-height: 1.6;

  color: rgba(240, 239, 232, .8);
}

.section--overview .section-copy strong {
  font-weight: 600;

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


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

.video-stage {
  width:
    min(
      80vw,
      calc((100vh - 220px) * 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;

  background: #080808;
}


/* =========================================================
   THE CODE + PRESS & AWARDS
   ========================================================= */

.image-stage {
  width: 80%;

  height:
    min(
      62vh,
      calc(80vw * 9 / 16)
    );

  align-self: center;

  margin: 0;

  overflow: hidden;

  background: #111;
}

.image-stage img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}


/* =========================================================
   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(4, 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: 7px 0 0;

  font:
    500
    15px
    var(--display);

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


/* =========================================================
   RIGHT-HAND PROJECT DOT NAV
   ========================================================= */

.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 {
  display: block;

  width: 9px;
  height: 9px;

  padding: 0;

  border:
    1px solid
    rgba(240, 239, 232, .5);

  border-radius: 50%;

  font-size: 0;

  background: rgba(0, 0, 0, .25);

  transition:
    transform .3s ease,
    background .3s ease,
    border-color .3s ease;
}

.pt-item:hover {
  transform: scale(1.4);

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

.pt-item.is-active {
  background: var(--accent);

  border-color: var(--accent);

  transform: scale(1.35);
}

.pt-segment {
  width: 1px;
  height: 14px;

  overflow: hidden;

  background: rgba(240, 239, 232, .12);
}

.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;
}


/* =========================================================
   MAIN PORTFOLIO NAV
   ========================================================= */

.site-nav {
  position: fixed;

  z-index: 200;

  left: var(--frame-size);
  right: var(--frame-size);
  bottom: var(--frame-size);

  padding:
    20px
    var(--gutter);
}

.nav-timeline {
  position: absolute;

  left: 50%;
  bottom: 20px;

  transform: translateX(-50%);

  display: flex;
  align-items: center;

  width: 60vw;
}

.tl-item {
  padding: 2px 8px;

  text-decoration: none;
}

.tl-label {
  font:
    500
    13px
    var(--display);

  letter-spacing: .12em;

  text-transform: uppercase;

  color: rgba(240, 239, 232, .4);
}

.tl-item:hover .tl-label {
  color: var(--off-white);
}

.tl-item.is-active {
  background: var(--accent);
}

.tl-item.is-active .tl-label {
  color: #000;
}

.tl-segment {
  flex: 1;

  height: 1px;

  margin: 0 4px;

  background: rgba(240, 239, 232, .12);
}


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

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

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

  width: 100%;
  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;

    overflow: visible;
  }

  .track {
    display: block;

    width: 100%;
    height: auto;

    transform: none !important;
  }

  .section {
    width: 100%;

    height: auto;
    min-height: 100svh;
  }

  .section-inner {
    height: auto;
    min-height: 100svh;

    padding:
      80px
      22px;
  }

  .project-copy,
  .video-stage,
  .image-stage,
  .credits-list {
    width: 100%;
    max-width: 100%;
  }

  .video-stage {
    aspect-ratio: 16 / 9;
  }

  .image-stage {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .project-nav,
  .site-nav {
    display: none;
  }


  /* HERO MOBILE */

  .section--overview {
    min-height: 100svh;
  }

  .hero-copy {
    left: 22px;
    right: 22px;
    bottom: 40px;

    width: auto;
    max-width: none;
  }

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

  .section--overview .section-headline {
    font-size:
      clamp(
        30px,
        10vw,
        54px
      );
  }

  .hero-description {
    max-width: none;

    margin-top: 14px;
  }

  .hero-description p,
  .section--overview .section-copy {
    font-size: 11px;
    line-height: 1.5;
  }


  /* CREDITS */

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


  /* WORK */

  .work-main {
    min-height: 100svh;
  }

  .work-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    grid-template-rows: auto;
  }

}

/* =========================================================
   PORSCHE TAYCAN — PRINT / OOH
   ========================================================= */
.ad-gallery-shell { width:80%; min-width:0; min-height:0; flex:1; align-self:center; display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; gap:clamp(10px,1.2vw,20px); }
.ad-gallery { min-width:0; display:flex; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scroll-behavior:smooth; overscroll-behavior-x:contain; scrollbar-width:none; }
.ad-gallery::-webkit-scrollbar { display:none; }
.ad-card { flex:0 0 100%; width:100%; height:min(62vh,640px); margin:0; overflow:hidden; scroll-snap-align:start; scroll-snap-stop:always; background:#000000; }
.ad-card img { display:block; width:100%; height:100%; object-fit:contain; }
.gallery-arrow { display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:1px solid currentColor; border-radius:50%; color:inherit; background:transparent; cursor:pointer; font:inherit; transition:opacity .3s ease,transform .3s ease,background .3s ease; }
.gallery-arrow:hover { transform:scale(1.08); background:rgba(240,239,232,.08); }
.gallery-arrow:disabled { opacity:.25; cursor:default; transform:none; }
@media (max-width:900px) { .ad-gallery-shell { width:100%; max-width:100%; flex:none; grid-template-columns:1fr; } .gallery-arrow { display:none; } .ad-card { height:auto; min-height:0; } .ad-card img { height:auto; } }
