/* Intro folder on a bare homepage visit. Scroll sends it up to reveal Work.
   Deep links and reduced motion skip this. A Type Media 9:16 story, when the
   file is present, sits in a matching well with object-fit: contain so the
   picture is not cropped. Bio copy stacks below the picture, never over it. */

html.landing-pending,
html.landing-pending body {
  background: var(--page-bg, #EFEFEF);
}

html.landing-pending body {
  overflow-x: hidden;
}

.landing-intro {
  display: none;
}

html.landing-pending .landing-intro {
  display: block;
  position: relative;
  z-index: 80;
  height: 220vh;
}

html.landing-pending .main-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.landing-intro-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.landing-intro-shell {
  position: relative;
  width: min(92vw, 889px, calc((100vh - 88px) * 889 / 1290.74));
  aspect-ratio: 889 / 1290.74;
  will-change: transform;
  pointer-events: auto;
  container-type: inline-size;
}

.landing-intro-folder {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--yellow-note, #FFFBCC);
  border-radius: 2px;
  clip-path: polygon(
    0 3.2%,
    0 0,
    15.55% 0,
    18.5% 3.2%,
    100% 3.2%,
    100% 100%,
    0 100%
  );
  z-index: 1;
}

.landing-intro-tab {
  display: none;
}

.landing-intro-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.landing-intro-tab-outline {
  display: none;
}

.landing-intro-body {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 7% 8% 10%;
  overflow: hidden;
  color: #000;
  font-family: 'NaN Rage Soft VF', var(--default-font-family, sans-serif);
}

.landing-intro-media {
  display: none;
}

.landing-intro-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.landing-intro-name {
  margin: 0 0 0.35em;
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 500;
  line-height: 1.05;
}

.landing-intro-copy p,
.landing-intro-body > p {
  margin: 0 0 0.85em;
  font-size: clamp(16px, 2.05vw, 24px);
  font-weight: 400;
  line-height: 1.32;
}

.landing-intro-copy p:last-child,
.landing-intro-body > p:last-child {
  margin-bottom: 0;
}

.landing-intro-now {
  font-weight: 500;
}

/* A print clipped onto the yellow folder — white mat, slight rotate, paperclip. */
.landing-intro--has-photo .landing-intro-body {
  overflow: visible;
}

.landing-intro-photo {
  position: relative;
  width: min(82%, 460px);
  margin: 0.2em auto 1.15em;
  padding: 7px 7px 18px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: 3px 4px 0 #000;
  transform: rotate(-6.4deg);
  z-index: 4;
}

.landing-intro-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  border: 1px solid #000;
}

.landing-intro--has-video .landing-intro-photo {
  display: none;
}

/* Photo + copy need a folder that can grow instead of the empty 889×1290 well. */
.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-shell {
  --tab-h: calc(41.29 / 889 * 100cqw);
  width: min(92vw, 520px, calc((100vh - 64px) * 0.7));
  max-height: calc(100vh - 48px);
  aspect-ratio: auto;
  height: auto;
  display: flex;
  flex-direction: column;
}

.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-folder {
  height: auto;
  display: flex;
  flex-direction: column;
  clip-path: polygon(
    0 var(--tab-h),
    0 0,
    15.55% 0,
    18.5% var(--tab-h),
    100% var(--tab-h),
    100% 100%,
    0 100%
  );
}

/* 1px silhouette around the tabbed folder, not a box around the body. */
.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--yellow-note, #FFFBCC);
  clip-path: polygon(
    0 var(--tab-h),
    0 0,
    15.55% 0,
    18.5% var(--tab-h),
    100% var(--tab-h),
    100% 100%,
    0 100%
  );
  filter:
    drop-shadow(1px 0 0 #000)
    drop-shadow(-1px 0 0 #000)
    drop-shadow(0 1px 0 #000)
    drop-shadow(0 -1px 0 #000);
  z-index: 0;
  pointer-events: none;
}

.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-tab {
  display: block;
  height: var(--tab-h);
  flex-shrink: 0;
}

.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-outline,
.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-tab-outline {
  display: none;
}

.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-body {
  height: auto;
  padding: 10px 8% 16px;
  overflow: visible;
  box-sizing: border-box;
}

.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-name {
  font-size: clamp(26px, 5vw, 40px);
}

.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-copy p {
  font-size: clamp(14px, 1.85vw, 17px);
  margin-bottom: 0.55em;
}

.landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-sticky {
  align-items: flex-start;
  padding: 40px 0 12px;
  box-sizing: border-box;
}

.landing-intro-copy a,
.landing-intro-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 2px;
  transition: background-color 160ms ease;
}

.landing-intro-copy a:hover,
.landing-intro-body a:hover {
  background: var(--blue-note, #CDEBFF);
}

.landing-intro-copy a:focus-visible,
.landing-intro-body a:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
  background: var(--blue-note, #CDEBFF);
}

/* Full 9:16 story below the tab. Tab height is a fraction of WIDTH so the
   clip-path cannot eat the picture when copy makes the folder taller. */
.landing-intro--has-video .landing-intro-shell {
  --tab-h: calc(41.29 / 889 * 100cqw);
  width: min(92vw, 340px, calc((100vh - 400px) * 9 / 16));
  max-height: calc(100vh - 48px);
  aspect-ratio: auto;
  height: auto;
  display: flex;
  flex-direction: column;
}

.landing-intro--has-video .landing-intro-folder {
  height: auto;
  display: flex;
  flex-direction: column;
  clip-path: polygon(
    0 var(--tab-h),
    0 0,
    15.55% 0,
    18.5% var(--tab-h),
    100% var(--tab-h),
    100% 100%,
    0 100%
  );
}

.landing-intro--has-video .landing-intro-tab {
  display: block;
  height: var(--tab-h);
  flex-shrink: 0;
}

.landing-intro--has-video .landing-intro-outline {
  display: none;
}

.landing-intro--has-video .landing-intro-tab-outline {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--tab-h);
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

.landing-intro--has-video .landing-intro-body {
  display: flex;
  flex-direction: column;
  height: auto;
  padding: 0;
  overflow: visible;
  box-shadow: inset 0 0 0 1px #000;
  box-sizing: border-box;
}

.landing-intro--has-video .landing-intro-media {
  display: block;
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--yellow-note, #FFFBCC);
  flex-shrink: 0;
}

.landing-intro--has-video .landing-intro-video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.landing-intro--has-video .landing-intro-copy {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  padding: 10px 7% 12px;
  background: var(--yellow-note, #FFFBCC);
  pointer-events: auto;
}

.landing-intro--has-video .landing-intro-name {
  font-size: clamp(20px, 4.2vw, 28px);
  margin-bottom: 0.25em;
}

.landing-intro--has-video .landing-intro-copy p {
  font-size: clamp(12px, 1.45vw, 14px);
  line-height: 1.28;
  margin-bottom: 0.4em;
}

.landing-intro--has-video .landing-intro-sticky {
  align-items: flex-start;
  justify-content: center;
  padding: 48px 0 12px;
  box-sizing: border-box;
}

.landing-intro--has-video .landing-intro-skip {
  top: 10px;
}

.landing-intro-skip {
  position: absolute;
  top: 16px;
  right: 16px;
  pointer-events: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #000;
  border-radius: 2px;
  background: var(--yellow-note, #FFFBCC);
  font-family: 'NaN Rage Soft VF', var(--default-font-family, sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: #000;
  cursor: pointer;
  z-index: 5;
  transition: background-color 160ms ease, transform 160ms var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}

.landing-intro-skip:hover {
  background: var(--yellow-note-dark, #F5F1A8);
}

.landing-intro-skip:active {
  transform: scale(0.97);
}

.landing-intro-skip:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.landing-intro-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  pointer-events: none;
  font-family: 'NaN Rage Soft VF', var(--default-font-family, sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: #000;
  opacity: 0.55;
}

html.landing-done .landing-intro {
  display: none;
}

@media (max-width: 900px) {
  .landing-intro-shell {
    width: min(94vw, calc((100vh - 72px) * 889 / 1290.74));
  }

  .landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-sticky {
    padding-top: 52px;
  }

  .landing-intro--has-photo:not(.landing-intro--has-video) .landing-intro-shell {
    width: min(90vw, calc((100vh - 72px) * 0.72));
  }

  .landing-intro--has-video .landing-intro-shell {
    width: min(88vw, calc((100vh - 280px) * 9 / 16));
  }

  .landing-intro-body {
    padding: 9% 7% 12%;
  }

  .landing-intro-photo {
    width: min(88%, 380px);
    transform: rotate(-5.2deg);
    margin-bottom: 1.3em;
  }

  .landing-intro--has-video .landing-intro-body {
    padding: 0;
  }

  .landing-intro-copy p,
  .landing-intro-body > p {
    font-size: clamp(14px, 2.4vw, 18px);
  }

  .landing-intro--has-video .landing-intro-copy p {
    font-size: clamp(12px, 2vw, 14px);
  }

  .landing-intro--has-video .landing-intro-copy {
    padding: 8px 7% 10px;
  }

  .landing-intro-skip {
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
  }
}

@media (max-width: 768px) {
  .landing-intro-copy p,
  .landing-intro-body > p {
    font-size: clamp(14px, 4.2vw, 18px);
  }

  .landing-intro--has-video .landing-intro-copy p {
    font-size: clamp(12px, 3.2vw, 14px);
  }

  .landing-intro--has-video .landing-intro-shell {
    width: min(88vw, calc((100vh - 320px) * 9 / 16));
  }
}
